Artificial intelligence • Original RRTutors lesson
Evaluating AI Products and Generative Models
Build evaluations that measure correctness, robustness, safety, latency, cost, and user outcomes.
Concept and explanation
AI evaluation combines representative datasets, task-specific metrics, human review, stress tests, and operational measures. Generative outputs often require rubric-based judgments and source checking rather than exact-match scores. Evaluation examples should be protected from training leakage and refreshed as the product and user population change.
How to apply it
Define a test protocol before tuning, include normal and adversarial cases, compare against a baseline, and report uncertainty and subgroup performance.
Worked example
A customer-support assistant can be evaluated for answer correctness, citation support, refusal quality, privacy leakage, and time to resolution.
Illustrative Python example
checks = {
"task_quality": "Does it solve the user need?",
"grounding": "Are claims supported?",
"safety": "Does it avoid prohibited outcomes?",
"operations": "Does it meet latency and cost limits?",
}
print(checks)
Expected result
A balanced evaluation includes product and operational measures, not only a model score.
Limitations and cautions
Human ratings can be inconsistent, biased, or vulnerable to judging fluent but incorrect answers.
Practice exercise
Create five evaluation cases for an AI tutor, including one case where it should admit uncertainty.
Key takeaway: Test the complete user-facing system under realistic conditions.