News / Learn / Fine-tuning
How do you evaluate a fine-tuned model?
You'll be able to design a fair test that shows whether your fine-tuned model beats the base model on the work that matters.
In plain English
A fine-tuned model is a base model that you trained further on your own examples. Evaluation means checking whether that extra training made it better at your task. You do this with a held-out test set, a clear scoring method, and a comparison against the base model. Without these three, you are guessing.
Why it matters
Fine-tuning costs time and money, and it can make a model worse at things you did not measure. A model can sound more polished while getting facts wrong or ignoring instructions it used to follow. Good evaluation tells you whether to ship the tuned model, keep prompting, or change your data. It also gives you a way to catch regressions each time you retrain.
How it works
Start by splitting your examples into training data and a test set that the model never sees during training. The test set must look like real traffic, including the awkward cases. If you test on examples the model trained on, the scores will look high and mean little.
Next, pick how you will score each answer. For tasks with one right answer, such as extracting a field or choosing a category, use exact match or a simple metric. For open-ended text, use a rubric with specific yes-or-no checks, or use a grader model with a clear scoring prompt. Check the grader against human labels on a sample before you trust it.
Then run the same test set through the base model, the fine-tuned model, and your best prompted baseline. Use the same system prompt, settings, and output format for each. Compare the results by category, not only the average, because a model can improve on easy cases and fail on the hard ones.
Finally, look at the failures by hand. Read the wrong answers and sort them into groups, such as formatting errors, factual errors, or refusals. This tells you whether the next step is more data, different training settings, or a different approach entirely. Repeat the same test after every change so you can see real progress.
A concrete example
A small harness that scores exact-match answers on a held-out test set and reports accuracy per category.
import json
from collections import defaultdict
def load_jsonl(path):
with open(path, encoding="utf-8") as f:
return [json.loads(line) for line in f if line.strip()]
def score(examples, predict):
totals = defaultdict(int)
correct = defaultdict(int)
for ex in examples:
answer = predict(ex["input"]).strip().lower()
expected = ex["expected"].strip().lower()
totals[ex["category"]] += 1
if answer == expected:
correct[ex["category"]] += 1
return {c: correct[c] / totals[c] for c in totals}
# predict_base and predict_tuned are functions you write
# that call each model with the same prompt and settings.
# test = load_jsonl("test.jsonl")
# print("base:", score(test, predict_base))
# print("tuned:", score(test, predict_tuned))A short sketch to show the idea. Check the official docs of the tool you use.
What goes wrong
- Testing on training data Hold out a test set before training and never add test examples to the training file, even by accident.
- Reporting only the average score Break results down by category and by difficulty so a drop in one area does not hide behind gains elsewhere.
- Comparing against no baseline Always compare the tuned model with the base model and a well-written prompt. A gain only matters if it beats the cheaper option.
- Trusting an unchecked grader If you use a model as the judge, check its scores against human labels on a sample first and fix the rubric until they agree.
Going deeper
Learn about statistical significance so you can tell real gains from noise on small test sets. Then study regression testing, where you keep a fixed set of hard cases and rerun it on every new model version.
FAQ
How many test examples do I need?
There is no fixed number. Use enough that each category has examples you can reason about, and add more when a score change seems too small to trust.
Can I use the same test set for every experiment?
Yes, and you should, so results stay comparable. Just avoid tuning your prompts or settings so hard against it that it stops reflecting real use.
Is loss during training a good measure?
Training loss shows the model is learning the training data. It does not show whether the model does your task well, so use task-level tests as well.
What if the tuned model scores higher but feels worse to users?
Your test set is probably missing cases your users care about. Add those examples, then rerun the comparison.
Written with AI by CapyLaunch. Spotted a mistake? Email hello@capylaunch.com.