E3 · Problems
Problems
★ foundations · ★★ advanced · ★★★ expert. Model answers are not published, so that the problems keep their value as assessment; make check-E3 and your own study runs are your feedback.
-
★ For each job, say whether a workflow or an agent should choose the next step, and name the measurement that would change your mind. (a) Every night, summarise each new support ticket and file it under one of eight categories. (b) Answer an employee's question about any company policy, from a knowledge base of 400 documents. (c) Reconcile a supplier's invoice against purchase orders, where mismatches have a dozen known causes and a long tail of unknown ones.
-
★ A refund tool has the schema
{"type": "object", "properties": {"customer_id": {"type": "string"}, "amount_eur": {"type": "number"}, "reason": {"enum": ["damaged", "late", "other"]}, "items": {"type": "array", "items": {"type": "integer"}}}, "required": ["customer_id", "amount_eur"], "additionalProperties": false}. Givecheck_arguments' exact output (its docstring fixes the order) for (a){"customer_id": "C-1001", "amount_eur": "40"}, (b){"customer_id": "C-1001", "amount_eur": 40, "reason": "Damaged"}, (c){"amount_eur": true, "items": [1, 2.5]}, (d){"customer_id": "C-1001", "amount_eur": 12.5, "note": "x"}. For each, write the one-line error message the model should receive, and say which of the four a strict decoding mode, one that masks every token the schema does not allow (E2 lesson 4), would have prevented. -
★ Convert this Chat Completions history to an Anthropic Messages request body by hand: a system message "Be brief."; a user message "Compare a.txt and b.txt."; an assistant message with no text and two calls,
read_filewith{"path": "a.txt"}(idc1) andread_filewith{"path": "b.txt"}(idc2); and the two tool results"alpha"and"beta". Then name the two mistakes a hand-written adapter most often makes on this input, and what the API does with each. -
★ A turn asks for, in order:
read_file a(300 ms),read_file b(200 ms),fetch_url u(500 ms),send_email(100 ms),read_file c(300 ms),recall(100 ms),write_file d(50 ms). Withparallel_safe = READ_ONLYand a pool of four workers: (a) the groups, (b) the wall-clock time of the turn, (c) the time with Module 1's sequential loop, (d) the time if the pool had one worker. Then say whetherfetch_urlbelongs in the first group in a deployment that handles customer data, and why that is a different question. -
★★ Retry arithmetic. Model calls fail independently with probability 0.1. (a) The success probability of an 8-call task with 1, 2 and 3 attempts per call. (b) The expected number of attempts per call with k attempts, in closed form, and its value for k = 3. (c) Each attempt costs 2 s on average whether it fails or not. What does going from k = 1 to k = 3 cost in expected seconds per successful task?
-
★★ Check the study. Derive the expected number of model calls per run in lesson 5's simulation, for a five-call task with failure probability p and k attempts, remembering that a run stops at the first call whose attempts all fail. Evaluate it for (p, k) = (0.2, 1), (0.2, 4) and (0.05, 2) and compare with the study's 3.35, 6.21 and 5.22.
-
★★ Retry-After makes a herd. 1,000 agents receive
429withRetry-After: 10at the same instant. (a) What doesmax(backoff, retry_after)withbase = 0.5do to the herd on the first retry? (b) Propose a rule that honours the header and spreads the retries, and find the smallest spread that keeps the peak under 50 requests per 100 ms bucket. (c) The server's operators would rather you did not add jitter after their deadline. What else could the server send, and what would you do with it? -
★★ Tokens and money. A task has S + T = 1{,}200 prompt tokens and adds C + R = 800 per step, and each step writes 150 completion tokens. Prices are 3 per million prompt tokens and 15 per million completion tokens. (a) The cost of a 12-step run, and the share of it that is re-sent history. (b) With
max_cost=0.05, after how many steps does the run stop, what has it spent, and by how much did it overshoot? (c) The same run with a prompt cache that bills re-sent prefixes at a tenth of the price: the 12-step cost. Which limit (steps, tokens or cost) would you now set first, and why? -
★★ Correct and conforming. A structured-answer run on 200 tasks gives: conformed first time 168; conformed after one repair 189; correct among the conforming 171; correct among the 21 repaired 12. (a) Fill lesson 7's table. (b) The conformance rate and the accuracy among conforming answers, each with a Wilson interval. (c) The accuracy of repaired answers against first-time answers: is the difference established? (d) Would you keep the repair? State what you would measure next.
-
★★ A streaming interface. Design what a user sees while a reply streams that contains text, then a
send_emailcall arriving in six fragments. For each moment (first text fragment, first tool fragment, the fragment containing"to": "man,finish_reason, the result), say what you show and why. Then give the one thing you must never show beforefinish_reason, with an example of how it misleads. -
★★ At the limit. (a) Give the worst-case number of model calls and tokens for a run under
Budget(max_steps=n, max_tokens=B), (i) with the hard stop and (ii) with one final no-tools call after any limit, when no single call can exceed c tokens. (b) Lesson 6's third question showed that the time budget cannot interrupt retries. Changecall_with_retriesandChatClientso that it can, without breakingclassify's contract, and say whatstopthe run should then report. (c) Name a task for which the final no-tools call is harmful, and say how the caller should tell the difference. -
★★ Read your own study. Use your table from the build. (a) Report the two pass rates with Wilson intervals over runs, and say why they overstate your precision. (b) With 60 paired runs, 7 passed only with E3 and 2 only with Module 1. Compute the exact McNemar p-value (Module 9 lesson 5) and say what it does and does not establish. (c) Why does a task-clustered bootstrap give a wider interval for the difference than one over runs? (d) Write the sentence you would put in a design review, with its denominator.
-
★★★ pass^k is not a power. Twenty tasks: ten that the agent always solves, five it solves 60% of the time and five 20% of the time. (a) pass^1, pass^3, and (\text{pass}^1)^3. (b) Explain the gap with Jensen's inequality, and say what it implies about reporting one reliability figure for a fleet of mixed tasks. (c) With three tries per task, show that \binom{c}{3}/\binom{3}{3} is unbiased for p_i^3, and say why it is a poor estimator of a single task's reliability. (d) Which tasks would you add tries to first, if each try costs the same?
-
★★★ Self-conditioning, modelled. A run may survive one error but not two. Before any error, each step errs with probability 0.01; after the first error, with 0.05. (a) The success probability for 20, 50 and 100 steps. (b) The same with no self-conditioning (0.01 throughout, one error survivable). (c) The 50% horizon in each case, to the nearest 5 steps. (d) Sinha et al. (2025) report that thinking mitigates self-conditioning. In this model, what parameter does that change, and what horizon would you get if it returned the post-error rate to 0.02? (e) Kwa et al.'s 50-minute horizon doubles every seven months. What does it predict for two years out, and for two years out if the doubling time were four months? Name the two assumptions that matter most.
-
★★★ Code actions at the gateway. CodeAct reports up to 20% higher success with Python actions than with JSON calls. You run Module 3's gateway, which checks each JSON call's tool and arguments against policy. (a) What can the gateway no longer see if the agent emits code, and which of Modules 3, 11 and 13's controls stop working? (b) Sketch two designs that keep some of CodeAct's gain while restoring a checkpoint for consequential actions, for example tools exposed to the code as typed functions that themselves call through the gateway. (c) For each design, name the attack it still permits and the measurement you would run to compare the designs on both utility and security.