Home / Insights / QA and Software Testing

QA and Software Testing

Testing AI Features: Evaluation Sets, Regression Checks and Human Review in Your Release Process

AI features do not pass or fail like ordinary code. The same input can produce different outputs, and a small prompt or model change can quietly break behaviour that worked last week. This guide shows how to fit evaluation sets, regression checks and human review into a normal release process.

TopicsQA and Software TestingGenerative AI and LLMs

Key takeaways

  • Traditional test cases with one expected output do not work well for AI features; you need an evaluation set of realistic inputs with criteria for what a good output looks like, scored across many cases.
  • Build the evaluation set from real usage, edge cases and known failures, keep it versioned, and grow it every time a production issue is found.
  • Run the evaluation set as a regression check whenever the prompt, model, retrieval data or settings change, and compare scores against the last approved baseline before release.
  • Use automated checks and model-based grading for scale, but calibrate them against human reviewers; research on LLM judges shows strong agreement with people alongside known biases.
  • Keep humans in the loop on a schedule: sample production outputs, review high-risk categories and feed findings back into the evaluation set, as frameworks such as NIST’s AI RMF recommend testing before deployment and regularly in operation.

Most product teams now have at least one feature built on a large language model or another machine learning component: a summary of a long document, a suggested reply, a classifier that routes tickets, a field extracted from an invoice. These features are tested by the same QA teams that test the rest of the product, and many of those teams find their usual methods do not fit. A test case expects one correct output. An AI feature might give three different, acceptable answers to the same input, or one fluent answer that is quietly wrong.

This article is for QA leads, engineering managers and product owners who are responsible for releasing AI features with confidence. It explains why AI features need a different testing approach, how to build an evaluation set, how to run regression checks when prompts or models change, how to combine automated and human grading, and how to set release gates. It deliberately stays practical: you can start with a spreadsheet and a script, and grow from there.

Why AI features need a different testing approach

Three properties make AI features harder to test than ordinary code.

  • Non-determinism. The same input can produce different outputs between runs, especially when sampling settings allow variety.
  • Many acceptable answers. A good summary can be written in countless ways, so exact-match assertions fail even when the output is fine.
  • Hidden dependencies. Behaviour depends on the prompt, the model version, retrieved data and settings such as temperature. A change to any of them can alter results without a single line of application code changing.

The answer is to move from single test cases to evaluation: running a representative set of inputs through the feature and scoring the outputs against agreed criteria, then looking at aggregate results and individual failures. OpenAI’s open-source Evals framework puts the case directly, describing high-quality evals as one of the most impactful things you can do when building with LLMs, because without them it is hard to see how a new model version affects your use case.

What still works from conventional testing

Not everything changes. The code around the model still needs ordinary unit, integration and end-to-end tests: input validation, error handling when the model API times out, rate limits, permissions, logging and the user interface. Keep those tests deterministic by mocking the model. Evaluation is an additional layer for the behaviour of the AI component itself, not a replacement for your existing suite. Our article on continuous testing in DevOps covers how that conventional layer fits into the pipeline.

Building an evaluation set that reflects real use

An evaluation set is a versioned collection of inputs, each with information about what a good output looks like. It is the single most valuable QA asset for an AI feature.

What goes into each case

  • The input exactly as the feature receives it, including any context such as retrieved documents or user profile data.
  • A reference: an expected answer for tasks with one right answer (a classification label, an extracted date), or criteria for open tasks (must mention the refund amount; must not promise a delivery date).
  • Tags for category, difficulty, language and risk level, so you can see where performance changes.
  • Source: where the case came from, such as production sample, edge case or bug report.

Where cases come from

  1. Real usage. Anonymised samples from production or from a pilot, covering the common cases.
  2. Edge cases. Very long or short inputs, mixed languages, poor formatting, missing fields, unusual but legitimate requests.
  3. Adversarial inputs. Attempts to make the feature ignore its instructions, reveal data or produce harmful content.
  4. Known failures. Every bug report becomes a new case, so the same failure cannot return unnoticed.

How big should it be?

Start small and grow. As an illustrative starting point, 50 to 100 well-chosen cases covering your main categories and risks are more useful than 2,000 random ones. Add cases each sprint. For classification and extraction tasks you will want more cases per category so that score changes are meaningful rather than noise. If your feature answers questions from company documents, our guide to building a test set for enterprise knowledge search goes deeper on retrieval-specific cases.

Treat the evaluation set like code: store it in version control, review changes, and record which version was used for each release decision.

Scoring outputs: automated checks, model grading and human review

Different checks suit different tasks. Most teams combine several.

MethodHow it worksGood forLimitations
Exact or rule-based checksCompare to an expected value, or check format, length, required fields and banned phrasesClassification, extraction, structured output, policy rulesCannot judge quality of open text
Reference similarityMeasure overlap or semantic similarity with a reference answerShort answers with a known gistRewards wording close to the reference; misses factual errors
Model-based gradingA strong model grades each output against a rubricOpen text at scale: summaries, replies, explanationsHas its own biases; must be calibrated against humans
Human reviewTrained reviewers score outputs with a rubricHigh-risk outputs, calibration, new featuresSlow and costly; reviewers need guidance to agree
Production signalsUser edits, thumbs up or down, escalations, complaintsDetecting real-world driftLagging and noisy; does not replace pre-release tests

Model-based grading, used carefully

Using a language model to grade outputs makes evaluation affordable at scale. The research supports this, with caveats. In Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena, Zheng and colleagues report that strong judges such as GPT-4 reached over 80% agreement with human preferences, similar to the level at which humans agree with each other. The same paper documents position, verbosity and self-enhancement biases. In practice:

  • Write a specific rubric with examples of good and bad outputs, rather than asking whether an answer is good.
  • Grade one criterion at a time where possible (accurate, complete, follows policy, appropriate tone).
  • Check the grader against a sample of human-scored cases before trusting it, and re-check when you change the grader model.
  • Do not let the same model grade its own outputs without that calibration.

Look beyond accuracy

The Holistic Evaluation of Language Models (HELM) study measured models across accuracy, calibration, robustness, fairness, bias, toxicity and efficiency. Your feature does not need all seven, but the principle applies: decide which qualities matter for your users, such as factual accuracy, tone, safety, latency and cost per request, and score each one rather than relying on a single number.

Regression checks when prompts, models or data change

The most common source of AI feature regressions is not a code change. It is a prompt tweak, a model upgrade, a new retrieval index or a changed setting. Each of these should trigger the same discipline as a code release.

What should trigger an evaluation run

  • Any change to the prompt or system instructions
  • A new model or model version, including provider-side updates you opt into
  • Changes to retrieval: new documents, chunking, embedding model or ranking
  • Changes to settings such as temperature or maximum output length
  • Changes to pre- or post-processing code around the model

How to run it

  1. Keep a baseline. Store the scores from the last approved version, by category and overall.
  2. Run the full evaluation set against the candidate change. For non-deterministic features, run each case more than once or with fixed settings so you can separate real change from run-to-run variation.
  3. Compare by category, not just overall. A small overall improvement can hide a serious drop in one high-risk category.
  4. Review every newly failing case by hand. Decide whether it is a real regression, an acceptable difference or a flaw in the test.
  5. Record the decision with the evaluation set version, scores and reviewer notes.

For example, a customer support team that upgrades its model might see overall reply quality improve while refund-policy answers get worse, because the new model phrases conditions differently. Category-level comparison catches this before customers do.

Automate the routine

Once the evaluation set and scoring are stable, run them automatically in your CI pipeline on every relevant change, with results posted where the team reviews pull requests. Keep the full human review for release candidates and high-risk changes.

Human review that scales

Automated checks make evaluation affordable; people keep it honest. The aim is not to review everything, but to review the right things consistently.

Where human review is essential

  • Calibrating automated graders before you rely on them
  • New features and major changes before first release
  • High-risk categories: anything touching money, health, legal commitments or personal data
  • Cases where automated scores disagree with each other or change sharply

Making reviewers consistent

  • Use a written rubric with scored examples, and a short training session for new reviewers.
  • Have two reviewers score a shared sample regularly and discuss disagreements; low agreement means the rubric is unclear.
  • Include domain experts for specialist content. A QA engineer can judge format and tone; a clinician or lawyer may be needed to judge correctness.
  • Capture reviewer comments, not just scores, so failures turn into new evaluation cases.

Review in production, too

The NIST AI Risk Management Framework states that AI systems should be tested before deployment and regularly while in operation, and calls for monitoring behaviour in production and feedback channels for users. A practical way to do this is a weekly sample of production outputs, stratified by category and risk, reviewed with the same rubric. Findings go into the evaluation set and the backlog.

Release gates, costs and risks

Evaluation only protects users if it influences release decisions. Agree the gates in advance, with product and engineering, so that results are not argued about under deadline pressure.

GateExample criterion (illustrative)
No regression in high-risk categoriesScores in tagged high-risk categories equal to or better than the baseline
Overall qualityOverall score within an agreed tolerance of the baseline or better
Safety and policyZero failures on adversarial and policy cases marked as blocking
Human sign-offReviewed sample of new failures accepted by the product owner
Operational limitsLatency and cost per request within agreed budgets
Rollback readyPrevious prompt and model configuration can be restored quickly

Costs to plan for

  • Time to build and maintain the evaluation set, including domain expert time
  • Model API costs for running evaluations and model-based grading on each change
  • Reviewer time for calibration, release review and production sampling
  • Tooling to store cases, run evaluations and compare results

Common risks

  • An evaluation set that goes stale while real usage moves on. Refresh it from production samples.
  • Overfitting: tuning the prompt until it passes the evaluation set but not real inputs. Keep a held-out set that is not used during tuning.
  • Personal data in test sets. Anonymise production samples and control access.
  • Untracked configuration. Store prompts and model settings in version control, so you always know what was tested.

Getting started: a step-by-step plan

You do not need a dedicated platform to begin. A versioned file of cases, a script and a review spreadsheet are enough for a first feature.

  1. Define what good means. With the product owner, write three to six quality criteria for the feature and mark which failures are blocking.
  2. Collect a first evaluation set of real and edge-case inputs, tagged by category and risk.
  3. Choose scoring methods for each criterion: rules where possible, model grading for open text, human review for high risk.
  4. Calibrate any model grader against human scores on a sample.
  5. Record a baseline for the current version.
  6. Automate the evaluation run in CI for prompt, model, data and setting changes.
  7. Agree release gates and write them into your release checklist.
  8. Start production sampling on a weekly schedule and feed findings back into the set.

If your feature is a conversational assistant, our guide to evaluating an AI chatbot before users depend on it adds conversation-specific checks. PoliteTech’s QA and testing service covers test strategy, automation in your pipeline, release checklists and evaluation sets and model behaviour checks for AI features; a test strategy review is the usual starting point.

Frequently asked questions

Can we test AI features with our existing test automation tools?

Partly. Use your existing tools for the code around the model, with the model mocked. The AI behaviour itself needs an evaluation set and scoring, which can still run from your CI pipeline using a script or an evaluation framework.

How many test cases do we need in an evaluation set?

Start with a few dozen to a hundred well-chosen cases covering main categories and risks, then grow it every sprint and with every production issue. Quality and coverage of cases matter more than raw size.

Can we trust a language model to grade outputs?

With calibration, for many criteria. Research on LLM-as-a-judge reports over 80% agreement with human preferences for strong judges, but also documents position, verbosity and self-enhancement biases. Check the grader against human scores before relying on it.

What should trigger a regression run?

Any change to the prompt, model or model version, retrieval data, settings such as temperature, or the code that prepares inputs and processes outputs. Treat these like code changes.

How do we handle outputs that differ every run?

Score against criteria rather than exact text, run each case more than once or with fixed settings, and compare aggregate scores by category against a baseline. Investigate individual failing cases rather than chasing every wording difference.

Who should do human review?

QA engineers can review format, tone and policy adherence with a rubric. Domain experts should review correctness for specialist content such as medical, legal or financial outputs. Two reviewers on a shared sample helps keep scores consistent.

Sources and methodology

Guidance reflects PoliteTech delivery experience. The external references below informed specific points in this article.

  1. OpenAI: Evals framework (GitHub repository) — accessed 9 November 2026. Why evals matter when building with LLMs, basic and model-graded eval templates, and private evals with your own data.
  2. Zheng et al.: Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena (arXiv, 2023) — accessed 9 November 2026. Over 80% agreement between strong LLM judges and human preferences, and documented position, verbosity and self-enhancement biases.
  3. Liang et al.: Holistic Evaluation of Language Models (arXiv, 2022, revised 2023) — accessed 9 November 2026. Evaluation across accuracy, calibration, robustness, fairness, bias, toxicity and efficiency.
  4. NIST: AI Risk Management Framework 1.0, Section 5 (Core) — accessed 9 November 2026. Testing before deployment and regularly in operation, repeatable TEVV processes, production monitoring and user feedback channels.

Do you know what happens to your AI feature when the model changes?

We can help you build an evaluation set, automate regression checks in your pipeline and set release gates your team can apply consistently.