Skip to content

Diagnose the missing prompt technique

Read a failing prompt's outputs, identify whether it needs examples, room to reason or nothing more, and pick the change that applies the missing technique.

Scenario

The trust team of a B2B marketplace runs three Claude prompts, and each has a complaint against it:

  • Seller notices: "The facts are right, but some notices sound like a lawyer, some like a chat message, and none sound like us."
  • Dispute decisions: "The layout is perfect. The decision is wrong on about one dispute in seven."
  • Language detection: "It works. Can we add ten examples to make it better?"

Three prompts, three different answers. Try to diagnose them before you read the explanation.

Explanation

The three techniques fix different failures.

Zero-shot: clear, direct instructions with no examples. It is the cheapest, and it is enough when the task is well defined and the output simple. The language-detection prompt works, so ten examples would add tokens to every request and show nothing new. Keep it zero-shot unless the eval shows a failure.

Few-shot (multishot): examples of input and ideal output. They steer format, tone and structure reliably. Anthropic's guidance: 3 to 5 examples, relevant to the real use case, diverse enough to cover edge cases, and wrapped in <example> tags so they don't read as instructions. If every example looks alike, the model copies what they share, including what you didn't intend: length, label, phrasing.

Chain of thought: room to reason before answering, for multi-step judgement such as applying policy conditions or comparing evidence. On current models, use the model's thinking: enable it where it isn't always on, and raise effort if reasoning falls short. General instructions ("think through each policy condition carefully") often beat a hand-written list of steps. An exact figure, such as a commission or a weighted score, is a different case: compute it in code and let Claude extract the inputs and explain the result, because more reasoning can't make a probabilistic answer exact. Manual chain of thought is the fallback when thinking is off: ask for reasoning before the answer and the final answer in <answer> tags so code can extract it. On several of the newest models, a prompt that asks the model to write its reasoning out in the response (for example in <thinking> tags) may be declined; the thinking docs say to rely on thinking there, at a lower effort if cost or latency matters.

Read the symptom:

Symptom Missing
Facts right, shape or tone varies Examples (and, for a parser, structured outputs in code)
Shape right, conclusion wrong on multi-step cases Room to reason
Output copies quirks of the examples Diverse examples
Works well already Nothing: keep it zero-shot
Facts invented or missing Not a technique: the context lacks them
An exact figure is wrong Not a technique: compute it in code

The last row matters: no technique fixes a fact the prompt never contained.