AAI Agentic Handbook
Question 07 · How LLMs work

When do you use zero-shot prompting, few-shot examples, or chain-of-thought?

Reviewed Oct 2026
How to spend the time
  1. 1 min — definitions as in-context learning
  2. 2 min — when each wins, with a labelled-set example
  3. 2 min — costs and reasoning-model caveat
  4. 1 min — escalation ladder and versioning
01Concept

All three are in-context learning — changing behaviour without changing weights. Zero-shot: clear instructions only; the default with instruction-tuned models. Few-shot: 2–8 input→output examples; best for a format, label boundary or tone that is hard to describe. Chain-of-thought: ask for intermediate steps before the answer; helps multi-step reasoning on non-reasoning models at the cost of more output tokens (often 3–10× the answer length). On reasoning models, which already think internally, explicit CoT prompts add little and can hurt — give them the goal and constraints instead.

02Practical use case

A customer-support ticket router with 12 categories confuses "billing dispute" and "refund request". On a 600-ticket labelled set: zero-shot with better definitions 81% → adding 3 contrasting boundary examples 89%. The quote-calculation step needs arithmetic: CoT lifts accuracy from 72% to 86%, but a calculator tool call reaches 99% with fewer tokens — so the team ships the tool.

03Staff framing
  • Few-shot examples are strong priors: the model copies their length, label distribution and quirks. Balance labels, rotate examples, and evaluate with and without them.
  • Order of escalation: instructions → few-shot → decomposition into steps (prompt chaining) → tools → fine-tuning. Each step must beat the previous on the golden set to stay.
  • CoT costs real money: 300 extra output tokens × $15 / M = $0.0045/call, $4.5k per million calls.
  • Org scope: prompts live in version control with their eval results; a shared prompt library holds vetted few-shot sets per task type so teams don't re-derive them.
  • Where it breaks: showing chain-of-thought to users as the explanation. It is not guaranteed to reflect how the answer was produced.

What the answer sounds like at each level

Mid

Defines the three and picks few-shot for formats and CoT for multi-step problems.

Senior

Measures each on a labelled set, knows few-shot bias effects, and prefers tools over CoT for arithmetic.

Staff

Defines an escalation ladder with eval gates, prices CoT tokens, and runs a shared prompt library with versioned evals.

Follow-ups the interviewer will push

1You port a CoT-heavy prompt to a reasoning model and quality drops. Why?

The model already reasons internally; prescriptive step lists constrain its search and duplicate tokens. Strip the CoT scaffolding, state the goal and constraints, and re-evaluate.

2How many few-shot examples?

Start at 3 contrasting ones near the confusing boundary; plot accuracy at 0/3/6/9 on the golden set and stop where it flattens — the extra input tokens cost on every call.

Red flags interviewers listen for

  • Adds 'think step by step' to every prompt including reasoning models.
  • Uses unbalanced few-shot examples and doesn't evaluate the bias.
  • Treats CoT text as a faithful explanation for users or auditors.

How it's scored

DimensionWhat strong looks like
SelectionClear rule for each technique tied to the failure mode.
EvidenceUses accuracy on a labelled set, not anecdotes.
Cost/opsPrices extra tokens and versions prompts with their evals.

Sources

  1. Language Models are Few-Shot Learners — Brown et al., 2020paper
  2. Chain-of-Thought Prompting Elicits Reasoning in Large Language Models — Wei et al., 2022paper