# When switching models, only rewrite three types of paragraphs in the prompt

Date: 2026-04-14
Category: Technology
Tags: Prompt, Model Migration, LLM
Summary: Split the prompt into three layers—contract, examples, and patches: migrate the contract as is, rerun and verify the examples, and delete style and patches one by one. Include the chunking method and regression order.

When migrating a prompt for ticket summaries, the first version is easy to copy wholesale. The summary gets longer, no fields are missing, but "urgency" starts to drift: for the same ticket, the old model says high, the new model says medium, and the reasoning sounds plausible. At this point it's tempting to blame the model's capability, but looking back at the prompt reveals that the closing line "please judge carefully and do not over-escalate" was just a small patch on the old model, yet became a hard constraint on the new one. Delete that line, add an explicit decision rule, and the output stabilizes.

After this, when migrating a prompt I no longer ask "should I rewrite it" but first ask "what is this text doing."

## First distinguish contract, examples, and patches

I usually split a prompt into four parts, but only three need genuinely different treatment during migration.

**Contract** is the task definition, input/output, field enums, units, null semantics, refusal boundaries. They carry business semantics, should not change when switching models, and should be moved as-is.

**Examples** include few-shot, reference outputs, counterexamples. The content can stay, but the count, order, and format must all be re-validated, not blindly copied.

**Style and patches** refer to role setting, tone, format nudges, chain-of-thought inducement, and prohibitions added specifically for some flaw in the old model. This category is the least suitable for copying as-is.

The fourth part is runtime parameters: temperature, max tokens, stop, JSON mode, tool schema (the parameter definitions for tool calls). They don't count as prompt, but they often get changed together with it, and are the easiest to overlook when problems arise.

A simple split looks roughly like this:

```
[任务] 从工单中抽取分类和紧急度
[输出] category / urgency / reason
[边界] 不确定时填 unknown，不要猜
[示例] 三条历史工单及标注
[风格] 你是资深客服质检员，请谨慎判断
```

During migration, the first three parts belong to the contract, examples need to be re-run, and the last part should be deleted first and then tested.

## First run a version with not a single word changed

I've seen two opposite mistakes.

One is rewriting the prompt on the day of the model switch, only for the old problem to come back—the line that was deleted was actually contract, not a patch. The other is copying as-is, carrying over the old model's patches, so the new model is over-constrained, producing long and conservative output while believing it is "more rigorous."

My order is: first switch only the model, change not a single word of the prompt, and run a set of hard samples. You don't need many samples—a dozen to a few dozen is enough—covering normal input, boundary input, input that should be refused, and input where format easily breaks. For each, write an acceptance rule a human can judge, such as "fields complete," "enum values valid," "output unknown when uncertain," rather than treating the old model's output as the sole standard answer. Old output is only a baseline, not the truth.

After running, classify by failure type: format failure, factual error, omission, verbosity, tool call failure. For format failures, check the runtime first—whether JSON mode is on, whether the stop sequence is right, whether max tokens is sufficient—don't rush to change the prompt. For facts and omissions, check the contract section. Verbosity and tone issues usually fall in the style-and-patch layer. Change only one category at a time, otherwise you won't know which line had the effect.

## What I move as-is, and what I rewrite on the spot

Moved as-is: field names, enum values, units, time zones, null semantics, business rules, refusal boundaries. These are contract and should not change when switching models. Real input samples and acceptance criteria are also kept, but expected outputs need to be re-examined. Safety red lines keep the rule itself; the wording can be adjusted for the new model. Tool names and parameter schemas stay unchanged; tool descriptions are rewritten.

These categories get rewritten on the spot.

- Role setting and personified tone. "You are a senior..." the old model may have needed; the new model may over-role-play, which actually drags down format.
- Inducements like "think step by step" or "outline first, then answer." If the new model has built-in reasoning, repeated prompting may make output longer, or even leak the intermediate process directly.
- Patch lines added for old model bugs, such as "do not repeat," "do not output code blocks," "be sure to output only JSON." Delete first and test; many patches are just noise for the new model.
- Emphasis words and delimiters. IMPORTANT, must, repeated emphasis—the new model may overreact.
- The count and order of few-shot examples. Examples are the part most capable of skewing model style; content can stay, but samples must be re-selected.
- Tool descriptions. Function names and parameter schemas stay unchanged; descriptions are rewritten for the new model.
- Length constraints. If the old model was verbose, you add "no more than three sentences"; the new model may be more verbose, or may over-compress, requiring recalibration.

One more easily overlooked point: if the new model supports a system prompt, don't stuff the entire old prompt into user. First put things in their proper roles per the API, then discuss content. A larger context window doesn't mean you should stuff in more examples; more examples may actually skew the model.

## Migration checklist and rollback

I now proceed in this order:

1. Save the old prompt as v1, and run it unchanged when switching models.
2. Build a set of hard samples, each with an acceptance rule a human can judge, not treating old output as the sole answer.
3. Classify failures by type; fix the runtime first, then the prompt.
4. Delete patch lines one by one, one at a time, running samples after each deletion. Don't rewrite the whole thing and say "feels much better."
5. Replace examples with the closest ones picked from failure samples; don't blindly add more.
6. Keep the diff, pass rate, and a rollback switch. After launch, watch the format failure rate and manual rewrite rate in real traffic.

On the day of the model switch I do only one thing: run the old prompt as-is and mark the failure samples. The next day I decide which section to rewrite.

If you have a prompt to migrate right now, don't change the words yet—first mark it in three colors: contract, examples, patches. Usually after marking you'll find there's less that truly needs rewriting than you imagined.
