The Question Everyone Gets Wrong
When I first started building AI-powered tools, I fell into a trap I see constantly in forums and Discord servers: someone describes a problem and immediately half the replies say "just fine-tune it" while the other half say "use RAG." Everyone sounds confident. Nobody agrees. And the person asking the question ends up more confused than before.
Here's the thing — it's actually not that complicated once you know the one question that cuts through all the noise:
Is your problem about knowledge, or is it about behaviour?
That's it. That single question will settle the choice for you in 90% of cases. Let me explain what I mean, and then we'll work through a proper decision checklist so you can apply it to your own situation.
What RAG Actually Does (And What It Doesn't)
RAG — Retrieval-Augmented Generation — solves a knowledge problem. The base model doesn't know your stuff. It doesn't know your company's internal docs, last week's meeting notes, your product catalogue, or anything that didn't exist when it was trained. RAG fixes that by fetching relevant chunks of your documents at query time and stuffing them into the context window so the model can reason over them.
The model's behaviour doesn't change. It still talks the same way, reasons the same way, formats answers the same way. You're just feeding it better input. Think of it like giving a smart person a reference book to look things up before answering you — they don't become a different person, they just have access to better information.
RAG is the right choice when:
- Your data changes frequently (support docs, product specs, news)
- You need the model to cite sources or reference specific documents
- Your dataset is large and you only need a slice of it per query
- You need to add knowledge without touching the model at all
- You're working with a model you don't control (like the OpenAI API)
Real example
You want an internal chatbot that answers questions about your employee handbook. The handbook updates every quarter. RAG is the obvious answer — you update the document store, not the model.
What Fine-Tuning Actually Does (And What It Doesn't)
Fine-tuning solves a behaviour problem. The base model knows plenty — but it doesn't act the way you want it to. Maybe it's too verbose when you need terse responses. Maybe it writes code in a style that clashes with your conventions. Maybe you're building a customer-facing product and the default tone is all wrong. Fine-tuning adjusts the weights of the model by training it on examples of the exact input-output behaviour you want.
Crucially, fine-tuning does not reliably inject facts into a model. This is the mistake I see constantly. People think "if I fine-tune on my documentation, the model will know my docs." It kind of will — until it hallucinates something adjacent to what it learned. Fine-tuned knowledge is fuzzy and unreliable. RAG knowledge is grounded in the actual source text.
Fine-tuning is the right choice when:
- You need a specific tone, voice, or persona that prompting can't reliably produce
- You need consistent output structure (JSON schemas, specific formats) that the base model fumbles
- You're doing classification or extraction tasks with domain-specific labels
- Prompt engineering has hit its ceiling and you're still not getting what you need
- You have high-quality labelled examples of exactly the right behaviour (hundreds minimum, ideally thousands)
Real example
You're routing customer support tickets into one of 12 categories. The base model keeps miscategorising edge cases. Fine-tuning on 2,000 labelled examples of tickets and their correct categories will outperform any prompt you can write.
The Decision Checklist
Run through this checklist for your project. Be honest with each answer — I've found that the temptation to default to fine-tuning often comes from it sounding more impressive, not from it actually being more appropriate.
# RAG vs Fine-Tuning Decision Checklist
## Step 1: Knowledge or Behaviour?
→ "The model doesn't KNOW something it should know"
→ RAG
→ "The model doesn't ACT the way I need it to act"
→ Fine-Tuning
## Step 2: Is your data dynamic?
→ Changes weekly/monthly → RAG (update docs, not model)
→ Stable for 6+ months → Fine-Tuning is viable
## Step 3: Do you need source attribution?
→ Yes ("according to policy doc v3.2...") → RAG
→ No → Either works
## Step 4: Do you have labelled examples?
→ Fewer than 100 examples → RAG or better prompting
→ 500+ high-quality examples → Fine-Tuning becomes viable
## Step 5: Have you maxed out prompting?
→ Not yet → Fix your prompts first (seriously)
→ Yes, genuinely → Consider Fine-Tuning
## Step 6: Budget and iteration speed?
→ Need fast iteration → RAG (change docs in minutes)
→ Stable project, cost matters long-term → Fine-Tuning
(shorter prompts = lower per-token cost at scale)One more thing on that last point: fine-tuning can pay off economically at serious scale because you can often use a smaller, cheaper model that outperforms a larger base model for your specific task. But "serious scale" means millions of queries. If you're just getting started, that's not a reason to choose fine-tuning today.
Can You Use Both? Yes — And Sometimes You Should
The framing of "RAG vs fine-tuning" implies you have to pick one. You often don't. The most capable production AI systems I've seen use both:
- Fine-tune for behaviour: teach the model to respond in your format, with your tone, following your conventions
- RAG for knowledge: retrieve the relevant facts and documents at query time
A legal tech company might fine-tune a model to always produce structured analysis (issue, rule, application, conclusion) and then use RAG to pull in the actual case law and statutes relevant to each query. The behaviour is baked in. The knowledge is retrieved fresh.
That said — start with one. Combining them multiplies complexity. If you haven't shipped a RAG pipeline yet, build that first. If you haven't shipped a fine-tuned model yet, do that in isolation. Getting both working together before you understand either individually is a path to expensive confusion.
The Mistake I Made (So You Don't Have To)
When I first tried this stuff, I spent a week setting up a fine-tuning job for an internal search tool. I had company documentation — policies, procedures, product specs — and I wanted an AI assistant that could answer questions about it. I collected examples, formatted them into JSONL, ran the training job, evaluated the outputs. Some answers were great. Some were confidently wrong in ways that were hard to catch.
What I should have done — and eventually did — was just build a RAG pipeline. Three hours of work. The answers were grounded in the actual documents. When something was wrong, I could trace it back to the source chunk and fix it. When the docs updated, I re-indexed them. Done.
Fine-tuning felt like the sophisticated choice. RAG was the right one. Know the difference before you commit a week to the wrong path.
Quick rule of thumb
If you can solve it with better prompting, do that. If you can solve it with RAG, do that. Fine-tuning is the last resort — not because it's bad, but because it's the most expensive and inflexible option to iterate on.
The Short Version
Ask yourself one question: Is my problem about what the model knows, or how the model behaves?
Knowledge problem → RAG. Retrieve the right information at query time. Fast to build, easy to update, grounded in source truth.
Behaviour problem → Fine-tuning. Adjust how the model acts by training on examples. More expensive, slower to iterate, powerful when prompting has genuinely failed.
Still unsure? Run the checklist above. And if you're just starting out — build the RAG pipeline first. You'll learn more about what you actually need, and you'll probably solve your problem in the process.
More tutorials in this category, or explore the full field guide.