Your support assistant gives a confident answer about a product limit. The answer is wrong. Should you add retrieval, fine-tune the model, or rewrite the prompt?

That depends on what went wrong. Perhaps the model never received the current manual. Perhaps it received the right paragraph and ignored an exception. Or perhaps the facts were fine, but the response broke the JSON format your application expects. Those failures can look similar in a chat window. They need different fixes.

The useful starting point for RAG vs fine-tuning is this: test retrieval when the model needs better evidence; test tuning when it repeatedly mishandles a well-defined task despite having the right information. Try a clear prompt and a few good examples first. Combine methods when you can explain what each one contributes.

This article follows a fictional support assistant through that decision. The scenarios and worksheet are design examples, not customer case studies or measured model results. Technical sources were checked on October 21, 2026. If the terminology is new, my guide to AI and large language models covers the foundations.

RAG vs fine-tuning at a glance

Retrieval-augmented generation, usually shortened to RAG, brings outside information into the answering process. Fine-tuning adapts a model through additional training. One changes the evidence available for a request; the other changes model parameters or trainable adapters.

The distinction is useful, but it has limits. Training can teach knowledge, and retrieval can bring examples of a preferred response style. Treat the comparison as a way to investigate failures, rather than a rigid rule about what either technique can do.

QuestionRAGFine-tuning
What changes?The information retrieved and supplied for a requestModel weights or trainable adapter parameters
What do you prepare?Searchable sources, metadata, permissions, and an update processReviewed training examples and separate evaluation data
What is a good starting use case?Answering questions from changing manuals or internal recordsImproving a repeated classification, format, or response task
How do you update facts?Refresh the source and retrieval pipelineUpdate training data and assess whether retraining is appropriate
Where do citations come from?Source records retained by the applicationFine-tuning alone does not create a reliable source lookup
What can go wrong?Missing, stale, unauthorized, or irrelevant evidenceLearning inconsistent examples, overfitting, or regressing on other tasks
Can you combine them?Yes, retrieve evidence for a tuned generatorYes, tune a model that still uses retrieval

On a phone, scroll the table sideways to read all three columns. For another vendor’s framing, AWS compares the two approaches and discusses using them together for document-based applications.

What RAG changes in an application

Take a support assistant for a small project-management app. A user asks how many rows the Team plan can export. The current manual says 20,000; a retired page says 5,000. These numbers belong to our fictional example.

A retrieval pipeline searches the permitted product documentation, selects relevant passages, and supplies them to the model. The generator then has evidence it did not need to memorize during training. The application can keep the page URL, version, and relevant passage alongside its answer.

That is the appeal of RAG: the manual can change independently of the model. The catch is that the application must retrieve the right version. Putting two conflicting pages into an index does not tell the system which one governs today’s product.

The original RAG paper by Lewis and colleagues combined parametric model knowledge with retrieved material for language generation. Modern application designs vary, but the practical idea remains: make useful evidence available when the question arrives.

The retrieval problem comes before the answer problem

If the assistant receives only the old 5,000-row passage, improving the wording of its answer will not repair the evidence. Inspect the retrieval result first. Was the current page indexed? Did it carry the right product and version metadata? Did a search filter accidentally exclude it?

Search does not have to begin with a vector database. Product codes, exact setting names, and error messages can benefit from lexical matching. Natural-language questions may benefit from semantic matching. A mixed collection may justify a hybrid approach. Microsoft’s RAG overview describes the retrieval and grounding work involved; the choice of index is only part of that work.

For a first test, a small collection is an advantage. You can read the retrieved passages and see whether the answer was even available. That is much harder when a demo ingests a whole drive before anyone has written an evaluation question.

A citation is a starting point for verification

Suppose the response says “You can export 20,000 rows, including archived projects,” followed by a citation. The manual may support the limit but say nothing about archived projects. The citation exists; the extra claim still needs checking.

Keep the evidence passage, not just the link. Assess whether each important claim follows from it. Also check whether the assistant can say that the available sources do not answer the question. Some failures come from being too willing to finish an answer.

What fine-tuning changes

Now give the assistant the correct manual. Its factual answers are acceptable, but ticket classification keeps drifting. Your application expects one of four labels. The model invents a fifth, or changes the output keys even after being shown the required schema.

Start with the inexpensive checks: make the label definitions unambiguous, validate the output, and supply a few representative examples. If the task is still unreliable and you have reviewed examples of good behavior, supervised fine-tuning becomes a candidate.

Training uses those examples to alter how the model responds to related inputs. Google’s explanation of supervised fine-tuning discusses task-specific examples, output formats, and behavior adaptation. It also recommends considering prompting and retrieval rather than treating training as the first move.

Training examples need a consistent answer

Consider two tickets with almost identical wording. One reviewer labels the first as a billing issue; another labels the second as a bug. If no written rule explains the difference, the training set is asking the model to learn an unresolved disagreement.

Resolve that disagreement before buying a training run. Write the rule, review a sample again, and include awkward boundary cases. A small set of coherent examples can be more useful for diagnosis than a large export of historic tickets whose labels changed with staffing or policy.

Keep evaluation examples out of training. Near-duplicate tickets also need attention: a held-out message is less informative if its rewritten twin appeared in the training data. Split by the underlying case or document where that better reflects your workload.

Where LoRA fits

Fine-tuning does not always mean updating every weight. Low-rank adaptation, or LoRA, trains smaller update matrices while keeping the original weights frozen. That can reduce the trainable parameter count and memory required for adaptation. Hugging Face’s LoRA conceptual guide explains the mechanism.

It does not eliminate data preparation, evaluation, serving compatibility, or regression testing. An adapter is still a versioned artifact whose behavior you need to understand. For current implementation details and supported data formats, use the TRL supervised fine-tuning documentation.

Diagnose the failure before choosing a method

Here is the most useful experiment in this comparison: give the model a short, correct passage containing everything needed to answer the question. Keep the question and instructions unchanged. Compare that result with the ordinary retrieval path.

If the answer improves when you supply that passage manually, investigate retrieval and context selection. If it still fails, the problem lies somewhere else: ambiguous instructions, a task the model handles poorly, competing context, or a flawed expected answer. Fine-tuning might help, but this experiment has not proved that it will.

For our support assistant, the investigation looks like this:

Observed mistakeWhat to inspectA sensible first experiment
It repeats the retired export limitSource freshness, filters, and rankingSupply the current passage directly, then compare retrieval
It gives the right limit in invalid JSONSchema, examples, and output validationConstrain and validate the response before testing tuning
It confuses two ticket categoriesLabel definitions and reviewed examplesResolve ambiguous cases and measure the existing prompt again
It answers an unannounced-feature question confidentlyEvidence sufficiency and uncertainty handlingInclude questions that have no answer in the approved sources
It reveals another team’s internal noteAuthorization and retrieval boundariesTest access control independently of answer quality

The last row deserves its own fix. Neither a more fluent response nor a tuned model establishes permission to read a document. Enforce the user’s access before the material reaches generation. Microsoft’s document-level access guidance covers that boundary in a retrieval system.

This diagnosis also prevents a common testing mistake: changing the retriever, model, prompt, and examples at once. A better answer is welcome, but you still need to know which change earned it.

An evaluation plan you can use

Download the RAG and fine-tuning evaluation worksheet. It contains eight illustrative cases for the fictional support assistant, with a proposed first intervention and an expected behavior. The result and notes columns are blank for your measurements. It is a starting template, not a scored benchmark.

Replace the sample inputs with reviewed cases from your own workload. Include ordinary requests as well as failures. A system that improves on the hardest examples but becomes unreliable on routine ones may be a poor trade.

Keep three questions separate

First, did retrieval return enough relevant evidence? You can often answer that by inspecting the passages before asking a generator to use them.

Second, did the response stay faithful to that evidence? This is different from sounding relevant. A concise answer can still add an unsupported condition.

Third, did it satisfy the task? A grounded answer might omit a required step, use the wrong category, or break the expected output structure.

Ragas documents metrics for retrieval quality, response relevance, and faithfulness, among others. Those categories are useful even if you begin with a spreadsheet. A model-based grader can help scale review, but check it against human judgments before relying on its score.

For an internal tool, I’d rather begin with a small set of cases that reviewers can explain than a dashboard of scores nobody has checked. Add more cases as you learn which mistakes matter.

Compare changes on the same cases

Start with the base model and your clearest prompt. Test a retrieval version against it where outside evidence is needed. If the remaining failures justify training, compare the tuned version using the same held-out tasks and acceptance rules.

Record the model revision, prompts, source snapshot, retrieval settings, and training-data version. Repeat important cases when the system can vary between runs. Do not turn a successful demonstration into a reliability claim without those repetitions.

Avoid collapsing every result into a single average. Invalid output may be unacceptable for an automated pipeline even when most prose answers look good. An unauthorized disclosure is not balanced out by ten correct answers. Choose release criteria that reflect the consequences of each failure.

Cost: the model bill is only one line

“Which is cheaper?” sounds like a simple question until the first data update or support correction arrives.

RAG adds work around the model: ingestion, parsing, indexing, source updates, retrieval, and often extra context tokens. Fine-tuning adds a different set of costs: selecting and reviewing examples, training, evaluating, deploying the resulting model or adapter, and maintaining it when requirements change.

A useful calculation is:

Cost per accepted task =
  model + retrieval + infrastructure + data work + review costs
  divided by tasks that meet the agreed acceptance criteria

Keep the accounting period and workload consistent. If you compare a training bill for one month with retrieval costs for a single day, the result says little about either architecture.

Tuning might let you shorten repetitive instructions or use a smaller suitable model. Retrieval might avoid repeated retraining when the manual changes. Neither saving is automatic. Measure the version you intend to deploy, including the work needed to correct its mistakes.

Latency has the same trap. Retrieval introduces a stage before generation, while a shorter prompt or smaller generator may save time elsewhere. Track the whole request, including slow cases and retries. The answer depends on your pipeline, not the label on its architecture diagram.

When combining RAG and fine-tuning makes sense

Return to the support assistant. The product manual changes often, so retrieval supplies current facts. The company also has a stable, well-defined ticket taxonomy and a concise answer format. Those are separate requirements. It is reasonable to test a tuned generator that still receives retrieved evidence.

Combination is especially interesting when the model has the right passages but handles distracting context poorly. The RAFT research paper studies training for answering with relevant retrieved documents while ignoring distractors. It provides one concrete research example of retrieval and adaptation being used together; its reported results are not a promise about a different dataset or model.

Do not add both methods simply to avoid choosing. You will then own two systems to diagnose. When an answer worsens, you need to distinguish a source update, retrieval change, and model regression. Keep separate tests and version records for each.

In practice, the order should follow the problem. Stabilize the evidence path when missing information dominates. Improve task examples and model behavior when the evidence is already sufficient. Add the other technique once a measured gap calls for it.

What about a larger context window or an AI agent?

If the complete approved source is short, supplying it directly may be the cleanest baseline. A retrieval service is not mandatory for a few pages that fit comfortably into a request. Check the resulting answer quality, latency, and cost before building an index.

As the collection grows, selecting the relevant material becomes more valuable. A larger context window gives you capacity; it does not tell you whether every included passage helps. Old versions, duplicated sections, and irrelevant instructions can still complicate the task.

An agent adds another decision layer. It can choose to search again, inspect another document, or call a service. That is useful when the next action depends on what the system discovers. It also creates more behavior to evaluate.

My Python research-agent tutorial shows a small runtime with read-only tools and citation-provenance checks. Its controlled tests explain the execution boundary; they do not establish that a particular model will research a topic accurately. RAG, tuning, and agent orchestration remain separate choices even when one product uses all three.

A practical decision to take back to your project

Before the next architecture meeting, collect a few failed outputs and the information available when they were generated. For each one, write down what would count as a correct result.

If the answer was missing from the supplied information, work on the evidence path. If the information was there and the task was clear, investigate the model’s handling of it. If reviewers disagree about the expected answer, resolve that first.

Then run one small experiment. A better retriever, a clearer example, or a carefully scoped tuning job should earn its place through the error it fixes. The strongest design is one your team can explain when it fails.

For model candidates and serving constraints, use my comparison of open-source and open-weight AI models. Keep that choice separate from the retrieval-versus-training decision: changing the model does not automatically repair the rest of the application.

Books, videos, and further reading

The books below go deeper into application design, retrieval, and model adaptation. Select Read More for the Book and Author tabs; the Buy link opens the publisher’s page. Access and purchase options vary.

Books

AI Engineering By Chip Huyen
AI Engineering
By: Chip Huyen
Buy
Hands-On Large Language Models By Jay Alammar and Maarten Grootendorst
Hands-On Large Language Models
By: Jay Alammar and Maarten Grootendorst
Designing Large Language Model Applications By Suhas Pai
Designing Large Language Model Applications
By: Suhas Pai
A Simple Guide to Retrieval Augmented Generation By Abhinav Kimothi
A Simple Guide to Retrieval Augmented Generation
By: Abhinav Kimothi

Videos you can watch here

Use a play button to open the site’s video player. The introductory recordings teach the concepts; consult current documentation before copying version-specific code or choosing a service.

RAG vs. Fine Tuning — IBM TechnologyRAG vs. Fine Tuning — IBM Technology
What is Retrieval-Augmented Generation (RAG)? — IBM TechnologyWhat is Retrieval-Augmented Generation (RAG)? — IBM Technology
Is Fine-Tuning Still Needed? LLMs, RAG, & LoRA — IBM TechnologyIs Fine-Tuning Still Needed? LLMs, RAG, & LoRA — IBM Technology
Deep Dive into LLM Evaluation with Weights & Biases — DeepLearning.AIDeep Dive into LLM Evaluation with Weights & Biases — DeepLearning.AI

Primary sources and useful documentation

Frequently asked questions about RAG and fine-tuning