Repository navigation
Module 2.2 Addendum
Estimated reading time: ~22 minutes (Readings 1–2 + lesson)
Chapter 1 traces the evolution of reasoning in language model agents across four paradigms — Chain-of-Thought (CoT), ReAct, Tree of Thoughts (ToT), and LATS. Each paradigm was designed to address a specific limitation of its predecessor. Your goal is not to memorize each paradigm in isolation but to understand the causal logic connecting them: why each one became necessary, what it costs, and when to choose it over the alternatives.
Without consulting any materials, answer these questions in 2–3 sentences each:
- When you solve a multi-step math problem, do you typically work through intermediate steps or jump directly to an answer? What does this suggest about how reasoning might help a language model?
- What happens when you follow a plan and encounter an unexpected obstacle? How do you decide whether to adapt the plan or abandon it entirely?
Keep your answers nearby — you will revisit them after completing the readings.
Assigned: Abstract, Section 2, and Section 3 (arithmetic results), and skim Sections 4–5 (commonsense and symbolic). Figure 1 plus the results figures.
Approximate time: ~10 minutes
Source: Wei, J. et al. (2022). Chain-of-thought prompting elicits reasoning in large language models. NeurIPS 2022.
Guiding Questions:
-
The paper contrasts "standard prompting" with "chain-of-thought prompting." What is the structural difference between these two approaches? What specific element does CoT add to the few-shot exemplar?
-
Wei et al. describe chain-of-thought reasoning as an emergent property. What does emergent mean in this context? At what approximate model scale does CoT benefit appear, and what does this imply about deploying CoT with smaller models?
-
Figure 1 shows CoT applied to arithmetic, commonsense, and symbolic reasoning tasks. Across these task types, which shows the largest relative improvement? What property of that task type explains why intermediate reasoning steps help most?
-
The paper calls the intermediate steps a reasoning trace. In one sentence, define what a reasoning trace is in the CoT sense, using only language from the paper itself.
-
What does CoT not provide that would be necessary for an agent to interact with the external world? (This question anticipates Reading 2 — note your answer before proceeding.)
Key terms to locate and annotate: Reasoning trace · Few-shot exemplar · Emergent capability · Chain-of-thought prompting · Standard prompting (baseline)
Assigned: Sections 1–2
Approximate time: ~12 minutes
Source: Yao, S. et al. (2022). ReAct: Synergizing reasoning and acting in language models. ICLR 2023.
Guiding Questions:
-
Yao et al. describe CoT as operating "entirely within the model's internal knowledge." What specific problem does this create for tasks that require current or external information? Give one concrete example of a task that CoT alone cannot complete correctly.
-
The ReAct loop has three phases: Thought, Action, and Observation. For each phase, answer: What is the input? What does the model produce? What happens to the output — is it returned to the model, sent to a tool, or delivered to the user?
-
Under what condition does the ReAct loop terminate? What does the final output look like?
-
ReAct is described as "grounding reasoning in real-world information retrieved during the task." What does grounding mean here, and how does it differ from the parametric knowledge used in CoT?
-
The lesson states that "the ability to read and diagnose a ReAct trace is the core diagnostic skill of Module 2." Based on your reading, identify two specific points in the Thought–Action–Observation cycle where an error could occur that would produce an incorrect final answer.
Key terms to locate and annotate: Thought / Action / Observation (TAO cycle) · Grounding · Action space · Observation · Final Answer (terminal state)
After completing both readings, review the lesson's treatment of Tree of Thoughts and LATS, and the Four-Paradigm Comparative Framework.
Guiding Questions:
-
Tree of Thoughts (ToT) addresses a limitation of ReAct. What is that limitation? What does ToT do structurally that ReAct cannot?
-
The lesson identifies four conditions that justify the higher cost of ToT. List all four and provide a one-sentence explanation of each.
-
LATS (Zhou et al., 2023) is described as a "unifying framework." What does it unify, specifically? Name the three elements from earlier paradigms that LATS integrates.
-
The Four-Paradigm Comparative Framework evaluates paradigms across five dimensions. Without looking at the figure, predict what those five dimensions might be — then check the figure and note any you missed.
-
The lesson states that "most production systems today use ReAct for cost reasons." Given that LATS is more capable, why do cost constraints favor ReAct? What would have to change (technically or economically) for LATS to become the production default?
S1. Construct a four-row table with columns: Paradigm | Core Innovation | Limitation It Addresses | When to Prefer It. Fill in all four rows for CoT, ReAct, ToT, and LATS. This table is the core analytical deliverable of Chapter 1.
S2. A financial analysis agent must (a) retrieve current stock prices, (b) compute a ratio from retrieved data, and (c) explain its reasoning step by step. Which paradigm is most appropriate, and why? Would your answer change if the agent also needed to try multiple valuation methods and select the best one?
S3. Revisit your "Before You Read" answers. How did the readings confirm, challenge, or refine your initial intuitions about intermediate reasoning steps and plan adaptation?
Estimated reading time: ~32 minutes (Reading 3 + Video 1 + lesson)
Chapter 2 establishes the architectural distinction between an LLM and an agent: tools. More specifically, it develops the professional competency of designing tool integrations that work reliably — not just technically wiring tools to a model, but specifying tool descriptions precisely enough that an agent selects the right tool, calls it with correct arguments, and interprets its output accurately.
-
Imagine you are managing a new employee on their first day. They can do whatever you describe to them in writing. How would you describe a task like "search the web for today's top news headlines and summarize the top three"? What would you need to specify to avoid misunderstandings?
-
Think about the difference between a calculator and a language model. What can a calculator do that a language model cannot? What does this suggest about the value of giving an LLM access to a calculator tool?
Assigned: Full create_agent API Reference + Tool Creation Reference
Approximate time: ~10 minutes
Source: LangChain Documentation. https://reference.langchain.com/python/langchain/agents/factory/create_agent
Guiding Questions:
-
create_agentaccepts five primary parameters. For each parameter, state: (a) its data type, (b) whether it is required or optional, and (c) what it controls at runtime:
| Parameter | Data Type | Required? | Runtime Role |
|---|---|---|---|
model |
|||
tools |
|||
system_prompt |
|||
middleware |
|||
response_format |
-
The
toolsparameter accepts "a sequence ofBaseToolobjects, callables, or tool-specification dicts." What is embedded within eachBaseToolobject that the agent uses to decide which tool to call at inference time? -
The
response_formatparameter constrains the agent's final response to a defined schema. What does this imply about the agent's default behavior whenresponse_formatis not set? In what deployment contexts would structured output be important? -
create_agentreturns an agent that runs "a LangGraph-backed ReAct loop internally." What does it mean for the loop to be "LangGraph-backed"? How does this differ from the legacyAgentExecutorapproach, and what specific capabilities does LangGraph state management unlock? -
The documentation states that the agent "iterates through Thought → tool call → Observation cycles until a terminal condition is reached." What is the terminal condition? How does the agent know it is done?
Key terms to locate and annotate: BaseTool · Tool registry · response_format / structured output · middleware · LangGraph-backed execution · Terminal condition
Focus: The five-question specification discipline and the heterogeneous tool ecosystem.
Guiding Questions:
- The lesson identifies five questions that an effective tool description must answer. For each question, explain why that specific information is necessary — what failure mode results if it is omitted?
| Question | What Failure Mode Does Omission Cause? |
|---|---|
| What does this tool do? | |
| When should the agent use it? | |
| What arguments does it require? | |
| What does the output look like? | |
| What errors can it produce? |
-
The lesson states: "Ambiguous argument specifications produce hallucinated values, especially for structured data types." Explain the mechanism behind this failure: why does argument ambiguity specifically lead to hallucination rather than to a tool call failure or an error message?
-
The "when should the agent use it" question requires specifying "conditions where the tool is NOT appropriate." Why is negative specification (what NOT to do) as important as positive specification (what to do)? Provide an example of a tool for which negative specification would be critical.
-
The lesson contrasts a production-grade heterogeneous tool set with a single-tool deployment. Identify the six tool types mentioned in the lesson and for each, state one specific argument-specification challenge that distinguishes it from a simple text-input tool.
-
The lesson states that "tool use introduces a new class of failure modes distinct from LLM reasoning failures." Identify two failure modes that are specific to tool use and could not occur in a pure CoT system.
Watch focus: The conceptual distinction between CoT and ReAct; the observation integration step.
Guiding Questions:
-
Map any terms used in the video to the structural definitions from Reading 2 (Yao et al., 2022). If the video uses different terminology for the same concept, record both terms and note which is the canonical academic term.
-
At what point in the video does the presenter demonstrate the Observation integration step? Describe what you observe in the code or trace output at that moment.
-
The presenter discusses tool selection. How does the agent in the demo decide which tool to use? What role do the tool descriptions play in that selection?
Using the five-question framework from the lesson, write a complete tool description for a hypothetical database query tool that allows an agent to retrieve records from a customer database. Your description must answer all five questions with enough precision that a developer could implement the tool correctly from your specification alone.
Estimated lesson reading time: ~5 minutes + trace analysis activities
A reasoning trace is the primary diagnostic artifact in agent systems. When an agent produces an incorrect answer, the trace is what a practitioner examines to determine where the reasoning deviated, why it deviated, and what change would fix it. Chapter 3 develops this diagnostic skill by introducing the five classes of reasoning trace failure.
-
Think about a time you followed a multi-step process and made an error. Was the error in your initial assumptions, in a step you executed, or in how you interpreted feedback? How did you identify which step was wrong?
-
In a ReAct trace, there are three phases: Thought, Action, and Observation. If the final answer is wrong, at which phase(s) could the error have originated? How would you distinguish between them by reading the trace?
The lesson identifies five distinguishable failure classes. Using the lesson content and your understanding of the ReAct loop from Chapter 1, complete the analysis for each failure class:
Failure Class 1: Faulty Reasoning (Incorrect Thought Step)
-
In this failure class, the Thought step contains an incorrect premise or logical inference. What distinguishes a reasoning error from a tool call error? Could you observe this failure from the action and observation alone, or must you examine the Thought?
-
What is the typical fix for a faulty reasoning failure — is it a change to the prompt, the tool descriptions, the model, or something else?
Failure Class 2: Incorrect Tool Selection
-
The agent selects a tool that is not appropriate for the current subtask. What aspect of the tool description design (from Chapter 2) is most directly responsible for preventing this failure class?
-
Can incorrect tool selection be detected by examining the Observation alone? Why or why not?
Failure Class 3: Malformed Tool Call (Incorrect or Hallucinated Arguments)
-
The agent selects the correct tool but calls it with invalid, hallucinated, or incorrectly formatted arguments. The Chapter 2 lesson identified this as a consequence of what specific specification gap?
-
How would you distinguish a malformed tool call from an incorrect tool selection in a trace? What specific trace element reveals each?
Failure Class 4: Observation Misinterpretation
-
The tool returns a correct observation, but the agent misinterprets it in the next Thought step. Why is this failure class particularly difficult to detect? What would the trace look like at the point of misinterpretation?
-
Is observation misinterpretation a failure of the tool, the tool description, the model's reasoning, or the prompt? Defend your classification.
Failure Class 5: Loop Failure (Premature Termination or Infinite Loop)
-
Premature termination occurs when the agent concludes it has enough information to answer but the information is actually insufficient. What does the Final Answer look like in this case, and what trace evidence would indicate premature termination rather than a correct completion?
-
An infinite loop occurs when the agent repeatedly calls the same tool without making progress. What condition in the Thought step would indicate that the agent is stuck in a loop rather than making productive iterations?
The following is a simplified reasoning trace from a ReAct agent tasked with: "Find the current CEO of OpenAI and report when they were appointed."
Thought 1: I need to find the current CEO of OpenAI. I will use the web search tool.
Action 1: web_search("OpenAI CEO")
Observation 1: "Sam Altman is the CEO of OpenAI. He was reinstated as CEO in November 2023
after a brief period of removal by the board."
Thought 2: The search result says Sam Altman. I now know the answer. I will report that
Sam Altman has been CEO of OpenAI since the company's founding in 2015\.
Final Answer: Sam Altman has been CEO of OpenAI since the company was founded in 2015.
Analysis Questions:
- Identify the failure class present in this trace. Cite the specific trace element (Thought, Action, or Observation) where the failure occurs.
- Is the Observation 1 correct? Is the Final Answer correct? What is the relationship between these two facts?
- Which of the five failure classes does this trace exemplify? What change to the agent design would prevent this specific failure?
- Rewrite Thought 2 as it should have appeared — a corrected reasoning step that would produce an accurate Final Answer.
When diagnosing a trace, apply this four-step procedure:
- Start with the Final Answer. Is it correct? If not, identify specifically what is wrong.
- Work backwards from the Final Answer. Examine the Thought immediately preceding the Final Answer. Does it logically support the answer? If not, the failure is in the final reasoning step.
- Trace each Thought → Action → Observation cycle in reverse order. For each cycle, ask: (a) Is the Thought logically valid given the prior Observation? (b) Does the Action correctly implement the Thought? (c) Does the Observation reflect what the Action should have returned?
- Classify the failure and identify the fix. Map the failure to one of the five failure classes and specify the change — to the prompt, tool description, model, or system design — that would prevent recurrence.
Practice: Apply this four-step procedure to the trace above. Document your reasoning at each step.
Estimated lesson reading time: ~9 minutes
Chapter 4 reframes prompt engineering from a craft applied to chatbot interactions into a design discipline applied to agent behavioral control. The lesson introduces four independently configurable dimensions through which agent behavior is specified: system instructions, tool descriptions, few-shot CoT scaffolds, and output format constraints. This guide develops the analytical competency to work with each dimension intentionally, not intuitively.
-
If you were managing a contractor who would complete tasks exactly as described but would exercise no independent judgment beyond the instructions given, what categories of information would your written instructions need to include? Think beyond just "what to do."
-
From Chapter 2, you learned that tool descriptions are one mechanism for specifying agent behavior. What behavioral aspects cannot be controlled through tool descriptions alone? What other mechanisms might be available?
The lesson introduces the Agent Prompt Architecture comprising four independently configurable dimensions.
Dimension 1: System Instructions
System instructions define what the agent knows about its role, its operational context, and its behavioral constraints. In create_agent, these are passed via the system_prompt parameter.
Guiding Questions:
-
System instructions are described as specifying "what the agent knows about its role and constraints." Identify three specific types of information that should appear in a well-designed system instruction for a financial analysis agent. Why must these be defined at the system level rather than inferred by the agent at runtime?
-
The lesson warns against treating behavioral problems as prompting problems: "when the agent does something unintended, the instinct is to add a sentence to the system prompt." Why is this approach described as "accumulating fragile constraints that interact unpredictably"? Can you think of an example where two system prompt constraints might conflict?
-
System instructions persist across all conversation turns — they are not updated based on tool observations. What implication does this have for constraints that should only apply in certain task states? How would you handle a constraint like "do not summarize until all data has been retrieved"?
Dimension 2: Tool Descriptions
Guiding Questions:
-
Tool descriptions are listed as an independent behavioral control dimension. From a behavioral control perspective (not just technical specification), what does a tool description control that the system prompt cannot? Give a specific example of a behavioral constraint that must live in the tool description rather than the system prompt.
-
The lesson lists four dimensions as "independently configurable." Does this mean they are independent in their effects as well as their configuration? Specifically, can a system prompt instruction contradict a tool description's "when to use" specification? What should take precedence, and how would you design to avoid the conflict?
Dimension 3: Few-Shot Chain-of-Thought Scaffolds
Guiding Questions:
-
From Chapter 1, you know that CoT is emergent above a model scale threshold. What does this imply about the effectiveness of few-shot CoT scaffolds for smaller models? Should a developer rely on CoT scaffolds when using a model below the emergence threshold?
-
A few-shot CoT scaffold for a research agent might include an example trace where the agent searches, retrieves, evaluates relevance, and then synthesizes. What is the behavioral risk if the scaffold example is drawn from a task that is slightly different from the agent's actual tasks? How specific should scaffold examples be?
-
Few-shot scaffolds increase prompt token count. In a long-running ReAct loop with many reasoning steps, how does the inclusion of few-shot CoT scaffolds affect total context token consumption? What design decision mitigates this?
Dimension 4: Output Format Constraints
Guiding Questions:
-
The
response_formatparameter increate_agentenforces output format at the parser level. How does this differ from specifying output format in the system prompt? When is the parser-level constraint preferable? -
A developer adds the instruction "always respond in JSON with fields: summary, confidence, sources" to the system prompt. In testing, the agent occasionally produces JSON with different field names or wraps the JSON in markdown code fences. What does this behavior indicate about system prompt-level format constraints, and what is the more reliable alternative?
-
The lesson states that behavioral control "is not a patch — it is an architecture." Apply this principle to output format: if you discover in production that the agent's output format is inconsistent, what is the architectural approach to fixing it versus the patch approach?
The lesson's key architectural argument is: define behavioral boundaries clearly at design time, test them systematically before deployment, and instrument the agent to detect and log behavioral violations in production.
Synthesis Questions:
-
The hands-on project for Module 2 requires documenting "three specific behavioral constraints and the prompting mechanism used to enforce each." Choose a hypothetical agent (e.g., a medical information assistant, a legal document reviewer, a customer service agent) and identify three behavioral constraints. For each, specify: (a) the constraint statement, (b) which of the four dimensions implements it, and (c) why that dimension is the appropriate mechanism rather than the others.
-
A team builds an agent that sometimes executes financial transactions without explicit user confirmation. They propose adding "always ask for user confirmation before executing transactions" to the system prompt. Evaluate this proposal against the architectural principle: is this a patch or an architectural fix? What would an architectural approach look like?
-
The four dimensions are described as "independently configurable." Design a testing strategy for verifying that each dimension is functioning as intended — independently of the others. What would a test for system instruction compliance look like? For tool description compliance? For output format compliance?
Estimated reading time: ~7 minutes (lesson) + regulatory readings
Chapter 5 synthesizes the entire module by introducing the six-dimension trade-off framework for selecting a reasoning architecture in professional practice. Architectural selection is not a purely technical decision — it is a multi-objective optimization problem that must account for task complexity, cost, accuracy requirements, interpretability, tool use needs, and regulatory risk. This guide also introduces two key regulatory frameworks — the EU AI Act and the NIST AI Risk Management Framework — that directly constrain architectural choices in high-risk deployment domains.
-
You have now studied four reasoning paradigms (CoT, ReAct, ToT, LATS). If a colleague asked you "which one should I use?", what information about their use case would you need before answering? Try to list at least five factors.
-
Think about a domain where AI errors have serious consequences — healthcare, legal services, or financial advising. What properties would an AI system need to have before you would trust it in that domain? Are any of those properties in tension with each other?
Guiding Questions:
- The lesson presents a six-dimension trade-off framework. For each dimension listed below, state: (a) how it varies across the four paradigms (CoT, ReAct, ToT, LATS), and (b) what type of deployment context makes this dimension the dominant selection criterion:
| Dimension | How It Varies Across Paradigms | When It Is the Dominant Selection Criterion |
|---|---|---|
| Task complexity / state space | ||
| Computational cost / latency | ||
| Accuracy requirements | ||
| Interpretability / auditability | ||
| Tool use requirements | ||
| Safety / regulatory risk |
-
The lesson states that "most production systems today use ReAct for cost reasons." Using the six-dimension framework, describe the complete set of trade-offs this implies. What does defaulting to ReAct sacrifice in each of the other five dimensions?
-
The framework is described as a "multi-objective optimization problem." In practice, two dimensions often conflict. Identify one pair of dimensions that are frequently in tension with each other and explain why — with a concrete deployment example.
Source: European Parliament (2024). Regulation (EU) 2024/1689 — Artificial Intelligence Act. Title III, Chapter 2, Article 13.
Access: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32024R1689
Guiding Questions:
-
Article 13 requires that high-risk AI systems provide output that is "sufficiently transparent" to enable operators to understand and interpret the system's outputs. What does "sufficiently transparent" require in practice — what specific information must be accessible to an operator?
-
The lesson argues that a LATS agent deployed in a high-risk domain "may face regulatory scrutiny that a ReAct agent would not, precisely because the branching trace is harder to audit." Explain the mechanism: what makes a branching trace harder to audit than a linear trace? What would an auditor need to review in a LATS trace that is not required for a ReAct trace?
-
Article 13 creates an "interpretability requirement." How does this requirement interact with the accuracy vs. interpretability trade-off in the six-dimension framework? In a high-risk domain, can you deploy a more accurate but less interpretable architecture, or does Article 13 effectively mandate the more interpretable choice?
-
Chain of thought (CoT) is currently the most valuable and holistic tool for understanding AI reasoning, though it remains an imperfect and fragile signal rather than absolute ground truth. Would a CoT agent deployed in a healthcare setting satisfy Article 13's requirements? What limitations of CoT (from Chapter 1) create compliance risks?
-
The EU AI Act defines "operators" as organizations that deploy AI systems. How does the "sufficiently transparent" requirement change the information that a developer must provide to a deploying organization as part of system documentation?
Source: NIST (2023). AI Risk Management Framework (AI RMF 1.0).
Access: https://nvlpubs.nist.gov/nistpubs/ai/NIST.AI.100-1.pdf
Guiding Questions:
- The NIST AI RMF organizes risk management around four core functions: Govern, Map, Measure, and Manage. For each function, answer: (a) what activity does it describe, and (b) how does it apply to a team selecting a reasoning architecture for a production agent?
| Function | Activity | Application to Reasoning Architecture Selection |
|---|---|---|
| Govern | ||
| Map | ||
| Measure | ||
| Manage |
-
The NIST AI RMF is a voluntary framework, while the EU AI Act is binding regulation for EU-market deployments. In what ways do the two frameworks complement each other? Where do they potentially diverge?
-
The safety/risk dimension of the six-dimension trade-off model asks practitioners to assess AI risk before selecting an architecture. How does the NIST AI RMF's "Map" function operationalize this assessment? What specific risk categories does it identify that are relevant to reasoning architecture selection?
S1. A healthcare startup wants to build an AI agent to assist clinicians in reviewing patient records and suggesting differential diagnoses. Using the six-dimension trade-off framework, assess which reasoning architecture is most appropriate. Your assessment must address all six dimensions and reference both the EU AI Act Article 13 and the NIST AI RMF in your analysis.
S2. The lesson states that "LATS represents the frontier of what is possible when cost and latency constraints permit." Identify a real or plausible deployment context where LATS's higher cost is justified by the six-dimension framework — that is, where the other five dimensions all favor LATS over ReAct. What would have to be true about the task, the accuracy requirements, the interpretability requirement, and the regulatory context?
S3. Module 2 architecture justification in your Project Proposal requires evidence-based justification across all six dimensions. Practice by writing a two-paragraph justification for a customer service agent that handles refund requests. Paragraph 1: state which architecture you select and why each of the six dimensions supports or constrains your choice. Paragraph 2: identify the single dimension that most constrained your selection and explain what you would do differently if that constraint were relaxed.
Instructions: Select the single best answer for each question. The answer key with instructor feedback follows immediately after the quiz.
Question 1. Chain-of-thought prompting improves LLM performance on complex tasks by:
- A. Fine-tuning the model on domain-specific datasets before inference
- B. Providing intermediate reasoning steps as part of the few-shot prompt, guiding the model to produce its own step-by-step reasoning
- C. Increasing the number of tokens in the model's context window through architectural modification
- D. Replacing parametric knowledge with retrieved external documents at inference time
Question 2. Wei et al. (2022) describe chain-of-thought reasoning as an "emergent" capability. What does this mean in practice for a team selecting a model for a CoT-based agent?
- A. CoT improves performance on all models proportionally — larger models benefit slightly more than smaller ones
- B. CoT degrades performance on small models and should only be used with models above approximately 100 billion parameters
- C. CoT produces a qualitative performance jump only above a scale threshold; below that threshold, adding reasoning steps provides no benefit or may hurt performance
- D. CoT is only emergent in transformer architectures; recurrent neural networks do not exhibit this property
Question 3. In the ReAct framework, what is the function of the Observation phase?
- A. The model generates a hypothesis about what tool to call in the next step
- B. The output of a tool call is returned to the model as new context, enabling the model to update its reasoning based on real-world information
- C. The model produces its final answer and terminates the reasoning loop
- D. The system prompt is updated with the results of the previous reasoning step
Question 4. A developer needs to build an agent that must solve a complex multi-step planning problem where early wrong decisions are very costly to recover from, and where multiple solution paths must be explored before committing. Which reasoning paradigm is most appropriate?
- A. Chain-of-Thought — sufficient for complex multi-step reasoning without external tools
- B. ReAct — the Thought/Action/Observation cycle handles multi-step planning efficiently
- C. Tree of Thoughts — supports branching exploration of multiple paths with backtracking, suited for problems with large state spaces and costly early commitment
- D. LATS — always the correct choice for any planning problem regardless of cost constraints
Question 5. LATS (Zhou et al., 2023) is described as integrating three elements from prior paradigms. Which combination correctly identifies those three elements?
- A. CoT reasoning + retrieval augmentation + fine-tuning
- B. Deliberate tree search (ToT) + grounded tool use (ReAct) + reinforcement learning-inspired self-reflection
- C. Sparse retrieval + dense retrieval + neural re-ranking
- D. System prompt engineering + tool description design + output format constraints
Question 1 — Correct Answer: B
Chain-of-thought prompting adds intermediate reasoning steps to few-shot exemplars, prompting the model to produce its own step-by-step reasoning trace before arriving at an answer.
Feedback for incorrect choices:
- A (Fine-tuning): CoT is a prompting technique applied at inference time — it requires no fine-tuning and does not modify model weights. Fine-tuning is a separate training procedure.
- C (Context window architecture): CoT does not modify the model's architecture or context window size. It uses the existing context window to inject reasoning steps as text.
- D (Retrieved documents): Replacing parametric knowledge with retrieved documents describes Retrieval-Augmented Generation (RAG) or ReAct, not CoT. CoT operates entirely within the model's internal parametric knowledge.
Question 2 — Correct Answer: C
Wei et al. report that CoT benefit is absent in smaller models and appears only above a scale threshold, representing a qualitative capability transition rather than a continuous improvement.
Feedback for incorrect choices:
- A (Proportional improvement): The paper's key finding is that CoT improvement is not proportional — it is absent below a certain scale. A team selecting a model for CoT must verify that the chosen model is above the threshold where emergence occurs.
- B (100 billion parameter threshold): While Wei et al. identify a scale threshold, stating a precise cutoff of 100B parameters oversimplifies the finding. The threshold varies by task type. More importantly, the key implication is qualitative (present vs. absent), not a linear relationship.
- D (Architecture type): Wei et al.'s emergent CoT finding is specific to large-scale models; the paper does not make cross-architecture comparisons involving RNNs. This is outside the scope of the assigned reading.
Question 3 — Correct Answer: B
In the ReAct loop, the Observation phase feeds the output of a tool call back into the model's context, allowing the model to update its reasoning with real-world information before generating the next Thought.
Feedback for incorrect choices:
- A (Hypothesis generation): Generating a hypothesis about the next step is the function of the Thought phase, not the Observation phase. The Thought phase produces internal reasoning; the Act phase specifies the tool call; the Observation phase receives the result.
- C (Final answer): Producing a Final Answer is the terminal condition that ends the ReAct loop — this occurs in a Thought step that concludes with the model deciding it has enough information, not in the Observation phase.
- D (System prompt update): The system prompt is a fixed input set before the ReAct loop begins. It is not updated dynamically during the loop. Observations are appended to the running conversation context, not to the system prompt.
Question 4 — Correct Answer: C
Tree of Thoughts is designed for problems with large state spaces, multiple possible solution paths, and costly early commitment — it explicitly supports branching, evaluation of intermediate states, and backtracking.
Feedback for incorrect choices:
- A (CoT): CoT produces a single linear reasoning chain and cannot explore multiple paths or backtrack. It is well-suited for well-defined problems where step-by-step reasoning is sufficient, not for planning problems with many possible paths.
- B (ReAct): ReAct's Thought/Action/Observation cycle is also linear — it commits to one path and cannot backtrack from dead ends. The lesson explicitly identifies this as the fundamental limitation that ToT was designed to address.
- D (LATS always best): LATS is the most powerful paradigm but incurs the highest computational cost. The lesson explicitly states that LATS is justified only when cost and latency are not primary constraints. Defaulting to LATS for every planning problem is poor architectural practice.
Question 5 — Correct Answer: B
LATS integrates: (1) deliberate tree search over reasoning paths from ToT, (2) grounded tool use from ReAct, and (3) a reinforcement learning-inspired self-reflection mechanism that evaluates node quality based on real-world action outcomes.
Feedback for incorrect choices:
- A (CoT + RAG + fine-tuning): This conflates LATS with retrieval-augmented generation and training techniques. LATS builds on ToT and ReAct architecturally; it does not require fine-tuning, and RAG is a separate retrieval mechanism.
- C (Retrieval methods): Sparse retrieval, dense retrieval, and re-ranking are components of RAG pipeline design (Module 3), not of LATS. LATS is a reasoning architecture, not a retrieval architecture.
- D (Prompt engineering dimensions): System prompt engineering, tool description design, and output format constraints are the four dimensions of prompt engineering for behavioral control covered in Chapter 4. They are orthogonal to the LATS framework.
Instructions: Select the single best answer for each question. The answer key with instructor feedback follows immediately after the quiz.
Question 1. In create_agent, what is the primary mechanism by which the agent selects which tool to call during a reasoning step?
- A. The agent queries a lookup table mapping user intents to tool names
- B. Tool descriptions embedded in each
BaseToolobject are used at inference time to match the current reasoning step to the most appropriate tool - C. The
system_promptparameter enumerates all available tools and the order in which they should be called - D. The
response_formatparameter specifies which tool to use for each type of query
Question 2. A developer builds a tool that accepts a database query as a plain text string but does not specify the expected SQL dialect, maximum query length, or what the return format looks like. According to the Chapter 2 lesson, what is the most likely failure mode?
- A. The agent will refuse to call the tool because the description is incomplete
- B. The agent will select the wrong tool because the description is ambiguous
- C. The agent may hallucinate argument values (e.g., invalid SQL syntax or unsupported clauses) because argument ambiguity produces fabricated inputs
- D. The
create_agentfactory will throw an error at initialization because required fields are missing
Question 3. The middleware parameter in create_agent is described as enabling "observability, tracing, and logging." Which statement best characterizes how middleware achieves this?
- A. Middleware modifies the agent's reasoning logic to insert logging instructions at each step
- B. Middleware intercepts each reasoning step without modifying agent behavior, enabling production monitoring
- C. Middleware replaces the system prompt with a logging-aware version at the start of each session
- D. Middleware buffers all tool calls and executes them in batch at the end of the reasoning loop
Question 4. A production agent's tool set includes a web search tool, a Python REPL, and an email tool. A user asks: "Search for the current price of AAPL stock and email it to my manager." Which statement best describes the professional standard for specifying the email tool in this context?
- A. The email tool description needs only to specify the recipient format; the agent will infer the subject line and body content
- B. The email tool should explicitly state when it is NOT appropriate to send an email (e.g., when the retrieved data is unverified or the user has not confirmed the content), in addition to its required arguments and output format
- C. The email tool description is unnecessary because the agent's reasoning capability is sufficient to determine how to use any communication tool
- D. The system prompt alone is sufficient to constrain email sending behavior; individual tool descriptions should focus only on technical specifications
Question 5. create_agent replaces the legacy AgentExecutor class with a LangGraph-backed execution graph. What specific capability does this architectural change provide that AgentExecutor did not offer?
- A. Support for more than three tools in the agent's tool registry
- B. The ability to use OpenAI models as the agent backbone
- C. Inherent compatibility with checkpointing, streaming, and multi-agent orchestration through LangGraph's stateful execution graph
- D. The ability to run the agent without a system prompt
Question 1 — Correct Answer: B
Tool descriptions embedded within BaseTool objects serve as the primary signal for tool selection at inference time. The agent's reasoning step generates a Thought that includes intent, and the LLM selects the tool whose description best matches that intent.
Feedback for incorrect choices:
-
A (Lookup table): There is no intent-to-tool lookup table in
create_agent. Tool selection is driven by the LLM's inference over tool descriptions at each reasoning step — it is a language understanding problem, not a rule-based lookup. -
C (System prompt enumerates tools): The system prompt provides persistent behavioral instructions such as role definition and output format constraints. While it may reference tools, it is not the mechanism for tool selection. Tool descriptions embedded in
BaseToolobjects are what the agent uses to select tools during reasoning. -
D (response_format specifies tool):
response_formatconstrains the structure of the agent's final output. It does not determine which tools are called during the intermediate reasoning steps.
Question 2 — Correct Answer: C
The lesson explicitly states: "Ambiguous argument specifications produce hallucinated values, especially for structured data types." When the tool description does not specify what arguments are valid, the LLM generates plausible-sounding but potentially invalid inputs rather than producing an error.
Feedback for incorrect choices:
- A (Agent refuses to call tool): LLMs do not refuse to call tools due to incomplete descriptions — they attempt to call tools based on whatever information is available. The absence of specification leads to fabricated arguments, not to abstention.
- B (Wrong tool selected): Tool selection errors occur when the description poorly captures what the tool does or when. The failure described here results in incorrect arguments, not incorrect tool selection.
-
D (Factory error at initialization):
create_agentdoes not validate tool description completeness at initialization. Missing specifications produce runtime failures or silent incorrect behavior, not initialization errors.
Question 3 — Correct Answer: B
Middleware intercepts each reasoning step between the agent's logic and the execution environment, enabling logging, tracing, and monitoring without altering the agent's decision-making process.
Feedback for incorrect choices:
- A (Modifies reasoning logic): This is the defining property middleware does NOT have. Middleware is explicitly described as intercepting steps "without modifying agent logic." Any instrumentation that modifies agent reasoning would be an architectural change, not middleware.
- C (Replaces system prompt): The system prompt is a fixed behavioral specification set at initialization. Middleware does not modify it. These are two independent architectural components — system prompt specifies behavior, middleware observes it.
- D (Batch execution at loop end): Middleware does not buffer tool calls. Each tool call is executed in real time as the ReAct loop iterates. Batching tool calls would fundamentally change the loop's reasoning behavior, which is the opposite of what middleware is designed to do.
Question 4 — Correct Answer: B
Professional tool description design requires specifying when a tool should NOT be used — in this case, preventing the agent from sending an email with unverified data or without user confirmation. This negative specification, alongside required argument descriptions and output format, represents the standard described in the lesson.
Feedback for incorrect choices:
- A (Agent infers body content): Allowing the agent to infer email subject and body without specification introduces unpredictable behavior. Unspecified outputs become agent-generated content, which may be incorrect or inappropriate.
- C (Tool description unnecessary): This option directly contradicts the chapter's core argument. Tool descriptions are the contract between agent and tool; they are not optional. The lesson explicitly states that "undocumented errors produce agents that silently misinterpret failure states."
- D (System prompt alone sufficient): While the system prompt can establish high-level behavioral constraints, it cannot substitute for tool-level specifications. A general instruction in the system prompt is less precise than tool-level negative specification of appropriate use conditions.
Question 5 — Correct Answer: C
The LangGraph-backed execution graph provides state management, checkpointing (saving execution state for resumption), streaming (emitting intermediate outputs in real time), and compatibility with multi-agent orchestration — capabilities that the legacy AgentExecutor lacked.
Feedback for incorrect choices:
-
A (More than three tools):
AgentExecutoralso supported multiple tools — this is not the distinguishing capability. Thecreate_agenttool registry can hold as many tools as needed in both architectures. -
B (OpenAI model support):
AgentExecutoralso supported OpenAI models as backends. LLM backbone compatibility is not the architectural change introduced bycreate_agent's LangGraph integration. -
D (No system prompt required): The ability to run without a system prompt is not specific to the LangGraph transition. Both
AgentExecutorandcreate_agentsupport optional system prompts. The architectural advantage of LangGraph is stateful execution and orchestration compatibility.
Instructions: Select the single best answer for each question. The answer key with instructor feedback follows immediately after the quiz.
Question 1. A reasoning trace shows that an agent called a web search tool to perform arithmetic, retrieved a web page about mathematical methods, and produced an incorrect numerical answer. Which failure class best describes this trace?
- A. Faulty reasoning — the Thought step contained a logical error in the arithmetic
- B. Incorrect tool selection — the agent used a web search tool for a task requiring a calculator or code execution tool
- C. Observation misinterpretation — the agent correctly selected the tool but misread the retrieved result
- D. Malformed tool call — the agent submitted an incorrectly formatted arithmetic query to the search tool
Question 2. In a reasoning trace, Observation 3 returns a valid JSON object with a "price" field containing the correct value. Thought 4 states: "The tool returned an error — no price data is available." What failure class does this represent?
- A. Malformed tool call — the tool call in Act 3 was incorrectly specified
- B. Faulty reasoning — Thought 4 contains an incorrect premise about the state of the world
- C. Observation misinterpretation — the agent correctly retrieved data but generated an incorrect interpretation in the subsequent Thought step
- D. Incorrect tool selection — the tool was not appropriate for retrieving price data
Question 3. An agent is asked to compose and send an email with a summary of retrieved data. The trace shows: Thought 5 correctly identifies the email tool as appropriate; Act 5 calls email_tool(to="manager", subject="Summary", body=<correctly drafted content>); Observation 5 returns: {"status": "error", "code": 403, "message": "Sender not authorized"}. Thought 6 states: "Email sent successfully." Which failure class does Thought 6 represent?
- A. Incorrect tool selection — the email tool was not appropriate for this task
- B. Malformed tool call — the arguments to the email tool were incorrectly specified
- C. Observation misinterpretation — the agent received a clear error status but interpreted it as a success
- D. Faulty reasoning — the agent's logic for composing the email was incorrect
Question 4. A developer reviews a trace in which the agent calls the same web search tool four consecutive times with minor variations of the same query, producing similar observations each time, and ultimately submits an incomplete answer. Which failure class is most likely, and what is the most direct fix?
- A. Faulty reasoning — the model should be replaced with a larger one capable of better reasoning
- B. Observation misinterpretation — the agent misread the search results on all four occasions
- C. Loop failure — the agent failed to make progress and did not recognize a stopping condition; the fix is to add a max-iteration limit or improve the agent's self-assessment logic in the Thought steps
- D. Incorrect tool selection — the agent should have used a different tool from the first step
Question 5. Which statement correctly characterizes the primary professional value of reasoning trace analysis?
- A. Traces allow developers to measure agent token consumption and optimize inference costs
- B. Traces serve as the primary diagnostic artifact for identifying the specific failure class and pipeline component responsible when an agent produces incorrect output, enabling targeted remediation
- C. Traces provide a complete audit log for regulatory compliance with the EU AI Act's Article 13 interpretability requirements
- D. Traces allow end users to verify that the agent did not access unauthorized data sources during task execution
Question 1 — Correct Answer: B
Using a web search tool to perform arithmetic is an incorrect tool selection failure. The web search tool retrieves information from the internet; arithmetic computation should be performed by a Python REPL or calculator tool. The error is at the Act step (wrong tool called), not in the Thought's logical reasoning or in the tool's output.
Feedback for incorrect choices:
- A (Faulty reasoning): Faulty reasoning would occur if the Thought step contained an incorrect logical inference — for example, a wrong mathematical formula. If the agent correctly identified that arithmetic was needed but chose the wrong tool to execute it, the root cause is tool selection, not reasoning logic.
- C (Observation misinterpretation): Observation misinterpretation requires a correct tool call that returns valid data, which the agent then misreads. In this scenario, the web search tool was the wrong tool entirely — retrieving web content about mathematical methods is the expected output of a web search tool; using it for arithmetic is a selection error.
- D (Malformed tool call): A malformed tool call involves the right tool called with incorrect arguments. This scenario describes the wrong tool being selected, which is distinct from calling the right tool incorrectly.
Question 2 — Correct Answer: C
The Observation correctly contains the price data; the failure occurs in the subsequent Thought step, where the agent generates an incorrect description of what the Observation contained. This is observation misinterpretation: the tool performed correctly, but the agent's reading of its output was wrong.
Feedback for incorrect choices:
- A (Malformed tool call): A malformed tool call error would appear at the Act step — the tool would either fail to execute or return an error. In this trace, the tool executed correctly and returned valid JSON. The error occurs only in Thought 4's interpretation.
- B (Faulty reasoning): Faulty reasoning involves an incorrect logical inference. Thought 4 does not make a logical error — it makes a factual error about what the Observation contained. The distinction matters for remediation: faulty reasoning suggests a prompt or model issue; observation misinterpretation suggests the tool output format may need clearer documentation.
- D (Incorrect tool selection): Incorrect tool selection would mean the wrong tool was called. The scenario specifies that the tool returned valid price data — it was the right tool, correctly selected and correctly executed. The failure is entirely in the interpretation step.
Question 3 — Correct Answer: C
The tool returned an explicit error status (403, "Sender not authorized"). Thought 6's claim that the email was "sent successfully" directly contradicts the Observation. This is a clear case of observation misinterpretation — the agent failed to parse the error status correctly.
Feedback for incorrect choices:
- A (Incorrect tool selection): The trace shows the agent correctly identified the email tool as appropriate (Thought 5) and called it with correctly formatted arguments. The tool is the right tool; the problem is not selection.
- B (Malformed tool call): A malformed tool call would result in an argument-level error (e.g., invalid recipient format, missing required field). The error here is a 403 authorization error — the tool call was well-formed but the agent lacked permission. The fix is not to respecify arguments but to handle authorization errors in the tool description's error documentation.
- D (Faulty reasoning): Thought 5 shows correct reasoning (correctly identifying the email tool). Thought 6's error is not a logical inference problem — the agent's logic would be sound if the email had actually been sent. The error is factual: misreading the Observation's status field.
Question 4 — Correct Answer: C
Repeating the same (or near-identical) tool call without making progress and ultimately producing an incomplete answer is the definition of a loop failure. The agent failed to recognize a stopping condition or to update its strategy based on prior observations. Adding a max-iteration limit prevents indefinite loops; improving self-assessment logic addresses the root cause.
Feedback for incorrect choices:
- A (Model replacement): Model replacement is rarely the most targeted fix for a loop failure. Loop failures often stem from missing stopping conditions or insufficient self-assessment prompting, both of which can be addressed through prompt engineering or system design before resorting to model change.
- B (Observation misinterpretation): Observation misinterpretation would involve the agent reading the search results incorrectly. In this scenario, the problem is that the agent continues searching without making progress — it is not misinterpreting results but failing to recognize when to stop or change strategy.
- D (Incorrect tool selection from the first step): If the tool were wrong from the start, the first observation would have been clearly unhelpful. The trace shows the agent making four attempts with the same tool — this suggests the tool is plausibly relevant but the agent is stuck, which is a loop failure rather than an initial selection error.
Question 5 — Correct Answer: B
The primary professional value of trace analysis is diagnostic: it is the method by which practitioners identify which failure class occurred, where in the pipeline it occurred, and what targeted change would fix it. This is the core competency Chapter 3 develops.
Feedback for incorrect choices:
- A (Token consumption optimization): Token consumption is visible in traces but measuring it is not the primary diagnostic purpose. Token optimization is an engineering concern; trace analysis as taught in Chapter 3 is a debugging and quality assurance competency.
- C (EU AI Act compliance): While reasoning traces can support interpretability requirements under Article 13 of the EU AI Act, this is a secondary application. The primary professional value described in the lesson is diagnostic — understanding and fixing agent failures. Article 13 compliance is covered in depth in Chapter 5.
- D (User data access verification): Traces record reasoning steps and tool calls; whether they reveal unauthorized data access depends on what the tools log. Data access security is a system design and auditing concern, not the primary purpose of reasoning trace analysis as introduced in Chapter 3.
Instructions: Select the single best answer for each question. The answer key with instructor feedback follows immediately after the quiz.
Question 1. According to Chapter 4, what is the primary distinction between prompt engineering for chatbots and prompt engineering for agents?
- A. Agent prompt engineering requires knowledge of Python, while chatbot prompt engineering is accessible to non-programmers
- B. Agent prompt engineering is a design discipline for specifying behavior across four independently configurable dimensions; chatbot prompting is primarily focused on improving response quality through better phrasing
- C. Agent prompt engineering replaces tool descriptions with system instructions, consolidating behavioral control into a single location
- D. Chatbot prompting and agent prompt engineering are equivalent; the lesson uses different terminology for the same underlying practice
Question 2. A developer discovers that their financial analysis agent occasionally recommends specific investment products, which violates the intended scope of the agent. The developer responds by adding "do not recommend specific investment products" to the system prompt. According to the lesson's architectural principle, what is problematic about this approach?
- A. System prompt modifications require redeployment of the entire agent, making them too costly for behavioral fixes
- B. This is a patch — adding isolated constraint sentences accumulates constraints that may interact unpredictably and does not address the root cause in the agent's role specification
- C. The system prompt cannot override the agent's LLM backbone's tendencies; only fine-tuning can prevent investment recommendations
- D. This instruction belongs in the output format constraint dimension, not the system instructions dimension
Question 3. Which of the four behavioral control dimensions is most directly responsible for ensuring that an agent uses a specific reasoning pattern — for example, always retrieving evidence before forming a conclusion?
- A. System instructions — specify the reasoning pattern as an explicit behavioral rule
- B. Output format constraints — require the output to include an "evidence" field before a "conclusion" field
- C. Few-shot chain-of-thought scaffolds — provide example traces demonstrating the desired retrieve-then-reason pattern, which the agent uses as a template for its own reasoning
- D. Tool descriptions — specify that the retrieval tool must be called before the synthesis tool
Question 4. A developer notices that when the response_format parameter is set to a Pydantic model in create_agent, the agent consistently returns correctly structured output. However, when the same format is specified only in the system prompt as "always respond in JSON with the following fields," output format compliance is inconsistent. What best explains this difference?
- A. Pydantic models are only compatible with certain LLM backends; the inconsistency reflects a model compatibility issue
- B.
response_formatenforces output structure at the parser level, providing a hard constraint that the output parser validates and rejects if violated; system prompt instructions are soft constraints that the LLM follows probabilistically - C. The system prompt instruction is processed after the tool calls, while
response_formatis applied before tool calls, creating a timing difference - D. Pydantic models compress the JSON schema, reducing token count and improving LLM compliance with the format
Question 5. The Module 2 hands-on project requires documenting "three specific behavioral constraints and the prompting mechanism used to enforce each." A student writes: "Constraint 1 — The agent will only use verified data sources. Mechanism — System prompt." Which follow-up question should the student answer to demonstrate understanding of the architectural principle?
- A. How many tokens does the system prompt instruction add to the context window?
- B. What is the
system_promptparameter's data type increate_agent? - C. How was this constraint tested systematically before deployment, and what logging mechanism detects violations in production?
- D. Can this constraint be implemented in the
response_formatparameter instead?
Question 1 — Correct Answer: B
The lesson explicitly frames agent prompt engineering as a four-dimensional design discipline (system instructions, tool descriptions, few-shot scaffolds, output format constraints) rather than a craft of "writing better prompts." Each dimension is independently configurable and contributes independently to agent reliability.
Feedback for incorrect choices:
- A (Python requirement): Technical implementation skill is not the distinction the lesson draws. The lesson contrasts the scope and purpose of prompt engineering in agent contexts versus chatbot contexts — not the skill set required to execute it.
- C (Tool descriptions replaced by system instructions): This directly contradicts the lesson. Tool descriptions remain an independent behavioral control dimension in agent prompt engineering — they are not subsumed by system instructions. Each dimension controls different behavioral aspects.
- D (Equivalent practices): The lesson explicitly distinguishes agent prompt engineering from chatbot prompting in terms of scope, purpose, and professional discipline. Treating them as equivalent misses the chapter's central argument.
Question 2 — Correct Answer: B
Adding isolated constraint sentences to the system prompt is the "patch" approach the lesson warns against. Patches accumulate over time, creating constraints that may interact unpredictably. The architectural approach is to define the agent's role and behavioral boundaries comprehensively at design time.
Feedback for incorrect choices:
- A (Redeployment cost): The lesson does not cite redeployment cost as the problem with the patch approach. The problem is architectural — accumulated constraints interact unpredictably — not operational cost.
- C (Fine-tuning required): This overstates the limitation. System prompt instructions do constrain agent behavior effectively when they are part of a coherent behavioral architecture. The lesson's point is that ad hoc additions to the system prompt are fragile — not that system prompts cannot control behavior at all.
- D (Wrong dimension): The investment recommendation constraint belongs in the system instructions dimension (role definition and scope constraints). Output format constraints govern response structure, not the content of what the agent may recommend.
Question 3 — Correct Answer: C
Few-shot chain-of-thought scaffolds directly specify reasoning patterns by providing example traces. When an agent is shown an example trace that retrieves evidence before forming a conclusion, it uses that trace as a template and reproduces the pattern in its own reasoning. The lesson identifies scaffolds as the mechanism for specifying "what patterns of reasoning the agent should follow."
Feedback for incorrect choices:
- A (System instructions): System instructions can describe a reasoning pattern ("always retrieve evidence before forming conclusions"), but they specify it as a rule rather than demonstrating it. The lesson assigns few-shot CoT scaffolds as the dimension for reasoning pattern specification because they provide the model with a worked example, which is more effective than rule statements alone.
- B (Output format constraints): Requiring an "evidence" field before a "conclusion" field constrains the output structure, not the reasoning process that produces the output. An agent could still form its conclusion first and then populate the evidence field retroactively.
- D (Tool descriptions): Tool descriptions specify when and how individual tools should be used. They do not specify the sequence or pattern of reasoning across multiple tools.
Question 4 — Correct Answer: B
response_format enforces output structure at the parser level — the output parser validates the agent's response against the Pydantic schema and rejects it if it does not conform. This is a hard constraint. System prompt format instructions are soft constraints: the LLM will follow them probabilistically, but compliance is not guaranteed and degrades in longer, more complex contexts.
Feedback for incorrect choices:
-
A (Backend compatibility): Pydantic model compatibility is not the explanation for the behavioral difference. Both
response_formatand system prompt instructions work with standard LLM backends. The difference is enforcement mechanism (parser-level vs. probabilistic). -
C (Timing difference):
response_formatis applied at the output of the final generation step. The relevant difference is enforcement strength, not timing relative to tool calls. - D (Token compression): Pydantic models define the output schema; they do not compress the JSON or reduce token count. The compliance difference is entirely attributable to hard vs. soft constraint enforcement.
Question 5 — Correct Answer: C
The lesson states: "define behavioral boundaries clearly at design time, test them systematically before deployment, and instrument the agent to detect and log behavioral violations in production." A constraint documentation that identifies the mechanism but does not address testing and monitoring is incomplete from an architectural standpoint.
Feedback for incorrect choices:
- A (Token count): Token count is an engineering optimization concern, not a test of architectural understanding. Knowing how many tokens the instruction adds does not demonstrate that the student understands how to validate that the constraint works or detect when it fails.
-
B (Parameter data type): Knowing the data type of
system_promptis a technical implementation detail. It does not demonstrate understanding of the behavioral control architecture or the principle that behavioral boundaries must be tested and monitored. - D (response_format alternative): Whether the constraint could be implemented differently is a valid design question, but it is secondary to the more fundamental question of whether the implemented constraint has been tested and instrumented.
Instructions: Select the single best answer for each question. The answer key with instructor feedback follows immediately after the quiz.
Question 1. The Chapter 5 six-dimension trade-off framework characterizes architectural selection as a "multi-objective optimization problem." What does this mean for a practitioner choosing between ReAct and ToT?
- A. The practitioner should always select the architecture that maximizes accuracy, since accuracy is the primary objective in professional AI deployment
- B. The practitioner must evaluate trade-offs across all six dimensions simultaneously — optimizing for one dimension (e.g., accuracy) may require accepting worse performance on another (e.g., cost or interpretability)
- C. Multi-objective optimization requires running both architectures in parallel and selecting the one with the better aggregate score
- D. The six dimensions are weighted equally, so the architecture that scores highest on average across all six is always the correct choice
Question 2. The EU AI Act's Article 13 requires that high-risk AI systems be "sufficiently transparent" to enable operators to understand and interpret the system's outputs. A team is deploying a legal document review agent. Which architectural choice most directly supports Article 13 compliance?
- A. LATS, because its branching search produces the most accurate results in legal document analysis
- B. ReAct, because its linear Thought/Action/Observation trace is more auditable than LATS's branching trace, making it easier for operators to understand and interpret each reasoning step
- C. CoT, because it produces no tool calls and therefore has no external data sources that would require disclosure
- D. Tree of Thoughts, because its evaluation of multiple reasoning paths ensures higher accuracy for legal reasoning tasks
Question 3. The lesson states that a LATS agent in a high-risk domain "may face regulatory scrutiny that a ReAct agent would not, precisely because the branching trace is harder to audit." What specific property of the LATS trace creates this auditing challenge?
- A. LATS traces are encrypted by default for security, preventing auditors from reading the reasoning steps
- B. LATS generates and evaluates multiple branching reasoning paths with action-observation pairs at each node; auditing requires reviewing all explored branches, not just the final path chosen
- C. LATS traces are stored in a proprietary format that regulatory agencies cannot currently parse
- D. LATS requires more LLM calls, producing a longer trace than ReAct that takes more time to review but is not substantively harder to audit
Question 4. The NIST AI Risk Management Framework (AI RMF 1.0) defines four core functions: Govern, Map, Measure, and Manage. Which function most directly corresponds to the activity of "selecting a reasoning architecture based on explicit evaluation of risk across the six dimensions"?
- A. Govern — establishes the organizational policies under which AI risk decisions are made
- B. Map — identifies and classifies AI risks in the context of the specific deployment, which provides the risk evidence that informs architecture selection
- C. Measure — quantifies AI risks using defined metrics, producing the data that confirms the selected architecture meets risk thresholds
- D. Manage — implements risk mitigation controls, of which architecture selection is one example
Question 5. A team is building an e-commerce product recommendation agent with the following constraints: (a) response time must be under 500ms, (b) accuracy requirements are moderate — imprecise recommendations reduce user satisfaction but carry no safety risk, (c) interpretability is not a regulatory requirement, and (d) the task involves retrieving live inventory data. Applying the six-dimension framework, which architecture is most appropriate?
- A. LATS — maximizes accuracy and handles complex product relationships better than simpler paradigms
- B. Tree of Thoughts — explores multiple recommendation paths to select the best option
- C. ReAct — meets the latency constraint, supports live tool use for inventory retrieval, satisfies moderate accuracy requirements at reasonable cost, and requires no regulatory interpretability compliance
- D. Chain-of-Thought — produces the most interpretable traces, which would be useful if the team later needs to explain its recommendations
Question 1 — Correct Answer: B
Multi-objective optimization means that no single dimension dominates all others, and improving performance on one dimension typically requires accepting trade-offs on others. The practitioner must explicitly evaluate all six dimensions and make a context-appropriate choice, not simply optimize for the highest score on the most salient dimension.
Feedback for incorrect choices:
- A (Accuracy always primary): Accuracy is one of six dimensions in the framework. In some deployment contexts — those with tight latency constraints, regulatory interpretability requirements, or limited computational budgets — accuracy may not be the dominant selection criterion. A framework that always maximizes one dimension is not multi-objective.
- C (Parallel deployment): The lesson describes the six-dimension framework as a selection tool — it guides the choice of architecture before deployment, not a post-hoc comparison. Running both architectures in parallel and selecting the winner is an empirical approach distinct from the framework-based assessment the lesson introduces.
- D (Equal-weight average): The lesson does not assign equal weights to all six dimensions. The framework is context-sensitive — different deployment contexts make different dimensions dominant. A healthcare deployment heavily weights safety/risk; a real-time consumer product heavily weights latency.
Question 2 — Correct Answer: B
ReAct's linear Thought/Action/Observation trace is more auditable than LATS's branching structure because operators and auditors can follow a single, sequential reasoning chain to understand how each step led to the next. Article 13 requires that operators can understand and interpret the system's outputs — linear traces more readily satisfy this requirement in legal document analysis.
Feedback for incorrect choices:
- A (LATS for accuracy): LATS may produce more accurate results, but Article 13 imposes an interpretability constraint that is legally binding for high-risk systems. In a high-risk legal context, a more accurate but less auditable architecture may not satisfy regulatory requirements. The lesson explicitly notes this tension.
- C (CoT for minimal disclosure): CoT's lack of tool calls is not a compliance advantage — it is a capability limitation. CoT cannot access live documents, current legal databases, or real-time information, making it insufficient for legal document review. Article 13 compliance is about interpretability of reasoning, not minimizing external data use.
- D (ToT for accuracy): ToT, like LATS, explores branching reasoning paths. Its evaluation of multiple alternatives produces a trace that is harder to audit than ReAct's linear trace, creating the same Article 13 compliance challenge as LATS.
Question 3 — Correct Answer: B
LATS generates multiple reasoning branches, with each branch including action-observation pairs at every node. An auditor reviewing a LATS trace must review not only the final selected path but all explored branches to understand why alternative paths were rejected. This is substantively more complex than auditing a single linear ReAct trace.
Feedback for incorrect choices:
- A (Encrypted by default): LATS traces are not encrypted by default. This is not a documented property of LATS and has no basis in the chapter materials. The auditing challenge is structural — branching complexity — not a security or access issue.
- C (Proprietary format): LATS traces in LangChain implementations are produced in standard formats. The audit challenge is the quantity and complexity of information to review, not a format incompatibility with regulatory tools.
- D (Longer but not harder): This option incorrectly characterizes the challenge as purely one of volume. The difficulty is qualitative: branching traces require understanding why each branch was evaluated, what the node-quality heuristics produced at each step, and how the final path was selected from among alternatives.
Question 4 — Correct Answer: B
The NIST AI RMF's "Map" function involves identifying and categorizing AI risks in the specific organizational and deployment context. Selecting an architecture based on explicit risk evaluation across the six dimensions is a mapping activity — it identifies which risks are present, which dimensions are most sensitive, and which architectural choice best addresses the risk profile.
Feedback for incorrect choices:
- A (Govern): Govern establishes organizational policies, accountabilities, and cultures for AI risk management — the institutional framework within which individual decisions like architecture selection are made. It is a prerequisite for the mapping activity but is not the function that corresponds to the specific activity of architecture selection.
- C (Measure): Measure involves quantifying and analyzing AI risks using defined metrics. This function applies after the architecture has been selected and deployed — it evaluates whether the implemented system meets risk thresholds. Architecture selection precedes measurement.
- D (Manage): Manage implements risk mitigation plans based on measured risks. While architecture selection is a form of risk management, it more precisely fits the Map function's identification and classification activity. Manage typically involves ongoing controls, monitoring, and incident response after deployment.
Question 5 — Correct Answer: C
ReAct satisfies all four stated constraints: (a) its linear loop has lower latency than ToT or LATS; (b) its accuracy is sufficient for moderate-risk recommendation tasks; (c) interpretability is not a regulatory factor in this context; and (d) it supports tool use for live inventory retrieval. The six-dimension framework identifies ReAct as the appropriate choice when cost and latency are binding constraints and accuracy/interpretability requirements are moderate.
Feedback for incorrect choices:
- A (LATS): LATS is ruled out by constraint (a) — its multiple LLM calls per step and branching search structure make it unlikely to meet a 500ms latency requirement. The lesson explicitly notes that LATS is appropriate "when cost and latency constraints permit."
- B (Tree of Thoughts): ToT also incurs higher computational cost than ReAct due to multi-branch generation and evaluation. The lesson identifies four conditions that justify ToT's cost — none of which apply here: the state space for product recommendations is not exceptionally large, backtracking is not necessary, and computational budget is constrained by latency requirements.
- D (Chain-of-Thought): CoT does not support tool use — it operates entirely within the model's parametric knowledge. Constraint (d) requires retrieving live inventory data, which CoT cannot perform. Selecting CoT for its interpretability in a context where the team has no current interpretability requirement and tool use is mandatory misapplies the six-dimension framework.
Created: C. Lizárraga · Updated: M. Yung
2026.
Arizona Institute for Artificial Intelligence (AI2S).
Office of Responsible Artificial Intelligence. The University of Arizona.
AI Automation and Agents (v2)
Table of Contents
📂 Preparing your Portfolio in Github
MODULE 1
- 1.1 Module Overview
-
1.2 Foundational Concepts /
1.2 Addendum - 1.3. Module Activities
- 1.4. Additional Resources
Summary and Key Takeaways:
MODULE 2
- 2.1 Module Overview
-
2.2 Foundational Concepts /
2.2 Addendum - 2.3 Activities
- 2.4 Additional Resources
MODULE 3
- 3.1 Module Overview
-
3.2 Foundational Concepts /
3.2 Addendum - 3.3 Activities
- 3.4 Additional Resources
MODULE 4
MODULE 5