RAG vs fine-tuning, which one do you actually need

3 min read

RAG is for facts that change. Fine-tuning is for behaviour that stays the same. Most teams need RAG. Few need fine-tuning. Pick the wrong one and you pay for training when a search would have done.

Think of it like learning a language. RAG is carrying a dictionary. You look up the words you do not know, and you can swap the dictionary whenever the language changes. Fine-tuning is moving to the country and living there until you speak fluently. It works, but it is slow, expensive, and you cannot swap it out when things change.

Here is the decision matrix.

RAGFine-tuning
Best forFacts, documents, anything that changesTone, format, behaviour that stays put
ExampleAnswer from your handbookAlways reply in your brand voice
CostCheap, per queryTraining run, then higher inference
UpdateEdit the documentRetrain the model
When it failsDocument is missing or wrongTraining data is thin or biased

A worked cost comparison makes it concrete. RAG costs you embeddings and storage, a few dollars a month for a small document set, plus the normal per-token price of the model. Fine-tuning costs a training run. On OpenAI, training gpt-4.1-mini cost $5.00 per million tokens, and running the tuned model cost $0.80 per million input tokens and $3.20 per million output, against $0.40 and $1.60 for the base model. You pay double to run it, forever, for a model that knows your style.

There is a bigger reason to pick RAG in November 2026. OpenAI is winding down its self-serve fine-tuning platform. From 7 May 2026, organisations that had never run fine-tuning could no longer start. From 2 July 2026, organisations that had not used a fine-tuned model in the previous 60 days lost the ability to create jobs. From 6 January 2027, no existing customer can create new fine-tuning jobs at all. Fine-tuned models keep serving until their base model is retired, but the door is closing. If you are starting fresh, do not build on it.

That leaves two paths for fine-tuning. One is open-weight models, where you train with LoRA or QLoRA on your own hardware or a rented GPU. The other is Google Vertex AI and AWS Bedrock, which still offer supervised fine-tuning. Both work. Both cost real money and real time. So the question is not whether fine-tuning is good. It is whether your problem needs it.

Use RAG when the answer lives in a document and the document changes. Use fine-tuning when the answer is a behaviour, like a writing style or a strict output format, and you have hundreds of good examples to train on. If you have fewer than a hundred examples, fine-tuning will not help. Use RAG and a good prompt instead.

python
# Decide in three questions.
def pick(facts_change, need_style, examples):
    if facts_change:
        return "RAG"
    if need_style and examples >= 100:
        return "fine-tuning"
    return "RAG and a good prompt"

print(pick(True, False, 0))     # handbook: RAG
print(pick(False, True, 500))   # brand voice, 500 examples: fine-tuning
print(pick(False, True, 20))    # brand voice, 20 examples: RAG and a prompt

Try this

bash
python3 -c "
def pick(facts_change, need_style, examples):
    if facts_change: return 'RAG'
    if need_style and examples >= 100: return 'fine-tuning'
    return 'RAG and a good prompt'
print('handbook:', pick(True, False, 0))
print('brand voice, 500 examples:', pick(False, True, 500))
"

For RAG in depth, Topic 15. For the cost side, the LLM Cost Calculator in Topic 17 works out what each path actually costs you.

Sources

  • OpenAI fine-tuning wind-down: OpenAI deprecations page, staged dates 7 May 2026, 2 July 2026, 6 January 2027.
  • Fine-tuning prices: OpenAI pricing page, gpt-4.1-mini training $5.00 per million tokens, tuned inference $0.80 input and $3.20 output per million, checked September 2026.
  • RAG vs fine-tuning: standard guidance, OpenAI and Anthropic docs, 2025-2026.