Exercise Bank — The Language Model as a Cognitive Substrate
The printed Chapter 2 keeps Exercises 1–5; the bank continues from Exercise 6.
Exercise 6. Five successive generations of a model are benchmarked on emitting one exact ten-token API call; a single wrong token and the call fails. Per-token accuracy improves smoothly across the generations: p = 0.60, 0.75, 0.85, 0.93, 0.98. Treat token errors as independent. (a) Compute each generation’s exact-match success m = p^{10}. (b) The team’s dashboard credits a generation with the ability when m \ge 1/2. Which generations qualify? Describe the shape of the two sequences — per-token and exact-match — and say which of them a reader of the dashboard alone would call emergent. (c) Show that exact match on a k-token answer crosses one half at per-token accuracy p^*(k) = 2^{-1/k}, and evaluate this for k = 10 and k = 30. What happens to the apparent point of emergence as answers grow longer? (d) In the light of (a)–(c), state what you would demand of any claimed discontinuity in ability — the dispute recounted in Section 2.1 — before accepting it as a property of the model rather than of the metric.
Exercise 7 (project). The chapter’s argument can be run in thirty lines. Take this corpus of status reports:
corpus = [
"the tests pass on linux",
"the tests fail on windows",
"the build passes on windows",
"the build fails on macos",
"the reviewer approves the change",
"the reviewer requests a change",
"the tester reruns the tests",
](a) Build a bigram model of it: a table mapping each token to the counts of its successors (pad each sentence with start and end markers), a sampler that draws a successor in proportion to its count, and a generator that samples and appends from the start marker until the end marker arrives. Seed your random generator and print eight continuations. (b) Find, among your outputs, a report that appears nowhere in the corpus and is contradicted by it; trace through the bigram table exactly how the model came to assert it, and compute the probability with which it does so. (c) Wire two copies into a “conversation”: each turn generates a sentence starting from the final token of the previous turn’s sentence, falling back to the start marker when that token admits no continuation. Run six turns and list every place in your program where any state about the exchange lives. (d) Audit the toy against the chapter: which of the four absences of Section 2.3 does this model already exhibit, which of the four gifts of Section 2.2 does it lack, and what does that split tell you about which characteristics of the substrate come from scale and which from the objective itself?
Exercise 8 (lab). The brittleness reported in Section 2.3 — the same request, reformatted, yielding materially different answers — is measurable in an afternoon with an API key (the companion repository’s setup guide describes the setup). Choose a small task with a single mechanically checkable answer, write one canonical prompt for it, and produce seven variants that alter only presentation — separators, ordering of the same instructions, headers, whitespace, quotation style — while holding meaning fixed. (a) State your protocol before running anything: what is held fixed across all calls, and why each such variable would otherwise confound the measurement. (b) Run each of the eight prompts ten times at fixed sampling settings, and tabulate per-variant accuracy and within-variant agreement. (c) Compare the spread in accuracy across variants with the disagreement within a variant, and state what each of the two spreads measures. (d) Write the short note you would send to a team whose system prompt “was tuned until it worked”: what does your table say about how durable that tuning is likely to be? Record the model identifier and the date beside the table.