A. Module overview
| Field | Value |
|---|---|
| Module ID | L3-M03 |
| Level | 3 - AI Agent Quality Engineer |
| Description | Testing whether an agent completes a multi-step task rather than testing piece by piece: a task scenario (goal, setup, success checks, scope of allowed change) with an oracle that reads the end state of the environment; a workflow with branches treated as a graph, the edge coverage of a scenario suite, a few rules about the process, and a table showing which scenario notices which defect; partial credit with rules against gaming (count only what changed, dependent checks, damage means zero), four outcome levels and a gate that fails closed when data is missing and never approves by itself; environment verification (a read-only observation, comparing the claims in the message with the real changes, finding unreported changes, checking that the log still matches the state). The module's lab is a simulated agent on the mock tool layer of the fictional product ThuVien Mini (a school library assistant), deterministic and offline: no model call, no real server, no API key; tools run only in memory and in a temporary folder. What is known about agent evaluation is cited from sources read on 2026-11-04: Anthropic's article on evaluating agents, three arXiv papers (τ-bench, AppWorld, WebArena) and two Wikipedia pages (code coverage, mutation testing). The reading depth of each source is recorded in §12 of each lesson. |
| Why this module matters | Users do not see individual tools; they see whether the task is done. An agent can pass every tool-contract test, still end wrong, and still write "Done". Only a scenario with an end-state oracle shows that, and only a rule-bound scale shows that a half-done run differs from a complete failure. The module lays the ground for trajectory evaluation (L3-M04), reliability (L3-M06) and agent safety (L3-M07). |
| Target professional competency | Level 3, learning outcome 3: "Evaluate task success, partial success and trajectories, with documented matching rules". This module covers task success and partial success with scenarios that have an end-state oracle; trajectories belong to L3-M04. The module does not measure reliability across many trials (pass^k), does not evaluate with a model (a judge), and does not measure a real agent. |
| Estimated duration | 4 lessons × 120 minutes = 8 hours, plus the module assignment (~4 hours) = ≈ 12 hours for someone who has finished L3-M02. An estimate, not measured with real learners. |
| Prerequisites | L3-M02 (the first lesson needs L3-M02-L05). The module reuses, without repeating: the agent loop and stop conditions (L3-M01-L02), the sandbox and the log (L3-M01-L01, L04), the mock tool layer with an effect log, idempotency, approval and budget (L3-M02-L04), the oracle (L1-M01-L01), the scoring rubric (L2-M03-L02). No API key needed. |
| Module deliverable | A multi-step scenario suite: scenarios with an end-state oracle, a suite covering the workflow's branches, a partial-credit scale with a gate that fails closed when data is missing, a report comparing the message with the state, and a golden table for mutation testing; plus the small product of each lesson |
| Cost | 0 VND |
What the learner builds. Step by step, in code-labs/l3-m03: (L01) a scenario spec as data, evaluate, diff_state, collateral and the end-state oracle, lint_scenario; (L02) a workflow as a graph of nineteen named edges, edge coverage, three process rules, eleven simulated defective agents and the table "which scenario notices which defect"; (L03) grade with four rules, rank, summarize, gate and lint_weights; (L04) observe, extract_claims, compare, environment_consistent. The lab copies the files it needs from the L3-M02 lab, does not import from the old lab, and needs only pytest.
What the module does not do. It does not measure a real model or agent, state the price, speed or reliability of any model, agent or vendor, or rank or recommend any framework or provider: every figure in the lab describes a simulation. It runs no shell command, network access or file outside the temporary folder. It does not measure consistency over many trials and does not use a model as the grader. It does not create or edit an automated workflow in the repository. It states no legal opinion. The oracle, coverage, score and gate only flag and rank; the gate fails closed when data is missing and has no word for "approved"; a person decides the threshold, what a failure means and every real effect.
Terms reused with a different meaning (each lesson has a sentence separating them). A scenario is a multi-step task together with how to grade it, different from a "sample" of the dataset (L2-M02) and a "test case" of L3-M02 (L01); a workflow is the graph of steps the simulated agent follows, different from an automation workflow that runs on a schedule (L02); a score is the fraction of one task, different from the average score of L2-M03 (L03); the trace of L3-M01-L04 is the agent's own record, while lesson L04 reads the environment; the oracle is still the mechanism that decides pass or fail (in L01 it is the scenario's checks plus the scope).
B. Learning objectives
| ID | Objective |
|---|---|
| MO1 | Write a task scenario with success checks and a scope, run the end-state oracle and the lint, and state what they do not check. |
| MO2 | Describe a workflow as a graph, measure the edge coverage of a scenario suite, run the process rules, and read the table "which scenario notices which defect" without inferring anything about a real agent. |
| MO3 | Grade a result in parts with rules against gaming, read earned, missed, regressed, collateral, and use a gate that fails closed when data is missing without treating it as approval. |
| MO4 | Verify the environment: a read-only observation, comparing the claims in the message with the state, finding unreported changes, checking that the log still matches the state. |
| MO5 | Test the oracle and the grader themselves with mutation testing on a golden table and state which broken versions survive and why. |
C. Lessons
| ID | Lesson | Duration | Prerequisite | Concepts | Practical output |
|---|---|---|---|---|---|
| L3-M03-L01 | Task scenarios and success criteria | 120' | L3-M02-L05 | scenario, end state, gain checks and guards, scope, lint | A scenario spec with an end-state oracle |
| L3-M03-L02 | Multi-step workflow tests | 120' | L01 | workflow graph, edge coverage, unreachable edges, process rules, the table of noticed defects | A suite covering the branches |
| L3-M03-L03 | Partial success and graded outcomes | 120' | L02 | partial credit, four rules against gaming, four levels, a gate that fails closed | Grading for an unfinished task |
| L3-M03-L04 | End-state verification in the environment | 120' | L03 | read-only observation, claim, unsupported, unreported, environment consistency | Checking the environment, not only the message |
D. Module assignment
The module assignment exercises.md: a multi-step scenario suite for ThuVien Mini v2 (scenarios and the oracle, workflow and coverage, score and gate, environment verification, mutations and the golden table, reproduction; criteria AC1-AC6 and a 100-point rubric) plus an independent challenge. The four independent exercises of each lesson are in code-labs/l3-m03/exercises/ and in §9 of each lesson: fix three broken scenario specs (L01), predict the missing edges and choose extra scenarios (L02), predict grade levels and choose weights that resist gaming (L03), predict the flags of four runs and write two runs that expose two kinds of mismatch (L04).
E. Module assessment
The module quiz quiz.md (12 questions, 20 points, pass mark 70%), the module assignment with acceptance criteria and a rubric (exercises.md); the solutions and the instructor guide are for instructors only. The per-lesson practice files are practice-01.md to practice-04.md (with .en.md versions), public and with reference answers. The instructors' solutions and checks are in code-labs/l3-m03/instructor/ and are for instructors only.
F. References
The shared list is in references.md (6 sources re-fetched on 2026-11-04, with the access date and reading depth of each). Each lesson also has its own references table in §12.
Objectives ↔ assessment matrix
| Objective | Lesson | Independent exercise (§9) | Quiz questions | Module assignment criterion |
|---|---|---|---|---|
| MO1 | L01 | exercises/test_l01_scenario.py |
Q1, Q2, Q12 | AC1 (and AC6 for the whole module) |
| MO2 | L02 | exercises/test_l02_workflow.py |
Q3, Q4, Q6, Q10 | AC2 (and AC6 for the whole module) |
| MO3 | L03 | exercises/test_l03_grading.py |
Q7, Q9, Q12 | AC3 (and AC6 for the whole module) |
| MO4 | L04 | exercises/test_l04_endstate.py |
Q5, Q8, Q11 | AC4 (and AC6 for the whole module) |
| MO5 | L01 to L04 | no separate exercise; mutations belong to the module assignment | no separate question | AC5 |