RAG vs fine-tuning: how to make AI know your business

Should you train an AI model on your documents or let it look them up? Why retrieval (RAG) is the right default for a private knowledge base, and when it isn't.

Westerwick5 min read

Shelves of colourful labelled office binders, neatly filed
Photo: Richard Heinen on Unsplash (Unsplash License)
On this page

A common first question about AI assistants is: "Can we train it on our documents?" That's really the RAG vs fine-tuning question, and it's a reasonable instinct. You want a system that knows your policies, contracts and product manuals as well as your best staff member does.

But "training" usually isn't the right tool for that job. There are two very different ways to make an AI model useful with your own information, retrieval augmented generation (RAG) and fine-tuning, and choosing the wrong one costs time, money and trust.

RAG vs fine-tuning: what the model knows vs how it behaves

The simplest way to tell them apart:

  • RAG changes what the model can see. When someone asks a question, the system first looks up the most relevant passages in your documents, then hands them to the model with an instruction: answer using this. RAG "explicitly uses the domain-specific information through external retrieval" rather than changing the model1.
  • Fine-tuning changes how the model behaves. You retrain a copy of the model on examples until it absorbs a style, a format or a specialised task. AWS describes this as embedding "the required knowledge directly into the model"1.

AWS's own guidance draws the line in the same place: if you need a question-answering system that references your documents, "we recommend that you start from a RAG-based approach. Use fine-tuning if you need the model to perform additional tasks, such as summarization"1.

Why RAG is the right default for a knowledge base

For a private knowledge base, RAG wins on the things business owners actually care about.

It shows its sources. With RAG, "a RAG model provides a reference to the information source"1. On Amazon Bedrock Knowledge Bases, AWS's managed RAG service, responses "are returned with citations to the original source data"3. Your staff can click through and check the passage behind an answer. By contrast, AWS notes that "fine-tuned models do not provide a reference to the source in their responses"1.

It stays current. Policies change, prices change and contracts get renewed. AWS says RAG "can incorporate the latest documents in a few minutes", while fine-tuning "can take a few hours to days", which makes it a poor fit "if your custom documents change frequently"1.

It makes things up less often. Because a RAG answer is built from retrieved passages, "there is a reduced risk of hallucination"1. Fine-tuning goes the other way: "there can be an increased risk of hallucination when using a fine-tuned model to answer questions"1.

It doesn't need a data-science team. "AWS offers fully managed RAG solutions. Therefore, no data scientist or specialized knowledge of machine learning is required." Fine-tuning, by contrast, "might require a data scientist" and "might not be available for all models"1.

If the answer has to be traceable to a document, the model shouldn't be memorising your documents. It should be reading them.

There's also a governance benefit: RAG lets you update the documents available for retrieval without retraining the model1. In Bedrock, each time you add, change or remove files "you must sync the data source", and on sync a deleted document "is removed from the vector store"5.

What it costs: one worked example

AWS published a side-by-side test of the three approaches on the same dataset, assuming 1,000 users making 10 requests a day, run for a month in a US Region2:

ApproachAnswer quality (AWS's AI evaluator, 0–1)Response timeMonthly cost (USD)
RAG0.828.3 secondsabout $548
Fine-tuning0.564.2 secondsabout $5,107
RAG + fine-tuning0.8617.7 secondsabout $5,457

In that test, RAG gave much better answers than fine-tuning for roughly a tenth of the cost. Fine-tuning was faster to respond, and combining both was slightly more accurate but slowest and most expensive.

Two caveats matter. First, most of the fine-tuning cost is hosting: AWS assumed "the model instance is up 24/7", and notes that costs "can decrease significantly depending on the traffic pattern" if the hosted model scales down to zero when idle2. Second, AWS says "the results in this example were specific to the dataset that we used"2. Treat these as an illustration of the pattern, not a quote for your project.

When fine-tuning earns its place

Fine-tuning isn't wrong. It solves a different problem. It's worth considering when:

  • You need a consistent voice or format. A model trained on your organisation's writing can "create content that more closely matches your organization's style"1.
  • You need a specialised task done repeatedly, such as a particular kind of summary or classification. We recommend fine-tuning here only when testing shows a clear improvement over good instructions alone.
  • Speed matters more than freshness. In AWS's test, the fine-tuned model responded about twice as fast2.

And it doesn't have to be either/or. AWS notes you can fine-tune the model that sits inside a RAG system, which "might be an optimum solution for your use case"1. Research from UC Berkeley on this hybrid approach (RAFT) trains a model to make better use of retrieved documents4. In our view, that's a second-stage optimisation: prove RAG works on your documents first, then decide whether the extra cost is justified.

Where RAG can go wrong

RAG has its own weak spots, and a good project plans for them:

  • Whole-document summaries. AWS notes that "RAG does not work well when summarizing information from entire documents"1. It's built to find the right passage, not to digest a 200-page report in one pass.
  • Retrieval quality. An answer is only as good as the passages retrieved for it. We recommend testing whether retrieval finds the correct passages, and whether citations point to the right text, before changing models.
  • Safety filters don't cover everything. On Bedrock, Guardrails "are applied only to the input and the generated response from the LLM. They are not applied to the references retrieved from Knowledge Bases at runtime"3. What goes into your knowledge base needs its own review.
  • Knowing when to say "I don't know". A well-built assistant should decline to answer when the documents don't support an answer, rather than improvising.

If your organisation is in South Africa, there's one more design question: where the AI processing happens. We cover that separately in choosing an AWS Region for South African AI workloads.

What to do next

  1. Name the questions. List 20–30 real questions staff or customers ask, and the documents that should answer them.
  2. Pick a source of truth. Decide which documents are authoritative and who keeps them current. Stale documents give stale answers.
  3. Start with RAG on a small set. Test with those real questions, and check every answer's citation, not just whether it sounds right.
  4. Test the "no answer" cases. Ask things your documents don't cover and make sure the assistant says so.
  5. Consider fine-tuning only for a proven gap, such as a required tone or format, once the retrieval side is working.

Our Ask knowledge assistant demo shows this pattern working, citations and abstentions included.

See it on your own data first.

We stand up a working proof of concept on our AWS account. Real sample data, no cost to you, before you commit to a build.