RAG

By Fossilite Team

Published

1 December 2026

Read time

20 min read

RAG vs Fine-Tuning: Which One Does Your Business Need?

Fossilite Guide
Knowledge Problem Or Behavior Problem?
Match the fix to what is actually failing.
Start here

Better prompt

The instructions are unclear or the answers are inconsistent. Cheapest to test.

→
Missing facts

RAG

The model lacks your current information. Give it your documents to look up.

→
Wrong behavior

Fine-tuning

The model has the facts but format or tone drifts. Teach it with examples.

TEST ON YOUR OWN QUESTIONS BEFORE YOU MOVE TO THE NEXT STEP

RAG vs fine-tuning is the choice between giving an AI model your information to look up and training the model to behave differently. Use RAG when the model lacks facts, such as your prices, policies or documents. Use fine-tuning when it has the facts but gets the format, tone or labels wrong. Try a better prompt before either.

Both make a general AI model more useful to one business, which is why they get compared, but they work in different places. RAG, short for retrieval-augmented generation, searches your documents each time someone asks a question and hands the best-matching passages to the model. Fine-tuning trains the model further on examples you supply, so the model itself changes.

This guide is for owners and managers deciding what to ask a developer or vendor to build. It shows how to tell which kind of problem you have, what each option needs from your business, what it costs to keep running and when to stop. It also covers a 2026 change that affects planning: OpenAI has closed its fine-tuning platform to new users and is winding it down.

What Is The Difference Between RAG And Fine-Tuning?

The difference between RAG and fine-tuning is where the change happens. An AI model answers using three things: the instructions it receives, the information placed in front of it, and what it learned in training. Prompt engineering changes the instructions, RAG changes the information, and fine-tuning changes the model. Each fixes a different kind of failure.

Prompt Engineering: Changing The Instructions

Prompt engineering means improving the instructions and examples you send to the model with each request. It changes no software and no model settings. You write clearer rules, add sample answers and state the output format. It is the fastest and cheapest option, and it shows what the model gets wrong before you spend anything on RAG or fine-tuning.

RAG: Changing What The Model Can Look Up

Retrieval-augmented generation, or RAG, searches your own documents when a question arrives and gives the best-matching passages to the model along with the question. The model answers from those passages. The model is not retrained, so updating a document updates the next answer, and the answer can point to its source.

The idea comes from a 2020 research paper by Patrick Lewis and colleagues, which combined a language model with a searchable index of Wikipedia. The authors noted that knowledge stored inside a model is hard to trace and hard to update, and retrieval was their answer to both problems (Lewis et al., 2020 (opens in a new tab)). Many RAG systems find passages with a vector database, a store that searches by meaning rather than exact words. That is common but not required, as our guide on RAG without a vector database explains. If you do need one, our guide to choosing a vector database compares the options.

Fine-Tuning: Changing The Model Itself

Fine-tuning continues a model's training on examples you supply, usually pairs of an input and the ideal output. The model's internal settings, called weights, change, so it follows your patterns without being reminded. It suits consistent format, tone and classification, and it is a poor way to teach a model new facts.

OpenAI's accuracy guide describes the split as two separate problems. One is what the model knows, which it calls context optimization and answers mainly with RAG. The other is how consistently the model behaves, which it calls LLM optimization and answers mainly with fine-tuning (OpenAI, optimizing LLM accuracy (opens in a new tab)). An LLM, or large language model, is the kind of AI model behind most business chat and writing tools.

Where each option works
Three Different Places To Change An AI Answer
Each option changes a different part of the path from question to answer.
1. Prompt engineering

The instructions

Rules, examples and output format sent with every question.

→
2. RAG

The information

Your documents are searched, and the best passages are added to the question.

→
3. Fine-tuning

The model itself

Extra training on your examples changes how the model behaves.

QUESTION → INSTRUCTIONS + DOCUMENTS → MODEL → ANSWER
Fig. 1: Each option changes a different part of the path from question to answer.

Diagnose The Failure Before You Choose A Fix

A common mistake in the RAG vs fine-tuning decision is to pick a solution first and look for a problem afterwards. Reverse that. Write down what is going wrong in plain terms, then match it to a cause. The table below covers common failures and where to start with each.

What you seeWhat is probably wrongTry first
Answers about your products, prices or policies are wrong or out of dateThe model never saw your current informationRAG over your current documents
Answers sound confident, cite nothing and sometimes invent detailsNothing ties the answer to a sourceRAG with required citations and a rule to say "I do not know"
The facts are right but format, tone or length driftsThe model needs clearer behavior rules or examplesA prompt with rules and three to five sample answers, then fine-tuning if it still drifts
The same kind of item gets different labels on different daysInconsistent behavior on a repeated taskA prompt with examples, then fine-tuning for large volumes
The right document exists but the answer ignores itA retrieval or instruction problem, not a model problemFix retrieval and instructions before touching the model
The prompt works but is very long, slow or costly at high volumeAn efficiency problemShorten the prompt, reuse cached context, or fine-tune a smaller model
Answers should differ depending on who is askingAccess rules are missingRAG with permissions applied when documents are retrieved

Table 1: Common failures, their likely cause and what to try first.

Build A Small Test Set First

A test set is a fixed list of real questions or tasks, each paired with an ideal answer. It turns "this feels better" into a score you can compare after every change. OpenAI's guidance suggests at least 20 question and answer pairs to start (OpenAI, optimizing LLM accuracy (opens in a new tab)). We suggest 30 to 50 drawn from real tickets, emails or calls, including hard cases and questions where the correct response is "I do not know, hand this to a person."

Score each answer as pass or fail and write one line on why. Keep the set fixed so that every later change faces the same questions. Our guide on how to test an AI solution before you commit covers how to run a small proof of concept around a test set like this.

Sort The Failures Into Groups

After the first run, sort every failure into one group: missing fact, wrong document found, wrong format or tone, ignored rule, or risky answer that should have been escalated. The largest group points to the fix. A pile of missing facts points to RAG. A pile of format and tone failures points to better examples and, later, fine-tuning. A pile of wrong-document failures means the search needs work, and no change to the model will help.

When Prompt Engineering Is Enough

Prompt engineering is often enough for summarizing, rewriting, extracting fields from text and drafting in a set format, where the model already has the knowledge and only needs clear instructions. OpenAI's guidance treats it as the usual starting point and notes that it forces you to define what a correct answer looks like.

It reaches its limits when the knowledge is large, private or changing, and when you need the same behavior across thousands of requests. Stuffing more and more text into the prompt gets slower and more expensive, and it makes results harder to predict.

Small Knowledge Bases Can Skip Retrieval

If your knowledge base is smaller than about 200,000 tokens, roughly 500 pages, Anthropic's guidance says you can place all of it in the prompt and skip RAG. A token is a small chunk of text, often part of a word. Anthropic added that prompt caching, which reuses the same prompt text across requests, could cut latency by more than 2x and cost by up to 90%. Those figures come from the company's September 2024 announcement, so confirm current pricing and limits with your provider (Anthropic, Contextual Retrieval (opens in a new tab)).

Putting everything in the prompt has its own tradeoffs. Accuracy can fall before the context window is full, so test it at your real size before relying on it.

When RAG Is The Right Choice

Choose RAG when the answer depends on information that lives in your documents, such as policies, prices or contracts, and the model cannot be expected to know it. RAG also suits answers that must cite a source or change often. Common signs:

  • Answers must reflect current prices, policies, contracts or product details.

  • Users or auditors need to see which document an answer came from.

  • The knowledge is too large to fit in a prompt.

  • Different users are allowed to see different documents.

  • Information changes often enough that retraining each time would be impractical.

What RAG Needs From Your Business

RAG is only as good as the documents behind it. Before building, check that each source has an owner, that outdated versions are removed or clearly marked, that duplicates are cleaned up, and that someone knows how changes will reach the system. A permissions plan matters too, because a RAG system can only respect access rules that exist in your data. Our AI readiness checklist walks through these questions.

Where RAG Goes Wrong

RAG reduces made-up answers but does not remove them. The search can return the wrong passage, two documents can disagree, the model can ignore what it was given, or a correct answer can be buried under too much text. Each failure needs a different fix, and testing retrieval separately from the final answer is what makes them findable. Our guide to building production RAG that reduces hallucinations covers that testing in detail. For the technical side of chunking, reranking and measuring retrieval, SensViz has a guide to RAG architecture and retrieval quality (opens in a new tab).

When Fine-Tuning Is The Right Choice

Choose fine-tuning when the model has what it needs to know but keeps behaving the wrong way, and a good prompt with examples has already been tried and measured. Fine-tuning is about teaching a pattern through repetition, which is why it needs examples rather than documents.

What Fine-Tuning Does Well

OpenAI's supervised fine-tuning guide lists four best-fit uses: classification, nuanced translation, generating content in a specific format, and correcting instruction-following failures. Its accuracy guide adds efficiency: a tuned model can sometimes work with a shorter prompt or a smaller model, which lowers cost and delay at high volume. These are all behavior and consistency gains. None of them is "the model now knows our company."

If your task is sorting or scoring structured records, such as invoices or leads, a simpler machine learning model may beat any language model approach. Our guide on choosing the right machine learning model explains how to judge that.

Why Fine-Tuning Is A Weak Way To Teach Facts

Two research papers point the same way. Ovadia and colleagues compared unsupervised fine-tuning with RAG for adding knowledge to a model, and RAG consistently performed better in their tests (Ovadia et al., 2023 (opens in a new tab)). Gekhman and colleagues studied closed-book question answering and found that examples containing new facts were learned slowly, and that once learned they increased the model's tendency to hallucinate. They also suggest that most factual knowledge comes from pre-training (Gekhman et al., 2024 (opens in a new tab)). Both studies used controlled research settings, so treat them as a strong signal rather than a rule for every task.

In practice, facts change, need sources and need correcting, and documents handle all three more easily than model weights do. Keep facts in documents and use fine-tuning for behavior.

What You Need Before You Start

Fine-tuning is worth a pilot only when you have these in place:

  • A prompt baseline you have already tested, with failures counted and sorted.

  • Examples of ideal answers, written or approved by people who know the work. OpenAI reports that improvements often appear with 50 to 100 well-crafted examples and sets a minimum of 10.

  • A hold-out set, meaning examples kept out of training so you can check that the model improved on cases it has not seen.

  • Permission to use the data for training, and a clear answer on how the provider handles it.

  • An owner who will re-test the tuned model whenever the base model, the data or the task changes.

Fine-Tuning Availability In 2026

Fine-tuning depends on the model provider continuing to offer it, and that is less certain than it was. OpenAI's notice says it is winding down the fine-tuning platform, which is no longer open to new users. Eligible existing customers can create training jobs until January 6, 2027, unless the base model shuts down earlier. Fine-tuned versions of gpt-4.1-nano shut down on October 23, 2026, and those of gpt-4.1 and gpt-4.1-mini are scheduled to shut down on January 14, 2027 (OpenAI, supervised fine-tuning (opens in a new tab)).

The same risk applies elsewhere. Amazon Bedrock announced fine-tuning for Anthropic's Claude 3 Haiku as generally available in November 2024, and AWS now says that model reached end of life on September 10, 2026 (AWS, Claude 3 Haiku fine-tuning (opens in a new tab)). A fine-tuned model is tied to the base model it was built on. When that base model is retired, the tuning work has to be redone on a newer one, or it is lost.

Other providers still support tuning, including Google's Gemini models on Vertex AI (Google Cloud (opens in a new tab)), and open-weight models, whose settings are published so you can run them yourself, can be tuned with a technique called LoRA. LoRA trains a small add-on instead of the whole model. In the original paper's comparison with full fine-tuning of GPT-3 175B, it cut trainable parameters by 10,000 times and GPU memory needs by 3 times (Hu et al., 2021 (opens in a new tab)). That lowers training cost, but you still need to host and maintain the result. Confirm current availability and retirement dates before any fine-tuning plan is approved.

When Neither Is The Answer

Some problems need neither. A well-organized FAQ page or ordinary site search may answer your customers' questions better than an AI model. A fixed set of rules may handle a routine approval. A classical prediction model may fit a scoring task, and our guide on telling whether you have a prediction problem helps with that call.

RAG Vs Fine-Tuning Vs Prompt Engineering Compared

When teams weigh prompt engineering vs fine-tuning vs RAG, they often compare one option's strengths with another's weaknesses. The table holds all three to the same standard: what each changes, what it is good and poor at, what it needs and what can go wrong.

FeaturePrompt engineeringRAGFine-tuning
What it changesThe instructions sent with each requestThe information placed in front of the model at question timeThe model's weights
Best at fixingUnclear, inconsistent or badly formatted answersMissing, private or changing factsConsistent format, tone and task behavior at volume
Weak atLarge or changing knowledgeFormat and tone consistency by itselfAdding facts that change
When a fact changesEdit the promptUpdate the document and re-indexUsually a new training run and re-testing
CitationsOnly if you supply the source textCan point to the passage usedNot built in
Setup workWriting and testing promptsCollecting, cleaning and indexing documents, and building retrievalPreparing examples, training, and testing on a hold-out set
Ongoing workRe-test when the model version changesKeep documents current and monitor retrievalRe-train and re-test when facts, data or the base model change
Main riskThe prompt grows long and brittleWrong or outdated passages are retrievedLearning errors in the examples, and dependence on a base model that can be retired
Who keeps it accurateWhoever owns the taskThe owner of each document sourceThe experts who approve examples, plus someone who re-tests
Good first testRewrite the prompt and run your test setIndex a subset of documents and run your test setTrain on 50 or more examples and compare on held-out cases

Table 2: Prompt engineering, RAG and fine-tuning held to the same standard.

The table covers who keeps each option accurate, not who owns it. Ownership of the tuned model, the document index and the data is a legal and commercial question, and it is separate from upkeep. Settle both in writing before you sign, and do not assume that one answers the other.

When a policy changes
What It Takes To Get A New Fact Into The Answers
RAG updates the information. Fine-tuning has to update the model.
RAG
Update the document
→
Re-index it
→
Next answer reflects it
Fine-tuning
Update the examples
→
Run a new training job
→
Re-test on held-out cases
→
Switch to the new model
FEWER STEPS FOR FACTS THAT CHANGE OFTEN
Fig. 2: The steps it takes to get a changed fact into the answers.

Fig. 2 shows why the update path matters for fast-changing information. In RAG, a changed policy reaches the next answer after the document is updated. In fine-tuning, the same change travels through new examples, a training run and a fresh round of testing.

A 2024 survey by Menlo Ventures of 600 US enterprise IT decision-makers at companies with 50 or more employees reported RAG adoption at 51%, up from 31% a year earlier, while only 9% of production models were fine-tuned (Menlo Ventures, 2024 (opens in a new tab)). It is one survey of larger US companies from late 2024, so treat it as direction rather than proof for your business.

Can You Combine RAG And Fine-Tuning?

Yes. A common setup uses RAG to supply current facts and fine-tuning to keep the style, format or labeling consistent. Add them in that order, and add fine-tuning only after measuring a behavior problem that prompts and examples did not fix.

Combining needs care. OpenAI advises that training examples should match what the application sends in production, including retrieved context if the application uses RAG. It also shows a case where adding RAG lowered the score of a model that had already learned a behavior through fine-tuning. Test the combined system as a whole, not the parts alone.

What Each Option Costs To Run

Cost comparisons of fine-tuning vs RAG often focus on the build and skip the upkeep. Prices change often and vary by provider, so this guide lists cost drivers instead of figures. Use the table to ask for a quote that covers all of them. Our guide on what it costs to build an AI agent gives a fuller budget breakdown.

Cost areaPrompt engineeringRAGFine-tuning
BuildTime to write and test promptsDocument cleanup, indexing, retrieval and an interfaceExpert time to prepare examples, training runs and testing
RunningLonger prompts cost more per requestA search step, plus the cost of longer prompts that carry retrieved textOften shorter prompts and sometimes a smaller model, plus hosting if you run it yourself
UpdatingEdit the textRe-index changed documentsA new training run and re-testing
EvaluationRun the test setTest retrieval and answers separatelyTest against a hold-out set and the full test set
SkillsA business user and a developerA developer with search and data skillsA developer with machine learning skills, or a provider's tuning service
RetirementRe-test on the new modelRe-test on the new model; documents stay yoursRe-train on the new base model, or lose the tuned model

Table 3: Cost drivers to ask about in any quote. Prices are left out because they change often.

Each project also carries the cost of the test set itself. It takes expert time to write, and it is usually the most useful spend in the project, because it lets you compare options on your own work instead of on a vendor's demo.

Security, Privacy And Ownership

The risks differ by approach. With RAG, the main concern is who can retrieve what. OWASP's 2025 list of risks for LLM applications warns that weak permissions on embeddings can let a system reveal restricted content, that shared vector stores can leak data between user groups, and that poisoned documents can steer answers. Its defenses include permission-aware stores, validated sources and tamper-resistant retrieval logs (OWASP, LLM08:2025 (opens in a new tab)).

With fine-tuning, the concern is the training data. Ask the provider whether your examples are retained, who can access them and whether they can be used to improve other models, and check that you have the right to use the data. Whoever builds either system, a written policy for staff use helps, and our AI acceptable use policy template is a place to start. For controls on what an AI system is allowed to do once it is running, see AI agent guardrails.

A Worked Example: Support Answers For A Home-Services Company (Illustrative)

This example is illustrative. It is not a Fossilite client and the numbers are invented to show the method.

A 60-person home-services company wants an AI assistant to draft replies to warranty and scheduling questions. The support lead collects 40 real past questions with approved answers as a test set. With a basic prompt, 22 of 40 answers pass. Of the 18 failures, 13 come from missing or outdated facts, such as current warranty terms and service areas, 4 from replies that are too long or off-tone, and 1 from a complaint the assistant should have handed to a person.

The facts are the largest group, so the team adds RAG over the current warranty, pricing and service-area documents. Eleven of the 13 fact failures are fixed, and 33 of 40 pass. The two remaining fact failures turn out to be an old warranty PDF that was still indexed. Removing it fixes both, and 35 of 40 pass. For the 4 tone failures, the team adds four approved sample replies to the prompt, which fixes all of them, and 39 of 40 pass. The last failure is not a model problem at all: the team adds a rule that complaints go straight to a person.

The decision is not to fine-tune. The tone problem was solved with examples in the prompt, and the knowledge problem was solved with documents. The team writes down what would change that: if volume grows enough that long prompts become costly, or if tone failures return at scale, a fine-tuning pilot becomes worth testing against the same 40 questions.

A Decision Path With Stop Rules

The path below turns the guide into five gates. Move to the next gate only when the one before it has been measured and has failed to solve the problem.

  1. Gate 1, baseline: write the best prompt you can and score it on the test set.

  2. Gate 2, sort: group the failures. Missing facts lead to Gate 3, wrong behavior to Gate 4, and wrong retrieval to fixing search and sources first.

  3. Gate 3, RAG pilot: if missing or outdated facts are the largest group, build a small RAG pilot on a subset of documents and score it again.

  4. Gate 4, fine-tuning pilot: if behavior failures remain after better prompts and examples, run a small pilot with a hold-out set.

  5. Gate 5, combine: use both only if each has fixed something the other could not.

Decision path
Move Up One Step Only When The Test Says So
Measure on the same test set after every change.
Gate 1 Write the best prompt you can and score it on your test set.
Gate 2 Sort every failure into a group.
Gate 3

Missing or outdated facts

Run a small RAG pilot on a subset of documents.

Gate 4

Behavior still wrong

Add examples to the prompt. If it still fails, run a fine-tuning pilot with a hold-out set.

Fix first

Wrong document found

Repair search and sources. Changing the model will not help.

Gate 5 Combine RAG and fine-tuning only if each fixed something the other could not.
Stop rule Stop any pilot that misses the improvement you set in advance.
Fig. 3: The decision path. Move up one step only when the test says so.

Stop rules keep a pilot from running on hope. These are our suggested rules of thumb, not an industry standard, so adjust them to your risk level:

  • Do not start a fine-tuning pilot until behavior failures are the largest remaining group after prompts and examples have been tried.

  • Allow a fine-tuning pilot two training rounds. Stop if the hold-out score has not improved by the margin you set in advance, or if the tuned model performs worse on cases where it should refuse or escalate.

  • If more than half of the remaining RAG failures trace to document problems, such as outdated, duplicate or missing sources, stop tuning the search and fix the documents.

  • Do not approve fine-tuning work if its base model will be retired before the project can pay for itself.

Our guide to building an AI implementation roadmap covers how these gates fit into a longer plan.

Questions To Ask A Developer Or Vendor

Whoever proposes RAG or fine-tuning, these questions separate a measured plan from a sales pitch:

  1. Which failure are you fixing, and what is the current score on a test set?

  2. Did you try a better prompt first, and what happened?

  3. For fine-tuning: which base model is it built on, and when is that model scheduled to retire?

  4. Who owns the tuned model or the document index, and can we take it with us?

  5. How is our data stored, who can see it, and is it used to train anything else?

  6. How does a changed policy or price reach the system, and how long does it take?

  7. How will you test retrieval and answers separately, and who reviews the failures?

Our guide on vetting an AI vendor shows how to test a provider's claims before you sign. The same questions also help when you are choosing an AI consulting partner.

How Fossilite Approaches RAG And Fine-Tuning

Fossilite starts with the workflow and the problem, not with a model. We look at what your existing tools already do, help you build a test set from real cases, and sort the failures before recommending anything. Often the answer is a better prompt or cleaner documents rather than new AI work.

When RAG or fine-tuning is justified, we prefer to pilot it on one workflow, agree in advance what score counts as success, and write down who keeps the documents or examples accurate after launch.

Frequently Asked Questions

These are the questions business owners ask most often when choosing between RAG, fine-tuning and a better prompt. Each answer stands on its own.

Is RAG better than fine-tuning?

Neither is better in general. RAG is usually the better choice for facts that change or must be cited, such as policies, prices and product details. Fine-tuning is better for consistent format, tone and classification. Match the tool to the failure you measured, and try a better prompt first.

Is fine-tuning cheaper than RAG?

It depends on volume and how often your information changes. Fine-tuning adds training and re-testing costs whenever something changes, but may allow shorter prompts or a smaller model at high volume. RAG adds setup and upkeep costs for documents and search. Compare both on your own test set and expected request volume.

Does fine-tuning reduce hallucinations?

Not reliably. Fine-tuning mainly changes behavior, and one controlled study found that training on facts a model did not already know increased its tendency to hallucinate. For factual accuracy, grounding answers in your documents with RAG is the stronger control, though it does not remove errors either.

Can I use RAG and fine-tuning together?

Yes. A common pattern uses RAG for current facts and fine-tuning for consistent format or tone. Add them in that order, and only after measuring a remaining behavior problem. Train on examples that include the retrieved text your application will actually send, because mismatched training data can lower quality.

How much data do I need to fine-tune a model?

Less than most people expect for a first test. OpenAI's guidance says improvements often appear with 50 to 100 well-crafted examples, with 10 as the minimum. Quality matters more than volume. Keep some examples aside as a hold-out set to check the model improved on cases it has not seen.

Do I need a vector database for RAG?

Not always. RAG only needs a way to find the right passages. Many systems use a vector database, which finds text by meaning, but keyword search, document structure or a small knowledge base placed in the prompt can also work. Test retrieval on your real questions before paying for new infrastructure.

Is fine-tuning still available in 2026?

Yes, but options have narrowed. OpenAI said in May 2026 that its fine-tuning platform is closed to new users and winding down, with new jobs for eligible existing customers ending January 6, 2027. Other providers and open-weight models still support tuning. Confirm availability and base-model retirement dates before planning around it.

What should I try first: a better prompt, RAG or fine-tuning?

Start with a better prompt and a small test set, because it is the cheapest way to see what actually fails. Add RAG if the failures are missing or outdated facts. Consider fine-tuning only if behavior problems remain after prompts and examples. This order limits cost and keeps each change measurable.

What To Do Next

Before you settle RAG vs fine-tuning or ask anyone to build either, collect 30 to 50 real questions with approved answers and score a basic prompt against them. Our guide to running an AI proof of concept shows how to turn that test set into a small, low-risk trial. If you would like a second opinion on which problem you have, you can talk with the Fossilite team.