跳转至

Reference Answers to Thought Questions

The reference answers were generated by AI and lightly reviewed by humans.

Chapter 1: Getting Started with AI Agents

1. (★★) If you could improve only one of the model, the context, or the tools first, how would you decide where investment pays off most? Which evaluation results would make you change your choice?

Start by checking whether the model actually received the information it needed to complete the task. This step exposes omissions directly and makes them easy to fix locally. Then analyze the failure trajectories: when business facts, past decisions, or task state are missing, improve the context; when an interface for observation or execution is missing, add tools; when the model has enough information and suitable tools but still cannot reason its way through, compare stronger models. Adjust one factor at a time on the same task set, and record completion rate, error types, time, and cost.

2. (★★★) Suppose each round adds roughly the same amount of new messages, and every round supplies the model with the complete prior history. Why does cumulative input grow approximately quadratically with the number of rounds? Which costs do caching, compression, and history trimming each change?

Count only the message history first, and assume each round adds 100 tokens. The first three rounds send 100, 200, and 300 tokens. The third request carries only 300 tokens of history, yet the three requests together have already sent 600. The first number can be read off the third request; the second requires adding up the history input across all three usage records. In general, if each round adds \(m\) tokens, round \(i\) sends about \(mi\) tokens, and the first \(n\) rounds send about \(mn(n+1)/2\) in total. If there is also a fixed system prompt of length \(P\) that counts toward the input every round, add \(nP\) to the total.

Still counting only the message history from this example, suppose that from the second round on the service can fully reuse the previous round's input: round two hits 100 tokens in the cache and round three hits 200. Over the three rounds, 300 of the 600 input tokens hit the cache and the other 300 are processed for the first time. Caching reuses the prefix computation for those 300 tokens.

Compression replaces history with a shorter summary, at the cost of summarization calls and cache rebuilds; trimming removes part of the history outright and must preserve the goal, the state, and the pairing between calls and their results. Prefer to process history in batches at stage boundaries or length thresholds. This cuts the summarization calls and cache rebuilds that per-round compression would cause, as well as the information loss that accumulates over repeated compression. Move large artifacts out of the context and read them on demand, or isolate exploration in a sub-agent, then compare information loss against cost.

3. (★★) Models are taking on more and more tool-calling decisions, while the Harness must support longer and more complex tasks. How will the responsibilities of the two change? Which mechanisms can be simplified, and which need to be strengthened?

Once the model can plan and choose tools directly, fixed routing, format repair, and some heuristic prompting can be simplified one by one. The longer the task, the more the Harness needs to organize context, manage tool interfaces, and enforce constraints, verification, and correction. Mechanisms worth strengthening include permission checks, budgets and timeouts, repeated-call detection, persistent state, and error recovery. After every model upgrade, use controlled task evaluations to decide which rules can be removed; identity, authorization, and external execution remain the responsibility of the trusted runtime and environment.

4. (★★) In the experiment, missing tool results led to repeated calls. In a production system, what other causes could produce a similar loop? How would you detect it, recover, and set termination conditions?

Common causes include a tool that keeps returning the same error, a model that keeps requesting a capability that does not exist, compression that drops completed state, messages that do not conform to the interface format, and a task that lacks required input. Detect repetition by combining the tool name, arguments, returned results, and state changes. Once a loop is found, first identify the cause of the error, then supply missing information, change course, or restore state. The runtime sets limits on rounds, time, cost, and consecutive failures; when a limit is reached, it saves progress and ends or hands off the task according to the task's rules.

5. (★) Choose an AI product you use daily and list the main information in its context, its available operations, and its execution strategy. At which step is it most likely to fail? How would you improve it?

Take a travel assistant as an example. Its context holds the destination, dates, budget, user preferences, and earlier search results; its operations include searching flights, looking up hotels, revising a draft itinerary, and asking for confirmation; its execution strategy can combine autonomous search with a fixed booking process. If it keeps recommending options over budget, check whether the budget made it into the current input, whether prices are refreshed in time, and whether the filtering rules are actually applied, then evaluate the improvement on the same set of itinerary tasks.

One way to test this is to put the same fare into two delegations. Both users want a ticket for under 1,200 yuan, and in both cases the cheapest fare the airline's customer-service representative quotes is 1,250 yuan. One is a business traveler who, faced with small overruns like this in the past, has cared more about arriving on time; the other is traveling with family and always checks the total budget first. If both have asked the assistant to book for them, the assistant can accept the 50-yuan difference for the first traveler, in line with that traveler's established trade-off, and report the actual fare after booking. For the second traveler, the assistant should send the quote first and let the traveler decide. If the business traveler's request adds "the reimbursement cap this time is 1,200 yuan," the assistant must also stop before ticketing. If the business traveler later says the extra 50 yuan was not acceptable this time, the assistant should remember the correction and ask first the next time a similar fare comes up. While waiting for a reply, the assistant can also ask the representative whether the fare can be held, or look for other flights.

6. (★★) Design a process for a flight booking customer service system: which steps suit a workflow, and which suit an autonomous Agent? When the user changes the itinerary at short notice, how do the two parts work together?

Organize identity verification, order-status checks, price confirmation, payment, and booking as a process with explicit preconditions; hand requirement clarification, searching for alternative flights, and comparing options to an autonomous Agent. The order of payment and ticketing, as well as seat-hold and timeout rules, follow the specific business interfaces. When the user changes the date, create a new itinerary version, cancel stale quotes and pending operations, and recheck price and authorization. Operations such as refunds and large payments request confirmation according to risk rules, and their results are checked against receipts.

7. (★★★) The same delete_file tool carries different risks when deleting a temporary file and when deleting a critical system file. How would you combine arguments, resource scope, and recoverability into a dynamic risk assessment?

Risk assessment should consider the tool type, arguments, target resource, caller identity, and consequences of the operation together. First have the server resolve and normalize the target path and check whether the real resource falls within the authorized scope; then weigh the file's importance, the scale of the deletion, and the availability of backup and recovery. Symbolic links and changes to the resource after the check must also be handled at execution time. Low-risk temporary files can be cleaned up directly under the rules; critical resources call for preview, confirmation, or a ban on deletion, with a record of the result. The model supplies the task intent; the runtime enforces access control.

8. (★★) An open-ended action space allows content and combinations of operations that are hard to enumerate in advance. In what tasks is it better to restrict actions to a small set of predefined options? What benefits and costs does that restriction bring?

Refunds, payments, and account-status changes suit predefined operations with structured arguments, which make amount ranges, state transitions, and authorization conditions easy to check. Restricting the options reduces invalid combinations and makes testing and tracing easier, but it also reduces flexibility in handling new needs. Provide explicit operations for in-scope tasks and, for out-of-scope requests, an entry point for clarification, human handling, or controlled extension; check coverage against real cases.

9. (★★) When an Agent needs human confirmation, the user may be offline, slow to respond, or give vague instructions. What state should the system save, what work can it continue, and which operations must wait?

Save the original goal, completed items, operations awaiting confirmation, current arguments, authorization state, and the versions of related artifacts. Work that is already authorized and independent, such as organizing materials, can continue; payments, deletions, or external submissions that require confirmation stay on hold. Notify the user through the channel they chose, with reminder and timeout rules. If the reply is vague, keep clarifying; before resuming, recheck price, inventory, identity, and environment state to confirm that the original operation is still valid.

10. (★★★) Give an example of an engineering method that will be simplified as models improve. Explain what problem it originally solved, and how the underlying system design principle continues to apply.

For example, once models generate structured calls more reliably, the dedicated logic for repairing JSON and filling in missing arguments can shrink; interface Schema validation, authorization checks, and error handling continue to keep calls reliable.

External knowledge bases can also shift their division of labor as learning ability changes: some stable knowledge moves into model parameters, while external systems handle real-time updates, exact retrieval, access control, and source traceability.

Capability interfaces can expand from a large number of specialized tools to "a Skill's textual procedure plus a general-purpose executor." As models get better at understanding interfaces and following procedures, more and more operations can be carried by general executors, and the number of specialized tools can drop. The model generates commands according to the procedure and the runtime checks arguments and permissions; standardized calls carry structured arguments and support validation and cross-system interoperability.

Prompts and tool definitions can also be loaded on demand. Early implementations often placed them in fixed positions to help models recognize and follow them; as instruction following improves and training covers dynamic loading, Skills and dynamically discovered tools can be appended later in the context, reducing what must be supplied up front.

Chapter 2: Context Engineering

1. (★★★) Read the sliding-window run log from Experiment 2-3: what did each of the five tool calls do? To determine whether the repeated calls were caused by history truncation, what else would need to be recorded, and what controlled comparison would need to be run? Design a truncation scheme that preserves key state, and explain its effect on prefix caching.

In the sliding-window record from Experiment 2-3 (result_sliding_window_20260718_kimi_k2_6.json), task states that the user asked to list the Python files, read main.py and agent.py, and summarize in three sentences. tool_calls lists five calls: the first three are all find("*.py"), each finding 13 files; the last two each read one of the specified files. Measured against the request, only the final three-sentence summary is still missing at that point. A single reply can request several tools, so the five call records alone cannot be mapped one by one to five model requests. The record saves the tool calls but not the complete messages sent to the model in each round. The current implementation attaches the original task every round. To test whether trimming caused the repetition, record the IDs of the messages kept and removed in each round, fix the model, the task, and the round limit, and compare the number of repeats and the completion rate under full history and under the sliding window.

One approach is to write the files already read, key results, and to-do items into a stage summary, archive large outputs while keeping an index, and keep recent tool requests and their results together as pairs. Replacing history affects the prefix cache from the point of modification onward; system instructions and tool definitions that come before that point can still be reused. Another approach is to hand file exploration to a sub-agent and have it bring back only its conclusions and the file locations to the main conversation.

2. (★★) Qwen3's Chat Template handles past thinking based on the position of the last real user query. If a ReAct loop runs for hundreds of rounds, how would you manage the steadily growing reasoning content? Compare trimming past thinking, passing it back, and prefix-binding protocols, and explain how the Harness should adapt.

First decide, based on the model and its interface protocol, which reasoning content must be passed back, then set a budget for history. Historical reasoning may carry plans not yet executed and paths already ruled out, and long-horizon tasks depend on that state even more; deleting it outright leaves later decisions without a basis, while passing all of it back inflates the input. Under protocols that allow trimming, keep recent reasoning and consolidate the long-term plan into a state summary; for interfaces that require pass-back, store the original response fields. If thinking is bound to the prefix, then after the prefix is rewritten, handle the affected reasoning blocks according to the protocol, or use server-side compression.

3. (★★) Suppose you need to compress about 150,000 characters of search material into 2,000 characters. Which facts, relationships, and sources would you keep? How would you check whether the summary is sufficient to support later questions, and how would you recover omitted details?

Keep people, dates, organizations, relationships, key evidence, and open questions, and preserve verbatim the identifiers needed for locating things. Design follow-up queries for the summary to check for omissions and ambiguity; archive the original material, recording its source, retrieval time, and how to access it. Links help locate material; snapshots of the original text support long-term verification.

4. (★★) The tool counter misses one call, so the status bar reports the wrong number of remaining calls. Design event logging, aggregate verification, and execution-layer checks, and explain how to detect and repair this kind of inconsistency.

Call counts should preferably be computed by code. When the model must extract events from unstructured records, have it extract them one at a time and let code do the aggregation, which reduces missed and double counts over a long history. Assign each call a unique event ID, record the request, execution, and return status, and state clearly whether the limit applies to call attempts or successful calls. Idempotent updates prevent double counting; event replay and periodic reconciliation catch missed counts. The execution layer checks, against the trusted count, whether any call quota remains; the model reads the state for planning. When an inconsistency occurs, keep the event log, rebuild the summary, and then continue; text of unknown origin should be treated as material awaiting verification.

For example, after the executor accepts call A, the same "A accepted" notification is delivered twice. Merged by call identifier, the two notifications consume the budget only once. If the budget counts actual executions, a genuine retry should get its own execution identifier, linked to the original request.

5. (★★) Experiment 2-4 compared tone, information organization, and tool descriptions. If a system prompt is maintained by many people over a long period, how would you manage versions, check for conflicting rules, and use regression tasks to evaluate each change?

Put the prompt under version control and review, and have business, operations, and engineering staff jointly check its processes and boundaries. Maintain a regression set of typical tasks, edge cases, and known failures, and record the goal and outcome of every change. Organize rules with Markdown/XML and check for duplicates and conflicts; place stable rules in the reusable front portion of the context, append dynamic state as messages, and split specialized procedures out into Skills.

6. (★★★) The pet shop example involves both single-record lookups and overall statistics. Design the raw records, the statistical summary, and the query routing so that the system can answer both kinds of questions efficiently, and explain when the summary needs to be updated.

Index the per-cage records by cage number, and have code maintain the count for each color incrementally from add, remove, and change events. Single-cage queries read the corresponding record, count queries read the statistical summary, and questions about a new dimension go back to the raw data. Periodically recompute the totals and reconcile them against the incremental state. When this state must persist across sessions, store the records and indexes durably and load them on demand in new tasks.

7. (★★★) A Skill is in the catalog, but the model does not recognize that it applies to the current task. How would you investigate the problem from four angles: the description, the catalog organization, explicit triggering, and evaluation samples?

Check whether the Skill's name and description cover how real tasks are phrased, and add concrete trigger conditions and the boundaries with easily confused cases. When the catalog is large, retrieve candidates per task. Explicit triggering provides a direct loading path; the evaluation set should include cases that should trigger, cases that should not, and cases with similar descriptions, with missed selections and wrong selections counted separately.

8. (★★) A Skill loads successfully, but the model skips its verification step. Design a controlled experiment that separates problems in triggering, comprehension, tool use, and completion judgment, and compare how different models perform.

Fix the task, tools, and Skill version, and test autonomous triggering and explicit loading separately. First check whether the Skill body appears in the messages sent to the model. Then, with the loaded body fixed, give the model either "verify the deliverable" or an instruction that spells out what to check, which command to run, and what counts as passing, and compare whether the model initiates verification. For calls it does initiate, return pre-prepared success and failure results and see whether the model still declares completion after a failed check. This lets you count failures to load, failures to call, and wrong wrap-ups separately. Each model uses the message protocol it supports and is compared against the same deliverable standard. The caching cost can be checked with three consecutive requests. If the Skill body is appended once and then left in place, it can be reused as long as the server still holds a valid cache and the prefix, chunking, and cache boundaries meet the hit conditions. If another copy is appended at the end every round, the new copy must be computed, but the original prefix can still hit. If the body is first deleted from its old position and then moved to the latest round, the prefix changes from the old position onward, and the cache after that point usually cannot be reused directly.

9. (★★★) A system has a large number of tools, and the tool set changes frequently. How would you arrange the positions of fixed definitions, the tool catalog, on-demand loading results, and runtime state? Consider discovery accuracy, the context budget, and cache hit rates together.

Put frequently used, stable tools at the front in a fixed order, and supply the remaining definitions on demand through the catalog and tool search. Load new content in whatever way the interface supports, so that unrelated changes do not ripple into the existing prefix. Put dynamic state at the back and choose between replacement and appending. Parent and child Agents can reuse shared stable instructions; their differences in permissions and tasks should be stated explicitly.

Chapter 3: User Memory and Knowledge Base

1. (★★) The user says: "On May 1, I'm moving from A to B. From May 10 to 20, I'll be staying at Hotel C, so email my bills during that time." On May 15, how should the assistant answer questions about the home address, the temporary residence, and how bills are delivered? Design the recording and query rules, and explain how to handle typo corrections or addresses that conflict with one another.

On May 15, the home address is B, the temporary residence is Hotel C, and bills should go by email. Keep each record's purpose, validity period, source session, and the user's original words. The move makes the home-address record for A valid until May 1 and the one for B effective from that day; the hotel and the email instruction apply only from May 10 to 20. Queries match both the purpose and the target date, so asking today for the home address as of April 30 should still return A.

When the user explicitly corrects a typo, revise the corresponding record and keep the basis for the correction. If two records give different addresses for the same purpose and the same period, and there is not enough evidence to explain the difference, keep both sources and confirm with the user.

2. (★★) When a source document contains contradictory information, a contextual prefix may write the error into the index along with everything else. How would you store sources, versions, and uncertain items, and how would you use this information during retrieval and generation?

Suppose the old handbook says "returns accepted within 7 days of delivery," and the new edition changes this to 14 days, noting "applies to orders placed on or after June 1." If every chunk of the new edition gets the prefix "the return window is 14 days," a search about an order from May may return top results that all say 14 days, all derived from the same summary sentence that dropped the condition. When building the index, store the generated prefix separately from the original text, and record the document version, publication date, conditions of effect, access permissions, and the cited passage. Link the two versions of the clause to each other, so it is easy to establish which one applies to a given order.

Two orders make a good acceptance test: one placed May 31 and delivered June 2, the other placed and delivered June 1. First restrict the search to handbooks the user is allowed to read, then find the applicable version by order date, check the original text, and answer 7 days and 14 days respectively, citing the clause. If the new edition gives only a publication date and does not say from which orders it takes effect, keep both sources and point out which provision is missing. This also tests whether the system mistakes a prefix repeated across many chunks for multiple independent pieces of evidence.

3. (★★) Which spatial relationships are easily lost when a chart is converted into text? Give examples using a table, an architecture diagram, or a line chart, and design a scheme in which the original image, a structured representation, and a text index are retrieved together.

For example, merged headers in a table determine which year and region a value belongs to. Saving only "revenue 100" loses that relationship. Store the original image, the page number, and region coordinates alongside structured cells that include the row header, column header, value, and unit. The text index is used for locating; answers read the structured records and fall back to the original image when there is ambiguity. Architecture diagrams should also preserve nodes, connection directions, and containment.

4. (★★★) As models and long-context capabilities improve, which parts of the chunking, indexing, and retrieval pipeline might be handed over to the model? Analyze this in light of the discussion of search and learning in Rich Sutton's "The Bitter Lesson," and design an experiment that compares feeding in everything with retrieving on demand, examining task quality, computational cost, and permission constraints.

The model may take over choosing chunk boundaries, rewriting queries, and integrating results, and some manual configuration will become simpler as capabilities improve. Retrieval and model-driven distillation are themselves applications of search and learning. For the comparison, fix the materials, questions, and model, run full-context input, single-pass retrieval, and multi-round retrieval, and measure quality, latency, and cost as the corpus grows. Add tasks involving cross-document statistics, exact clauses, updated facts, and permission differences to see under which conditions each method still works. Statistics can be delegated to verifiable aggregate computation, while permissions are enforced through input construction and the execution layer.

5. (★★★) If a model already has extensive domain knowledge, what should an external knowledge base still store? Discuss public common knowledge, continually updated rules, private material, and evidence that must be precisely traceable.

Stable public knowledge can rely mainly on the model, but the latest rules need versions and scopes of effect, private materials need access control, and precise argumentation needs sources and original text. An external knowledge base also supports correction, deletion, and auditing.

6. (★) Which queries do RAPTOR's multi-level summaries and GraphRAG's entity relationships and community summaries each support? Give one example each for a high-level overview, a local detail, and a multi-hop connection, and explain what evidence needs to be checked.

RAPTOR's high-level summaries suit global overviews, its lower-level material supports details, and retrieval can combine content from different levels. GraphRAG's local entity relationships support association queries such as "user → doctor → hospital → address," and its community summaries support thematic overviews. For example, to get an overview of which instruction extensions a processor manual covers, list the topics from the summaries first, then check against the table of contents for a whole category that was missed. If the question is only what a particular bit of XCR0 means, go to the register description and verify the bit number and definition. Figure 3-11 asks for "the address of the hospital where my dentist works." Starting from the user, follow the dental-visit relationship to Dr. Zhang A, then look up the address of Ren'ai Dental Hospital. Starting from the user's father instead leads to Dr. Zhang B in cardiology. Even if the hospital address found at the end is completely correct, the answer is still wrong because the earlier step identified the wrong person.

7. (★★) How can directories, links, and vector indexes work together to organize knowledge? Design a knowledge base that people and Agents maintain together, and explain where navigation, semantic search, version updates, and permission filtering each fit.

Take a company travel handbook as an example. An employee who knows to look for "changing a ticket" can follow the table of contents to "Travel → Air Tickets → Changes," then follow the links in that entry to the reimbursement rules. If the employee only remembers "can I claim the extra cost of switching flights at the last minute," vector retrieval can find the same rule; if the clause number is at hand, a keyword search is more direct. The summary on the landing page is enough to point the way, but when amounts and exceptions are involved, the original text of the version in effect must be opened.

People and Agents edit the same set of readable, version-controlled files. After finance staff revise the ticket-change rule, they must update the landing-page summary, the related links, and the affected search indexes at the same time. Search again with a sentence from the old rule to see whether the new version comes back. If negotiated fares are visible only to procurement staff, also query the table of contents, search, and the original text as an ordinary employee, to confirm that titles, summaries, and search snippets obey the same permissions as the original text.

8. (★★★) After fields have been extracted from cases and clustered, how do you judge whether the prototypes are useful? Distinguish the importance of clustering features, the ability to predict outcomes, and causal explanation, and design a held-out evaluation and an expert review process.

First check whether field extraction is accurate and missing values are handled consistently, then examine the shared features within clusters, the differences between clusters, and stability under repeated sampling. The features that separate the clusters, and their weights, describe the grouping structure; predictive power must be evaluated on held-out samples; causal explanation further requires controlling for confounders, an appropriate study design, and domain evidence. Taking Experiment 3-12 as an example, determine the fields, missing-value handling, and cluster centers on the 360 modeling records, then freeze that pipeline and assign prototypes to the 60 held-out records. Have experts first read the originals independently, then check the reasons for each assignment; sample typical members as well as cases farthest from the center and those hard to classify. If you also claim that the prototypes predict some outcome, specify the prediction target in advance, compare against a simple baseline on the held-out records, and make sure the extracted fields do not leak that outcome.

9. (★★★) Design incremental-update and periodic-reorganization workflows for a Markdown user-memory library. If the Reviewer and the Proposer use the same model, and the Reviewer can see only the fragments the Proposer selected, which errors are likely to slip through? Propose improvements in terms of evidence coverage, tool permissions, and review evaluation.

For incremental updates, the proposer retrieves existing knowledge, submits changes that are as small as possible yet complete, along with their sources, and maintains links, indexes, and time information. The reviewer checks independently, and code checks format, links, metadata, and permission labels; once the change passes, it is merged and the affected indexes are updated. Periodic consolidation deduplicates, merges, reorganizes the table of contents, and verifies against the original material according to a coverage checklist; reorganizations go through the same review process, and candidates are released only after passing retrieval regression tasks, after which actual retrieval performance continues to be monitored. Looking only at selected excerpts makes it easy to miss negative conditions, changes over time, and conflicts across files; the same model may also repeat similar misreadings. Give the reviewer full evidence retrieval and inspection tools within its authorized scope, and separate the permissions for branch writes, review, and release. Evaluate the detection rate with deliberately planted faulty changes, compare different model pairings and evidence scopes, and set an iteration budget and an entry point for human handling.

Chapter 4: Tools

1. (★★) MCP separates tool connection from the Agent framework. Choose one of the following needs—streaming results, bidirectional interaction, or managing the state of long-running tasks—explain which protocol capabilities and which host capabilities it requires, and discuss what design would have to be added to integrate it with today's MCP.

Take long-running tasks as an example. Separate "submit the computation" from "fetch the result": submission returns a task ID, and progress is then obtained through status queries or notifications. The server must store task state and artifacts and define the transitions among queued, running, completed, failed, and canceled; the host must store the task ID, resume querying after a disconnect, and route new results back to the correct Agent task. When integrating, also check the MCP version in use, its extensions, and client support before deciding whether to use existing capabilities or add explicit business tools. The protocol connection closing, the client giving up waiting, and the background task being canceled are three states that must be handled separately. Cross-session event orchestration is also worth attention: new email and external callbacks need to wake the right tasks, and queuing, resumption, and retries need a common convention.

One test is to close the window showing progress and reopen it with the saved task number. If the latest status of the same task can still be retrieved, the task lifecycle has been decoupled from the window. Then cancel the task explicitly and check whether the executor really stops.

2. (★★) When several MCP servers provide similar tools, how should one be chosen? Taking "one returns a summary, the other returns the full text" as an example, design tool descriptions, source identifiers, and selection criteria that let the Agent exploit this difference.

Suppose a catalog service returns summaries and an archive service provides full text. The host can give the two tools the aliases catalog.summary and archive.read_full, binding each alias to the configured server identity and the tool name that server publishes. The descriptions spell out what material each covers, what it returns, how it paginates, how often it is updated, and what a call costs. To pick candidates from a batch of files, the model consults the catalog first; to verify a passage of original text or the conditions of a citation, it reads the full text. The host dispatches according to the bindings and checks the service version and authorized scope.

Walk through it with a contract that exists in two versions: can the summary provide a document identifier and version that the archive service also recognizes? If so, use them to read the corresponding original; if the two services do not share numbering, relocate the document through the source link and verify the version. This tests whether the tool descriptions match what the tools actually return, and it also catches the error of "picking the right summary but opening the wrong version."

3. (★★) Besides running checks after writing code, where else can "execute–validate–feedback" be applied? Choose two examples, describe the validation method, the failure feedback, and the cost, and discuss when immediate, sampled, or asynchronous validation is appropriate.

The first example is modifying a configuration: check the format and fields first, then start the service in an isolated environment and read its health status or behavioral results. On failure, return the offending field, startup diagnostics, and the actual state, so the Agent can decide whether to fix the configuration or restore the original value. The second example is generating a slide deck: render the pages, check whether text overflows or charts are obscured, and feed the page numbers and positions back to the generator. Format checks are cheap and can run immediately; if only one page's body text changed, render the changed page and its neighbors first. If the whole master template changed, it is worth rendering the full deck in the background and reading back every page's check results before delivery. Sampling decides which pages to check; asynchronous execution decides when to wait for results; the two choices can be combined.

External operations can also have their results queried. For example, after an email is submitted, read the message status from the server; after an order is created, look up the record by business ID. Choose verification interfaces that read status, receipts, or audit records, and distinguish between meanings such as "accepted" and "completed." When external effects are involved, prior approval and after-the-fact verification each carry their own responsibilities.

4. (★★) Facing thousands of tools, how else can capabilities be organized besides proactive discovery? Drawing on category catalogs, workflow templates, or general executors, describe one approach, the conditions under which it applies, and its trade-offs.

For highly repetitive business, common tasks can be organized into workflow templates. For example, a research-summary template prescribes "search for candidates → read the full text → verify sources → generate the report," exposing only the relevant tools at each step. Templates reduce the number of definitions exposed at once and help the model understand data dependencies between steps; they suit tasks with stable processes and controlled variation in input. For new tasks, keep an entry point for adjusting the steps or adding tools.

Other methods can be combined as well: organize the catalog by domain and keep a few high-frequency tools resident; put detailed usage into Skills that are read on demand; use a general-purpose code executor to call stable libraries or APIs, reducing the number of specialized interfaces.

Chapter 5: Coding Agents and General-Purpose Agents

1. (★★) Design a sandbox for a Coding Agent that needs to read project files, install dependencies, and run tests. How would you configure file, network, process, and resource permissions? When the task needs broader permissions, how should the request be expressed, its scope checked, and a record kept?

First list the access the task requires: the project's working copy is writable, reference material is read-only, and dependencies come from approved sources. Use an isolated execution environment to limit processes, running time, memory, and disk; credentials are held by a trusted service. When broadening permissions, state the target resource, operation, duration, and reason, and have the execution layer check and record the authorization. Validate the configuration with build, test, and resource-exhaustion cases.

2. (★★★) When a creator generates and modifies Agents over many successive generations, framework defects and domain errors may gradually accumulate. How can reference versions, regression tests, behavioral evaluation, and rollback mechanisms be used to track such drift?

Keep separate versions of the reference framework, each generation's artifacts, and the requirements, and record the provenance and changes of each generation. The regression set should cover message protocols, tool linkage, state recovery, and real domain tasks, with independent tasks held back to check generalization. It should include tasks that are hard enough and have verifiable results; simple examples easily mask defects that accumulate across generations. Compare success rates, costs, and failure types between old and new versions, release only after validation passes, and roll back to the most recent accepted version when a regression appears.

For example, pin the same small project to the same commit and have the initial version and the next-generation Agent each fix the same bug once. Even if the new version fixes the target bug, still run the existing tests and read both patches to see whether a special case for this one problem has been written into the general framework.

3. (★★) A change in log format may come from a normal upgrade or from a defect in the producer. What evidence should an adaptive parsing system keep, and on what conditions should it decide to add a new parser, report an anomaly, or pause processing?

Keep the raw logs, the producer version, the change notes, and the old parser's results. First check field meanings, types, and values against the interface contract, then validate on normal and abnormal samples. Confirmed format upgrades go into parser iteration; changes with conflicting meanings, missing data, or unknown origin go into an issue report, and related processing is paused if necessary. A new parser and an alert record can coexist.

4. (★★) In a Proposer–Reviewer loop, the Reviewer considers a page's information density reasonable, but the user finds it crowded. How can user preferences be turned into examples, scoring criteria, and interactive feedback, and how can you check whether subsequent revisions meet them?

Ask the user to label pages as acceptable or too crowded, and derive concrete standards for font size, white space, and information density. Review feedback should include page numbers and the location of each problem, and revisions should show the same page for easy comparison. Preference records include the user, the task, and the scope of application, and later tasks reference them by scope; spot reviews can reveal drift between the review standard and the user's experience.

5. (★★) A Coding Agent can update the knowledge base, architecture documentation, and project instructions, and can also turn sequences of operations into code. How can redundant or outdated rules be identified, and how should rules be given a scope of applicability, a verification method, and exit conditions? What accumulation and evaluation mechanisms are still needed to go from a single successful change to the continual evolution discussed in Chapter 9?

Record each rule's source, scope, verification cases, and the time it was last checked. Merge duplicate rules, archive obsolete ones along with the version, and move stable, decidable requirements into linters, tests, or tool validation. For example, the original instructions require pnpm test. After one workspace migrates to a different package manager, first run the CI tests with the new command in a clean checkout, then replace that workspace's instructions; subprojects still using pnpm keep verifying with the original command. This gives the old rule an exit condition and a scope. Validate rule changes on historical tasks first, then check the gains on new tasks. Continual evolution further requires organizing the accumulation of runtime evidence, candidate changes, independent evaluation, release, and rollback into a long-term loop.

6. (★) Teams that are friendly to remote collaboration usually also make it easier for Agents to obtain work information. Examine the requirements, architecture, decision records, and acceptance criteria of a project you know well, list the documents most in need of filling in, and explain which specific tasks they would help an Agent complete.

Use a new team member's first handover as a self-check: can they find the background of the requirements, the architectural relationships, how to build, where the tests start, and the acceptance conditions? Prioritize knowledge that affects current tasks, such as an explanation of a module's responsibilities, a record of a technical trade-off, or executable acceptance cases. Conventions passed on only by word of mouth rarely make it into an Agent's input, and decisions reached in everyday team discussion should also leave a searchable record. Assign document owners and update triggers, and maintain related material whenever the code changes.

7. (★★★) For an Agent that simultaneously accesses private data, processes untrusted content, communicates externally, and uses persistent memory, how would you arrange identity authorization, source labeling, data-flow checks, and review of memory writes? Use a normal business workflow to show where these checks sit.

Take reading customer data and sending a service notification as an example: an identity service determines which customers may be accessed, customer data and external web pages are labeled with their respective sources, and the communication interface checks the recipient and which fields may be sent. After the task completes, memory writes are checked for source, necessity, sensitivity, and expiry. Data reads, outbound sends, and cross-session saves are recorded separately, making it easy to review anomalies and revoke stale authorizations.

8. (★★) In the Artifact pattern for SQL and HTML, the model generates the artifact, the execution service handles the query or rendering, and the interface presents the results directly. Which information is suitable to hand back to the model for interpretation? How do you check query permissions, resource budgets, page isolation, and the consistency of the displayed results?

A complete table can be presented directly by the execution service, saving the time and tokens the model would spend generating the data item by item and reducing transcription errors in the numbers. When summarization or a decision is needed, the model then reads aggregated results, anomalous rows, and field explanations on demand. Queries use a restricted account and structural validation that limit the accessible data, functions, and execution budget; pages render in an isolated environment, and declarative components still have their properties and actions checked. Compare results against reference queries and page values, then check units, dates, and how statistics are defined.

9. (★★) The tool validates rules against the business state in the database, while the parameter descriptions help the model prepare the call. Using reservation cancellation as an example, explain the respective roles of the natural-language policy, parameter examples, execution-layer validation, and boundary tests. When the policy changes, which of these need to be updated together?

The natural-language policy tells the model which conditions to look up and lets it explain the outcome to the user. When the user changes plans, for example, the call passes reservation_id and cancellation_reason="change_of_plan"; the model can also fill in expected_has_insurance to state its own judgment. The execution service verifies identity and authorization for the order, and makes its ruling using the reservation time, insurance, and flight-segment status from the database together with the server clock. If the model believes the trip is insured but the order record shows no insurance, the service records the discrepancy and still acts on the order's facts. Concurrent modifications between validation and submission must also be prevented from invalidating the ruling.

Following the example policy in the chapter, first hold the other conditions fixed: economy class, no insurance, flight operating normally, no segments used. Cancellation exactly 24 hours after booking should be allowed; at 24 hours and one second it should be refused. Then change only the segment status: even if just two hours have passed, cancellation should be refused once any segment has been used. These three cases check the time boundary and the precedence of rules. When the policy changes, update the description, the execution code, the parameter examples, and the boundary tests together, and confirm which policy version applies to existing reservations.

Chapter 6: Interaction: Expanding the Observation and Action Spaces

1. (★★) When an asynchronous Agent receives a new event, it must judge how the event ranks against the current task. If this judgment involves semantic understanding—for example, recognizing whether the user is adding a condition or demanding an immediate stop—how should responsibilities be divided between a rules engine and an LLM? Compare response time, cost, and the consequences of misjudgment.

Start with rules keyed on trusted sources and event types: explicit stop signals, executor failures, and due tasks go into their respective handling channels. Intent expressed in natural language is identified with the help of a classification model, and the result is handed to the runtime, which schedules according to permissions and current state. Rules are cheap and their behavior is easy to inspect; models handle variations in phrasing but add inference cost, latency, and the chance of misjudgment. Critical stop signals should be able to take effect directly through a dedicated channel, and there must be a defined way to handle classification timeouts or uncertain results. The body of an external event is treated as data to be classified; permissions and priority are governed by trusted metadata and the scheduling policy.

Test the design with two messages arriving in quick succession. The user first says "hold on a moment," and then a tool returns a quote. Operations that involve commitments are paused, but the quote can still be saved for use on resumption. On replay, check whether any new order was placed between receiving the pause and actually stopping.

2. (★★) The event queue has a backlog of 20 events: 10 tool results, 5 user messages, and 5 system reminders. How would you organize their order, format, and processing status so that the model can track task dependencies and respond to important changes?

First group events by task identifier, source, time, and dependency, and identify true duplicates; condition updates for the same task are kept in time order, and tool results carry the original call and background-task identifiers and are assigned to the corresponding task according to the interface protocol. If the original call already returned a running status, the later completion result arrives in the agreed event form. Stop or failure events that need immediate handling are taken in first by the runtime; the remaining events are organized into a per-task list marked unprocessed, in progress, or processed. Long tool results keep the facts and state needed for decisions, with the full content in searchable external storage. Update the list at the end of each round so already consumed events do not trigger actions again. New conditions from the user should be linked to the plans or pending tasks they affect.

3. (★★★) An Agent can use a dedicated email address and phone number, or it can operate the user's personal accounts after being authorized. Considering background operation, the other party's identity-verification requirements, the scope of permissions, and auditing, discuss the scenarios each identity approach suits.

For appointments, inquiries, and everyday communication, prefer an independent identity: it makes background operation easier, keeps the Agent's activity distinguishable, and allows its access scope to be managed separately. When data or business operations inside the user's account are involved, use authorization that is clearly scoped and revocable, and bring in the user when the other party requires confirmation from the account holder. For example, on a customer-service call the Agent can explain the request first and then complete identity confirmation through a three-way call; a visual login can be completed by the user in a controlled interface.

4. (★★) An end-to-end voice model processes audio directly, so errors in its intermediate stages are hard to locate from the outside. How would you design observations and controlled experiments to distinguish perception errors, reasoning errors, and expression errors?

Save input audio collected with authorization, the event timeline, tool results, and output audio, and record whatever text output the model can provide. Using the same input, compare answering directly from audio with transcribing first and then answering, and add a human-verified transcript to see whether errors change with the form of the input. For example, if the model gets an arithmetic problem wrong from audio but right when shown an accurate transcript, the audio path deserves scrutiny first. Switching to text also changes the input interface, though, so two answers alone cannot pin down which step failed. If the model returns both text and speech, compare the two as well to find numbers dropped only in the spoken output. The two recordings in Experiment 6-6 have the same words at different speaking rates; to ask which one is spoken faster, the audio must be kept, because a text transcript has already lost the cue needed to answer. Evaluate speaking rate, noise, endpointing, barge-in, and first-segment latency separately.

5. (★) Step-Audio R1.1's MPS lets formulation and expression advance together. How should the system use pauses, progress updates, and segmented expression? When later reasoning changes a conclusion that has already been spoken, how should it be handled?

The rhythm of speech should serve the current task: while waiting on a lookup, say what is being checked; when explaining something complex, break it into segments with appropriate pauses. What can be said early includes confirmed facts, the understanding of the task, and the next steps; business conclusions need supporting evidence. If a conclusion later turns out to be wrong, promptly state the specific correction and its impact, and update subsequent actions accordingly. Evaluation should check first-segment response and naturalness of speech as well as consistency of conclusions and actual completion, rather than treating the number of filler words as the goal of natural conversation.

6. (★★) Both SoM's visual region annotation and DOM element indexing let the model point to where it wants to act with a single number. When facing nonstandard controls, occlusion, or dynamic changes, how would you combine re-annotation, coordinate prediction, and post-action checks?

First check whether the candidates have gone stale because of scrolling, refreshing, or dynamic loading, and if necessary re-capture the page state and regenerate the mapping. When structured information is missing, supplement it with visual candidates from a screenshot; when the target is clear but no candidate covers it, fall back to coordinate prediction. Before executing, validate the transform from image coordinates to desktop coordinates; afterward, check for the expected interface change. If the target itself is still unclear, zoom into the region or read more interface information. All three routes must cope with occlusion and state changes, and should save the frame on which each localization was based.

7. (★★) The quality of teleoperation data depends on the operator's skill. How do jitter, detours, pauses, and failed grasps affect VLA training? How can data be filtered while keeping valuable failure-recovery sequences?

Imitation learning may bake frequent jitter and pointless detours into the action policy. During collection, record success states, path length, changes in velocity and acceleration, collisions, out-of-bounds events, human takeovers, and missing observations, and use these metrics to locate segments that need review. Filtering should also account for task difficulty: a successful recovery from a slip may add more training coverage than a smooth completion. Label stable demonstrations, failed actions, and recovery sequences separately, then select data according to the training objective; this improves the quality of basic actions while preserving error-correction experience. If basic actions are still unstable, first examine and improve the quality of the demonstrations before adding complexity to the model architecture.

8. (★★★) Voice, Computer Use, and robotics can all use unified models, modular cascades, or a division of labor between foreground interaction and background reasoning. Looking ahead five years, how would you combine these routes? Explain your judgment in terms of latency, observability, upgrade cost, and task risk.

Determine the constraints of the scenario first, then choose the combination. Continuous speech requires maintaining the timing of listening and speaking, while complex business analysis requires longer reasoning; the two can cooperate through task and state interfaces. Computer Use needs to keep capturing page changes, and robots must also sustain high-frequency control. Modularity makes components easy to replace, problems easy to localize, and parts independently upgradable, at the cost of extra interface communication overhead and the need to keep state consistent across modules; unified training has a chance to improve information use and timing coordination, but upgrades and diagnosis require more end-to-end evaluation. Frontier reasoning models update quickly, so keeping the background model replaceable allows new capabilities to be plugged in on their own, reducing the cost of retraining the entire interactive system. Keep a replaceable background reasoning capability while continuing to improve the foreground interaction model.

9. (★★) Standard web pages can provide DOM or accessibility information, whereas Canvas, WebGL, and custom-drawn controls often rely on visual grounding. What costs does maintaining both structured and visual paths add, and what benefits does it bring?

The structured path provides roles, labels, and element references, making forms and page relationships easy to understand; the visual path covers content that is visible in a screenshot but not exposed in the structure. Maintaining both requires handling state synchronization, aligning elements with images, different failure types, and additional testing. The benefit is being able to choose the better localization method for each page and to use screenshots to check whether the structured information matches the current interface. Measure localization success rate, number of action rounds, latency, and recovery cost on the same tasks for each path to decide when to use one route and when to combine them. In the short term, keep both paths; in the long term, the vision route's potential to cover diverse software interfaces matters more. As vision models grow stronger, re-evaluate the actual benefit of the structured path and gradually simplify adaptations that pay off little.

10. (★★) Action chunking lets a VLA generate a segment of future actions at once. If an object is moved during execution, how would you coordinate chunk length, re-observation, background reasoning, and action interruption to balance execution efficiency with responsiveness?

Distinguish the length of actions the model predicts from the length actually executed each time: predict a longer trajectory, execute only its first short segment, then update on a rolling basis with new observations. When inference and execution overlap, the transition between old and new action chunks must be handled; when the environment changes quickly or the arm is near obstacles, shorten the executed segment and check state more often. The control layer continuously monitors limits and anomalies, slows or stops as the hardware requires when necessary, and discards the remaining actions that are no longer valid. When choosing parameters, measure inference latency, trajectory smoothness, and worst-case response time together, rather than setting the action length on throughput alone.

11. (★★★) Fast interaction requires acting promptly. Using a voice reply, a web form submission, and a robotic grasp as examples, design action tiers, state confirmation, and stop mechanisms so that response speed matches the consequences of the task.

Voice can acknowledge the task first and state the business conclusion after the lookup completes; on the web, the Agent can read or fill in a draft first and check the target, content, and authorization before submitting; a robot can plan its approach path first and confirm the object's position and the state of the workspace before grasping. Whether an action may execute is determined jointly by permissions, current state, and required confirmation. Fast and slow models pass through the same execution constraints, and the runtime blocks actions whose conditions are not met. When stopping, handle separately generation versus playback, requests not yet submitted versus already submitted, and motion commands versus the actual state of the actuators.

12. (★★★) Choose one primitive—wake-up, safe point, cancellation, preemption, or fast/slow division of labor—and compare its implementation in event-driven tasks and in robot action chunking. How do the speed of environmental change, the reversibility of actions, and the cost of observation affect the design?

Choose "cancellation." In Experiment 6-2, when the user asks to stop the analysis, the scheduler first stops dispatching further work for that task and then notifies the executor to terminate the child process. Verify the outcome by task number: T1 has an exit receipt, and the one that later reported completion is a new task, T2. If T1 wrote files before exiting, also check their state to decide whether to keep them, clean them up, or resume from the last complete write.

Now switch to a robotic arm. Suppose it is approaching a cup by following a pre-generated segment of actions, and the cup is moved away. Removing the queued follow-up actions still leaves the arm possibly executing the segment already sent. The control layer must slow down and stop in the way the device allows, read the actual positions of the arm and the cup, and only then can the planner take over from the new state. The faster the cup moves, the shorter the time the arm may execute continuously without re-observing; after the gripper has made contact, opening it may drop the cup, so before resuming, confirm whether the object is being held. If visual localization is expensive, observe more often during approach or contact and lengthen the interval during smooth motion. Emergency stop needs a channel that goes directly to the control layer.

13. (★★) Should a customer's chat, the approval discussion, and the payment callback for the same order be placed in the same thread? Compare merging threads with subscribing by correlated object in terms of processing order, parallelism, partition-key migration, and permission isolation.

A merged thread puts all events for the same order in one queue, so a task reads its context in the simplest way; the cost is that unrelated messages block each other, discussion in the after-sales group has to wait behind customer messages, and large orders become hot spots. The queue orders events by arrival, but payment callbacks themselves can arrive late or out of order, so events must still carry source timestamps. The thread identifier usually doubles as the partition key, so any change to the merging rules requires migrating existing data. Speakers from different sources have different permissions, so after merging, each message within the same thread must still be checked for who can trigger what.

Subscribing by correlated object keeps each source's thread separate, guaranteeing order only within each thread, with ordering across threads judged from task state and source timestamps. Tasks can subscribe to or unsubscribe from threads as needed, partition keys are unaffected, and permissions stay isolated along with the threads. The cost is that tasks must merge events from several threads and handle the same matter arriving from two sources.

Test with one scenario: the payment callback arrives first, and the customer's "cancel the refund" arrives afterward. Under both approaches, the task must compare the source times of the two events with the current refund state to judge whether the cancellation is still in time: the callback may have arrived late, so arrival order is not the order in which things happened. A merged thread saves only the step of collecting events across threads.

14. (★★) A voice travel assistant needs to check the weather, read user memory, search the web, look up flights, and book tickets. How should the foreground, background, and runtime divide the work? If the user says a fellow traveler's name aloud, and then asks about the weather while waiting for flight results, how do you avoid booking the wrong ticket or failing to report the results?

The runtime puts user memory into the context in advance. Weather checks, flight lookups, and simple web searches are called directly by the foreground, saving the two background model calls that delegation would require. Work that requires synthesizing search results or comparing rebooking options is handed to the background.

The foreground can handle booking itself: it makes sure it has the exact spelling of the name, asks the user to confirm, and then places the order. When delegation is needed, the foreground writes the name and numbers it heard correctly, along with the user's corrections, into the task description, and the background fills in the booking from that. When the user interjects with a weather question, the runtime notes the flight results not yet announced, so the foreground can report the flights after answering about the weather.

Chapter 7: Evaluating Agents

1. (★★) A judge model may favor longer answers, a particular writing style, or a particular display position. How would you design control samples, swap tests, and a human calibration set to separate content quality from these preferences?

Call the two answers A and B. Show them to the judge model in the order A, B, then swap their positions. If it picks A both times, the result for that pair is consistent; if it picks the left one both times, swapping positions swapped the winner. Record how many pairs show such a flip, then repeat the judging in random order to see how large the disagreement is. A single flip is not enough to conclude that the model always favors the left side.

To test for a length preference, keep the same three facts—refund amount, time to arrival, and refund method—and only make the same reply longer. To test for style, keep the length roughly the same and change the wording. If length, tone, and facts all change at once, any change in score is hard to explain. Have people familiar with the business independently judge a batch of samples against the same rubric, recording the task requirements, the factual basis, and the human verdict. Examine scoring disagreements category by category; with discrete labels, Cohen's κ can also measure agreement beyond chance. For edge cases where the rubric is unclear, add precedent cases, and hold back another batch of samples to test the revised rubric. When re-judging with a model from a different family, still use the human verdicts to check whether both miss the same errors.

2. (★★★) Public evaluation sets may end up in training data. How would you combine new tasks, parameterized environments, unreleased test items, and production samples to reduce the effect of data contamination on your conclusions? What clues can canary markers provide?

Have the evaluation include regularly refreshed new tasks, parameterized instances, an independent held-out set, and production cases that have been anonymized and approved. Task-generation rules can be reused, but evaluation instances and training instances should be managed separately and differ sufficiently in task structure, time, and environment. Parameter variation should preserve the relationships that require reasoning rather than merely swapping names and numbers. Canary markers can help reveal that text was copied or seen, but judging training contamination also requires data provenance, release dates, and behavioral evidence. Reporting scores separately by source helps show whether a model is merely familiar with one kind of public question.

3. (★★) Using the four principles of expert guidance, comprehensive coverage, importance weighting, and self-containment, design Rubrics for "the answer is helpful" and "the tone is appropriate." How can edge cases be used to handle disagreement among evaluators?

First define the audience and the task. "Helpful" can be broken down into whether the answer addresses the current request, whether it offers an actionable next step, and whether it keeps the necessary conditions; "appropriate tone" can be broken down into whether it respects the user, whether it fits the communication setting, and whether it avoids unfounded promises. Give each item score levels, positive and negative examples, and edge cases—for instance, the difference between briefly acknowledging a problem in a complaint reply and apologizing at length, over and over. Suppose a support agent is handling the complaint "my bill was charged twice; how do I check?" Try a five-point scale: 2 points for correctly identifying which charge to check, 2 points for giving verification steps the user can carry out right now, and 1 point for respectful wording without promising a refund on its own authority. Each item scores only when its condition is fully met. A reply of just "We're very sorry for the inconvenience" earns only the last point on this question. Have several people familiar with the business score independently, discuss the task understanding behind their disagreements, and then update the reference material and precedent cases. Scoring can preserve meaningful differences in preference, with the aggregation method specified in advance according to product goals.

4. (★★) τ²-bench uses a model to simulate the user. How would you check whether the simulated user follows the task setup, and whether it can cover real interaction conditions such as emotion, ambiguity, and missing information?

Check on two levels: adherence to the setup and representativeness of real interaction. For the first, verify turn by turn what the simulator knows, what it may reveal, whether it fabricates facts, and whether it responds correctly to the Agent's questions; for the second, compare against the ambiguity, omissions, emotion, corrections, and interruptions found in real user samples. Build a scenario matrix for these conditions and examine task success rate, number of turns, and error categories under different simulation strategies. Then calibrate key tasks with human interaction samples, and see whether absolute scores and model rankings change with the simulator.

5. (★★) Bradley–Terry explains pairwise preferences with a one-dimensional latent strength. Which task distributions or user groups might produce cyclical preferences? How can subgroup analysis and model fit error be used to interpret a leaderboard?

Suppose three judges rank three models as A, B, C; B, C, A; and C, A, B, each putting their favorite first. Now vote pair by pair: A versus B, two judges choose A; B versus C, two choose B; C versus A, two choose C. Each person's preferences have a clear order, yet together they form a cycle. Bradley–Terry gives each model a single strength score, and three scores cannot be arranged into such a cycle.

When reading an actual leaderboard, first look at how many matches each pair has and how wide the uncertainty in the win rate is, then compare with the win rates the fitted model predicts. With enough data, fit separately by task or user group: some people care most about accuracy, others more about speed, and pooling may hide this difference. Finally, choose according to the share of each task type in the target business.

6. (★★) An Agent has a single-run success rate of 60%. Under the assumption of independent attempts, compare Pass@k and Pass^k at \(k=5\); then, taking retry cost, result selection, and action side effects into account, explain how to design a realistic evaluation.

Assuming each attempt succeeds with probability 0.6 independently, Pass@5 = 1 − 0.4⁵ = 98.976% and Pass^5 = 0.6⁵ = 7.776%. The former describes at least one success in five attempts; the latter describes all five succeeding. Real retries also require a usable result verifier or selector, and the time and cost of failed attempts must be counted. For tasks with external side effects, design isolated state, idempotency, and recovery mechanisms, and measure each failure and its consequences under controlled conditions. Take k from the attempt budget actually allowed or the repeated-execution requirement, and record differences between tasks and correlation between attempts.

7. (★★) Under a limited budget, how would you schedule small-scale diagnostics, paired comparisons, repeated runs, and a final validation on tasks that took no part in selection, so that each round of evaluation helps the decision as much as possible?

First pick a small number of diagnostic tasks based on failure clusters, making clear which causal hypotheses each round should distinguish; compare single changes under paired conditions, and look first at intermediate observations that explain behavior. After screening out the worthwhile changes, increase task coverage and repetitions to estimate the interval for the difference. When each item is run once under each of two configurations, McNemar's test can analyze the paired difference in binary outcomes; when the same item is run repeatedly, aggregate to the task level first, or resample clustered by task. Before running, fix the smallest improvement worth adopting and the maximum number of items you can evaluate. If the interval still includes practically meaningful gains and losses and budget remains, test another batch according to the predetermined plan. If the budget runs out and the answer is still unclear, report the existing results and interval and hold off on switching configurations. Keep tasks that took no part in tuning for confirmation, and correct for multiple comparisons when screening several options. Cover high-risk edge cases and common production tasks separately, and do not mistake the concentrated sampling of a diagnostic set for the overall distribution.

8. (★) Among AndroidWorld's four Wi-Fi tasks, the full element tree raised the success rate from 25% to 100% at 2.498 times the token cost of the original scheme; after trimming, all four still succeeded at 0.506 times the tokens of the full tree. How would you design the pruning rules and the regression tasks so that control state, accessibility relationships, and dependencies for later actions are preserved?

Start by designing two regression items. One switches Wi-Fi from on to off, checking whether the pruned tree still lets the Agent find and operate the switch; the other starts with Wi-Fi already off and asks the Agent to confirm that it is off. Here the model must read the current state and finish promptly—one more tap would actually turn Wi-Fi back on. SystemWifiTurnOffVerify in the H5 control group shows exactly why the second item matters: the emulator gave a state score of 1 at both the start and the end, yet the Agent never reported completion. The experiment requires both a correct target state and a completion report from the Agent, so this run still counts as a failure.

When pruning, keep control text, accessibility labels, state values, and elements that are actionable, focusable, or scrollable. After collapsing empty containers, it must still be possible to follow the original relationships to map each label to the correct switch and target each action at the correct control. Run the full tree and the pruned tree from the same starting state, and compare control coverage, task success, token usage, and latency item by item. If a control cannot be found at some step, look back at both trees, add the missing relationship to the rules, and then run regressions on tasks that require scrolling or span multiple screens, and on other apps.

9. (★★) A user simulator reveals information step by step as the Agent asks. How would you compare different disclosure strategies, and determine how the number of turns, the success rate, and task difficulty are affected?

Fix the task facts, the initial environment, and the Agent, then configure strategies such as proactive full disclosure, step-by-step disclosure in response to questions, and allowing omissions or ambiguity; compare the number of clarifications needed, tool calls, success rate, and error types. Use disclosure behavior in real user trajectories as the basis for calibration, and cover both skilled and unskilled users in separate strata. The simulator changes how hard it is to obtain information, which can affect absolute scores as well as model rankings; therefore, observe results under several reasonable strategies and state the corresponding user and task conditions.

10. (★★) A user gives a research assistant three observations, 2, 5, and 8, and asks for a plot and the mean. The read log shows the file failed to open, and the plotting program then generated a figure from 4, 5, and 6, with the report giving a mean of 5. The existing check only requires that "the figure opens and the mean is correct." What result will this check give? How should the acceptance check and the regression case be changed so that the substituted data is caught?

The existing check will pass. Both sets sum to 15 and have a mean of 5, but the first point on the plot has changed from 2 to 4 and the third from 8 to 6. Read the three values independently from the user's file, compare them with the data passed to the plotting function, and verify point by point in observation order. Merely seeing the file name in the log is not enough to confirm that the plot used the values in the file.

For regression, run two trials. First make the file unreadable, and check whether the assistant points out the missing data, asks for it to be provided again, and records the analysis as incomplete. Then change the first value in a valid file to 11, keeping the other two at 5 and 8. The first point should now move to 11 and the mean should become 8. Checking both together catches errors where only the plot or only the report gets updated.

Chapter 8: Model Post-Training

1. (★★) A targeted fine-tune improved the target task but degraded general tool-calling ability. How would you design a test set that checks existing capabilities, adjust the data mixture and training volume, and compare the results of full-parameter fine-tuning and LoRA?

Suppose the fine-tune is meant to make the assistant keep investigating while a refund has not yet arrived. First prepare three sets of items independent of the training data: refunds not yet completed, to see whether it wraps up too early; refunds already received, to see whether it can finish promptly; and tasks it could already do, such as looking up flights, to see whether it still picks the right tools and fills in the right arguments. The last two sets check whether existing capabilities have regressed. Fix the tools, permissions, and task starting points, run the un-fine-tuned model once first, and record a baseline for each set.

Starting from the same base, run full-parameter fine-tuning and LoRA with the same data split and training budget. Mix samples from the original distribution into training, and tune the ratio of new to old data, the learning rate, and the stopping point on a development set; once the configuration is chosen, run each of the three held-out sets once. If the not-yet-received items improve but the already-received items now trigger several extra lookups, looking only at the average score on refund tasks will miss this regression. LoRA freezes the base parameters, but the check is still needed once the adapter is attached. Further options include adding a reference-policy constraint during training and attaching the adapter only for relevant tasks; for image-and-text input, you can also decide whether to adjust the projection layer, the language model, or the vision component depending on where errors originate.

2. (★★) A certain domain capability can be learned through parameter training, or supported with in-context examples and knowledge retrieval. What factors would you use to choose between them?

First determine whether the need is fact retrieval, describable rules, or perception and implicit decision patterns. Facts that require updating, citation, access control, and deletion suit RAG; a small number of rules and examples can go into the context first; stable behaviors used repeatedly can be considered for parameter training. Then compare call volume, latency, and training and maintenance cost. Deterministic approval rules are executed by code, while the model understands the input and handles language tasks outside the rules.

For example, if a refund policy changed this month, after updating the retrieval material, ask once with an old date and once with a new date to check whether the model cites the version in effect at the time. A different kind of problem is when the model reads the correct policy but consistently misses a key condition across many phrasings; records like that are what help construct behavioral training samples.

3. (★★) What training material and verification methods are needed to distill, respectively, a Chat model that answers directly, a Reasoning model that generates its reasoning process, and an Agentic model that uses tools over multiple turns?

Chat distillation needs representative inputs, reliable answers, and task-quality checks that cover both facts and expression. Reasoning distillation needs accessible reasoning demonstrations, checks on the answer and key intermediate steps, and a comparison of reasoning length against quality. Agentic distillation additionally needs tool definitions, environment observations, and state changes, and validates the entire action chain; the policy loss covers only the positions the model generates, with environment feedback serving as context. When the student easily drifts into states outside the demonstrations, on-policy distillation can supply supervision for those prefixes.

4. (★★★) A customer-service Agent completes a task in 10 turns of interaction and receives a final success reward. How would you relate this signal to the intermediate decisions? Which steps are suitable for adding process rewards?

Suppose turn 2 clarified which charge was in dispute, turn 7 explained the fee, and turn 10 received a receipt confirming the refund. The whole trajectory can be marked a success, but the receipt alone does not show how much the explanation in turn 7 contributed. With PPO, a value model can estimate the expected return at the start of each step, which is combined with the actual return to estimate each action's advantage. With GRPO, compare multiple trajectories handling the same dispute; if every attempt succeeds, identical success rewards alone cannot tell which approach was better.

Intermediate events such as identity verification with a trusted receipt, or confirmation of the required order number, can be checked on their own. After adding process feedback for them, still use the end-state criterion to verify that the money was actually refunded to the specified order. Whether the agent explains the fee first or looks up the order first, both orders should be allowed as long as both legitimate paths succeed. As for which explanation helps most, sample more trajectories, or ask a teacher model to provide a demonstration grounded in evidence.

5. (★★★) You have a $10,000 budget to improve a customer-service Agent. How would you allocate investment across evaluation, context and knowledge, Prompts/Skills, programmatic constraints, and parameter training?

First use part of the budget to build a representative task set, tally the error distribution, and rank problems by failure frequency, business impact, and cost of fixing. Missing knowledge is addressed first by improving retrieval, problems with understanding procedures are tried first with Prompts/Skills, and permission and amount constraints are enforced by code. Get these cheaper, easily modified solutions right first, then schedule parameter training and deployment evaluation for the perception, expression, or implicit-decision problems that remain. One adjustable budget: $3,000 for building the baseline, regression tests, and post-launch monitoring; $2,500 for fixing knowledge and retrieval; $1,000 for tuning Prompts and Skills; $1,500 for implementing and testing programmatic constraints; and the remaining $2,000 reserved for small-scale training. If the baseline shows that the main problem is retrieving outdated policies, spend the training reserve first on adding cases tagged with effective dates, and retest behavior during the changeover between old and new policies.

6. (★★★) A task lacks a clear reward, and environment interaction is expensive. From what sources can learning signals be obtained? How would you verify that these signals actually improve task performance?

Signals can come from human demonstrations, preference comparisons, token-by-token evaluation by a teacher, verifiable events in the environment, and model-generated diagnoses. One direction worth comparing is turning rich feedback into concrete learning signals: for example, "which piece of customer information is still missing" already points to the next step, and keeping feedback of this kind provides denser supervision than a single success-or-failure label. Model-based simulators can increase the volume of interaction, and on-policy distillation can increase the density of supervision per trajectory.

7. (★★) Training a dedicated LoRA for each user or each company—which personalized capabilities is this suited to carry? Which information is better kept in an external knowledge base?

Long-term stable expression style, habits in using domain terminology, and recurring decision patterns can be learned through a dedicated adapter. Account state, frequently changing product facts, and memories that need to be cited or deleted item by item are better suited to external storage and retrieval. The choice should also consider the amount of user data, isolation, update frequency, and the deployment cost of many adapters.

8. (★★★) Drawing on the research ideas of Weak-to-Strong Generalization, can a small model provide useful supervision for a stronger Agent? Consider local verification, preference labels, and extra context separately, and design a method for checking supervision bias.

A small model may be good at a narrow verification task, or may provide useful signal because it has the rules, reference answers, or additional material. The strong model generates candidates, the small model evaluates the parts it can judge reliably, and the result is combined with programmatic verification or human spot checks. Use gold labels to measure supervision errors, analyze bias by task type, and check the strong model's performance on independent evaluation. Down-weight samples with large disagreements or route them to more reliable evaluation sources.

9. (★★) One trajectory has mostly correct intermediate steps but ultimately fails; another reaches the correct result but violates a process constraint. How would you combine process and outcome to evaluate these two trajectories?

Take the file operations in Experiment 8-16 as an example. Trajectory A first reads the configuration, then edits the specified field, and acceptance testing finds that the value was written incorrectly. The outcome is a failure, but the checker can confirm that it read the original file. Trajectory B writes the right value but overwrites the existing file directly. The outcome check passes, while the path check can point to the specific write that violated the "read before editing" rule. If that rule is a hard condition of delivery, B cannot pass acceptance either. When creating a new file, there is no old content to read, so writing directly should be allowed.

During training, keep the outcome score and path feedback separate. A's compliant operations are on record, but its incorrect final value still needs correcting; when penalizing B, the penalty can be placed on that one non-compliant write. To judge whether training worked, measure completion rate and number of violations separately on held-out tasks. If the model simply does less of the task, violations will also drop; the completion rate is then the reminder to check what it actually learned.

10. (★★★) The environments and verifiers of SWE-bench, τ²-bench, and AndroidWorld can be used for training. How would you split task instances and templates so that the training material is put to use while independent evaluation is preserved?

Share the environment interfaces and verification logic, keep training and evaluation instances separate, and save the splitting rules. A parameterized generator can produce new instances of the same kind to check in-distribution generalization; held-out tasks across templates, businesses, or environments check more distant transfer. Public test items already used for training can be kept as diagnostic material, while independent evaluation uses tasks that took no part in training. Reporting each kind of held-out result separately shows whether gains come from adapting to instances or from broader capability improvement.

11. (★★★) The pass@1 on the target task is very low. How would you combine pass@k, format parse rate, partial progress rate, and failure attribution to decide among Mid-training, SFT, and RL?

First distinguish three kinds of problems: insufficient knowledge and basic capability, format and protocol errors, and poor strategy choices. pass@k shows whether more attempts can produce success, the parsing rate shows whether trajectories can be executed and scored, and the partial-progress rate shows whether usable intermediate signals exist. When basic capability is lacking, add the relevant domain training; when the capability exists but output format or operating procedure is unstable, train on demonstrations; when the model can generate scorable trajectories with reward differences among them, try RL. Small-scale trials can also show which additional items the new method gets right, how much the training costs, and whether items the model could already do are still done correctly.

12. (★★★) In a batch of rollouts, only a few very long responses are still unfinished while the other tasks are done. How would you raise utilization of the training cluster while controlling the policy staleness introduced by asynchronous sampling?

Use continuous batching and dynamic scheduling to fill in new requests, bucket by length, or separate sampling and training resources. An asynchronous pipeline can reduce waiting, provided it records the behavior-policy version and generation probabilities, limits the allowed lag, and monitors importance ratios. Length budgets or a soft over-length penalty can shorten the long tail, but they must distinguish useless repetition from necessary reasoning and handle truncated trajectories correctly.

13. (★★★) When a model is used to simulate a search engine or users, what simulation biases could mislead the Agent? How would you use task state and real interaction to calibrate training?

A simulated search engine may return relevant material too easily, and a simulated user may always understand vague phrasing or rate unfulfilled promises favorably. This reduces the model's opportunities to practice verification, clarification, and recovery. Base scoring as far as possible on verifiable state changes and deliverables, and check semantic quality separately with human samples. For tools that have real interfaces, compare simulated and real responses; for simulated users, calibrate with behavior distributions from real conversations and authorized user testing.

Chapter 9: Continual Evolution of Agents

1. (★★) An experience document is supported by three successful trajectories and one failed trajectory, and the failure occurred on a newer API version. How would you distinguish between the experience having become invalid and its applicability conditions having changed?

First organize the four trajectories by API version, task conditions, and environment state, then compare the specific steps that led to success or failure. If the old strategy succeeded on the old version and the new version changed the interface or preconditions, keep the old experience with a narrower scope and generate a candidate strategy for the new version. If failures also occur under the same conditions, look for omitted conditions and incidental factors, and decide through additional validation whether to revise or retract the experience. Keep supporting and contradicting evidence for each version.

Hand the same experience to the old and new interfaces, replay on identical inputs, and then change only the parameter suspected of having changed. If adding the field the new version requires restores success, the experience document should record from which version that field became mandatory.

2. (★★) A customer-service Agent's satisfaction and its rate of rule violations rise at the same time. How should learning signals be combined, and what guardrail metrics should be set for release?

Suppose support agrees to a refund the policy does not allow and the user immediately gives a good rating. If that rating is used directly as the training reward, the next version may learn to make the same promise more readily. First line up three records: how the user rated the service, what the policy allowed at the time, and what the refund tool actually executed. This example can be used to teach support to explain the policy and look for permitted alternatives; the good rating alone is not enough to make agreeing to the refund a demonstration.

Before release, compare the old and new versions on the same batch of requests, recording resolution rate, satisfaction, compliant workarounds, and whether responses are concise. Separately, count violations, privacy leaks, unauthorized actions, unsupported statements, and mismatches between promises and execution, using the method agreed in advance. For example, if both versions receive 100 refund requests, the old version approves 1 in violation of policy and the new version 4; if the release condition requires that this violation rate not rise, the new version cannot pass even with more positive ratings.

3. (★★★) An Agent often claims that an operation has been completed, while the tool records show it has not been executed. How would you choose among a Prompt, a Harness check, or parameter training based on the root cause?

First compare the reply time with the tool requests and their results. If the model has already received the correct state but repeatedly uses inappropriate language implying completion, start by adding explicit wording rules and examples. If the operation state can be read reliably by code, have the Harness check the reply against the state and demand a correction when needed. If the problem spans many tasks and phrasings, use more varied training data to improve alignment between language and action. Prefer changes that are small in scope and easy to verify and roll back.

4. (★★★) An Agent needs to modify tools and business verification components, while the control plane that approves its own updates is maintained by an independent module. How would you divide permissions, code, and tests between the two sides?

The Agent can modify tools and business validation programs in its own workspace and trial-run patches with a restricted account. Evaluation cases, release criteria, permission configuration, audit logs, and stable versions are all managed by the separate module, and the test account has no permission to modify them. Even changes to the validation programs are evaluated by this module. The Agent may view diagnostic results and revise its patch as authorized. Once approved, an account with release permission deploys it, recording which patch passed which tests and who approved it.

5. (★★) As the experience knowledge base grows, retrieval errors and rule conflicts appear. How would you design mechanisms for versioning, freshness, merging, and retirement?

Record each experience's source trajectory, applicable conditions, environment version, verification time, and status. When rules conflict, first determine whether they belong to different versions or scenarios and split them by condition; experiences that still conflict under the same conditions go into a queue for verification. Periodically merge duplicate experiences, move versions that have expired or been overturned by new evidence out of the default retrieval scope, and keep the history and a way to restore them.

6. (★★★) Design a continual-evolution scheme for medical customer service, explaining the division of labor among model parameters, knowledge, Skills, and code-level constraints, as well as the verification and release process for each kind of update.

Parameter training focuses on intent understanding and expression; the knowledge base maintains reviewed guidelines, drug information, and institutional policies, with versions and sources preserved; Skills organize processes such as information gathering, escalation to humans, and follow-up; code enforces identity verification, data access control, and the business validations the institution has approved. First evaluate trajectories for factual accuracy, process compliance, consistency between promises and actions, and quality of expression, then revise knowledge entries, procedures, code, or training samples according to where the error occurred. Professionals review changes involving medical content, which are validated on new scenarios, existing tasks, and safety tasks, released in stages, and monitored for anomalies.

7. (★★★) An exploration policy scores highest on every old discovery tree, yet degrades in the next round of online exploration. How would you analyze bias from the limited support of the replay data, randomness, and evaluation overfitting, and use the analysis to partition the replay worlds and set release gates?

The old discovery trees cover the branches that historical strategies actually explored, and new tasks or new strategies may enter other regions. Model sampling, tool noise, and environment changes also affect strategy rankings; repeatedly selecting strategies on the same set of trees easily biases results toward those trees. When replaying up to a node, if the action chosen by the new strategy has never been executed on that tree, record it as "no observation" and end the trajectory there. Report separately the proportion of trajectories that can follow the tree to the end and the scores on those trajectories, and list uncovered branches as priorities for online validation. Divide development, validation, and sealed test sets by task family, time, and independent discovery trees, keeping the same tree and its derived trajectories in the same set. Fix the model, tool versions, and budget, and use multiple random seeds and paired comparisons against a baseline to compare quality, cost, violation rate, and uncertainty. Once offline results meet a threshold set in advance, run a small-scale online comparison and release gradually according to benefit and guardrail results, keeping rollback conditions in place.

Chapter 10: Multi-Agent Collaboration

1. (★★) After a role switch, a code reviewer carries over the context of the requirements-analysis stage and keeps talking mostly about requirements. How can this kind of role interference be detected? How should the input, tool configuration, and handoff method be adjusted?

Suppose the requirements analyst has just been discussing "what prompt should appear when an empty file is imported," and the code change misses the empty-file branch. Look first at the model request right after the handoff: which version of the code did the reviewer receive, which tools, and what task? If it cannot read the change at all, supply the handoff material first. If it can, check whether it opened the relevant code, verified the interface and error handling, and pointed out the missing test. The mere appearance of "empty file" in the reply is weak evidence either way: it may be restating the requirement or reporting a defect.

Run three controlled trials on the same change. The first keeps the full discussion; the second condenses the discussion into a handoff note stating the current responsibility, the requirement basis, and the items to check; the third opens a separate context and supplies only the code, requirements, and test material needed for review. Fix the model, tools, and budget, and compare which defects each group found, which requirement it missed, and how many calls it took. If the problem lies in the tool configuration, then adjust only the tools the reviewer sees, with permissions still checked by the Harness.

2. (★★) The Manager's task decomposition misses a dependency, causing several sub-agents to redo their work. How can the quality of a decomposition be evaluated, and how can problems in the plan be discovered and corrected during execution?

The decomposition should list each subtask's inputs, outputs, dependencies, owner, and acceptance conditions, and be checked for coverage of the original requirements. Before execution, verify that the interfaces and resources are available and run small-scale trials on high-risk dependencies; during execution, use milestones and feedback from sub-agents to find missing conditions, update the plan version, and notify affected members. Evaluate planning quality by rework rate, blocking time, missed requirements, and the final outcome. Once the bottleneck is confirmed to be in decomposition, give the Manager a stronger model, complete task information, and enough reasoning budget first. A bad decomposition makes several executors redo work together, so simply adding executors rarely solves the problem.

For example, the translator has already translated three sections before the glossary is finalized. Add "glossary version" to the task inputs, find the passages that used the old version, and redo only the affected parts. In the next decomposition, let work that does not depend on the glossary go first, and give the translator an entry point where version changes are visible.

3. (★★) In decentralized collaboration, members may suffer from communication gaps, disputes over responsibilities, and goal conflicts. Choose two of these situations and design mechanisms that can locate the cause, move the handling forward, and bring the dispute to an end.

Take collaboration between a translator and a proofreader. Missed message. The glossary has been updated to its third version, but the translator still notes the second version on submission. First check by task number whether the third-version notice was sent, then check whether the translator acknowledged receipt. If it must be resent, reuse the original notice number, so the translator processes it once even on receiving it twice. The omission is resolved only when the affected passages are revised and the proofreader has checked the submitted version.

Disputed responsibility. The translator thinks the illustrator should change the outdated terms in the figures, while the illustrator thinks the translator should settle the names first. Both record the figure numbers, the terms currently in use, and the basis for the final wording in the same task record. As agreed in advance, the terminology owner settles the names, the illustrator updates the figures, and the proofreader checks that text and figures agree. If several rounds of back-and-forth still yield no new evidence, the designated owner makes the call.

4. (★★★) A parallel search needs to find only one result that meets the criteria. Design a complete process for "cancel the remaining branches after a verified success," handling two results arriving at the same time, duplicate messages, cancellation timeouts, and resource cleanup.

Sub-agents return candidates with their sources; the Manager verifies the matching conditions first, then atomically moves the task from searching to selected. When two valid results arrive at the same time, only one completes the state transition; duplicate events read the already recorded outcome. When registering the selected result, write out the pending cancellation notices for the other branches and their derived tasks in the same transaction. The Manager tracks acknowledgments by notice number and resends after a restart, and each sub-agent identifies duplicate notices by number. On receiving a new notice, a member saves its progress at a safe point, releases locks, closes sessions, and returns an acknowledgment. Executions past the cancellation deadline are taken over for cleanup by the runtime. External operations already submitted still need their results queried, and finally the evidence for the selected result is summarized together with the terminal state of each branch.

5. (★★★) Several Agents modify a book manuscript and its image numbering at the same time, and may also create duplicate files or mistakenly delete shared artifacts. How would you combine permissions, versions, working copies, semantic checks, and recovery mechanisms to manage the file system?

Partition access into private workspaces, shared artifacts, external resources, and read-only system resources, and give each member its own namespace. File commits use atomic version checks; code and manuscript edits can be made in separate worktrees and merged centrally. A change in figure numbering is a cross-file semantic relationship, so the consistency of figures, captions, and references must be checked; directory locks can limit the scope modified at one time, while semantic correctness is still judged by the cross-reference checks. Keep version history, protected backups, and a way to restore, restrict permissions for bulk deletion, and verify the integrity of artifacts after recovery.

6. (★★★) When an Agent delegates paid tasks through Pinchwork or RentAHuman, how should delivery quality be agreed on and checked? When the two parties dispute the acceptance result, how should review, payment, and appeals be organized?

Before delegating, specify the deliverable, quality standard, evidence requirements, deadline, and budget. Code tasks can run tests, visual artifacts can be checked by rendering, and on-site tasks can rely on agreed photos, records, and human verification. Keep the acceptance criteria along with the results, and when a delivery fails, state the specific conditions for fixing it. Disputes go, as agreed in advance, to an independent reviewer or a human, with funds held in escrow and an appeal process to match. Reputation records should cover task type, quality of delivery, timeliness, and how disputes were resolved, so later delegations can weigh price against capability.

7. (★★) Agents can delegate tasks to real people through marketplaces and payment interfaces. Besides on-site execution, what responsibilities can humans take on in goal setting, professional judgment, acceptance, and the allocation of accountability? Illustrate with an example.

For example, when an Agent arranges an on-site property inspection, people can help determine what really needs checking, judge anomalies on site, explain what the footage does not cover, and then take part in acceptance and follow-up decisions. The delegating party is responsible for the scope of authorization and the budget, the executor is responsible for truthful recording and feedback, and people with the relevant qualifications make the professional judgments.

8. (★★) The same model can either complete a task on its own or be organized into multiple roles. How would you design a controlled comparison to determine how much benefit comes from specialized division of labor, context isolation, parallel search, and external feedback respectively?

Fix the task set, model, tools, and evaluation method, and give the single Agent and the multi-agent setup comparable budgets. Vary role specialization, context organization, concurrent execution, and feedback channels separately, and observe quality, wall-clock time, token usage, and error distribution. External feedback should also be offered to the single-Agent control, so that tool benefits are not all attributed to collaboration. For example, first fix the total token cap and the number of calls, and have the same set of workers run four paired conditions: one role with shared context, separate roles with shared context, one role with isolated context, and separate roles with isolated context. Comparing the first two shows the effect of role specialization; making the same comparison between the last two shows whether the benefit of specialization depends on context isolation. Under the chosen configuration, then compare serial and parallel execution, recording how long the user waited, how many tokens the system used in total, and what was lost in the handoffs.

9. (★★★) Drawing on the transparent minds of The Three-Body Problem and on the questions the paperclip thought experiment raises about goal setting, discuss information sharing, shared goals, and diversity of viewpoints in multi-agent systems. How can observable experiments be used to judge whether the scope of sharing and the stages of independent analysis are appropriate?

Literary premises and thought experiments help frame the questions, while experimental judgment rests on information scope, goals, and behavioral metrics. Compare schemes such as sharing all conclusions immediately, analyzing independently and then aggregating, and sharing only raw evidence, while holding the task and budget constant. Observe differences among candidates, correlation of errors, final quality, and coordination cost, and check whether the shared goal omits any constraint. First have cross-reviewers read the raw evidence and form judgments independently, then let them consult earlier explanations as needed, so existing conclusions interfere less with the review.

10. (★★★) The same Coding Agent is given budgets of 30 steps and 300 steps. How should planning, implementation, verification, and revision be arranged in each case, and how should the strategy be adjusted according to the remaining budget and actual progress?

Both budgets should keep basic planning and the necessary verification. With 30 steps, pin down the core requirements first, choose a shorter path, and leave room for checking results and handling errors; with 300 steps, add comparison of approaches, boundary tests, and independent review. The runtime tracks the total budget, remaining budget, completed items, and open problems, and uses milestones to decide whether to keep exploring, focus on revision, or ask for input. Budget allocation and actual consumption both go into the log, and strategy changes when several consecutive rounds make no progress, so that extra steps are not spent on repeated operations.

11. (★★) What design insights can virtual memory and paging, file permissions, deadlock detection, and scheduling algorithms each offer multi-agent systems? Explain the scope within which these analogies apply, and the constraints that the runtime must explicitly enforce.

Paging suggests on-demand retrieval and hot/cold information management, file permissions suggest read-only mounts, tool authorization, and credential isolation, wait-for graphs help detect members waiting on one another, and scheduling algorithms can govern concurrency, priority, and resource quotas. Context summarization changes the representation of information, whereas memory paging usually preserves bytes exactly; task semantics depend on model judgment, while permissions and budgets should be enforced by the runtime. It is also important to distinguish a normal revision loop from deadlock or livelock with no progress, diagnosing with state, dependencies, and time.