The example in our prompt became the most common output

The example was doing more work than we intended. We put one "e.g." into a prompt that generates questions about the reasoning behind a change, and that literal phrase came back as the most frequent output across 2,144 generations. Backthread runs that pipeline over the agent sessions behind every merge in a team's codebase, which is how we noticed.

An example in a prompt looks like an instruction about form. It behaves like a sample of the content you want. Those two readings produce the same prompt and very different output distributions, and the gap is invisible until you count.

What we measured

Two measurements, a day apart, on one generation prompt in production.

What we measuredHowWhat came back
Where the prompt's own example ranked among generated outputsCounted outputs across 2,144 generations and ranked them by frequencyThe example's literal phrase ranked first
Whether the example was the causeChanged one word inside the example and re-ran the same promptThe literal's share fell from 19.5% to 2.4%

The first number is the one that should have been checked on day one and was not. We had read the output of this prompt many times and formed a favourable opinion of it. Reading a sample tells you whether an individual output is reasonable. It cannot tell you that one phrase is sitting at the top of the distribution, because every instance of it looks reasonable on its own.

The second number is the cheap causal test, and it is cheap enough that there is no excuse for skipping it. One word changed, everything else held: the prompt, the model, the inputs, the sampling. A share that falls by a factor of eight on a one-word edit is not a coincidence and does not need a larger experiment to interpret.

Why an example behaves like content

This is not a surprise if you read the documentation carefully. The guidance for the model we use states that examples "are one of the most reliable ways to steer Claude's output format, tone, and structure", and then tells you to make them relevant and diverse. Both halves are correct. The second half is the one teams skip, and skipping it has a mechanism: a relevant example is by construction close to the answer you want, and anything close to the answer is a strong prior on the answer.

There is older literature on the same effect from the classification side. The in-context examples in a prompt bias predictions toward the labels they contain — the majority label in the set, and the label nearest the end of the prompt — which is the finding behind contextual calibration in Calibrate Before Use. That work is about label distributions in a classifier. Ours was free text in a generation prompt, so the bias arrived not as a skewed label but as the phrase itself, reproduced.

Same root cause in both cases. The model is not given any way to distinguish this is the shape I want from this is the kind of thing I want, because in a prompt those are the same tokens.

What these numbers do not show

Four limits, because a measurement reported without them is an advertisement.

  1. They are one prompt, one model, one pipeline. The 19.5 to 2.4 figure is a property of this prompt and the thing it generates. The method transfers; the magnitude does not, and anyone quoting our number against their own pipeline is guessing.
  2. They say nothing about quality. Both measurements count how often a literal appears. Neither one establishes that the outputs which replaced the literal were good, and we should not be read as claiming the prompt got better — only that it stopped converging on one phrase we had written ourselves.
  3. They do not isolate which property of the example did it. We changed one word and the share collapsed. That is enough to establish the example as the cause, and not enough to say whether the mechanism was lexical overlap, semantic proximity or position in the prompt.
  4. A one-word edit is a weak intervention to have worked this well. That is a finding about how fragile the arrangement was, and a reason to distrust any prompt whose behaviour nobody has perturbed.

How to check your own pipeline for this

In the order that pays off fastest. The first step is an afternoon and finds the problem if you have it.

  • Count your outputs before you read them. Rank distinct outputs by frequency over a few thousand generations and look at the top ten. You are looking for your own prompt's text. Sampling and eyeballing will not find this, for the reason above.
  • Grep the output set for literals from the prompt. Exact strings from your examples, your instructions and your schema descriptions. A nonzero hit rate on an example's distinctive phrase is the whole bug.
  • Perturb one word and re-measure. It is the cheapest causal test in a prompt pipeline and almost nobody runs it. If one word moves the distribution, the example is content.
  • Stop certifying stages on tiny fixtures. The two fixtures we had used to certify another stage in this same pipeline were three rows and seven rows, which is too small and too easy to expose anything of this shape.
  • Measure what a filter downstream is discarding, not just how much. The general procedure is in auditing what your filter throws away, and it is the same failure in a different stage: keep-side metrics looking healthy while the stage misbehaves.

The pattern across all of these is that the metric we were watching was fine. We had a judge in the same pipeline whose kill rate was stable at 25 of 25 while its verdicts on the good candidates changed completely, and we deleted the stage rather than retuning it once we measured its lift over the gate beneath it at 0.71 to 0.94 times. A stable aggregate is not evidence that a stage is behaving; it is often the thing concealing that it is not.

Why we care about this prompt in particular: the material it generates against is thin to begin with. Of 4,302 decisions captured from agent sessions on our own repository, 1,613 carry any recorded deliberation, so most merged changes have no weighed alternative to ask about. A generator that falls back on its own example is, at that point, producing text about the prompt rather than about the codebase, and the teaching that reaches an engineer inside the coding agent is only as honest as the capture behind it.

Connect one repo and the reasoning behind each merge is captured against the area it touched, with the stages that cannot be measured removed rather than tuned. The trial runs fourteen days.

In short

One phrase from our prompt was the single most frequent output
Across 2,144 generations, the literal text of an "e.g." we had written into the prompt ranked first by frequency, appearing in 19.5 percent of outputs. Reading samples had not surfaced it, because each individual output looked reasonable.
Changing one word in the example dropped it to 2.4 percent
Same prompt, same model, same inputs, one word different inside the example. A share that falls by a factor of eight on an edit that small establishes the example as the cause and says nothing about which property of it mattered.
An example is a sample of content, not a specification of form
The documentation is explicit that examples steer output, and the classification literature has shown in-context examples biasing predictions toward the labels they carry. A prompt gives the model no way to separate the shape you want from the content you want.

Sources

  1. Prompting best practices for Claude — on using examples to steer output format, tone and structure
  2. Calibrate Before Use: Improving Few-Shot Performance of Language Models — Zhao, Wallace, Feng, Klein and Singh

Backthread shows how much of what your agents built your team really understands. See how it works