Quick revision
The short answer
Nothing in our code changed, but the model did: a new model version behaves differently, and prompts tuned to one model often regress on the next. We confirm it from logs that record the model version, re-run our evaluation set comparing format compliance, length and factuality between versions, and fix the prompt with clearer instructions, examples or a structured output schema, plus format validation and retries in code. To prevent it next time, we pin model versions instead of moving aliases and run the evaluation in CI before any switch.
What to remember
In this answer, we saw that a model upgrade can change behaviour even when our code does not, because prompts are implicitly tuned to one model and aliases can move us to a new version silently. We confirmed the cause from the logged served model version and metrics, measured the regression with an evaluation set on format compliance, length and factuality, fixed it with clearer instructions, examples and structured output plus validation and retries in code, and prevented a repeat by pinning model versions and running the evaluation in CI before any switch.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
Nothing in our code changed, but the model did: a new model version behaves differently, and prompts tuned to one model often regress on the next. We confirm it from logs that record the model version, re-run our evaluation set comparing format compliance, length and factuality between versions, and fix the prompt with clearer instructions, examples or a structured output schema, plus format validation and retries in code. To prevent it next time, we pin model versions instead of moving aliases and run the evaluation in CI before any switch.
Why this question is asked
This is one of the most confusing incidents for a team new to LLMs, because every usual debugging step comes up empty: no deployment, no code change, no configuration change, and yet users report that summaries no longer use bullets and are twice as long. Interviewers ask it because it tests whether we understand that the model is a dependency that can change under us, and whether we have the tooling to see and control that. In this answer, we will see why model upgrades change behaviour, confirm the cause, measure the regression with an evaluation set, fix the prompt and the code, and set up version pinning and CI so it does not happen silently again.
1Why a Model Upgrade Changes Behaviour
A model version is a different set of weights, often trained with different data and different instruction tuning. Even when the provider says the new version is better overall, it may follow our particular instructions differently: it may prefer prose over bullet lists, write longer answers by default, or weigh the system message differently. Our prompt was, without our noticing, tuned to the old model's habits.
Many providers also offer aliases, model names such as a family name followed by latest, that always point to the newest version. If our configuration uses such an alias, the provider can upgrade us on any day without our involvement. That is the likely story here: our code did not change, but the thing the alias points to did.
2Confirming the Cause
We start by checking what model actually served each request. Provider responses include the exact model version that answered, even when we sent an alias, and a well-built service logs it with every call. If it was not logged, the provider's dashboard or release notes usually show when the alias moved. We then line up that date with the first user complaints and with our own metrics, such as average output tokens per call, which typically show a step change on the day of the switch.
- Users report longer, unformatted summaries
- Check logged served model version per request
- Did the served version change?YesLine up the switch date with metricsNoLook at input data and prompt files
- Re-run the evaluation set on old and new versions
- Fix prompt, add schema and validation
- Pin the version, add evaluation to CI
6 steps in order. Play them, or step through them one at a time.
3Measuring the Regression With an Evaluation Set
Anecdotes from users tell us something is wrong; an evaluation set tells us how wrong and whether a fix works. We take a few hundred representative inputs, real tickets with sensitive data removed, and score outputs automatically on what the feature promises: format compliance (does the summary have three to five bullet lines), length (words or tokens within a range) and, for factuality, whether key facts from the input appear and no unsupported claims are added, checked with simple rules, a second model acting as a judge, or human review of a sample. We run the same set against the old version, if it is still available, and the new one.
Notice the numbers in the comment: they turn a vague complaint into a clear regression, 98 percent compliance down to 41, and give us a target for the fix.
4Fixing the Prompt and the Code
Prompt fixes come first because they are cheap. We make the instructions explicit rather than implied (Answer with 3 to 5 lines, each starting with a hyphen and a space, at most 20 words per line, and nothing else), move the format rule to the end of the system message where many models weigh it strongly, and add one short example of the exact output. Then we re-run the evaluation; often compliance comes back to above 95 percent.
A stronger fix is to stop depending on the model's formatting at all. If the summary is returned as structured output, for example a JSON object with a list of bullet strings validated against a schema, our code renders the bullets itself and the model only decides their content. Either way, the code should validate the format and length after every call and retry once with a reminder, or truncate safely, when it fails. The validation also gives us a metric: the share of calls that needed a retry is an early warning for the next regression.
5Preventing It Next Time
Two changes stop this from recurring. First, we pin model versions explicitly: configuration names the dated version (for example summary-model-2026-09-15) rather than an alias, and the version is logged with every call. An upgrade then becomes a decision we make, not one that happens to us. Providers retire old versions eventually, so pinning buys time and control, not permanence; we track deprecation notices.
Second, the evaluation runs in CI. Any change to a prompt file or to the configured model version triggers the evaluation suite, and the pull request shows the scores side by side with the current production values. A switch to a new model version is a pull request like any other: it must meet the thresholds before merge, and we roll it out to a small share of traffic first while watching the format-retry rate and output length.
6Follow-up questions
What if the provider retires the old version before we are ready?
That is why the evaluation set and CI matter: they let us validate the replacement quickly. We read deprecation notices as soon as they arrive, schedule the migration like any dependency upgrade, and if needed route the feature to an equivalent model from another provider through the gateway while we adapt the prompt.
Is using a model as a judge reliable for factuality?
It is useful at scale but not perfect: the judge can share the same blind spots and is sensitive to its own prompt. We calibrate it against human labels on a sample, use it to compare versions rather than as an absolute truth, and keep human review for the most important features.
Should we keep prompts for each model version?
If we switch versions rarely, one current prompt is enough, kept in version control with its evaluation scores. During a migration it is reasonable to keep the old and new prompt side by side, selected with the model version, until the old version is retired.
7Conclusion
In this answer, we saw that a model upgrade can change behaviour even when our code does not, because prompts are implicitly tuned to one model and aliases can move us to a new version silently. We confirmed the cause from the logged served model version and metrics, measured the regression with an evaluation set on format compliance, length and factuality, fixed it with clearer instructions, examples and structured output plus validation and retries in code, and prevented a repeat by pinning model versions and running the evaluation in CI before any switch.
Open with
Since our code did not change, my first suspicion is the model itself. Model versions behave differently, and prompts tuned for one often regress on the next; if our config uses an alias, the provider may have moved it.
Then, if they want more
I would check the logs for the model version that actually served each request, since responses report it, and line up the switch date with the complaints and with metrics like average output tokens per call.
Then I would re-run our evaluation set, a few hundred representative inputs, on the old and new versions, scoring format compliance, length and factuality, so I have numbers, for example compliance dropping from 98 to 41 percent.
To fix it I would make the instructions explicit, put the format rule at the end of the system prompt, add an example, and ideally move to structured output, a JSON list of bullets that the code renders, so formatting no longer depends on the model. The code validates format and length after each call and retries once.
To prevent a repeat, I pin dated model versions instead of aliases, log the version on every call, and run the evaluation in CI whenever the prompt or model version changes, so a model switch is a reviewed pull request with a gradual rollout.
About this answer
- Last updated
- 12 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- Spring AI reference
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "After a model version upgrade, your summarisation feature starts ignoring the required...": https://scrivio-interview-library.netlify.app/spring-boot/llm-fundamentals/92f988a954/