LLM evaluation: test a model on your data before switching
LLM evaluation on your own data: build a test set from real inputs, score the current model first, and decide with numbers before you switch.
Updated
To test an LLM on your own data, run the current model and the candidate on the same real inputs, then score both against answers you trust. Do this before you switch, because a public leaderboard measures someone else’s questions, not your documents.
Why public benchmarks do not settle it
Public benchmarks are good for narrowing a list. They are weak at predicting one production task. Your documents have their own layouts, abbreviations and edge cases. Take a job that pulls the notice address and the renewal date out of vendor agreements. A general test never shows how a model reads a date written as “the first business day after the anniversary of the effective date”, or an address split between a page footer and a signature block. For how to read those leaderboards, see reading an LLM benchmark without being fooled.
Build the test from real inputs
Pull a sample from the work you want to move, not from examples a vendor wrote for a demo. Keep the first version small enough that one person can check every answer, then grow it.
Cover the common cases and the ugly ones: scanned pages, very long files, empty fields, mixed languages, and records that someone corrected by hand after the fact. Split the set by document, not by chunk. If one document appears in both your examples and your test set, the score will look better than the model really is. Write the answer key next. Have someone who knows the task mark the correct output for each input, and note where each label came from. If two reviewers disagree, write the rule down, apply it to every row, and re-check the rows marked before the rule existed. Ambiguous answers make every score noisy, and a noisy key can make a worse model look better. In our extraction exam, experts marked the answers before any model was scored.
Score the current model first
Run the current model on the test set before you touch anything else. Record the score, the cost of the run from your invoice, and the full list of failures. That baseline is the number a switch has to beat. Teams often skip it and compare the candidate against their memory of how the old model behaves, which is a much weaker test than a stored result.
Keep the prompt, the model version and the settings fixed during the run. Change one thing at a time, and label each run so you can tell which experiment produced which score.
Pick metrics that match the task:
- Extraction: exact match on each field, or span-level F1 when the model must quote a passage.
- Classification: accuracy per label, plus a count of which labels get confused with each other.
- Generated text: a rubric of three or four yes-or-no questions that a reviewer can apply the same way twice.
Read the results without fooling yourself
A small gap on a short test set is noise. When the decision matters, use a larger held-out set or cross-validation. Cross-validation scores every document with a model that never saw it in training, which is the fair way to test a fine-tuned model. Cross-validation for LLMs explains how the folds are set up.
We ran this kind of test on a public contract extraction exam: 510 commercial contracts with answers marked by lawyers, scored with 5-fold cross-validation. The full results show how the models compared. The useful part for your own work is the setup. That exam covers a fixed set of clause types, so it says nothing about your contracts.
Check each group of documents, not only the average. A model that wins overall can still fail one contract type or one form layout that matters to you, and that group may need to stay on the current model or get more training data. Read the failures by hand as well. Counting them tells you how often the model misses. Reading them tells you why.
Compare cost on the full bill for the test set, not on the price per token. The same text can produce different token counts on different models, so the cheapest rate on paper is not always the cheapest run. Cost per million tokens shows how to convert between the two.
Common mistakes to avoid:
- Comparing against memory instead of a stored baseline.
- Changing the prompt or settings between runs.
- Splitting by chunk, which leaks the same document into both sides.
- Trusting a small gap on a short test set.
- Reporting only the average and never the failures.
Run the switch behind the test
Keep the current model in production while the candidate runs on the same inputs in parallel. Compare the outputs against your answer key, and switch only when the candidate beats the current model on your test. Keep the old route ready for a rollback until the new one has run on live traffic long enough to show the failure types you saw in testing.
Before you switch, check:
- The test set and answer key are saved with the model version and date they were run on.
- The baseline and the candidate used the same prompt, settings and inputs.
- Each document group clears the bar, not only the average.
- The bill for the test set is in the decision record.
- Someone has written down what happens the next time the vendor changes the model.
Every choice here trades time for confidence. A bigger test costs reviewer hours, and a smaller one can miss the rare inputs that do the most damage. Set the size by what a wrong answer costs you, not by what is convenient. Rerun the test whenever a vendor changes a model, because the same model name can behave differently over time. For the version side of this, see keeping the model you tested.
If you want help building this test for one task, book a free audit or a call. We look at which AI calls are worth testing first, and what the test needs to cover before anyone changes a model.
Questions
How many examples do I need to test an LLM?
Start with a few dozen real inputs that cover the common cases and the hard ones. Add more until the score stops moving when you add examples. A small set can rank two models, but it cannot prove a small gap.
Should I use a public benchmark or my own test set?
Use public benchmarks to shortlist models. Use your own test set to make the switch decision, because only your inputs and your answer key reflect the job.
What if the new model wins on average but fails on some inputs?
Look at the score for each document type or group before you decide. A model that wins overall can still fail a category that matters to you, and that category may need to stay on the current model or get more training data.