
Prompting, RAG or fine-tuning? Choosing how to adapt a language model
Better prompts, retrieval, fine-tuning or tools? A practical guide to working out what your AI feature is missing, and choosing the simplest change that fixes it.
Read the articleAI
Retrieval-augmented generation lets an AI assistant answer from your organisation's own documents and show its sources. How it works, what decides its quality, where it fails and when it fits.

Ask a general-purpose AI assistant that cannot see your files about your leave policy or admissions rules, and at best it says it does not know or offers generic advice; at worst it gives a confident answer that sounds right but is not. Retrieval-augmented generation (RAG) is a widely used way to reduce this: the assistant looks up relevant passages in your own documents and answers from them, with sources.
A large language model learns from a vast body of text gathered up to a fixed date. Internal policies, contracts and manuals were never part of it, and anything written since is missing too. Asked about them, a model may invent a plausible answer, often called a hallucination; our plain-language guide to large language models explains why.
Fine-tuning (further training a model on your own examples) can help with tone or format once better prompts have been tried, but not with knowledge that changes: each update needs retraining, a withdrawn document cannot reliably be removed, and the model cannot cite a source. Our guide to choosing between prompting, RAG and fine-tuning covers when each fits.
RAG instead changes what the model is shown: the system finds passages relevant to the question and passes both to the model. Update the documents and re-index them, and the answers change too.
A typical RAG system has two parts: one prepares your documents in advance, the other runs for each question. (Some systems instead query an existing search engine or let the model search repeatedly; the principle is the same.)
Citations make checking easier but do not guarantee accuracy: a model can misread a passage, or cite one that does not support what it says.
It is tempting to focus on the language model, but its answers can only be as good as the passages it is given. Quality depends heavily on everything around it:
An answer can only be as good as the passages the search finds.
The answer exists but search misses it: the question uses different words, the key fact is split across two chunks, or answering means counting across a whole collection (“How many of our contracts renew next quarter?”). When retrieval misses, clear instructions make the model more likely to decline, but not certain to: it may answer from its general training or stretch a loosely related passage to fit. Answers built on plausible but wrong passages, such as another site's policy, are hardest to spot, so include questions the assistant should decline in the test set.
If last year's and this year's versions of a policy are both indexed, the assistant may quote the wrong one or blend the two. Retire old versions, record versions in the metadata, and have the assistant flag disagreements between sources rather than silently pick one.
A document can contain text written to manipulate the model, such as a line telling it to ignore its rules. This is known as indirect prompt injection, and the risk is greatest with content that people outside a small trusted group can write: emails, web pages and uploads, but also shared wikis or tickets. No known technique makes a model reliably ignore such instructions, so limit the damage. Indexing trusted sources and keeping retrieved text separated from the system's instructions help, but guarantee nothing. Even an answer-only assistant can be made to give wrong answers or malicious links, or to leak data by hiding it in the address of an image or link that the chat window loads, so block external images and link previews in answers. Require a person to confirm before the assistant sends a message or changes a record.
RAG fits when knowledge lives in a sizeable, changing collection of text, questions can be answered from a few passages, and people need to see sources, as with staff handbooks, IT help articles or policy libraries. Other problems suit other approaches:
Many systems combine several of these approaches with RAG.
A RAG assistant is a small service, not a one-off build: it needs owners, updates and monitoring. If you are considering one, our AI solutions and automation team can help scope the collection, safeguards and evaluation before anything is built.
Related

Better prompts, retrieval, fine-tuning or tools? A practical guide to working out what your AI feature is missing, and choosing the simplest change that fixes it.
Read the article
AI features run on your data. How to classify it, trace where it goes, choose where the model runs and put simple controls in place before launch, so you keep personal and business data under your control.
Read the article
A demo shows an AI feature on a good day. Here is a practical way to test it on real cases, agree what good looks like, and keep checking once it is live.
Read the articleTell us about your project and we will come back with a clear next step.