Problem sets
Five sets. Each takes the analysis and design problems of its units and adds problems that cross them, one of which needs a measurement of your own. They are about arguing from definitions; none can be done by quoting a chapter.
Every chapter ends with problems in five groups. A problem set is made from them: all the Analysis problems of its units, one Design problem of your choice from each unit, and the cross-unit problems below, which are only here. Review problems are for checking yourself and are not handed in. Reading problems are the weekly responses. Open problems are for the project.
How they are marked
- An answer is an argument. State what you assume, name the definition or property you use (from the model), and reach the conclusion in steps a classmate could check. A right answer without an argument earns a third.
- Where a claim is false, say so and give the smallest counterexample. Several problems state something false on purpose.
- Calculations show their working and end in a number with units. Carry two significant figures.
- The measured problem in each set reports the number of runs, an interval, what it cost, and one thing that could make the number wrong. The one in set 3 calls no model, so it reports its table in place of runs and an interval.
- Roughly: a fifth of each set is straightforward, a half takes thought, and the rest is hard. About ten hours a set.
Problem set 1: loops, journals and decisions
Units: Chapter 1, Chapter 2, Chapter 3, Chapter 4. Due: week 3.
- The shape of a run. A task needs facts from three tools. In design A the model calls them one at a time; in design B it requests all three in one step and they run together. With fixed context c₀ = 9,000 tokens, each result adding 800 tokens, each model call taking 2.5 s plus 0.4 s per thousand input tokens, and each tool taking 1.2 s (ignore the tokens of the model's own requests, and count the whole of the last model call before the first word): derive the number of model calls, the total input tokens and the seconds to the first word of the reply for A and for B. Which term of the cost formula did B reduce?
- What the journal cannot tell you. A journal records, for each tool call, its name and whether it succeeded, but not its inputs. List three questions about past runs that are now unanswerable, and for each say whether adding the inputs would create a privacy cost. State a rule for what a journal should record that you could defend to the owner.
- A false claim. "If the journal is append-only and every report is a pure function of it, then a crash can never cause an effect to happen twice." Refute it with a sequence of events, and say what must be added to make it true.
- Buying on evidence. A vendor's benchmark says its search tool answers 91% of questions correctly. On 40 of your own questions it gets 30 and the alternative gets 33. Compute an interval for the paired difference under the worst and best cases for how the disagreements could fall, say whether you can tell the two apart, and say how many questions you would need to detect a true difference of five points with 80% power at the 5% level. What does the vendor's 91% contribute to your decision?
- Measured. Run your laboratory 1 agent loop, as far as you have built it (the loop and its two tools are enough), on twenty messages of your own invention, each three times. Report seconds to first word and total seconds with intervals over messages, and the share of total time that was model, tool and your own code. What would you change first?
Problem set 2: state that outlives a run
Units: Chapter 5, Chapter 6, Chapter 7. Due: week 5.
- The lifetime of an influence. For each of these, give the longest time for which a single piece of outside text read today can affect what the agent does, and what ends it: the context of a conversation; a saved memory; a skill; a routine that reads the newest mail each morning; a dated note. Order them, and say for which the owner can see the influence without looking for it.
- At most once, at least once. A reminder is due at 09:00. The process may crash at any instant and restarts within a minute. Design A marks the reminder sent, then sends it. Design B sends it, then marks it. For each give the failure it permits. The owner says a duplicate is a nuisance and a miss is a disaster; a different owner says the opposite. Which design suits each, and what would a third design need from the chat platform to give exactly once?
- Unattended asking. In an unattended run the gate's ask has nobody to answer. Three policies: treat it as refuse; hold the call and ask when the owner next writes; ask by notification and wait an hour. For each say what Property 2 becomes, what a taken-over model can do with it, and one ordinary errand it breaks.
- A false claim. "Because memory is plain text the owner can read, a planted memory will be noticed." Give two reasons this does not follow, each tied to a measured or measurable quantity, and design the smallest mechanism that would make it closer to true.
- Measured. Laboratory 1's tools only read, so first give your agent one tool with an effect in the simulated world (a reminder or a calendar event will do). Kill the agent at a random instant in each of thirty tasks that include a tool call with an effect. Report how many effects happened zero, one and two times, and compare with what your design promised.
Problem set 3: protection
Units: Chapter 8, Chapter 9, Chapter 10. Due: week 8.
- Two of three. An agent can (i) read text from outsiders, (ii) read the owner's private data, (iii) cause a send. Take the eight combinations. For each say what the worst outcome is if the model is taken over, and which of the course's mechanisms removes a capability for the length of one run. Then show a run in which an agent never holds all three at once and private data still reaches an outsider. What did the rule assume?
- Confinement is not noninterference. State noninterference from outside text to the send sink in your own words. Then exhibit three runs, all permitted by a gate that confines in the sense of Definition 7, in which what an outsider wrote changes what a third party receives: one through a paraphrase, one through the choice among allowed calls, one through timing or count. For each say whether any mechanism short of asking about every call would stop it.
- Counting the allow table. A gate has 40 tools. For 28 the effect class is fixed by the tool; for 12 it depends on two yes-or-no conditions on the inputs. The gate looks at the record of reading only to see whether it is empty. How many rows does the allow table need to be complete? An auditor samples 30 rows at random and finds none unsound. What can they conclude about the proportion of unsound rows, at 95%? Why is enumeration the right method here and sampling the wrong one?
- Least privilege, priced. A sign-in can request read-only access to mail or full access. With read-only, 15% of the owner's errands cannot be done. With full access, a stolen token can send as the owner. Write down the quantities you would need to choose, say which are properties and which measurements, and say what design makes the choice unnecessary.
- A false claim. "Opening an address is a read, so it needs no question." Refute it twice: once using Definition 2, once using what an address inside a private network can reach.
- Measured, without a model. Write the obedient-model audit of laboratory 3, part B, ahead of that laboratory, and run it on your laboratory 2 gate with an empty and a non-empty record of reading. If your gate does not yet read the record, the two tables will be the same: say which rows should differ. Report the table, every row whose answer the record changes, and one row you changed your mind about while doing it.
Problem set 4: reaching the world
Units: Chapter 11, Chapter 12, Chapter 13, Chapter 14, Chapter 15, Chapter 16. Due: week 10.
- Describing tools, or finding them. A service has N actions, each described in 350 tokens. Design A puts all descriptions in the fixed context. Design B offers a find tool and a run tool (700 tokens together), and each task then spends one extra model call, which comes first, and reads 5 descriptions, which every later call carries. A conversation is one task of 12 calls in A, and every call in either design also carries 5,000 tokens of other fixed context. Using the cost formula, derive the N at which B becomes cheaper, first with the fixed part of every call read from cache at a tenth of the input price (everything else at the full price, and writing the cache free), and then with no cache. What does B cost that the formula does not show?
- Two kinds of mistake. A classifier sorts unseen actions into "runs unasked" and "asks". On 400 labelled actions, 300 truly change something. It sends 12 of those to "runs unasked" and 25 of the 100 harmless ones to "asks". State the two error rates. The owner uses 30 actions a day, a tenth of them changes. Give the expected number of unasked changes and of needless questions per week. Which rate would you trade for the other, and how does a safe default change the answer?
- Time of check, time of use. The owner approves a reply to a message. Between the question and the send, a new message arrives in the thread that changes its meaning. Describe the failure, state the invariant the program should enforce, and say what the owner should be shown. Is re-reading before acting a property or a courtesy?
- A tool with no effect class. A browser run is one tool call whose effects depend on a hundred later steps the gate never sees. State what Properties 1 and 2 give for it. Then design the least machinery that restores a per-step gate, and say what it costs in speed and in what the agent can no longer do.
- Delivery. A platform delivers each message at least once, possibly late and out of order, and your handler may crash halfway. Give the conditions under which the owner's "yes" to a question could approve the wrong call, and the design that rules it out. Why is a typed "yes" weaker than a button, and what makes a typed word acceptable when a platform has no buttons?
- Measured. Take twenty invented pages with a table or chart on each. Extract the figures by recognised text alone and by showing the page to a model. Report accuracy per figure with an interval over pages, and cost per page, for each. For which pages would you pay for the second?
Problem set 5: knowing
Units: Chapter 17, Chapter 18, Chapter 19, Chapter 20. Due: week 13.
- The unit of analysis. A suite has 50 cases, 4 repeats each. Within a case, repeats agree with each other far more than runs of different cases do. A report gives a 95% interval of ±2.1 points computed over 200 runs. Explain why this is too narrow, derive the factor by which it is too narrow when the within-case correlation is 0.6, and give the corrected half-width.
- Headroom and noise. A suite of 52 cases, run 3 times each, scores 97.1% with a noise floor of 1.9 points. A change is believed to fix a tenth of the remaining failures. Can this suite show it? How many cases of what difficulty would a suite need for the same change to be visible at the same noise? What is lost by making cases harder, and how would you check that the harder cases still measure the thing you care about?
- A judge and a person. On 120 statements a judge says yes to 96 and a person to 84; they agree on 100. Compute observed agreement, chance agreement and κ. They disagree on 20: in 16 the judge said yes. What does that asymmetry mean for a score built on this judge, and in which direction is the score biased? What would you do to the statements before touching the judge?
- Spending a held-out set. You have 60 cases and a budget of 2,000 runs. You want to try ten changes and keep one. Design the split, the number of repeats and the rule for keeping a change so that the chance of keeping a change with no true effect is at most 5%. Then say what you do when an eleventh idea arrives.
- A false claim. "All 700 tests pass, so the gate is sound." List the four different things that would each have to be true for this to follow, and for each name the kind of evidence, other than a test, that bears on it.
- The cost of a pause. A conversation holds 60,000 tokens. A cache read costs a tenth of fresh input and a cache write a quarter more than fresh input; the cache lasts five minutes. The owner's gaps between messages are under five minutes 70% of the time. Count input only. Compute the expected input cost of the next message. A summary of 3,000 tokens, written by one extra call over the 60,000 made straight after each message while the cache is warm, could replace the conversation after a long gap. For what probability of a long gap is summarising cheaper, and what is the cost that is not money?
- Measured. Read thirty runs from your own laboratory 5 suite: ten it passed, ten it failed, ten at random. For each decide whether the mark was right. Report the suite's two error rates with intervals, and the single fault in a check that explains the most errors.