Sort by what's changing: large or fast-changing knowledge that needs citations is RAG; stable behavior or format is fine-tuning; a few per-request docs is long-context.
Imagine a chef who needs help. If the ingredients change every day, you don't retrain the chef — you hand them today's fresh shopping list each time they cook. That's RAG. If the chef keeps plating messily, you train them once so good plating becomes a habit. That's fine-tuning. And if a single customer brings one special recipe card just for their meal, the chef just reads it that one time. That's long-context. The fork is simple: is the thing that's missing knowledge (and how often it changes), or a behavior the chef should always do?
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Concept explanation~2 min read
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.
2–4 min · Everything important, quickly.
Spend 5-7 minutes on the knowledge vs behavior fork and the volume vs freshness sub-test so you can place any new need without memorizing the table.
| Need | Best fit | Why | Main cost |
|---|---|---|---|
| Large, changing knowledge needing citations | RAG | Retrieve fresh chunks at query time, grounded in sources | Retrieval infra + latency |
| Stable output style / format / domain behavior | Fine-tuning | Bakes the behavior into weights | Training run per update |
| A few docs supplied per request, used once | Long-context | Just put them in the prompt; no infra | Tokens + latency scale with size |
Real products, models, and research that use this idea.
- Customer-support assistants use RAG over a hourly-updated knowledge base so answers cite current docs and never go stale.
- Teams fine-tune a model to reliably emit a strict JSON schema or house tone the base model keeps fumbling.
- A contract-review feature drops the single uploaded document into a long-context prompt rather than indexing it.
What an interviewer would ask next. Try answering before peeking at the approach.
QAt what point does a long-context approach need to become RAG?
QYou fine-tuned for a JSON format but the model still hallucinates field values. What now?
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Reaching for fine-tuning to add knowledge that changes often — it bakes a snapshot into weights and goes stale, exactly the job RAG's fresh retrieval is for.
60-second night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.