AI evaluation
AI model testing: test types, metrics and messy data
Waiting for real client data before testing is not caution. It is a delay with a quality problem hidden inside it.
In brief
AI model testing checks whether an AI feature gives correct, safe and consistent output on the inputs your product will really see, before release and after every change. For teams adding AI to an existing product, that means a deliberately messy test set, one clear check for each kind of failure, and every production failure kept as a regression case. Do not wait for clean client data to start.
On this page
- 01What AI model testing covers, and why it is not normal QA
- 02Types of AI model testing, and when each one matters
- 03Why messy data breaks AI that looked fine in the demo
- 04Build the messy test set yourself
- 05What to measure in AI model testing
- 06Trade-offs to plan for
- 07What we see in production
- 08A short checklist for your next AI test plan
- Frequently asked questions
01What AI model testing covers, and why it is not normal QA
Traditional testing asks whether a function returns the expected value. AI model testing asks how often the feature is right, how it fails when it is wrong, and whether that shifts when the prompt, model or data changes. Three things make it different.
- There is often no single right answer. A summary or an extracted address can be correct in several forms, so tests check meaning, structure and support in the source, not exact strings.
- Failures are quiet. A wrong value lands in a field and looks like any other value. Nothing crashes.
- Behavior moves. A provider model update, a new parser or a shift in customer data can change results with no code change on your side.
The CheckList paper, Beyond Accuracy: Behavioral Testing of NLP Models, showed that held-out accuracy often overstates how well a language model really works, and proposed testing specific behaviors instead. That is still the right instinct.
Our guides to AI model evaluation and LLM testing go deeper on scoring and on language model checks.
02Types of AI model testing, and when each one matters
The useful question for a product team is what each test catches inside a live feature and how to run it.
| Test type | What it catches | How to run it in a product |
|---|---|---|
| Functional (unit) tests | Wrong output for known inputs | Fixed cases with reference outputs, checked on every build |
| Regression tests | A fix or upgrade that breaks something that worked | Rerun the full case set on every prompt, model or parser change |
| Robustness and edge cases | Failure on long, messy, partial or multilingual input | Deliberately messy cases, plus small variations of the same input |
| Adversarial and prompt injection | Users or documents steering the model off task | Planted instructions in inputs and uploaded files |
| Bias and fairness | Worse results for some groups or languages | Score results separately per segment, not only on average |
| Performance and cost | Slow answers and runaway spend | Track latency and cost per request at realistic load |
| Drift monitoring | Quality slipping after launch | Sample live traffic and score it against the same checks |
| LLM-specific evals | Invented facts, ungrounded answers, broken formats | Check every claim against the source and validate output schemas |
| Human review | Errors only a domain expert can see | Experts grade a sample and write the reference outputs |
| LLM-as-judge | Quality issues at a scale people cannot read | A grader model scores outputs, checked against human labels |
| Red teaming | Ways to misuse the feature nobody planned for | A focused session where people try to break it on purpose |
A few of these need more than a row.
Adversarial testing and red teaming. Prompt injection is first on the OWASP Top 10 for LLM Applications 2025, ahead of sensitive information disclosure and improper output handling. In a product, the risky input is often the PDF, email or web page the model reads, not the chat box. Adversarial tests are repeatable cases in your suite; red teaming finds new ones, which then join the suite.
LLM-as-judge. A grader model is the only practical way to score thousands of open-ended answers. The study Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena found that strong judges reached over 80% agreement with human preferences, about the level humans reach with each other, but also showed position, verbosity and self-enhancement biases. OpenAI's evaluation best practices give the working rule we follow: prefer pass or fail and pairwise grading over open scores, and use human feedback to calibrate the grader before you trust it.
For multi-step features, AI agent testing adds checks on tool calls and the path the agent takes. For retrieval features, RAG evaluation separates retrieval quality from answer quality.
03Why messy data breaks AI that looked fine in the demo
Demos use tidy inputs. Production does not. Think of a pitch deck with financials in a screenshot, a contract half in English and half in Spanish, or a product title that says "2015 and up" instead of a model year. These are normal in established products, and they are where AI quietly fails. This is part of our larger guide, LLMOps for SaaS: keep AI features working in production.
Two things make this worse in brownfield work. First, the AI output has to land in an existing system, with existing fields and rules, so a wrong extraction is not just a bad answer. It is a bad record. Second, real customer data is often the last thing to arrive. Legal reviews, access approvals and privacy concerns all slow it down. If testing waits for that data, the team builds for weeks on assumptions.
Google's long-standing guidance on production machine learning makes a related point. The gap between how a model behaves in training and how it behaves on live data is one of the main sources of failure. You should test on data that looks like what the system will actually see.
04Build the messy test set yourself
We create test inputs early and on purpose. The goal is to cover the shapes of mess the real data will have, before the real data exists.

- 01
List the input types.
PDFs, slide decks, spreadsheets, scanned images, short videos, scraped web pages, database rows. Each one fails differently.
- 02
List the known kinds of mess.
Long documents, inconsistent layouts, missing sections, multiple languages, numbers in images, free-text fields with no fixed format.
- 03
Write dummy documents that combine them.
A deck with financials split across slides. A bilingual memo. A response from an issuer or user that answers only half the questions.
- 04
Write the expected output for each.
What should land in each field? What should be left empty or flagged? This is your reference.
- 05
Include negative cases.
Inputs the AI should refuse, flag or hand to a person, including documents with planted instructions. A test set with only answerable inputs teaches you nothing about failure.
- 06
Run every case on every change.
Prompt edits, model upgrades and new parsers all go through the same set. Record which model version produced each result.
- 07
Add real cases as they arrive.
When client data comes in, every surprise becomes a new test case. The synthetic set does not go away; it grows.
05What to measure in AI model testing
Accuracy alone hides most of the problems. An overall average can look healthy while one input type or one language fails badly, so report serious failures separately. These are the checks we use for extraction and matching work.

| Check | What it catches | How to run it |
|---|---|---|
| Field-level match against reference | Wrong values in specific fields | Compare each extracted field with the expected output |
| Empty versus invented | The model filling a field it should have left blank | Flag any value that has no support in the source document |
| Language coverage | Quality dropping on non-English or mixed content | Score multilingual cases separately |
| Consistency | Different answers for the same input | Run the same case several times and compare |
| Mapping to the target system | Correct value, wrong destination field | Validate output against the target schema |
| Human comparison | Gaps between AI and expert entry | Show AI output beside the human-entered version |
The last row matters most in regulated or high-stakes products. Storing the AI-generated version next to the human-entered one, and showing both, turns every real record into a test case without risking the record itself. After launch, the same checks run on sampled live traffic, which is where AI observability takes over from pre-release testing.
06Trade-offs to plan for
Synthetic data is not proof. Dummy documents tell you the system handles the shapes of mess you imagined. They do not tell you about the ones you did not. Treat them as a floor, not a ceiling.
Reference outputs take expert time. Someone who knows the domain has to say what the correct extraction is. Budget for it. It is usually the most valuable hour in the project.
Judge models need their own tests. A grader that agrees with your experts on a labeled sample can score at scale. One that was never checked just adds a second untested model.
Rules versus models. For some matching problems, text similarity and rules beat a generative model, because they are predictable and cheap to test. Choose the method by testing both against the same messy set.
Data refresh. If the source data changes daily, the test set needs refreshed samples too, or it will drift away from reality.
Governance. Buyers increasingly ask how AI was tested. NIST's voluntary AI Risk Management Framework, with its Generative AI Profile added in July 2024, is a common reference, and a stored case set answers most of those questions.
For more on what goes wrong after launch, see why AI agents fail in production.
07What we see in production
For Datascape, a healthcare data consultancy, we built a crawler that collects provider details from medical practice websites. Every practice site is built differently, many have no sitemap, and scraped text alone could not be trusted. We split finding pages from trusting what we extract: a discovery module finds the pages, an LLM extracts providers into the client's own provider data model, and each provider is looked up in the NPI Registry.
That lookup is the test. Every scraped provider is matched against official NPI records, so the registry, not the model, decides what the output rests on. The crawler runs as a containerized app inside the client's own AWS account.
For an RV dealership group's staff training module, the mess was in the people data. Job titles that existed in the old training platform but not in the portal broke course assignments and completion percentages. We documented every title gap for the client to resolve, audited the migrated courses on staging and kept the education tab hidden on the live portal until the client verified assignments and progress. That habit catches the failures that a test of only the happy path misses.
For a company launching an accessory product for vehicle dealers, the mess was in free text. Dealer listing titles and compatibility text on accessory sites, such as a model name followed by "2015 and up", rarely matched exactly, so a plain lookup failed. We separated collection from matching: a crawler for each source site returned the same fields into one fitment database, and matching compared each listing title with compatibility text using rules and text similarity, limited to the same maker. No generative model was involved. Because the fitment matcher used rules rather than a model, a person could check each match it made, and testing it against those inconsistent titles was the core of the work.
08A short checklist for your next AI test plan
- Synthetic messy inputs exist before real data arrives.
- Every input type and every known kind of mess has at least one case.
- Each case has a reference output written by someone who knows the domain.
- Negative cases and planted prompt injections are part of the set, not an afterthought.
- The set runs on every prompt, parser or model change, with the model version recorded.
- Any judge model is checked against human labels before it scores at scale.
- AI output and human entry are compared side by side once real data flows.
- Every production surprise becomes a new test case.
If you already have an AI feature in your product and want an outside test of it, our AI Scorecard runs it against 50 of your own cases in two weeks for $5,000, and you keep the cases to run on every release.
Frequently asked questions
What are the main types of AI model testing?
Functional and regression tests check known cases and catch breakage after changes. Robustness, adversarial and red team tests probe messy input and misuse such as prompt injection. Bias, performance and drift tests check fairness across groups, speed, cost and quality over time. For generative features, add grounding checks, human review and a calibrated LLM-as-judge.
How is AI model testing different from AI model evaluation?
Testing is the set of pass or fail checks that decide whether a change can ship. Evaluation is the wider scoring of quality, often comparing models or versions over time. In practice they share the same case set: evaluation tells you how good the feature is, and testing tells you whether this release is still good enough.
Should AI model testing wait for real client data?
No. Real customer data is often the last thing to arrive, slowed by legal reviews, access approvals and privacy concerns. If testing waits for it, the team builds for weeks on assumptions. Write dummy documents that combine the known kinds of mess, test extraction from the first sprint, and let real data confirm what you tested.
Is synthetic test data enough?
No. Synthetic data is a floor, not a ceiling. Dummy documents tell you the system handles the shapes of mess you imagined, not the ones you did not. When client data comes in, every surprise becomes a new test case. The synthetic set does not go away; it grows, and it runs on every change.
When are rules better than a generative model for matching?
For some matching problems, text similarity and rules beat a generative model, because they are predictable and cheap to test. On an accessory fitment matcher for dealer websites, no generative model was involved, and a person could check each match it made. Choose the method by testing both against the same messy set.
How Datics helps
Datics specializes in Brownfield AI: production AI inside software people already rely on. Already built AI? The AI Scorecard tests it on 50 of your own cases in two weeks, for $5,000, and ranks what to fix first. Once it is live, AI Care keeps it accurate for $1,500 a month per capability.
›References (6)
- Google for Developers: Rules of Machine Learning
- OpenAI: Evaluation best practices
- Ribeiro et al., Beyond Accuracy: Behavioral Testing of NLP Models with CheckList (ACL 2020)
- Zheng et al., Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena
- OWASP Top 10 for LLM Applications 2025
- NIST: AI Risk Management Framework
Related work
Case studies from our projects on the same subject.
Datascape
Healthcare · Provider data crawler
Provider data from scattered practice websites, verified against NPI inside the client's AWS
Practice sites are all built differently and many lack sitemaps. One crawler in the client's AWS now turns them into NPI verified records.
Multi-location RV dealership group
Automotive · Staff training module
Dealership staff get training assigned by title and location inside their own portal
Training ran on a rented platform outside the staff portal; now courses, assignments and reports live inside it, on the portal's own people records.
Apex
Automotive · Dealer accessory matching plugin
A dealer plugin designed to offer only accessories that fit the listed vehicle
Fitment sat on many maker sites in free text; we crawled it into one catalog and designed a one button plugin to match it to listings.
More on AI evaluation
AI evaluation
AI evaluation: build your test set before the first release
AI evaluation starts before launch: collect real cases from your product, define pass and fail for each one, and run the set on every prompt or model change.
AI evaluation
AI model evaluation: how do you choose an LLM to build on?
AI model evaluation starts with a scorecard: define the task, metrics and test set first, then run every candidate model through the same rerunnable test.
AI evaluation
How do you run LLM testing with real user prompts?
LLM testing for an AI assistant should use real user prompts and customer-run tests, because demos hide lost context, repeated answers and wrong filters.
AI evaluation
What should an AI audit of a SaaS feature test?
An AI audit of a SaaS feature tests it on your own cases in seven areas, from answer quality and data separation to cost, and ranks what to fix first.
AI evaluation
What LLM evaluation should a chat agent pass before launch?
LLM evaluation for a chat agent starts with written user journeys. See how we turn them into test cases, graders and release gates before launch.
AI evaluation
What does good AI agent testing in CI look like?
A tiered approach to AI agent testing in CI: scripted fake models on every commit, and real-model routing and quality evals on demand.
Your customers already expect AI from your product.
Let us make it real inside the product you run today.
