# RAG vs fine-tuning: which do you need?

Use RAG when a model needs current or private facts at answer time, and fine-tuning when it needs a new behavior, style or format.

Use RAG when your model needs current or private facts at answer time. Use fine-tuning when it needs new behavior, style or format. RAG retrieves documents into the prompt, so knowledge updates as soon as the documents do and answers can cite sources. Fine-tuning retrains model weights, which changes how the model responds, not what it knows today.

## The one-line rule: knowledge vs behavior

[RAG](https://millionshort.com/docs/glossary/what-is-rag) adds **knowledge**: documents fetched at request time and placed in the prompt. Fine-tuning adds **behavior**: additional training that adjusts the model's weights so it responds in a particular style, format or domain register. Most "should we fine-tune?" questions get easier once framed this way. If the failure is "the model does not know X", retrieval fixes it. If the failure is "the model knows X but answers in the wrong shape", tuning might.

## Where each one wins

**RAG wins when:**

- Facts change faster than you can retrain: news, prices, documentation, inventory.
- You need **citations**. RAG can point at its evidence. A fine-tuned model cannot show which training example produced a claim.
- Data is private or permissioned. Retrieval can respect access per user. Knowledge trained into weights cannot.
- You need updates to take effect immediately, or you need to remove information. Reliably deleting one fact from trained weights is not practical.

**Fine-tuning wins when:**

- You need a consistent voice, a strict output format or domain-specific phrasing in every response.
- You want to teach a skill or a classification pattern that examples in a prompt do not convey reliably.
- You are optimizing latency and cost at scale: a tuned smaller model can replace long prompts of instructions and examples.

## Can you combine them?

Yes, and mature systems often do: fine-tune for behavior (format, tone, tool-use patterns) and retrieve for facts. What fine-tuning is not is a substitute for retrieval. Facts added by tuning are expensive to refresh, cannot be cited, and may be blended with what the model already learned instead of being recalled exactly.

## Practical consequence

Choosing RAG moves the hard work to retrieval quality. Your answers become only as good as the documents you fetch, so [grounding](https://millionshort.com/docs/glossary/what-is-llm-grounding) on clean, verifiable evidence can matter more than the choice of model. For pipelines that use the web as their knowledge source, that means a search API made for programs. The [RAG use case](https://millionshort.com/docs/use-cases/rag) and the [Search for RAG guide](https://millionshort.com/docs/search/guides/rag) show how MillionShort search fits that step: it returns ranked results with snippets and URLs, and your model writes the answer.

## Related terms

- [What is RAG noise?](https://millionshort.com/docs/glossary/what-is-rag-noise)
- [What is context engineering?](https://millionshort.com/docs/glossary/what-is-context-engineering)
