In-context learning(ICL)
When a language model learns from examples provided in the prompt itself, without any weight changes. The trick behind few-shot prompting.
In-context learning (ICL) is the surprising property of large language models that they can pick up new patterns from examples included in the prompt, without any actual training. You show Claude two or three examples of the format you want, and it produces output in that format for new inputs.
The “learning” is in scare quotes because nothing is being trained. The model’s weights don’t change. The examples shape the model’s response purely through the context window.
A concrete example
Without examples:
“Classify this customer email.”
You’ll get a generic best-guess classification.
With 3 in-context examples:
“Classify the customer email below into one of: shipping, refund, product question, complaint, partnership pitch, spam.
Example: ‘When will my order arrive?’ → shipping Example: ‘I want my money back, this product broke after 2 days.’ → refund + complaint Example: ‘Hi, we’re a podcast looking for sponsors.’ → partnership pitch
Now classify:
[your email]”
You’ll get a much more reliable classification, in exactly your taxonomy, formatted exactly how you asked.
That’s in-context learning. No fine-tuning, no training, just better prompting.
When ICL beats fine-tuning
For most Australian SMB use cases in 2026, in-context learning + a tight system prompt beats fine-tuning because:
- No infrastructure. Fine-tuning needs labelled datasets, training runs, model versioning. ICL is just prompt engineering.
- No retraining when behaviour drifts. Want to tweak the classification? Edit the prompt. Done.
- No vendor lock-in. ICL prompts transfer cleanly between Claude, GPT, Gemini. Fine-tuned models don’t.
- Per-request flexibility. You can include different examples for different users or different contexts.
Fine-tuning still wins when:
- You have thousands of well-labelled examples (true few-shot capacity is 5-20 examples)
- The behaviour is impossible to describe in a prompt
- You need to ship a custom model for cost/latency reasons at huge scale
For 95% of Australian SMB work: ICL is the right tool.
How many examples to include
Rule of thumb:
- 1 example: better than zero. Useful for format conformance.
- 3-5 examples: typical sweet spot. Covers the main variations.
- 8-15 examples: starts to hit diminishing returns + your context window
- 50+ examples: you’ve outgrown ICL. Time to fine-tune or build a proper RAG system.
Related terms
Want this built for your business?
Book a free 30-minute AI audit. We'll map your business and show you exactly which systems we'd build first. No pitch deck, no scoping fee.
Book my free AI audit