Module L3-M01 quiz

Study time
≈ 30 min (estimate)
Updated
2026-11-04
Draft · reviewed by AI, not yet by a person. Content may change. English translation: AI-assisted, not human-reviewed.
On this page

12 questions, 20 points (Parts A and B: 1 point/question; Parts C and D: 3 points/question), 30 minutes. Pass mark: 14/20 (70%). The solutions are for instructors only. A calculator and code-labs/l3-m01 (lab.tools, lab.classify, lab.loop, lab.planning, lab.trace, lab.archmap) are allowed. The systems, tools, tasks and numbers in the questions are fictional (simulated) data and do not describe a real model, vendor or product. Costs are counted in cu (the lab's pseudo cost unit): one model call 2 cu, calc 1 cu, notes_add 2 cu.

Part A - Multiple choice (1 point/question)

Q1. On a fresh sandbox (no notebooks yet), a call_tool call uses the tool name notes_read and the parameters {"name": "so_tay_3", "extra": 1}. The lab's correct error code is:

  • A. NOT_FOUND, because the sandbox has no notebook named so_tay_3 written earlier
  • B. UNKNOWN_TOOL, because the key extra is not part of the registered tool's schema
  • C. BAD_ARGUMENTS, because the parameter's key set differs from the tool's key set
  • D. BAD_NAME, because the notebook name so_tay_3 does not match the lab's valid name pattern

Q2. A Scripted policy calls calc eight times (eight different expressions) and then returns the final answer. Limits: max_steps 10, budget 23 cu; no tool errors. The result of run_agent, written as (stop reason, number of steps, cost), is:

  • A. (budget, 8 steps, 23 cu): the eighth step starts but its calc call does not fit
  • B. (budget, 7 steps, 21 cu): the eighth step does not start because the total would reach 23
  • C. (budget, 8 steps, 24 cu): the calc call of step eight runs and only then is blocked
  • D. (final, 9 steps, 26 cu): the budget does not block a policy that has a final answer

Q3. A LoopGuard with threshold 3 receives six calc calls with the same key ({"expression": "9-4"}); the state fingerprints of the six calls are f0, f0, f1, f1, f0, f0 in turn. The first call that is rejected (counting from 1) is:

  • A. call 3, because that is the third time the same key appears in the sequence
  • B. call 6, because call 5 only reaches the threshold count minus one
  • C. no call, because each time the fingerprint changes the key's counter returns to 0
  • D. call 5, because (key, f0) has now been seen three times, gaps included

Q4. A plan has five steps: (1) notes_add with {"name": "ban_a", "text": "xong"}; (2) calc with {"expression": "8*8"}; (3) notes_add with {"name": "ket", "text": "{notes_read}"}; (4) calc with {"expression": "9+1"}; (5) calc with exactly the parameters of step 4. lint_plan returns:

  • A. ['DUPLICATE_STEP:5'], because {notes_read} is a tool name so the placeholder is valid at every step
  • B. ['FORWARD_REF:3', 'DUPLICATE_STEP:5'], because nobody called notes_read before step 3
  • C. ['FORWARD_REF:3', 'DUPLICATE_STEP:4'], because the first step of the duplicate pair is the one reported
  • D. ['FORWARD_REF:3'], because two calc steps next to each other do not count as a repeat

Q5. The lab's example map (no errors) gets a new node calendar_add (tool, trusted, permission write, approval none_sandbox_only, no sandboxed field, observed_by trace_store), two edges connecting it to orchestrator, and a risk R13 pointing at calendar_add (score 4, one control, test is untested: later). validate_map returns:

  • A. [], because a risk already points at a tool with a write effect in the map
  • B. ['SIDE_EFFECT_TOOL_NO_RISK:calendar_add'], because the write tool lacks a risk
  • C. ['TOOL_WRITE_NO_APPROVAL:calendar_add'], because sandboxed: true is missing
  • D. ['TOOL_NO_PERMISSION:calendar_add'], because write is not a valid permission in the lab

Part B - True/False (1 point/question)

Q6. In a system the model decides the next step, the loop runs until the model reports it is done, and tool results are fed back to the model, but the code (not the model) chooses the tool at each step. lab.classify gives this system the label agent.

Q7. lint_plan of a two-step plan: (1) calc with {"expression": "2+2"}; (2) notes_add with {"name": "ghi", "text": "Xong: {tong}"} returns ['UNKNOWN_PLACEHOLDER:2'], because tong is not a tool name in the lab. (ghi is Vietnamese for "write" and Xong: {tong} for "Done: {total}"; they are test data.)

Q8. A trace has only one run span (start 1, end 10, all fields valid) and one INFO log with no span_id, clock 12. lint_trace reports LOG_OUTSIDE_SPAN because 12 is greater than the end time of the run span.

Part C - Short answer (3 points/question)

Q9. Run compare_patterns from lab.planning on exactly four tasks t01, t02, t07, t08, eight seeds s0 to s7, slip probability Fraction(1, 4) and the default limits (8 steps, 40 cu). (a) The success rate of plan_execute and of react (reduced fractions). (b) The average cost per run of the two patterns, and the cost per success of the two patterns (total cost of all runs divided by the number of successes), both as reduced fractions. (c) Give one reason this table does not yet tell you which pattern is better with a real model.

Q10. Run task t02 with the simulated policy plan_execute and with react, each time with budget 6 cu, default max_steps (8), no slips (PL.run_task). (a) For each pattern, give (stop reason, number of steps, cost). (b) Which pattern passes the end-state oracle? (c) Explain why the two patterns give different results with the same tools and the same task, and name one thing to do about the budget when comparing the two patterns.

Q11. Call redact from lab.trace on this dict: {"Pass word": "mk-2468", "ghi chú": "gọi cô Lan: 0912 345 678, thư lan.nt@truong.example", "header": "Bearer q7w8e9r0t1", "lớp": "5A"}. (ghi chú means "note", gọi cô Lan "call Ms Lan", thư "mail" and lớp "class"; they are test data.) (a) Write the result (four values). (b) Name two sensitive items that remain intact in the result and why redact misses each. (c) Name one place where the raw data can still exist even though the trace is clean.

Part D - Scenario (3 points/question)

Q12. The HocVui team adds to the lab's example map (no errors) a tool file_export (tool node, trusted, permission write, approval human, side_effect true, observed_by trace_store) and a node shared_drive (environment, untrusted), with three edges: orchestrator->file_export, file_export->orchestrator, file_export->shared_drive. There are no new risks yet. (a) Which codes does validate_map return? (b) The team adds risk R11 (target file_export, excessive_agency, severity 2, likelihood 3, empty controls, test is tests/test_l01_tools.py::test_notes_names_cannot_escape_the_sandbox): what codes remain, and what is test_coverage (a fraction)? (c) When all codes are gone, name two things the validator still does not know.