Capstone - Milestone 1: brief and design of the evaluation platform

Study time
≈ 5 h (estimate)
Needs
L2-M07-L05
Updated
2026-11-04

Progress is saved in this browser only. No account, nothing is sent to a server.

Draft · reviewed by AI, not yet by a person. Content may change. English translation: AI-assisted, not human-reviewed.
On this page

Module: L2-M08 (capstone) · Duration: ~5 hours (estimate) · Previous: L2-M07-L05 · Next: Milestone 2

1. Introduction

The past seven modules taught the pieces one at a time: evaluation strategy, datasets, metrics, judges, human labels, RAG, comparison and gates. The capstone puts the pieces together into one real job: provide the evidence for a person to decide whether to release an AI feature, using an evaluation platform you build yourself.

The product is HocVui Tutor (a math tutor for students in grades 3 to 5; fictional, simulated, offline), in the folder capstone-projects/project-02-ai-evaluation-platform/. The stable version is running; the rc version is about to be released. The first milestone does not write the platform. It answers three questions: what to evaluate (clauses and risks), how to evaluate (who grades which clause) and what to build (the data flow and the decision policy). The output is a reviewed design document.

2. Objectives

  1. Read clauses T1-T8 and point out which clauses can be checked with a deterministic metric function, which need a judge, and which need a person.
  2. Explore the product as a black box to understand the answer format, not to take expectations from it.
  3. Build a prioritized risk table and a traceability table from T1-T8 and E1-E12 to modules, oracles and data.
  4. Design the platform's data flow and write in advance the decision policy: what the judge does, what the gate does, what the person does.
  5. Defend the design in a short review session, with questions for the product owner.

3. Prerequisites

  • L2-M01 to L2-M07; you already have a feel for versioned datasets (L2-M02), metric functions (L2-M03), judges and kappa (L2-M04, L2-M05), paired comparison and gates (L2-M07).
  • Read the capstone's README.md, requirements.md, data/README.md, data/policy.json, rubric.md and design-doc.template.md.
  • Python 3.14 or 3.12 and pytest==9.2.0 (see the project README).

4. How to do this milestone

4.1 Expectations come from the clauses, not from stable

stable is the version that is running, not the correct version. If you copy the behavior of stable as the expectation, the platform can only detect "different from stable"; it cannot detect a defect that both versions share. The example in section 5 shows right away an answer from stable that lacks a term that clause T1 requires. Every expectation must trace back to T1-T8 or data/policy.json (L2-M01 on evaluation strategy, L2-M03 on metrics). stable is used only as the baseline for the paired comparison in milestone 3.

4.2 Who grades which clause

For each clause, ask: can it be checked with code? If so, use a deterministic metric function (cheap, repeatable, but it checks only what it states). If the criterion is a matter of perception (for example "clear, appropriate for the age group"), you need a judge (a model-based grader, simulated here), and the judge must be calibrated against human labels before it is trusted (L2-M04-L01 on the decision table; L2-M04-L04, L2-M05-L02 on kappa). An example row of the table: T4 ("questions outside math are redirected") can be checked by looking for the phrase "Mình chỉ giúp" ("I only help"); but a math problem that sounds like it is outside math (football, games) needs the opposite check, which must not contain that phrase. You fill in the remaining clauses yourself, and write down why.

4.3 Risks first, checks after

The risk table shows where to put the effort. An example of three rows (not a complete answer):

Risk Clause Impact Priority Why
The judge is lenient, scores look better than reality T7 Wrong decision because the metric is wrong High Only shows when compared with human labels (L2-M04-L03)
A small slice has too few items to conclude T8 A regression is missed Medium Wide interval, easy to confuse "not seen" with "not there" (L2-M01-L04)
The dataset has duplicate items or items that leaked into the training data T1 False high score Medium L2-M02-L05 on data contamination

Each risk has a priority (high, medium or low) and a way to check it. "I will be careful" is not a way to check.

4.4 Data flow and traceability

Data flow of the evaluation platform: pool and corpus → dataset manager → dev/test split → a runner that runs stable and rc. Two branches leave the runner: deterministic metric functions, and the judge with human labels followed by calibration (threshold chosen on dev, reported on test). They meet at the paired comparison and the A/A check → a gate with exit codes 0, 1, 2, 3 → a report → a person who decides.
Diagram: Data flow and traceability

Read the diagram from left to right: the pool and corpus enter the dataset manager, then are split into dev and test; the runner runs both versions; the deterministic metric functions and the judge (calibrated with human labels) produce the pass flags; the paired comparison and the A/A check feed the gate; the report goes to the decision maker.

The traceability table has T1-T8 (what the product claims) and E1-E12 (what the platform must do). Each row has the planned module or test, the oracle (where the expectation comes from) and the data. Planned test names can be taken from the AC in requirements.md section E. This table is also the evidence for criterion M2 and the two "Design" cells of the rubric.

4.5 A decision policy written in advance

Write it before seeing the results (L2-M07-L01 on a plan written before the data), because after seeing how bad rc is, it is very hard to stay objective when setting thresholds. Three sentences the design needs:

  • The judge only flags: the judge scores subjective criteria and flags items for a person to read; the judge does not release and does not block. One sentence used throughout: the judge only flags; the gate only reports a result (and blocks on error); a person decides.
  • The gate blocks on error (fail closed): missing data, malformed input or an unexpected error are all ERROR, exit code 3, never 0 (L2-M07-L04).
  • A person decides: one person reads the report and records the decision, the reasons, the limits and the conditions for changing the decision.

The thresholds live in data/policy.json: the practical margin ("biên thực tế", margin: a difference smaller than this does not change the decision; different from the margin of error of an interval in L2-M01-L04 and different from an edge case), the minimum sample size, the critical slices, and the judge's limits. The design says why those thresholds are reasonable or questionable: that is where you ask the product owner.

5. Hands-on: explore the product

From the root folder of the repository:

cd academy-content/capstone-projects/project-02-ai-evaluation-platform
python explore.py stable "Giải thích phân số cho bạn học lớp 4." --kind concept --args '{"term": "phân số"}'
python explore.py stable "Hôm qua trận bóng đá thế nào?" --kind offtopic
python explore.py stable --kind hint --args '{"a": "12", "b": "5", "op": "+"}'

Output (copied from a real run, 2026-11-04, Python 3.14.6):

Mình giải thích ngắn gọn nhé. Khi nói về phân số, cần nhớ: tử số. Khi nói về phân số, cần nhớ: phần bằng nhau.
Mình chỉ giúp các bài Toán lớp 3 đến lớp 5 thôi. Bạn có bài Toán nào cần giúp không?
Gợi ý: cộng hai số. Bạn thử đặt phép tính theo hàng nhé.

What you can read from it: the answer is text; a question outside math is redirected with a fixed phrase; a hint starts with "Gợi ý" ("Hint"). And one thing worth noting: the first answer lacks "mẫu số" ("denominator") even though stable is the running version (T1 requires "tử số" (numerator), "mẫu số" (denominator) and "phần bằng nhau" (equal parts) for "phân số" (fraction); the table of all 12 concepts is in requirements.md section B). Running again with a different --seed may give a different answer. These observations help you design checks; they do not prove stable is correct.

Then look at the map of the work for milestone 2 to milestone 4:

cd starter
python -m pytest

Almost every test fails with a message starting with TODO(M1), TODO(M2) ... Milestone 1 only needs deliverables/design.md.

6. QA perspective

  • What can go wrong in this milestone: writing the platform before knowing the risks; expectations copied from stable; a traceability table missing clauses or with no oracle; not deciding in advance who grades which clause; a decision policy written after seeing the results; forgetting to state that every number is simulated.
  • Design review: ask one person (a classmate, an instructor) to read it in 20 minutes, and record the comments and how you handled them in section 8 of the template.

7. Real-world scenario

Scenario (fictional): "the score went up four points". A team reports that the judge score of the new version is four percentage points higher than the old version, then releases. Nobody has human labels to know how lenient the judge is, nobody has a deterministic check for what once caused an incident, and the judge also had its prompt changed in the same week. After release, an old bug comes back. A traceability table would show which clause nobody checks, and a decision policy written in advance would force the question "has the judge been calibrated?" to come up before any number exists.

8. Milestone 1 deliverables

  1. deliverables/design.md following design-doc.template.md: scope, risks, T1-T8 and E1-E12 traceability, architecture, evaluation strategy, decision policy, questions for the product owner, review result.
  2. deliverables/explore-notes.md: exploration notes (charter, time, observations; example in section 5). The grader reads this file; the test suite does not check it.

Criteria: pass tests/test_m1_design.py (AC1.1-AC1.7); every T and E is in the traceability table; the risk table has at least 5 rows, each with a priority of high, medium or low; no blank template rows or <...> markers left; at least two questions for the product owner (hint: at what level of leniency compared with people should the platform refuse to use the judge, and who decides that level?).

9. Self-check questions

0/12 done · Results are kept in this browser only.

P01 · Short answer

In §5, stable answers a question about fractions without the word "mẫu số" (Vietnamese for "denominator"). What do you conclude about stable and about the source of the platform's expectations?

P03 · Select all that apply

A hypothetical app, QuizNhanh (fictional, not HocVui), states five clauses. Select every clause that can be checked by a deterministic metric function, without a judge.

P04 · True or false

A teammate proposes: if every deterministic check passes and the judge gives the top score, the platform writes PHÁT HÀNH (release) into the decision record by itself. This proposal is consistent with the decision policy of §4.5.

P05 · Fill in the blank

The gate of HocVui Tutor has four results with exit codes: PASS is ___, FAIL is ___, INCONCLUSIVE is ___ and ERROR is ___. When data is missing or the input is skewed, the result must be ___ (one of the four). The practical margin in data/policy.json is ___.

P06 · Put in order

Put the data flow of the platform in the order of the diagram in §4.4, from input to decision maker.

  1. The runner runs stable and rc
  2. Deterministic metric functions and the judge (calibrated with human labels) give the pass flag
  3. The report goes to the decision maker
  4. Paired comparison and A/A check
  5. The dataset is split into dev and test
  6. Pool and corpus enter the dataset manager
  7. The gate gives exit code 0, 1, 2 or 3

P07 · Match

Match each term with its meaning in the capstone.

P09 · Essay

The HocVui product owner asks: "How far may the judge disagree with people before the platform should refuse to use the judge, and who decides that level?" Write 5-8 sentences of answer for section 7 of the design document, based on data/policy.json and your own argument.

P10 · Recall

Lesson: L2-M07-L01

L2-M07-L01 §4.1: the team records the plan_hash of the comparison plan in the ticket. What does that hash prove?

P12 · Short answer

T4 needs two kinds of items in the offtopic slice (offtopic and inscope_word). What does each kind check, and if only the first kind exists, which product defect does the platform miss?

10. Summary

  • Milestone 1 answers "what to evaluate, who grades, what to build" before writing the platform.
  • Expectations come from the clauses; stable is only the baseline for the paired comparison.
  • The decision policy (the judge only flags, the gate blocks on error, a person decides) is written before seeing the results.
  • Output: a design document with risks, traceability, architecture and policy, already reviewed.

11. References

The capstone reuses the sources of the earlier modules; see this module's references.md.