Flashcard: what is few shot prompting and what does the 'few' actually refer to?
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Few shot prompting prepends 2-8 worked input-output examples to the query so the model can imitate the pattern through in context learning, with no weight updates.
Imagine asking a new intern to label customer feedback. If you just say 'label these,' they will probably invent their own categories. So you show them three already-labeled examples first: this one is positive, this one is negative, this one is neutral. Now they know what shape your labels take and can copy the pattern on the next ten. Few shot prompting is the same trick with a language model. You drop in two to eight worked examples right before the actual question, and the model imitates the demonstrated pattern. The model is not being trained or retrained; it is just reading the examples in the same prompt and matching the shape. The training all happened earlier; this is on the fly imitation.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
3 min: define few shot, explain in context learning, name placement and diversity rules, and show how prompt caching changes the cost story.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Believing the model is being fine tuned by your few shot examples. Nothing is updating in the weights; the model is doing in context pattern matching for that one call and forgets the examples on the next request.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.