# Fine-Tuning vs RAG vs Prompting: When to Use Which?

> Prompting, RAG or fine-tuning: what each one changes, which to try first, and how to explain it in your AI interview.

**In short:** Try prompting first, because it is the cheapest and quickest fix. Add RAG when the model needs facts it does not have, and fine-tune only when its style or format stays inconsistent after that.

AI and LLM interview question Q281, Fine-tuning and adaptation. Intermediate, very common (our estimate). From Venkat R. Murty's free Interview Kit: https://designervenkat.online/interview/ai/fine-tuning-vs-rag-vs-prompting

## Say it in 30 seconds

I try the cheapest fix first. That's prompting: clearer rules and a few examples. If the model is missing facts, like a bank's fee sheet that changes every month, I add RAG, so it reads the current text for each question. I only fine-tune when the output still drifts in style or format after good prompts and tests, because training is slow and makes facts hard to update.

## Say it in 2 minutes

The first thing I'd say is to try the cheapest fix before the expensive one. Prompting means better instructions and a few examples, and you can test it quickly. For tasks like summarising, translation and code generation it is often enough, and OpenAI's own guide starts there. I measure every change on a fixed set of test questions, so I know whether it helped.

If the model lacks facts, I add retrieval, which is RAG. Take a mid-size bank's support assistant. Its fee sheet changes every month, so a model trained on last month's version would quote old fees. With RAG, the system searches the current sheets for each question, pastes the matching passages into the prompt, and the model answers from them. The reply can show the sheet date it used.

I fine-tune only when the output still drifts after good prompts and tests, such as a format that breaks now and then or a tone that won't hold. Fine-tuning shapes how the model behaves, so it is poor at storing facts that change. It also needs good data, and OpenAI says it is winding down its fine-tuning platform for new users, so I check what is available first.

In short, I try prompting, add RAG for missing facts, and fine-tune for steady behaviour. The three can work together, and the test results decide.

## What are prompting, RAG and fine-tuning, in plain words?

Prompting means writing better instructions and examples for a model you already have. RAG, short for retrieval-augmented generation, means finding the right passages in your own documents and pasting them into the prompt before the model answers. Fine-tuning means training the model on many examples of good answers, so its own internal settings (its weights) change.

Think of a new hire at a bank's call centre. Prompting is the briefing on day one. RAG is the fee sheet they look up before answering a customer. Fine-tuning is months of coaching until they answer in the house style without looking anything up. An AI team faces the same choice with a support assistant that must quote this month's fees and always use the same reply format.

- **Prompt:** The instructions and examples sent to the model with each request.
- **RAG:** Retrieval-augmented generation: fetch relevant text, then answer from it.
- **Fine-tuning:** Training a model on examples, so its own settings change.
- **Weights:** The numbers inside a model that training adjusts.
- **Eval:** A fixed set of test questions with checked answers, used to score a change.

## Which one fixes which problem?

Each fix changes a different thing. Prompting changes the request. RAG changes what the model reads. Fine-tuning changes the model itself. OpenAI's guide splits the problem the same way, into context and the model:

> "Context optimization: You need to optimize for context when 1) the model lacks contextual knowledge because it wasn't in its training set, 2) its knowledge is out of date, or 3) it requires knowledge of proprietary information" (OpenAI, on context)
>
> "LLM optimization: You need to optimize the LLM when 1) the model is producing inconsistent results with incorrect formatting, 2) the tone or style of speech is not correct, or 3) the reasoning is not being followed consistently" (OpenAI, on the model)

*Diagram, Which fix to try first: Start at the wrong answer, then sort the failure. Prompting is tried first because it costs least, then retrieval for missing facts, then fine-tuning for steady behaviour. Only the fix that scores better on your test set stays.*
1. Sort the failure first: missing facts, or behaviour that drifts.
2. The fix that scores best on the same test set is the one that stays.

Missing or old facts point to RAG. Wrong formatting, a tone that slips, or reasoning that comes and goes point to the model. Anything clearer instructions can fix should be tried in the prompt first.

## In what order should you try them?

1. **Prompting first:** Write a clear prompt and test it on a fixed set of real questions. OpenAI's guide calls prompt engineering typically the best place to start, and Google's Gemini tuning guide says the same order: prompting, then tuning if it is still needed.
2. **Add RAG for missing facts:** If the model lacks knowledge, or the knowledge is old or private, fetch it for each question. OpenAI's guide names those three cases: knowledge the model never saw, knowledge that is out of date, and proprietary knowledge.
3. **Fine-tune for steady behaviour:** Only when the output still drifts in format, tone or reasoning after good prompts and tests. Tuning then fixes the recurring errors that prompts could not hold.

> **Tip:** Say the order out loud. Interviewers want to hear that you measure each step before you spend more on the next one.

## How does RAG work for a bank's fee questions?

Here is a realistic case. A mid-size bank runs a support assistant that gets about 20,000 questions a month. Its fee sheets change at the start of every month, and some fees differ by card and by region. A model trained on last quarter's sheets would give confident, out-of-date answers, so the team uses RAG.

*Diagram, How RAG answers a fee question: A customer's question becomes a search over the bank's current fee sheets. The closest passages go into the prompt, and the model answers from them. The reply can show the sheet date it used, so staff can check it.*
1. The customer's question becomes a search over the bank's sheets.
2. The closest matching passages come back from the search.
3. The passages go into the prompt, next to the question.
4. The reply goes out with the sheet date it was built from.

The hard part is getting the right passage back. OpenAI's guide warns that you can supply the wrong context, or too much irrelevant context, and the model then answers badly. So the team builds an eval set of a few hundred real fee questions, with answers the fee team has checked, and scores retrieval and answers separately.

Small knowledge bases may need no RAG at all. Anthropic's post on contextual retrieval said that a knowledge base smaller than about 200,000 tokens (the units a model counts text in, about 500 pages here) can simply go in the prompt. A small, stable set of rules belongs in the prompt.

## When is fine-tuning worth the cost?

Fine-tuning trains the model on examples of what good looks like. OpenAI describes supervised fine-tuning as a way to get a model that more reliably produces your desired style and content.

Data comes first. OpenAI suggests starting with 50 well-crafted demonstrations, and if 50 good examples make no difference, rethinking the task or prompt before adding more data. Google's Gemini tuning guide suggests a sizable labelled dataset, think 100 examples or more.

The payoff is a lower cost per call. Google's Gemini tuning guide notes that tuning can cut the cost of each request by removing the example answers pasted into the prompt (few-shot examples) and long instructions, so every call is shorter.

The limit is facts. A tuned model is poor at knowing what changed last month, and OpenAI's guide puts out-of-date knowledge under context, meaning the text the model reads for each question. That is where RAG lives.

> **Tip:** Check availability before you plan a tuning project. OpenAI says it is winding down its fine-tuning platform: new users can't get in, and existing customers can create training jobs until December 15, 2026.

## What does the interviewer want to hear?

**A strong answer covers**

- [ ] A plain split: prompts change the request, RAG changes what the model reads, tuning changes the model.
- [ ] The order: prompting first, then RAG for missing facts, then tuning for steady behaviour.
- [ ] Why facts go to retrieval: they change, and a tuned model has to be retrained to pick up each change.
- [ ] How you would measure each step on a fixed test set.
- [ ] The limits of tuning: data, time, cost and platform availability.
- [ ] That the tools combine: RAG for facts, tuning for format, with evals deciding.

**Common traps**

- Trap: "Fine-tune it on our documents so it knows them." Better: Training is a poor store for facts. Changing them means retraining, so put changing facts in retrieved text.
- Trap: "RAG makes the model smarter." Better: RAG gives it the right text for each question. Tone and format are a job for prompts or tuning.
- Trap: "Always fine-tune for better quality." Better: Try prompting and retrieval first. Tuning needs good data, time and money, and it may not be available to you.

## Can you pick the right tool?

**Spot the weak plan:** A bank wants its assistant to stop quoting old fees. Which plan is wrong?

A. Fetch the current fee sheet for each question and show its date.
B. Fine-tune the model on last March's fee sheet so it memorises the fees.
C. Test 200 real fee questions with checked answers before every release.
D. Tell it to say it doesn't know when no passage matches.

**Answer:** B. Training bakes last March's fees into the model, so they go stale as soon as the sheet changes. Current facts belong in retrieved text, where they can be updated and dated.

**Quick check:** An insurance claims bot quotes last year's policy limits. What is the best first fix?

A. Fine-tune it on last year's policy documents
B. Retrieve the current policy text for each claim
C. Add a rule that it must never quote policy limits
D. Add three more example answers to the prompt

**Answer:** B. The fact is out of date, so the model needs fresh text for each claim. Tuning would lock the old limits in. Hiding the limits does not answer the claim, and more examples do not add new facts.

## Can you answer these from memory?

**Flash cards**

- **What is prompting?** Better instructions and examples for the model you already have. Cheapest, so try it first.
- **What is RAG?** Fetching the right passages from your own documents and pasting them into the prompt, per question.
- **What is fine-tuning?** Training the model on examples of good answers, so its own settings change.
- **Which fix for missing or changing facts?** RAG. Changing facts means retraining, and tuned recall is unreliable.
- **Which fix for steady format or tone?** Prompting first. Tune only if the output still drifts after good prompts and tests.
- **What to check before proposing tuning?** Whether your platform still offers it to new users, plus your data and eval plan.

## Likely follow-up questions

- Q138 RAG vs long context: which to use? https://designervenkat.online/interview/ai/rag-vs-long-context
- Q294 How do you prepare a fine-tuning dataset? https://designervenkat.online/interview/ai/how-to-prepare-a-fine-tuning-dataset
- Q306 Fine-tuning for tone or format? https://designervenkat.online/interview/ai/fine-tuning-for-tone-or-format
- Q284 What is LoRA? https://designervenkat.online/interview/ai/what-is-lora
- Q308 Fine-tuning cost vs inference savings? (full answer coming)

## Learn it in depth

- [RAG vs Fine-tuning](https://designervenkat.online/learn/ai-engineering/rag-vs-fine-tuning)
- [Fine-tuning](https://designervenkat.online/learn/ai-engineering/fine-tuning)
- [Retrieval-augmented generation](https://designervenkat.online/learn/ai-engineering/rags)
