← All posts

RAG vs fine-tuning: which one your AI product actually needs

The short answer: use retrieval-augmented generation (RAG) when the model needs to know your facts: your documents, products, policies or records. Consider fine-tuning only when it needs to behave differently in a narrow way that prompting can't fix, such as a strict output format or a classification task at large volume. Most business AI apps need RAG, few need fine-tuning, and every app should start with a well-written prompt before either.

What each one does

RAG leaves the model alone. When a question comes in, your app searches your own content, picks the most relevant passages and puts them in the prompt alongside the question. The model answers from what it was given, and can show where each part of the answer came from.

Fine-tuning changes the model itself. You train it further on many examples of inputs and the outputs you want, and you get a version of the model that does that task more consistently, often with a shorter prompt.

RAG

Fine-tuning

What it changes

What the model knows for this question

How the model behaves on every question

Good for

Answers from your documents, products and records

A fixed format, tone or classification at scale

Updating it

Add or edit a document; live straight away

Collect examples and train again

Shows its sources

Yes, if you build it that way

No

Upfront work

Preparing and indexing your content

Hundreds or thousands of good examples

Running cost

Longer prompts, plus a search on each question

Shorter prompts, plus training runs

Main risk

Finding the wrong passages

Training in mistakes, and outdated facts

Start with the prompt

Before either, write the best prompt you can and test it on real questions. OpenAI's own guide to model optimisation says it plainly:

"The prompt engineering process may be all you need in order to get great results for your use case."
OpenAI, Model optimization guide

A clear role, a description of the task, a few examples of good answers and rules for what to do when unsure will take a modern model a long way. Measure it against a set of real questions with known good answers. Only when it falls short, and you can say why, is it time for RAG or fine-tuning.

When RAG is the answer

Choose RAG when the answers depend on information that is yours, changes often, or must be traceable:

  • A support assistant that answers from your help centre and policies
  • Internal search across contracts, specs or meeting notes
  • A sales tool that knows your current products and prices
  • Anything where a wrong or outdated answer has a cost, so users need to see the source

Facts change, and RAG handles that well: update the document and the next answer uses it. Fine-tuning facts into a model is the opposite: they are frozen at training time and hard to remove.

Most RAG failures are search failures

When a RAG app gives a bad answer, the cause is usually that it retrieved the wrong passages, not that the model reasoned badly. Better retrieval moves quality more than a bigger model. Anthropic's research on Contextual Retrieval shows how much is available:

"This method can reduce the number of failed retrievals by 49% and, when combined with reranking, by 67%."
Anthropic, Introducing Contextual Retrieval, September 2024

In their tests, the share of questions where the right passage was missing from the top 20 results fell from 5.7% to 2.9% with contextual embeddings and keyword search, and to 1.9% with reranking added. The practical lesson: spend time on how content is split, labelled and searched before you spend it on anything else.

When fine-tuning is worth it

Fine-tuning earns its place in a narrower set of cases:

  • A strict output format the model keeps getting wrong, even with examples in the prompt
  • High-volume classification, such as routing tickets or tagging documents, where a shorter prompt saves real money at scale
  • A specific style or tone that is hard to describe but easy to show with many examples
  • Speed or cost at scale, where a smaller fine-tuned model can replace a larger general one for one task

It needs good training data: hundreds or thousands of examples that are right, consistent and representative. If you don't have those, fine-tuning will learn your inconsistencies.

Check what your provider still offers

Fine-tuning options change. As of November 2026, OpenAI's guide says it is winding down its fine-tuning platform, which is no longer open to new users. Before you plan around fine-tuning, check what your chosen provider supports today and what happens to a fine-tuned model if the base model is retired. RAG doesn't have this problem: it works with any model, so you can switch providers without starting again.

Can you use both?

Yes. A common pattern for mature products is a fine-tuned model for a narrow, high-volume step (classifying the question, say), with RAG supplying the facts for the answer. Build them in that order only if you need to: prompt first, then RAG, then fine-tuning for the specific step that still falls short.

What it costs to build

The model is rarely the expensive part. The work is in preparing your content, building search that finds the right passages, writing the evaluation set and wiring the app into your systems. At our published rates, a senior AI engineer is $4,000 a month for about 160 hours; see hire AI engineers for what we vet for. Our AI app development guide covers how we build a new AI product, and AI Integration covers adding AI to the systems you already run. If you want to see how we use AI in our own engineering, read why AI-native teams ship faster.

Need engineers who ship?Build your hire
Book a 30-minute call