RAG vs Fine-Tuning: Which One Does Your Business Need?
Better prompt
The instructions are unclear or the answers are inconsistent. Cheapest to test.
RAG
The model lacks your current information. Give it your documents to look up.
Fine-tuning
The model has the facts but format or tone drifts. Teach it with examples.
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.
The instructions
Rules, examples and output format sent with every question.
The information
Your documents are searched, and the best passages are added to the question.
The model itself
Extra training on your examples changes how the model behaves.
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 see | What is probably wrong | Try first |
|---|---|---|
| Answers about your products, prices or policies are wrong or out of date | The model never saw your current information | RAG over your current documents |
| Answers sound confident, cite nothing and sometimes invent details | Nothing ties the answer to a source | RAG with required citations and a rule to say "I do not know" |
| The facts are right but format, tone or length drifts | The model needs clearer behavior rules or examples | A 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 days | Inconsistent behavior on a repeated task | A prompt with examples, then fine-tuning for large volumes |
| The right document exists but the answer ignores it | A retrieval or instruction problem, not a model problem | Fix retrieval and instructions before touching the model |
| The prompt works but is very long, slow or costly at high volume | An efficiency problem | Shorten the prompt, reuse cached context, or fine-tune a smaller model |
| Answers should differ depending on who is asking | Access rules are missing | RAG 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.
| Feature | Prompt engineering | RAG | Fine-tuning |
|---|---|---|---|
| What it changes | The instructions sent with each request | The information placed in front of the model at question time | The model's weights |
| Best at fixing | Unclear, inconsistent or badly formatted answers | Missing, private or changing facts | Consistent format, tone and task behavior at volume |
| Weak at | Large or changing knowledge | Format and tone consistency by itself | Adding facts that change |
| When a fact changes | Edit the prompt | Update the document and re-index | Usually a new training run and re-testing |
| Citations | Only if you supply the source text | Can point to the passage used | Not built in |
| Setup work | Writing and testing prompts | Collecting, cleaning and indexing documents, and building retrieval | Preparing examples, training, and testing on a hold-out set |
| Ongoing work | Re-test when the model version changes | Keep documents current and monitor retrieval | Re-train and re-test when facts, data or the base model change |
| Main risk | The prompt grows long and brittle | Wrong or outdated passages are retrieved | Learning errors in the examples, and dependence on a base model that can be retired |
| Who keeps it accurate | Whoever owns the task | The owner of each document source | The experts who approve examples, plus someone who re-tests |
| Good first test | Rewrite the prompt and run your test set | Index a subset of documents and run your test set | Train 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.
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 area | Prompt engineering | RAG | Fine-tuning |
|---|---|---|---|
| Build | Time to write and test prompts | Document cleanup, indexing, retrieval and an interface | Expert time to prepare examples, training runs and testing |
| Running | Longer prompts cost more per request | A search step, plus the cost of longer prompts that carry retrieved text | Often shorter prompts and sometimes a smaller model, plus hosting if you run it yourself |
| Updating | Edit the text | Re-index changed documents | A new training run and re-testing |
| Evaluation | Run the test set | Test retrieval and answers separately | Test against a hold-out set and the full test set |
| Skills | A business user and a developer | A developer with search and data skills | A developer with machine learning skills, or a provider's tuning service |
| Retirement | Re-test on the new model | Re-test on the new model; documents stay yours | Re-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.
Gate 1, baseline: write the best prompt you can and score it on the test set.
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.
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.
Gate 4, fine-tuning pilot: if behavior failures remain after better prompts and examples, run a small pilot with a hold-out set.
Gate 5, combine: use both only if each has fixed something the other could not.
Missing or outdated facts
Run a small RAG pilot on a subset of documents.
Behavior still wrong
Add examples to the prompt. If it still fails, run a fine-tuning pilot with a hold-out set.
Wrong document found
Repair search and sources. Changing the model will not help.
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:
Which failure are you fixing, and what is the current score on a test set?
Did you try a better prompt first, and what happened?
For fine-tuning: which base model is it built on, and when is that model scheduled to retire?
Who owns the tuned model or the document index, and can we take it with us?
How is our data stored, who can see it, and is it used to train anything else?
How does a changed policy or price reach the system, and how long does it take?
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.