BlogRAG
Deciding whether a task needs retrieval, fine-tuning or both
Ask whether the model is failing because it lacks facts or because it behaves inconsistently. Facts that change, need a source or depend on who is asking belong in retrieval. A narrow, stable task where the model must apply the same pattern to many inputs is a candidate for fine-tuning. Many products need both, and most should try a well-built prompt with an evaluation set before either.
Knowledge problem or behaviour problem?
A quick test: if a document changed tomorrow, would the correct answer change too? If yes, the task depends on knowledge, and that knowledge should be looked up at question time. If the correct output is a pattern applied to new input, such as a category, a field layout or a tone, the task depends on behaviour.
Mixed tasks are common. A support reply needs current product facts and a consistent house style. Splitting the requirement this way tells you which part each technique should carry.
Why changing facts belong in retrieval
The original RAG paper from 2020 named two weaknesses of knowledge stored only in model weights: it is hard to show where an answer came from, and hard to update. Retrieval addresses both, because the source passage can be cited and replaced. A 2023 study by Ovadia and colleagues compared unsupervised fine-tuning with retrieval for adding knowledge and found that retrieval consistently performed better, both for facts the model had seen and for new ones. The authors also reported that models struggled to learn new facts through fine-tuning unless they saw many variations of each fact.
There are operational reasons as well. Retrieval can filter documents by user permissions, cite its sources and drop a withdrawn document at the next sync, with a delay that depends on how sync is configured. Fine-tuning alone provides none of these mechanisms: a fact in the weights carries no access list and no source link, so scoping or removing it depends on controls around the model or on another training run.
Where fine-tuning earns its place
OpenAI's model optimisation guide describes fine-tuning as an optional step after evaluations and prompt work, and lists what each method suits: supervised fine-tuning for classification, specific output formats and fixing instruction-following failures; preference optimisation for tone and style; reinforcement fine-tuning for domain reasoning where expert graders agree on the right answer. Its stated benefits include training on more examples than fit in a prompt, shorter prompts and a smaller, faster model for one task.
Fine-tuning needs labelled examples of correct output, a task definition that stays stable for a while, and held-out cases to compare against the current model. Check availability before planning. When we read that guide in October 2026, it stated that OpenAI's fine-tuning platform was no longer open to new users. Open-weight models trained on your own infrastructure are the other route.
Five tasks, decided
The table applies the test to five invented tasks. The right column is a first choice to evaluate, not a final answer.
Task (hypothetical) Problem type First choice
---------------------------------------------------- ------------- ------------------------------
Answer staff questions from HR policies revised knowledge retrieval with citations
each quarter
Route incoming tickets to one of 40 queues, behaviour prompt baseline, then
high and steady volume fine-tune a smaller model
Draft customer replies in house style, quoting both retrieval for facts; prompt or
current product documentation fine-tune for style
Extract fixed fields from supplier invoices behaviour prompt with a schema first;
fine-tune only if it falls short
Answer questions about one short manual that knowledge whole manual in the prompt,
changes once a year if size and cost allowThe last row shows a third option. If the material is small enough, it can go into the prompt whole, with no retrieval and no training. Whether that is affordable depends on the model and its pricing, so it belongs in the evaluation as well.
An order of work that keeps both options open
- 1
Build the evaluation set
Real inputs with known correct outputs, including cases the system should refuse.
- 2
Measure a prompt baseline
Use a capable hosted model and a careful prompt, and sort the failures by type.
- 3
Fix missing or outdated facts with retrieval
If failures are about what the model knows, add retrieval and measure again.
- 4
Consider fine-tuning for remaining behaviour gaps
If the remaining failures are format, consistency, latency or cost at volume, compare a fine-tuned model on held-out cases, including cost per request.
Combining the two is legitimate, for example a model trained to answer only from supplied passages and to decline when they are missing. It also doubles what you maintain: a retrieval pipeline with its sync jobs, and a training set that has to be refreshed when the base model is replaced.
Questions
Can we fine-tune a model on our documents so it knows them?
You can, but research suggests it is an unreliable way to add facts, and fine-tuning alone gives you no citations, no per-user permissions and no direct way to withdraw a document. For document knowledge, retrieval is usually the better first step.
Is fine-tuning cheaper than retrieval?
They solve different problems, so compare complete designs. A smaller fine-tuned model can lower cost per request on a high-volume task, while retrieval adds search and longer prompts to every request. Put your own volumes, prompt lengths and current prices into the comparison rather than relying on general rules.
What do we need before starting a fine-tuning project?
Labelled examples of correct output for the task, ideally past cases where the outcome is known; a held-out set the model never sees in training; the current model's scores on that set; and a person who owns the label definitions. Without these there is nothing to compare the new model against.
Related services
RAG development
Assistants that answer from your internal documents, with permissions, citations and tests on your own questions.
Custom model training
A small open-weight model trained for one task and compared with your current model on cost and accuracy.
AI engineering and architecture
Assistants, voice interfaces and agents in the products you sell, with the serving and retrieval underneath.
More from the blog
RAG source readiness
How to decide which documents a retrieval assistant should use, who owns each source and how to find missing answers before anything is indexed.
Retrieval or generation?
A diagnostic procedure for finding out whether a wrong RAG answer started in ingestion, search, reranking or the model, using labelled evidence and per-question traces.
RAG production handover
What a RAG supplier should hand over so your team can run and change the system: source connectors, configuration, evaluation assets, runbooks, owners and a rehearsal.
Talk to an engineer
Bring one piece of work you would like to improve. The call takes 30 minutes and needs no access to your systems or your data.
Booking runs on Google Calendar.
Prefer to write first? Leave your email and a few lines, and we reply with times.
Look for the draft in your email program
Send it from there, and an engineer replies in person with times for a 30-minute call. If no draft has opened, write to us at miki@cloudsail.com.