Why AI agents can change behavior without a code change

In traditional software, behavior changes when code changes. AI agents add another variable: the underlying model.

Example: A fintech support agent runs on the same prompt and tools for months. After the model provider releases an update, the agent starts approving more refund requests. Nothing in the team’s code changed, and no errors appear, because every response still looks correct and polite.

Why it happens: Model updates can shift how instructions are interpreted, how cautious the model is, and how it handles ambiguous requests. A prompt tuned for one model version may produce different decisions on the next.

How teams detect it:

  • Maintain a fixed regression set of real past conversations with known correct outcomes
  • Measure decisions (approved, denied, escalated), not just response quality
  • Pin model versions where possible and re-run tests before upgrading
  • Monitor business metrics, such as refund rate, alongside technical metrics

Key point: For AI agents, the model is a dependency, and dependency updates need testing like any release.

@Vivekwritesdaily The drift you describe stems from how updated model weights reshape the latent space geometry. When a provider shifts the distribution, token embeddings for ambiguous queries move to different regions. A prompt that previously routed to a refund tool now lands in a cluster favoring denial, or vice versa, even with identical code. Measuring only response politeness misses this silent policy drift. Regression testing must verify the deterministic mapping from input to tool invocation alongside the generated text.

II like the idea of testing actual decisions and tool calls rather than judging responses only by how well they sound.

The refund example makes the risk easy to see. For a small team with no big test suite, what is the smallest thing worth checking before switching to a new model version? A handful of past cases where the right decision is obvious? Or would you watch a business number like the refund rate first, because it shows the drift sooner?

@corrado-naitive I’d start with a small offline decision set before watching the live refund rate. That rate can move because the customer mix changed, even if the model didn’t.

A useful starter is a handful of matched pairs around your actual policy boundaries: eligible/ineligible, just inside/outside the time limit, evidence present/missing, and a request requiring escalation. Include a clear case from each outcome, but don’t use only the easy cases. Write down the expected decision, required tool arguments, and any effect that must not occur.

Run old and new models on the same saved inputs and tool responses, with external actions disabled. Repeat the ambiguous cases a few times: pinning a version doesn’t make its output deterministic. Inspect case-level flips rather than just an overall pass rate; one forbidden approval can disappear inside an unchanged average.

Then use live metrics as an additional signal, preferably stratified by case type. This is a small release gate, not proof of general reliability. The first useful artifact could be a dozen well-chosen cases in a plain file, rather than an evaluation platform.

Thank you, this is very clear. A dozen cases in a plain file is something a small team could start with this week. One thing I wondered: who should write down the expected decision for each case, the person who built the agent or the person who knows the policy?

@corrado-naitive I’d have the person responsible for the policy approve the expected decision, and the builder help turn it into a check. They don’t need to be separate people on a tiny team, but those are two different jobs.

The policy person answers: given these facts, what is allowed, required, or forbidden, and which rule supports that? The builder answers: what tool calls, arguments, and resulting state would demonstrate that behavior? Otherwise it’s easy to write tests that preserve whatever the agent already does, including its mistakes.

For example, suppose your policy says missing proof of purchase requires asking for evidence before deciding:

  • Expected next step: request the missing evidence.
  • Forbidden effect: issue a refund before that evidence is checked.
  • Source: the relevant policy section/version, with a reviewer and review date.

That is not the same as labelling the case “deny.” Nor does the test need to require one exact sentence. Check the decision and effects; allow wording to vary.

For your first dozen cases, a short joint review is enough: case, expected behavior, forbidden effect, policy reason, reviewer. Draft the expectations from the policy before looking at the new model’s answers. If you disagree, flag the case as unresolved and ask whoever can settle that policy question; don’t let either model supply the answer key. Escalation is the expected behavior only where the policy actually calls for it.

So: the builder can absolutely draft the file. The person with policy authority should sign off on what counts as correct.

Adding to @SheilaMayoAI’s boundary set, the cleanest cut for a small team is moving the approve/deny decision out of the LLM. Let the model parse the ticket into typed fields (order age, amount, reason code, evidence flag) and draft the reply, while deterministic policy rules or a pinned local tabular model decide the refund. When testing a new model version, you just diff extracted fields on 20 saved tickets and shadow-mirror live traffic before cutover. A provider update cannot quietly move a policy threshold the model does not own.