News / Learn / Fine-tuning
When should you fine-tune a model?
You'll be able to decide whether fine-tuning beats prompting, retrieval, or a bigger model for a product problem.
In plain English
Fine-tuning means training an existing model a little more on your own examples. It changes how the model behaves, such as its style, format, or habits on a narrow task. It does not reliably add new facts you can count on.
Why it matters
Fine-tuning costs time, data, and money, and it creates a model you must maintain. Most product problems are better solved with clear prompts, good examples in the prompt, or retrieval of your documents. Knowing when fine-tuning is worth it keeps you from building something hard to update.
How it works
Start by naming the failure you want to fix. If the model knows what to do but does it in the wrong shape, tone, or format, fine-tuning can help. If the model lacks information, retrieval is usually the right tool, because you can update documents without retraining.
Try cheaper options first. Improve the system prompt. Add few-shot prompting with several good examples. Use structured output or JSON mode to lock in format. Measure how often these fix the problem, using an eval with a fixed test set.
Consider fine-tuning when cheaper methods plateau and you have many high-quality examples of the target behavior. It also helps when you need shorter prompts to cut latency or cost at high volume, since a tuned model can carry behavior that would otherwise sit in a long prompt.
Remember the ongoing cost. Each new base model may need new training runs. You must keep the training data current, rerun your evals, and check for regressions in behavior you did not target.
A concrete example
Before you train anything, write a small eval that scores the current setup. Use it to decide if fine-tuning gains are real.
def run_eval(answer_fn, cases):
passed = 0
for case in cases:
output = answer_fn(case["input"])
if case["check"](output):
passed += 1
return passed / len(cases)
# Compare the baseline prompt against a candidate.
# Only consider fine-tuning if the gap stays large
# after you have tried better prompts and examples.
baseline = run_eval(prompt_only_answer, cases)
print(f"Baseline pass rate: {baseline:.0%}")A short sketch to show the idea. Check the official docs of the tool you use.
What goes wrong
- Fine-tuning to add facts Fine-tuning does not give reliable recall of new facts. Use retrieval over your documents for knowledge that changes.
- Skipping the prompt baseline Measure a strong prompt with examples first. Otherwise you cannot tell whether training helped.
- Training on noisy data Small sets of inconsistent examples teach inconsistent behavior. Review and clean your examples before training.
- No eval after training Keep a held-out test set. Check both the target behavior and general behavior for regressions.
Going deeper
Read about preparing fine-tuning data, LoRA for cheaper training, and how to evaluate a fine-tuned model against a baseline.
FAQ
Will fine-tuning make my model smarter?
Not in a general sense. It shapes behavior on the kind of task you trained on. It rarely adds broad reasoning ability.
How many examples do I need?
It depends on the task and the model. Start with a small, high-quality set and measure whether more examples improve your eval scores.
Is fine-tuning the same as RAG?
No. Fine-tuning changes model behavior. RAG supplies relevant documents at request time, so you can update knowledge without retraining.
Should I fine-tune to reduce cost?
Possibly, at high volume. A tuned model can need shorter prompts. Compare total cost, including training and maintenance, against your current setup.
Written with AI by CapyLaunch. Spotted a mistake? Email hello@capylaunch.com.