Lesson 2 of 5 Testing AI Solutions

Creating Validation Criteria for Custom Models

This lesson explains how to define measurable acceptance criteria for custom models.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe the properties of good validation criteria.
  • Choose metrics by task type.
  • Identify criteria beyond average accuracy.

What validation criteria are

Validation criteria are the measurable conditions a custom model must meet to be accepted. They are agreed before training, so that the result is judged against a target rather than rationalized afterwards. Good criteria are specific (a named metric), measurable on a defined test set, tied to the business requirement, and include thresholds for quality, safety, fairness, latency and cost. They are documented, reviewed by the business owner and, where relevant, by risk and compliance, and the evidence of meeting them is kept for audit.

Metrics by task type

The right quality metric depends on the model's task. The following table summarizes common choices.

TaskMetricsNotes
ClassificationAccuracy, precision, recall, F1, per-class resultsUse recall where missing a case is costly, precision where false alarms are costly
ExtractionField-level accuracy, exact matchMeasure per field, because some fields matter more
Regression or forecastingMean absolute error, mean absolute percentage errorCompare with a simple baseline forecast
Text generation against referencesSimilarity, F1 score, BLEU, ROUGEUseful when reference answers exist
Grounded generationGroundedness, relevance, completenessAI-assisted evaluators, calibrated with human review
Agentic behaviourTask completion, tool call accuracy, intent resolutionFoundry agent evaluators

Beyond accuracy

A model that is accurate on average can still be unacceptable. Validation criteria should therefore also include the following.

  • Baseline comparison: the custom model must beat, or match at lower cost, the base model with good prompting, or the current process.
  • Segment performance: results for important segments, such as regions, languages, product lines or customer groups, must meet a minimum, so that average accuracy does not hide a failing group.
  • Safety: risk and safety evaluations, such as harmful content and protected material, must pass.
  • Robustness: performance holds on noisy, unusual and adversarial inputs.
  • Operational criteria: latency and cost per request are within targets at expected volume.
  • Test set integrity: the test set is held out from training, representative of production and large enough to be meaningful.
Worked example

Criteria for a fraud classifier

A payments company fine-tunes a model to flag potentially fraudulent transaction descriptions for review. Fraud is 2 percent of transactions. Missing fraud is very costly, while reviewers can handle a moderate number of false alarms. The current rules-based system catches 70 percent of fraud. Which validation criteria should be set?

Accuracy is misleading with 2 percent fraud, because a model that flags nothing is 98 percent accurate. The primary criterion should be recall on fraud, for example at least 85 percent, which beats the 70 percent baseline, with a minimum precision that keeps reviewer workload manageable. Criteria should also require that recall meets the minimum in each major market and language, that latency suits real-time screening, and that the model is evaluated on a held-out test set from recent transactions.

Check yourself

Why can a model with 95 percent average accuracy still fail validation?

Show answer

It may fail for an important segment, such as a language or region, or fail safety, latency or baseline criteria.

Exam Tips

Remember for the exam

  • Agree specific, measurable criteria with thresholds before training.
  • Choose metrics by task: precision and recall for classification, groundedness for grounded generation.
  • Include baseline comparison, segment performance, safety, robustness, latency and cost.
  • Accuracy is misleading for rare classes; use recall and precision.