RAG vs Fine-tuning
Two ways to give an LLM new knowledge or behavior — one retrieves at query time, the other bakes it into weights.
RAGvsFine-tuning
Verdict: Reach for RAG when knowledge changes often; fine-tune when you need a fixed skill, format, or tone.
The core difference
Retrieval-Augmented Generation (RAG) leaves the model frozen and feeds it relevant documents at inference time. Fine-tuning updates the model's weights on task data so the behavior is internalized.
Side by side
| Dimension | RAG | Fine-tuning |
|---|---|---|
| Best for | Fresh, changing facts | Fixed skills, style, format |
| Update cost | Re-index documents | Re-train weights |
| Cites sources | Naturally | Not by default |
| Latency | Higher (retrieval step) | Lower |
| Risk | Retrieval misses | Catastrophic forgetting |
When to choose which
- Choose RAG for knowledge that changes weekly, needs citations, or is too large to memorize.
- Choose fine-tuning for a consistent output format, a domain tone, or a narrow skill the base model handles poorly.
- Choose both when you want a specialized model that also grounds its answers in current documents.
Bottom line
They solve different problems and compose well. Start with RAG (cheaper to iterate); fine-tune once the behavior, not just the knowledge, needs to change.