Sanora.

RAG or Fine-Tuning? A Decision Guide for People Who Have to Ship

Key takeaways

  • RAG is for knowledge; fine-tuning is for behaviour. If the complaint is "it does not know our stuff", that is retrieval. If it is "it does not sound/format like us", that is tuning — or often just a better prompt.
  • Try the boring option first. With modern context windows, stuffing the relevant documents into the prompt beats a vector database for a surprising number of real projects.
  • Most "RAG is bad" complaints are chunking and ranking complaints. The retrieval layer, not the model, is where the quality lives.
  • They compose. The mature answer is usually a tuned or well-prompted model on top of good retrieval, not a choice between the two.

Almost every client conversation that starts with "we want to fine-tune a model on our data" should have started with "our model does not know about our data." Those are different problems with different solutions, and confusing them is the most expensive mistake in applied AI right now.

The one-line distinction

RAG changes what the model knows. Fine-tuning changes how the model behaves.

If your support bot cannot answer questions about your refund policy because it has never read your refund policy, that is a knowledge gap. Fine-tuning it on a thousand support transcripts will teach it to sound like your support team while still not knowing your refund policy. It will now be wrong in your house style.

If your support bot knows everything but writes six-paragraph essays when your team writes three crisp lines, that is a behaviour gap — and it is probably fixable with a prompt and three examples before you go anywhere near training.

Start with the option nobody blogs about

Before either technique: can you just put the material in the prompt?

Modern context windows are large. If your entire product documentation is 40 pages, you do not need a vector database, an embedding pipeline, a chunking strategy or a re-ranker. You need to paste 40 pages into the context, cache it, and ask the question. It will be more accurate than a naive RAG pipeline, because nothing is being dropped by a retrieval step that guessed wrong.

The math changed. Prompt caching means the repeated cost of a long, stable context is a fraction of the list price. For a lot of small and mid-size businesses, "retrieval" is a solved problem because there is nothing to retrieve from — the whole corpus fits.

Graduate to real retrieval when the corpus stops fitting, when it changes constantly, or when different questions genuinely need different slices of a large body of material.

When it is RAG

Reach for retrieval when any of these are true:

And the part everyone gets wrong

When people say "we tried RAG and it hallucinated anyway", they almost never have a model problem. They have a retrieval problem. The model was handed three irrelevant chunks and did its best.

The quality of a RAG system lives almost entirely in the layer before the model:

When it is fine-tuning

Fine-tuning is real, and it is genuinely the right answer for a narrower set of problems than the discourse suggests:

The prerequisites are unforgiving: a few hundred consistent, high-quality examples; a task that will not change next quarter; and an eval set to prove the tuned model actually beat the prompted one. If you do not have all three, you are not ready, and the prompt is cheaper.

The decision, compressed

The symptomThe fix
"It does not know our products / policies / data"Retrieval (or a big prompt)
"It makes things up when it does not know"Retrieval + an explicit "I do not know" escape hatch
"It cannot cite sources"Retrieval
"The information changes weekly"Retrieval
"It does not follow our format"Prompt + examples first, then fine-tuning
"It is too slow / too expensive at our volume"Fine-tune a small model, or route by difficulty
"It is 90% right and we need 99%"Neither — you need evals, then targeted fixes

The honest ordering

Almost every project we have shipped follows the same escalation, and almost none reach the end of it:

  1. Good prompt, with the source material pasted in. Most projects stop here.
  2. Prompt + real retrieval, when the corpus outgrows the context.
  3. Retrieval + a re-ranker, when precision matters.
  4. Fine-tune a small model on the now-proven task, when cost or latency demands it.

Skipping to step four because it sounds like the serious engineering choice is how six-week projects become six-month ones. The unglamorous steps are where the accuracy is.

Not sure which one your problem needs?

We scope AI systems honestly — including telling you when the answer is "a better prompt and a weekend", not a platform.

Ask us →
RAG retrieval augmented generation fine-tuning LLM architecture vector database embeddings AI engineering

FAQ

Common questions

What is the difference between RAG and fine-tuning?

RAG (retrieval-augmented generation) fetches relevant documents at question time and puts them into the prompt, so the model answers from source material it can see. Fine-tuning adjusts the model weights on example inputs and outputs, changing how the model behaves by default. RAG adds knowledge; fine-tuning adds behaviour.

When should I use RAG?

Use RAG when the model needs access to information it was not trained on: your documentation, your product catalogue, your policies, anything that changes. It is also the right choice whenever you need citations, because the model can point at the retrieved source.

When is fine-tuning worth it?

Fine-tuning earns its cost when you need a consistent output style or format that resists description, when you have hundreds of high-quality examples, when the task is stable, or when you want a small cheap model to match a large expensive one on one narrow job. It is a poor fix for a knowledge gap.

Do I need a vector database?

Not necessarily. If your corpus is small — a few hundred pages — putting the relevant subset directly in the context window, or using plain keyword search to select it, often outperforms a vector store and is far simpler to operate. Reach for a vector database when your corpus is large enough that selection genuinely requires semantic similarity.

Sanora Technologies

Got a product to build?

We build web apps, mobile apps, SaaS platforms and AI agents for founders and businesses — MVPs in as little as a week, and you work directly with the person writing the code.