Skip to content

Evaluation and modelsChecklist

Porting a prompt between GPT, Claude and Gemini: a checklist

A prompt that works on one model family rarely works unchanged on another. This checklist covers what to change when you port it for failover or a price move: system prompt placement, sampling and stop settings, structured output, tool schemas and cache layout. It ends with a small eval that tells you whether the port holds.

By INFRO Editorial

Published

9 min read

A single amber path on a dark ground forking into two glass branches of slightly different brightness

In short

Port a prompt in five passes (system prompt placement, sampling and stop settings, structured output, tool schemas, cache layout), then run the old and new model side by side on a small dataset you wrote down before the port. Vendors say a technique measured on one model must be re-tested on another against your own evals 1.

Key takeaways

  • A port changes five things you can list: system prompt placement, sampling and stop settings, structured output, tool schemas and cache layout.
  • Anthropic connections drop response_format on INFRO today, so a prompt that relied on strict json_schema needs a prompt-described shape or a single tool plus your own validation.
  • Keep the stable prefix (system prompt, tools, history) first and byte-identical, because providers cache by prefix and a cache does not follow you to another provider.
  • Write the eval set and pass rules before you edit the prompt, and run the incumbent model as a variant in the same run so the comparison is paired.
  • Judge a port per slice and per failure kind (schema validity, tool arguments, truncation, refusals), not by one average score.

What actually changes when you port a prompt

A prompt is more than its words. It is the words, where they sit in the request, the sampling settings, the output contract and the tool definitions around them. A port changes some of those on purpose and others by accident.

Anthropic's own guidance is blunt about this: a technique that names a model was measured on that model, and before you apply it to another model you should test it against your own evaluations.1 The same holds in reverse. Treat every habit your prompt picked up on the old model, such as a shouted rule or a particular example format, as unproven on the new one.

This checklist is for two situations: failover, where a second family must answer when the first is down, and a price move, where you want to run the same job on a different family. Both need the same discipline. The tokenizer and bill effects are covered in the tokenizer post and the fallback quality question in the fallback equivalence post. This one covers the prompt itself and how to check the port.

The order matters. Freeze the eval first (last section), then work through the five passes below.

  • Eval set and pass rules written before any prompt edit
  • System prompt placement checked per API shape
  • Sampling, length and stop settings re-chosen, not copied
  • Structured output path chosen per family
  • Tool schemas and tool-result handling tested
  • Cache layout rebuilt for the new provider

Pass 1: system prompt placement and structure

Start with where the instructions go. In the OpenAI chat shape the system prompt is a message with the system role inside messages, as in INFRO's own request examples.2 In Anthropic's Messages API the system prompt is a separate top-level system field, and the messages array carries only the conversation.1 If your code builds one list and posts it unchanged, a port that bypasses a translating layer will silently drop or misplace your instructions. Put the translation in one function and unit-test it with a prompt that contains a unique marker sentence.

Then look at structure. Anthropic recommends wrapping instructions, context, examples and inputs in consistent XML tags, giving 3–5 diverse examples inside <example> tags, and setting a role in the system prompt.1 None of that hurts on other families, but none of it is proof the other family needs it either. Port the content first, restructure second, and test each change on its own.

For long inputs, Anthropic advises putting long documents at the top, above the query, with the query at the end; it reports that this can improve response quality by up to 30 percent in its tests.1 That fits a cache-friendly layout too (see pass 5): static instructions and documents first, the per-request question last.

Two further habits to review:

  • Emphasis. Rules written in capitals for one model may be over-weighted by another. Anthropic suggests giving the reason behind an instruction, since the model can generalise from it.1 Rewrite "NEVER do X" as "do not do X because Y" and test it.
  • Self-reference. Prompts that name the model ("You are GPT…") or quote its model string need editing. Ported text that names the wrong model is a common, visible bug.

Pass 2: sampling, length and stop settings

Do not copy sampling values across families. A temperature of 0.7 is not a portable quantity: the scale, the default and the interaction with other settings are the vendor's. Read each vendor's reference for the model you are porting to, and choose the value by testing. INFRO's experiments let a variant carry temperature, top_p, max_tokens and seed as params, so you can compare settings on the same dataset.3 Do not assume a seed gives identical output across families, or even across snapshots of one family.

Length settings are the ones that bite in production. Token counts differ by tokenizer, so the same max_tokens can cut an answer off on one model and not on another; see the output token cap post. Add a truncation check to your eval: count answers that end because of the length limit, per model.

For stop sequences, re-test any that your parser depends on. A stop string that worked because the old model always wrote a particular header may never appear in the new model's output, and the answer will then run on. If you can, replace stop-sequence parsing with a structured contract (next pass).

Finally, check reasoning or effort settings. Anthropic's model pages describe effort calibration as a model-specific difference.1 Treat "reasoning effort" as a setting that must be re-chosen for the new model, and record the spend it causes, because thinking tokens bill as output on most providers.

Pass 3: structured output

This is where ports fail loudest, because a parser throws.

INFRO's text endpoint accepts the standard response_format modes. json_object gives syntactically valid JSON with no guarantee about keys. json_schema with strict: true constrains output to your schema, but only on models whose vendor supports it, and INFRO does not yet record that per model.2 On Anthropic connections INFRO drops response_format, so the reply is ordinary text; for JSON from Claude models, the page suggests describing the shape in the prompt, or using tool calling with a single tool whose parameters are your schema, then validating the result.2

That gives a concrete rule for the port: if the old path was strict json_schema, the new Claude path is either prompt-described JSON or a single-tool call, and neither is a guarantee. Add a validator and a retry or a failure branch.

validate_port.py
import json
from jsonschema import validate, ValidationError

def parse_reply(text: str, schema: dict):
    """Return (obj, error_kind). error_kind is None when the reply is valid."""
    try:
        obj = json.loads(text)
    except json.JSONDecodeError:
        return None, "not_json"          # prose, code fences, trailing text
    try:
        validate(obj, schema)
    except ValidationError:
        return None, "schema_violation"  # wrong keys, types or enum values
    return obj, None

Count not_json and schema_violation separately in the eval. They have different fixes: the first is an instruction problem, the second a schema or example problem.

Also note two details from the strict-mode rules: set additionalProperties: false on every object and list every property in required, using nullable types for optional fields.2 A schema relaxed for one family may fail on the other. For json_object, most providers reject the request unless the word "JSON" appears in your messages.2 A ported prompt that lost that word will fail with a 400, not a bad answer.

Pass 4: tool schemas and tool results

Through INFRO every tool-capable model takes the same OpenAI tools and tool_choice schema. Most provider kinds speak that protocol, and for Anthropic connections INFRO translates tools, tool_choice, tool calls and tool results to and from Anthropic's tool_use blocks.4 If you call providers directly rather than through a translating layer, you own that mapping, and the tests below matter more.

What still differs is behaviour, not shape. INFRO does not record tool support per model, so you must check the vendor's documentation and test at integration time; capability sets differ between a vendor's flagship and its small models.4 A provider that rejects the tools parameter returns a 400 with its own message.4

Test these on the new model:

  1. Tool selection. Does it call the right tool, and no tool when none is needed? Tool descriptions are what the model leans on; write them for the model.4
  2. Argument fidelity. Compare arguments to the expected JSON, field by field. Flat schemas with enum and per-property descriptions improve argument quality.4
  3. Parallel calls. Does the new model emit several tool_calls in one turn, and does your loop return one result per call?
  4. Loop termination. Does it stop calling tools once it has what it needs? Bound the loop either way; see mid-run failover for what state a switch mid-run does to you.

If you used a single tool to force JSON on Claude, remember it is still a tool call: your code must read arguments, not message content.

Pass 5: cache layout

Providers cache by prefix, and they differ in how a cache starts. INFRO's caching notes describe OpenAI caching as automatic once the prompt passes a minimum prefix length of roughly 1,024 tokens, Anthropic caching as explicit cache_control breakpoints, and DeepSeek and Google as automatic on supported models. The same page gives ballpark read rates of about 0.1× the input rate, with Anthropic writes at 1.25× for a five-minute entry and 2× for an hour, and warns that providers change these over time.5

So a port from an automatic-cache family to Anthropic gets no caching until you add breakpoints, and the layout rule is the same on both: stable material first, variable material last. INFRO's tool-calling page puts it as system prompt first, then tools, then history, with the tools array byte-stable between requests.4 Timestamps, request ids or user names near the top of the system prompt break the prefix on every request.

Two failover consequences. First, caches live with the upstream that served the request, so hits depend on consecutive requests reaching the same connection.5 A failover to another provider starts with no warm prefix there, so expect the first requests after a switch to bill at the ordinary input rate. Second, break-even changes with the write multiplier; see the cache break-even post before adding breakpoints for traffic that is thin.

Check the port with a small eval

Anthropic's guidance starts from the same place: define success criteria and have a way to test against them before tuning a prompt.6 Do that before editing, not after.

  1. Build the set. Take 40–100 real inputs from logs, stratified by the slices that matter (a long-document case, an empty-result case, a tool-needed case, a refusal-prone case). Add the five worst failures you remember. How many cases you need depends on how small a drop you must detect.
  2. Write pass rules per field. Exact match for classification labels, schema validity for JSON, expected tool and arguments for tool cases, a rubric for free text.
  3. Run old and new together. Put the incumbent model and prompt as one variant and the port as another, on the same dataset. INFRO experiments run a dataset through up to six variants (a model or route, a prompt version, settings) and judge answers with evaluators.3 Pairing means a hard case is hard for both, so differences are about the port.
  4. Estimate before spending. An experiment's dry run reports the request count, with one judge call per evaluator on every answer, and the estimated provider cost; a model with no known rate is listed as unpriced rather than as $0.3 The judge calls are real requests on your provider account.
  5. Read failures, not means. Break results by slice and by failure kind.

A small set detects large regressions, not fine ones. Run the winner at a small share of live traffic next, and keep a rollback ready; see rolling back a model migration.

Keeping the port reviewable

Keep the old and new prompt as two versions of one prompt, not two copies in code. INFRO's prompt management keeps versioned prompts with labels such as production, applied by the gateway before routing, with the version recorded on every request,7 and datasets, experiments and evaluators are available on every plan. Those features make the comparison above a configuration, not a script. They are optional; the checklist works with any harness that records the model, the prompt version and each case result.

Whatever you use, record per run: model id and snapshot, prompt version, sampling params, schema version and the dataset version. A port you cannot reproduce is one you cannot trust during an incident. The text endpoint is OpenAI-shaped at https://api.infro.io/v1, so pointing the same eval client at different models is a model-string change.7

Questions readers ask

Can I keep one prompt for all three families?
Sometimes, for short prompts with plain-text output. Once you depend on strict JSON, tool calls or a cache, expect a per-family variant of at least the system prompt layout and the output instructions. Keep the variants as versions of one prompt so the diff is reviewable.
Should the judge model be one of the models under test?
Prefer a judge outside the pair you compare, and give it a rubric tied to your pass rules. A judge that shares a family with one candidate can favour its style. Check the judge against a handful of human-labelled cases first.

From the team that builds it

Where this shows up in INFRO

INFRO is a control plane in front of the provider accounts you already hold. The capabilities below are the parts of it this article touches, each with the documentation that defines its behaviour.

  • Experiments

    Available with a plan

    A dataset run through the gateway across up to six variants (a model or route, a prompt version, settings), judged by your evaluators and compared side by side, with the request count and estimated provider cost shown before it starts and a spend cap it stops at. On every plan.

  • Datasets

    Available with a plan

    Inputs and expected outputs built from logged requests in one click, uploaded as JSONL or CSV, or sent from code, kept until you delete them. On every plan.

  • Evaluators

    Available with a plan

    A rubric a chat model judges answers by, on your own provider account: a sample of live traffic held to a monthly spend limit, or up to 1,000 logged requests on demand with an estimate first and a spend cap. Each verdict is a score on the request it judged, and each judge call is a request on your provider, counted against your allowance. On every plan.

  • Prompt management

    Available with a plan

    Versioned prompts with labels such as production, filled and applied by the gateway on chat completions, Messages and Responses requests before routing, guardrails and spend checks, with the version recorded on every request. A protected label is moved only by a person in the console. On every plan.

  • Text — OpenAI-compatible

    Available with a plan

    POST /v1/chat/completions with the request shape the OpenAI SDKs already send, including streaming and tool calling.

    Read the documentation for Text — OpenAI-compatible

INFRO accounts are self-serve. Provider usage is billed to you by your providers; INFRO charges a software subscription and takes 0% of model spend. See plans.

Sources

Numbered in order of first citation. Each was opened and checked against the claim on the date shown.

  1. 1.Prompting best practices (opens in a new tab) — Anthropic (Claude Platform Docs). Accessed Dec 1, 2026.
  2. 2.Structured outputs (opens in a new tab) — INFRO Docs. Accessed Dec 1, 2026.
  3. 3.Experiments (opens in a new tab) — INFRO Docs. Accessed Dec 1, 2026.
  4. 4.Tool calling (opens in a new tab) — INFRO Docs. Accessed Dec 1, 2026.
  5. 5.Prompt caching (opens in a new tab) — INFRO Docs. Accessed Dec 1, 2026.
  6. 6.Prompt engineering overview (opens in a new tab) — Anthropic (Claude Platform Docs). Accessed Dec 1, 2026.
  7. 7.INFRO documentation (opens in a new tab) — INFRO Docs. Accessed Dec 1, 2026.

About this article

Read on 2026-12-01: Anthropic's prompt engineering overview and prompting best practices, and INFRO's docs overview and its structured outputs, tool calling, prompt caching and experiments pages. OpenAI's prompt engineering page returned navigation only and Google's Gemini pages returned no text, so no OpenAI- or Gemini-specific parameter, schema or caching claim is made here; check those against each vendor's own reference.

Last checked against its sources on . The next review is due by . No separate named reviewer is recorded for this article.

How articles are written, sourced and corrected is set out in the editorial standards.