ValcairnRequest access

Fine-tune or RAG: how to decide

Use retrieval (RAG) when the model needs facts that change or that it must cite: policies, manuals, prices, tickets. Fine-tune when the model already has the facts but gets the behaviour wrong: format, tone, labels, refusals or a narrow task it must do the same way every time. Many teams need both, in that order.

The one-question test

Ask what a wrong answer looks like.

  • It invents or misquotes a fact that is written down somewhere you control. That is a retrieval problem. Put the right document in front of the model and ask it to cite it. Training the fact into the weights makes it hard to update and impossible to cite.
  • It knows the fact but answers in the wrong shape: the JSON breaks, the label set drifts, the tone is off, it writes three paragraphs where you need one line. That is a behaviour problem, and fine-tuning is good at behaviour.
  • It does neither reliably. Fix retrieval first, then measure again. Fine-tuning on top of bad retrieval teaches the model to sound sure about the wrong passage.

What each one costs you

Retrieval (RAG) Fine-tuning
Updating knowledge Replace the document Retrain
Citing a source Natural: the passage is in the prompt Not possible from weights alone
Fixing format and tone Long prompts and examples, often fragile Strong
Running cost per request Higher: longer prompts Lower: short prompts, possibly a smaller model
What you need first Clean documents and a search index Hundreds to thousands of good examples
What can go wrong The wrong passage is retrieved The model learns your mistakes

Signs you need fine-tuning

  • Your prompt has grown past a page of rules and examples, and the model still breaks one of them.
  • You call a large model for a narrow, repetitive job (classification, extraction, routing) and want a smaller model to do it more cheaply.
  • You have a few hundred or more examples of the exact output you want, reviewed by a person.
  • Latency or cost matters more than the model's general knowledge.

Signs you need retrieval

  • The answer depends on documents that change weekly.
  • A reviewer must be able to see where an answer came from.
  • Access rules differ per user, so one model cannot hold everything.

Decide with evidence, not taste

Freeze a set of real questions with expected answers before you change anything. Score the current system on it, change one thing (better retrieval, or a fine-tune), and score again on the same cases. Count what got fixed, what regressed and what still fails. If a change fixes ten cases and breaks four, you need to see the four.

This is what Valcairn's evaluation does today: frozen case sets, a side-by-side comparison of two versions with fixed, regressed and still-failing cases, and a report a named person approves. See the sample report. Training a model on your own GPU is also built (our one published run so far is a 0.6B model); see train a model on your own GPU.

Questions

Can I fine-tune a model to learn my documents?

You can, but it is usually the wrong tool. A model trained on documents may still misquote them, cannot cite them, and must be retrained whenever they change. Retrieval keeps the documents outside the model, where you can update and cite them.

Is RAG or fine-tuning cheaper?

Retrieval is cheaper to start and to update. Fine-tuning has a training cost but can lower the cost of every request, because prompts get shorter and a smaller model may do the job. For high-volume narrow tasks, fine-tuning often wins over time.

Can I use both?

Yes, and many production systems do. Retrieval supplies the facts and a fine-tuned model handles the format and behaviour. Fix and measure retrieval first, so the fine-tune learns from correct context.

How many examples do I need to fine-tune?

For a narrow format or labelling task, a few hundred reviewed examples can be enough to see a change. Broader behaviour needs more. Quality matters more than count: a few hundred correct examples beat thousands of noisy ones.

Updated · Markdown copy

We only use your address to reply about this request.