A. Module overview
| Field | Value |
|---|---|
| Module ID | L2-M03 |
| Level | 2 - AI Quality Engineer (Evaluation) |
| Description | Turn a dataset into a number you can trust: deterministic metrics (exact match, regex, number finding, tolerance, schema); text-similarity metrics and their limits; analytic and holistic rubrics with scales and descriptive anchors; operational definitions for six criteria (correct, relevant, complete, consistent, faithful, grounded); aggregating and interpreting results with a per-slice report. The lab builds a small toolkit for HocVui Tutor, the fictional math-tutoring chatbot of L2-M01 and L2-M02, running offline on seeded data and simulation. |
| Why this module matters | An evaluation number is only as good as the metric that produces it. A hastily written metric lets wrong answers through and wrongly rejects correct ones in predictable ways; a high similarity score does not mean correct; an ambiguous rubric scores inconsistently; one average hides a dangerous group of answers getting worse. This module teaches how to measure the metric itself and to report in a way others can re-check. |
| Target professional competency | Level 2: "Define quality metrics and scoring rubrics that separate good from bad outputs, and report them per slice". |
| Estimated duration | 3 lessons × 90 minutes + 2 lessons × 120 minutes = 8.5 hours + module assignment ~4 hours + quiz 0.5 hours ≈ 13 hours for someone who has completed L2-M02. An estimate, not yet measured with real learners. |
| Prerequisites | L2-M02 (a versioned dataset, labelling guidelines) and L2-M01 (strategy, statistics for eval). High-school math. No API key needed. |
| Module output | Metric definitions and scoring rubrics (tested metric functions, a rubric with descriptive anchors, operational definitions for the criteria, a per-slice report) |
| Cost | 0 VND |
What learners build. Step by step, in code-labs/l2-m03: (L01) deterministic metric functions with boundary tests, and a measurement of the metric's own precision and recall against human labels; (L02) similarity metrics, a threshold sweep, and an acceptance rule that pairs similarity with a deterministic check; (L03) a rubric as data with a linter, a scoring function, and a simulation of two graders; (L04) operational definitions and a check suite for six criteria, including faithfulness and groundedness per claim; (L05) a per-slice report with confidence intervals, a decision rule, regression detection, Simpson's paradox and a trivial baseline. The lab is independent of l2-m01 and l2-m02 and needs only pytest.
B. Learning objectives
| ID | Objective |
|---|---|
| MO1 | Write deterministic metrics (exact match, regex, number finding, tolerance, schema) with boundary tests and measure them with precision and recall against human labels. |
| MO2 | Compute text-similarity metrics, sweep thresholds and point out where similarity disagrees with correctness. |
| MO3 | Design a rubric with a scale, descriptive anchors and examples, score with weights and critical criteria, and compare two graders. |
| MO4 | Write operational definitions for correctness, relevance, completeness, consistency, faithfulness and groundedness, and state the blind spots of each check suite. |
| MO5 | Aggregate results into a per-slice report, detect regressions and gamed metrics, and interpret an average within its limits. |
C. Lessons
| ID | Lesson | Duration | Prerequisite | Concepts | Practical output |
|---|---|---|---|---|---|
| L2-M03-L01 | Deterministic metrics: exact match, regex, schema and numeric tolerance | 90' | L2-M02-L05 | NFC normalisation, whole-number match, exact tolerance, strict schema, the metric's precision and recall | Tested metric functions |
| L2-M03-L02 | Text-similarity metrics and their limits | 90' | L01 | token F1, ROUGE-L, threshold sweep, diacritics, deterministic guard | A table of cases where similarity and correctness disagree |
| L2-M03-L03 | Rubric design: analytic and holistic, scales, descriptive anchors | 90' | L02 | analytic and holistic rubric, scale, descriptive anchors, critical criterion, inter-grader agreement | A rubric with descriptive anchors |
| L2-M03-L04 | Six quality criteria: correct, relevant, complete, consistent, faithful and grounded | 120' | L03 | operational definition, claim, faithfulness and groundedness, no input means no score | Operational definitions with examples |
| L2-M03-L05 | Aggregating and interpreting metrics: a per-slice report instead of one average | 120' | L04 | pooled, per-slice and weighted averages, per-slice confidence interval, regression, Simpson, trivial baseline | A per-slice report |
D. Hands-on assignment (module assignment)
The module assignment (a set of metrics and rubrics for an AI feature, with a per-slice report, a measurement of the metrics against human labels, and a list of what is not checked) is in exercises.md. The five standalone exercises for the individual lessons are in code-labs/l2-m03/exercises/ and in §9 of each lesson.
E. Module assessment
The module quiz quiz.md, the module assignment rubric in exercises.md, and the practice-0N.md practice for each lesson. The solutions and the instructor guide are for instructors only and are not published.
F. References
The shared list references.md; each lesson also has its own references table in §12 with access dates.
Objectives ↔ assessment matrix
| Objective | Lesson | Standalone exercise (§9) | Module quiz |
|---|---|---|---|
| MO1 | L01 | exercises/test_l01_metrics.py |
(to be added with the quiz) |
| MO2 | L02 | exercises/test_l02_guard.py |
(to be added with the quiz) |
| MO3 | L03 | exercises/test_l03_rubric.py + my_rubric.json |
(to be added with the quiz) |
| MO4 | L04 | exercises/test_l04_criteria.py + my_points.json |
(to be added with the quiz) |
| MO5 | L05 | exercises/test_l05_report.py |
(to be added with the quiz) |