Tuning Versus RAG
Behavior in weights, facts in vectors
Tuning changes behavior; RAG supplies facts. They're complementary, not rivals: retrieval for up-to-date knowledge, tuning for how the system should think and act on it. Blend them deliberately.
What you will learn
- Separate knowledge from behavior concerns
- Choose the right tool per symptom
- Design hybrid tuning+RAG stacks
What is this?
These techniques serve different failures: RAG addresses missing/outdated knowledge (retrieve the truth at runtime); tuning addresses persistent behavioral flaws (format, style, tool-choice loops) no retrieval can fix. Knowledge-in-weights via tuning is stale-by-design; behavior-in-prompts is weak-by-design. The stack blends both.
Why do you need it?
- Tuning facts decays the moment data changes.
- Retrieval can't fix a model that formats nothing correctly.
- Hybrid: tuned extraction + RAG facts = robust pipelines.
- Costs differ — keep knowledge out of costly retraining cycles.
Mental model
A chef's training vs. the market's stock
Tuning vs. RAG
Michelin technique (behavior) is in the chef's muscle memory — you don't download that at the market. But tonight's menu depends on what's fresh TODAY (facts). Technique is trained; ingredients are fetched per-service. Neither replaces the other.
How it works
- Audit the failure: is it knowledge or behavior?
- Knowledge gaps → RAG / retrieval at runtime.
- Behavioral flaws → tune the way the model operates.
- Blend: tuned reasoning + RAG grounding in one loop.
- Eval both layers with their own metrics.
Concern split.
In production
- Tuned extraction model + RAG for the latest policy text.
- Tool-call behavior tuned; arguments grounded by retrieval.
- Support stacks: tuned tone + retrieved resolutions.
Best practices
- First try RAG for knowledge; tune for behavior only.
- Keep datasets about behavior, not facts.
- Eval retrieval and the tuned loop independently.
- Reassess the split when data or models change.
Common mistakes
- Tuning knowledge that RAG could serve (stale curveballs).
- RAG-text with an untuned model that can't use it well.
- Pit-framing the two ('RAG is always better') — they answer different questions.
Common issues
Tuned model ignores retrieved contextBehavior not trained to consume sources
Train samples that include context + citation patterns.
RAG retrieval good, answer still skeleton-staleComprehension layer weak
Strengthen the loop (prompt/structure) before tuning weights.
Debugging tips
- Answers wrong-but-current → knowledge problem; fix retrieval, not weights.
- Answers elegant-but-ignoring-sources → behavior problem; tune to cite/use context.
- Facts drift weekly → move knowledge layers out of weights.
Interview checkpoint
Quick quiz
Knowledge that changes weekly belongs in…
Tuning and RAG are competing techniques.