Zenaique

Match each knowledge-integration need to RAG, fine-tuning, or long-context

Match pairs·Medium·4.0 · 0·~2 min·Relevant atSambanova
Attempt it
Large, frequently-changing knowledge base needing citations
Teach a stable output style, format, or domain behavior
A few documents supplied per request, used once
Knowledge that updates hourly and must never be stale
Consistent JSON schema / tone the base model keeps missing
TL;DR

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.

Memory aid
Sign in for the mnemonic that makes this stick. See Pro pricing.
Easy to grasp

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.

Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.

Sign in for 5 free unlocks/day or go Pro for unlimited. See Pro pricing.

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.

NeedBest fitWhyMain cost
Large, changing knowledge needing citationsRAGRetrieve fresh chunks at query time, grounded in sourcesRetrieval infra + latency
Stable output style / format / domain behaviorFine-tuningBakes the behavior into weightsTraining run per update
A few docs supplied per request, used onceLong-contextJust put them in the prompt; no infraTokens + 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?
Sign in or go Pro to see the approach for this follow-up.
QYou fine-tuned for a JSON format but the model still hallucinates field values. What now?
Sign in or go Pro to see the approach for this follow-up.
QKnowledge updates hourly but you also need a strict output format. One tool or two?
Sign in or go Pro to see the approach for this follow-up.

Red flags & common mistakes

The phrases that signal junior thinking. Click to expand.

Most common mistake

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.

Sign in or go Pro to see all red flags and common mistakes. See Pro pricing.

60-second night-before-the-interview bullets. Scan these on the way to the call.

Sign in for 5 unlocks/day or go Pro for unlimited revision sheets. See Pro pricing.

Primary sources. Skim if you want the original framing.

Similar questions

Same topic, related formats. Practice these next.

4 curated
Next question
What is RLHF, and why is it used after pretraining?
MCQ·Easy