Academy

Zero-shot, few-shot, or chain-of-thought: picking the right technique

There are three basic prompting techniques, and each has its place. Knowing when to reach for which matters more than the techniques themselves.

The Felesh team 5 min

When writing a prompt, you have three basic techniques at your disposal: zero-shot, few-shot, and chain-of-thought. No single approach is universally superior; each is built for a specific kind of task. The skill lies in knowing which to choose.

Three prompts for one ticketThe ticket “Package never arrived” is tagged three ways. Zero-shot gives only the rule: tag it billing or shipping, and the reply is shipping. Few-shot adds two tagged tickets, “charged twice” as billing and “wrong size” as shipping. Chain-of-thought adds the instruction to reason step by step, and the model notes the package was never scanned before tagging shipping. A cost bar grows from the first prompt to the third.ticket: “Package never arrived”costzero-shotTag: billing/shipping→ shippingfew-shotPlus 2 tagged tickets:“charged 2x” → billing“wrong size” → shippingchain-of-thought+ “reason step by step”no scan → shippingpick the shortest prompt that works
Same ticket, three prompts: each step up adds words to the page, so pick the shortest one that does the job.

Zero-shot

Zero-shot prompting provides only the instruction, relying on the model’s pre-trained knowledge without showing examples. It is the simplest and cheapest route, and works well for straightforward tasks. If a task is clear enough to express with a precise description, start here.

Few-shot

Few-shot prompting includes examples of the input and desired output to demonstrate the target pattern. This approach is valuable when:

  • Rules alone cannot fully convey the required pattern.
  • The output format is complex and difficult to describe in words.
  • A specific reasoning style or edge case must be shown rather than told.

Avoid this approach when rules are clear and sufficient, when examples might bias the model towards a single specific pattern, or when a modern model already handles the task reliably without examples.

Examples fix the reply formatA prompt holds the rule “reply as category | urgency”, two worked tickets and the new ticket “Package never arrived”. With the rule alone, the model replies in loose prose: looks like a late parcel, pretty urgent. Once the two examples arrive, it replies in the shown format: shipping | high.promptReply as: category | urgency“charged twice”billing | high“wrong size sent”shipping | low“Package never arrived”modelreads the patternin the examplesreply, rule onlyreply, with examplesLooks like a late parcel,pretty urgent I think.shipping | hightwo examples fixed the reply format
Two tagged examples show the reply format that a written rule left loose.

Chain-of-thought

With chain-of-thought, you instruct the model to show its reasoning steps before providing the final answer. This is highly effective for:

  • Multi-step mathematical or logical deduction.
  • Tasks where intermediate steps matter.
  • Scenarios requiring visibility into the reasoning process.

However, for straightforward classification, pattern matching, or tasks the model already handles reliably, chain-of-thought merely adds verbosity without benefit.

Steps before the answerThe question: a plan costs 90 a seat, seats past the tenth are half price, what do 12 seats cost? The model writes three steps: 10 seats times 90 is 900, 2 seats times 45 is 90, 900 plus 90 is 990, then answers 990. Below, a simple task, the ticket “thanks, all good”, gets the label positive either way: straight to the label is a short bar, steps first is a long bar with the same answer.questionA plan costs 90 a seat.Past seat 10: half off.Cost of 12 seats?reasoning, written out110 seats × 90 = 90022 seats × 45 = 903900 + 90 = 990answer: 990 for 12 seatsa simple task: “thanks, all good”straight to the labelpositivesteps firstpositive
Writing the steps out lets each one be checked before the answer; on a task with no steps, they only add words.

An important modern caveat

A recent finding is worth noting: for sufficiently capable models, chain-of-thought examples primarily enforce the output format rather than genuinely increasing reasoning ability. In many cases, a clear zero-shot instruction performs as well as — or even better than — a prompt heavily loaded with examples. Before adding samples to a prompt, it is worth testing the zero-shot baseline.

Plain instruction against loaded promptTwo prompts for the ticket “Package never arrived”. The left one is a clear instruction with no examples. The right one has the same instruction plus three tagged tickets. Both return the same reply, shipping | high, marked equal. The advice under them: test the plain version before adding samples.clear instructionloaded with examplesTag the ticket:category | urgencyTag the ticket:category | urgencyno examples“charged 2x” → billing“wrong size” → shipping“no invoice” → billingreplyreplyshipping | highshipping | high=test the plain version before you add samples
On a capable model, a plain instruction can return the same line as a prompt loaded with examples, so test the plain version first.

The golden rule: start simple

The standard decision path is straightforward: start with zero-shot. If you require a specific format or style, add a few examples. If the task calls for reasoning or explanation, use chain-of-thought. The guiding principle is to start simple, introducing complexity only when genuinely required. A good prompt is the shortest prompt that completes the job reliably.

A staircase from zero-shot to chain-of-thoughtThree steps rising: zero-shot for a clear rule, such as tagging a ticket; few-shot when the format must be shown, such as category | urgency; chain-of-thought when the steps matter, such as the total for 12 seats. Each step holds a stack of bars for the prompt’s length: one, three, then four. You climb from zero-shot to few-shot when the format is off, and to chain-of-thought when the task needs steps.zero-shotthe rule is enoughtag a ticketfew-shotshow the formatcategory | urgencychain-of-thoughtthe steps mattertotal of 12 seatsshortest promptthat worksformat off?add examplesreasoning?add steps
Start on the bottom step and climb only when the output misses: the right prompt is the shortest one that does the job.