A product needs the model to answer from company-specific knowledge. Walk through how you'd decide between RAG, fine-tuning, and long-context — and why they're often combined rather than chosen exclusively.
Classify the gap first: fresh, large, citable knowledge → RAG; stable behavior or format → fine-tuning; small per-request docs → long-context. Mature systems combine all three.
Imagine teaching a new employee to handle your company's questions. If the answers live in a handbook that changes every week, you don't make them memorize it — you let them look it up each time, so they're never out of date. That's RAG. If they keep filling out forms wrong, you train them once so the right format becomes second nature. That's fine-tuning. And if a customer hands them one document for a single task, they just read it on the spot. That's long-context. A good system uses all three at once, because each fixes a different kind of problem.
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 6-8 minutes on the gap classifier, the cost that bites each option, and the handoff thresholds so you can design a layered system rather than crown a single winner.
| Dimension | RAG | Fine-tuning | Long-context |
|---|---|---|---|
| Gap it closes | Knowledge (large, fresh, citable) | Behavior / format / style | Small per-request knowledge |
| Freshness | Live — update the index | Stale until retrained | Fresh per request |
| Update cost | Reindex (cheap) | Training run (expensive) | None |
| Citations | Native (returns sources) | None | Possible if docs in prompt |
| Main cost / limit | Retrieval quality ceiling | Update cycle latency | Linear tokens; mid-prompt recall |
Real products, models, and research that use this idea.
- An enterprise assistant fine-tunes for a strict response schema, uses RAG over a docs index refreshed continuously, and drops user-pasted logs into long-context.
- Coding assistants combine RAG over a codebase with long-context for the open file and fine-tuning for diff/edit format conventions.
- Support tools choose RAG over fine-tuning for product knowledge precisely because the catalog changes weekly and answers must cite the source article.
What an interviewer would ask next. Try answering before peeking at the approach.
QYour RAG answers are wrong even though the documents contain the right facts. Where do you look first?
QWhen does long-context genuinely beat RAG even for a large document?
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.
Framing it as a single exclusive choice — 'should we RAG or fine-tune?' — when the gaps are orthogonal and a real system layers all three on the parts each one fits.
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.