Insights

RAG vs fine-tuning: choosing the right LLM approach

RAG vs fine-tuning in plain words: how each works, accuracy, freshness, permissions, Australian data residency, cost, and how SA organisations should choose.

When a business, council or agency wants a large language model (LLM) to “know” its own information, there are two main options: retrieval-augmented generation (RAG) and fine-tuning. They are often described as alternatives, but they solve different problems. RAG gives a model the right facts at the moment it answers. Fine-tuning changes how a model behaves. This guide explains both in plain words, compares them on accuracy, freshness, security, cost and effort, and gives a practical rule of thumb for South Australian organisations planning a knowledge assistant, chatbot or document workflow.

Retrieval-augmented generation

RAG searches your documents at question time and gives the most relevant passages to the model. The model’s answers can cite sources, stay current when documents change, and respect user permissions. For most knowledge assistants, RAG is the right starting point.

How RAG works, step by step

  1. Ingest: documents are collected from approved sources such as SharePoint, a records system, a policy library or a website, along with their permissions and metadata.
  2. Split and index: each document is split into sensible passages (“chunks”), and each passage is indexed both by keywords and by an embedding, a numeric fingerprint of its meaning.
  3. Retrieve: when someone asks a question, the system finds the passages most likely to answer it, filtered to what that person is allowed to see. Combining keyword and meaning-based search (hybrid search) and re-ranking the results usually beats either alone.
  4. Generate: the model is instructed to answer only from the retrieved passages, cite them, and say so when the answer is not there.

Most of the quality in a RAG system comes from the unglamorous parts: clean source documents, sensible chunking, good metadata, permission filtering and an honest “I don’t know”. Our RAG LLM application architecture shows the full design, and the government knowledge assistant architecture shows how it fits with records management.

Fine-tuning

Fine-tuning further trains a model on examples, so it learns a style, a format or a narrow task. It is useful for consistent outputs such as classification. It is not a good way to store facts that change.

What fine-tuning is good at

  • Consistent format: always producing the same structured output, such as a fixed set of fields from a referral or invoice.
  • Narrow, high-volume tasks: classifying thousands of emails or requests into categories, where a small fine-tuned model can be faster and cheaper than a large general one.
  • Tone and terminology: following a house style or specialised vocabulary that prompting alone cannot hold reliably.

Modern techniques such as parameter-efficient fine-tuning (for example LoRA) make training cheaper than it used to be, but the real cost is the training data: hundreds to thousands of high-quality, reviewed examples, refreshed whenever the task changes. Facts learned in training cannot cite a source, cannot be removed easily if they turn out to be wrong or sensitive, and are visible to every user of the model regardless of their permissions.

Try prompting first

Before either approach, see how far clear instructions and a few worked examples in the prompt can take you. Current general-purpose models follow detailed instructions well, and prompts can be changed in minutes, versioned and tested. Many teams that set out to fine-tune find that a well-structured prompt plus RAG meets the need. Fine-tune only when an evaluation shows prompting has hit a ceiling on accuracy, consistency, speed or cost.

Side by side

FactorRAGFine-tuning
Keeps facts currentYes, update the documents and the indexNo, needs retraining
Cites sourcesYesNo
Respects user permissionsYes, if retrieval is filtered per userNo, everything trained in is shared
Removing a wrong or sensitive factDelete or fix the documentRetrain the model
Consistent format and toneGood with promptingStrongest
Upfront effortData clean-up, indexing and permissionsCurating and labelling training examples
Running costRetrieval plus longer promptsLower per request for small models, plus retraining

Our rule of thumb

NeedBest fit
Answer questions from policies and documentsRAG
Consistent tone or output formatPrompting first, then fine-tuning
Classify high volumes of text cheaplyFine-tuned small model
Up-to-date facts with citationsRAG
Specialised task on your own documentsRAG, plus fine-tuning only if evaluation shows a gap

When to combine them

The two approaches are complementary. A common pattern is a RAG system for facts, with a small fine-tuned model doing one narrow step, such as routing questions to the right document collection or extracting fields into a fixed format. Another is fine-tuning a model to follow your citation and refusal rules more reliably, while all the facts still come from retrieval. Combine them only when you can measure that the extra moving part earns its keep.

Data residency, privacy and security

For SA Government agencies, councils and their suppliers, where data is processed matters as much as which approach you pick.

  • Know where each part runs: the document index, the embedding model and the LLM may be in different places. Check the specific model and feature are available in an Australian region if your policies require it. Our guide to Australian data residency explains the questions to ask.
  • Training data is sticky: the OAIC’s guidance on developing and training generative AI models confirms the Privacy Act applies to fine-tuning. Using personal information you already hold needs consent, or a secondary use the person would reasonably expect and that is related (directly related for sensitive information) to why it was collected. Being publicly available does not make data fair game. Complete a privacy impact assessment first, because trained-in information is hard to remove.
  • Permissions belong in retrieval: filter results by the user’s identity and group membership, so the assistant never shows a passage the person could not open directly.
  • Secure the index itself: the OWASP Top 10 for LLM Applications 2025 lists vector and embedding weaknesses (LLM08) as a risk in their own right: cross-user leakage, poisoned documents, hidden text in ingested files and embeddings that can be partly reversed to recover source text. Treat the vector store with the same access controls and classification as the documents, accept content only from approved sources, and log retrieval. For fine-tuning, the same list’s data and model poisoning risk (LLM04) means training examples need provenance and review.
  • Control the gateway: route model calls through one controlled point for logging, cost caps and content filtering. See our sovereign LLM gateway architecture, or the self-hosted LLM inference architecture where models must run inside your own environment.

Evaluate before you decide

Whichever approach you choose, invest in an evaluation set early. It is the only reliable way to know whether a change made things better.

  • Collect 50 to 200 real questions or documents, with the correct answer and source agreed by the business owner.
  • Measure whether answers are correct, whether they are supported by the cited sources, and whether the system declines when the answer is not available.
  • Include awkward cases: out-of-date policies, questions a user should not be able to get answered, and attempts to override instructions. Our guide to red teaming and evaluating LLM applications covers this in more depth.
  • Re-run the evaluation after every change to documents, prompts, models or settings.

Common mistakes

  • Fine-tuning to “teach” the model company facts, then finding answers are out of date and uncited.
  • Indexing every file share without cleaning out old drafts and superseded policies, so the assistant confidently quotes the wrong version.
  • Ignoring permissions, so the assistant becomes a way around document access controls.
  • Judging quality from a few demo questions instead of a proper evaluation set.
  • No guardrails for prompt injection, personal information or off-topic requests. See our guide to guardrails for LLM applications and AI agents.

Questions to ask your supplier or IT team

  1. Why RAG, fine-tuning or both for this use case, and what evaluation supports that choice?
  2. Which document sources are in scope, who owns them, and how are superseded versions excluded?
  3. How are user permissions enforced at retrieval time?
  4. Where are the index, embeddings and model hosted, and is any of our data used to train someone else’s model?
  5. How will answers be monitored for accuracy after go-live, and who fixes problems?
  6. What will it cost to run each month, and what caps are in place?

Talk to an Adelaide team

If you are planning a knowledge assistant, chatbot or document workflow and want to choose the right approach before you build, talk to us about LLM applications or call 0402 401 584. We can quote a short proof of value on a sample of your own documents, with an evaluation set you keep. Learn more about our LLM applications, AI consulting and AI governance services.

More insights

Let’s talk about your next project

Talk to an Adelaide-based team. We reply within one business day.