(Note · · 5 min read)
How do you know the AI feature got better?
Someone changes a prompt, tries three questions, sees better answers and ships. Next week a different three look worse and it gets changed back. Without a fixed set of questions and a recorded result, an AI feature has no way of knowing whether it is improving, and neither do you.
By Md. Habibur Rahman Shohel, full-stack & AI product engineer in Dhaka
Start with the questions you already failed
You do not need a benchmark. You need the real questions your system got wrong, kept verbatim — the exact wording matters, because wording is what retrieval responds to. Every complaint and every correction is a test case someone has already written for you.
In the support bot I built, admins review and correct answers in a panel and corrections feed back into the knowledge base. That same stream is the evaluation set: the questions that needed correcting are precisely the ones a change must not regress.
Separate retrieval from generation
Score two things, not one. First, did the right passage come back at all. Second, given the passages, was the answer faithful to them. A system can fail either way and the fixes have nothing in common — one is ingestion and chunking, the other is prompting and rules.
Collapsing them into one score is why teams swap models to fix retrieval problems and see no change.
Grade on what matters, not on wording
Exact text comparison fails immediately, since a correct answer can be phrased many ways. Judge instead on properties: does it contain the required fact, does it avoid the forbidden claim, does it cite a source that actually supports it, does it decline when it should.
The decline case deserves its own tests. A system that never says it does not know will score well on questions it can answer and cause the incident you actually fear on the one it cannot.
Run it on every change, including the ones that look safe
Re-run the set when the prompt changes, when documents are added, when chunking is adjusted and when the model version moves. The last is the one teams forget: a provider updating a model underneath you changes behaviour without a deploy on your side.
Record the results over time. Without history you cannot distinguish a real improvement from a better sample, which is the mistake the whole exercise exists to prevent.
Keep it small enough to actually run
Fifty real questions that run in a few minutes and are used on every change beat a thousand that are run once and abandoned. Add a case each time something goes wrong in production, and the set grows towards the shape of your actual failures rather than someone else's benchmark.
Common questions
How do I test whether a prompt change improved anything?
Keep a fixed set of real questions your system has got wrong, with the exact original wording, and re-run it on every change while recording results. Trying a few examples by hand cannot distinguish a real improvement from a better sample.
Should retrieval and generation be scored separately?
Yes. Score whether the right passage was retrieved, and separately whether the answer was faithful to the passages given. The fixes are unrelated — one is ingestion and chunking, the other is prompting — and collapsing them is why teams swap models to fix retrieval problems.
How should AI answers be graded automatically?
On properties rather than wording: does it contain the required fact, avoid the forbidden claim, cite a source that supports it, and decline when it should. Exact text comparison fails because a correct answer can be phrased many ways.
When should an evaluation set be re-run?
On prompt changes, document additions, chunking changes and model version changes. The last is most often missed, because a provider updating a model changes behaviour with no deploy on your side.