All practice tests

Module 1 practice questions: Agent architecture and orchestration

15 questions · Agentic Architecture & Orchestration

Practice questions written by Sanjay Shah. Not exam questions, not affiliated with or endorsed by Anthropic.

  1. Question 1

    A retail team wants a nightly report. Every night it should read yesterday's sales table, write five fixed sections (top products, returns, regional trends, stock alerts, a short summary), and email the result to managers. The sections never change. What is the best design?

    • A) One agent with SQL, charting and email tools that decides what to include each night.
    • B) A fixed workflow: code runs the queries, one Claude call per section runs in parallel, a final call writes the summary, and code sends the email.
    • C) A coordinator agent that spawns one subagent per section and lets each subagent choose its own queries.
    • D) A single Claude call that receives the raw sales table and writes the whole report, including the email.
    Show answer

    Answer: B

    • A: Wrong: an agent adds cost, variability and risk (it holds an email tool) for a path you can already draw.
    • B: Right: the steps are known in advance and never change, so this is a workflow, not an agent. The sections don't depend on each other, so they can run in parallel. Code does the querying and sending, which is cheaper and easy to test.
    • C: Wrong: subagents choosing their own queries turn a fixed job into an open-ended one. It costs more and its output is less predictable.
    • D: Wrong: one call with the raw table may overflow or dilute the context, and it mixes calculation (better done in SQL) with writing. Giving the model the email step also adds a side effect that code should own.
  2. Question 2

    An engineer's agent loop ends when Claude's reply contains the words "FINAL ANSWER". Sometimes the loop ends early because Claude writes "before I give the FINAL ANSWER, let me check…", and sometimes it never ends. Which two changes should the engineer make? (Choose TWO.)

    • A) End the loop when the response's stop reason is end_turn, and handle every other stop reason as its own case.
    • B) Ask Claude at the end of each turn, "Are you finished? Reply yes or no", and stop on "yes".
    • C) Use a more unusual marker string, such as <<<DONE>>>, and tell Claude to use it only once.
    • D) Add guards for maximum turns, budget and time that stop the loop and report what was done and what wasn't.
    • E) Remove the tools after five turns so Claude is forced to answer.
    Show answer

    Answer: A, D

    • A: Right: the API says when Claude has finished (stop_reason is end_turn), so no text parsing is needed.
    • B: Wrong: it adds a call and relies on the model's text again, the same flaw in another form.
    • C: Wrong: any marker in the text can appear early or not at all; it is still text parsing.
    • D: Right: guards end abnormal runs, and the report keeps a partial result from looking complete.
    • E: Wrong: it forces an answer whether or not the work is done, and reports nothing about what is missing.
  3. Question 3

    A coordinator agent sends a subagent this task: "Verify the customer's claim about the late delivery." The subagent comes back with general advice about delivery policies and no answer. What is the most likely cause, and the fix?

    • A) The subagent has no access to the coordinator's conversation; the brief must carry the goal, the known facts (order ID, dates, the claim), the limits and the return format.
    • B) The subagent's model is too small; switch it to the largest model available.
    • C) The subagent needs a longer system prompt describing the company's delivery process.
    • D) The coordinator should pass its full conversation history to every subagent by default.
    Show answer

    Answer: A

    • A: Right: subagents start with an empty context. "The customer's claim" means nothing to them. A brief with goal, facts, limits and return format fixes it.
    • B: Wrong: no model can verify facts it was never given.
    • C: Wrong: background on delivery processes doesn't tell it *which* order or *what* claim.
    • D: Wrong: passing the whole history defeats a main benefit of subagents (a small, focused context), costs tokens and can confuse the subagent. Pass what it needs, deliberately.
  4. Question 4

    A support agent's system prompt says "Never approve refunds over $300 without a manager." Audits show a few refunds of $400 to $600 went through anyway. What is the best fix?

    • A) Repeat the rule three times in the system prompt and put it in capital letters.
    • B) Add a second Claude call that reads the first call's reasoning and blocks refunds that look too high.
    • C) Put a check in the refund tool's code: above $300, it creates an approval task for a manager and returns "pending approval" to the agent.
    • D) Remove the refund tool and ask customers to email the finance team.
    Show answer

    Answer: C

    • A: Wrong: repetition may reduce failures, but a prompt is still a request, not a control.
    • B: Wrong: a second model call is also probabilistic, and it adds cost and latency without the certainty of a code check.
    • C: Right: money rules belong in code. A check in the tool layer can't be skipped, whatever the model decides, and the agent can still tell the customer honestly that approval is pending.
    • D: Wrong: it fixes the risk by removing the feature. A gate keeps the feature and controls the risk.
  5. Question 5

    In a multi-tenant SaaS product, an agent's tools take a tenant_id input, and Claude fills it from the conversation. What is the main risk, and the best design?

    • A) Token cost; shorten tenant IDs to save tokens.
    • B) A confused or manipulated model can pass another tenant's ID; code should inject the tenant ID from the authenticated session on every tool call, and the tool schema shouldn't expose it.
    • C) Claude may misspell the ID; add an enum of all tenant IDs to the tool schema.
    • D) There is no real risk if the system prompt says "only use the current tenant's ID".
    Show answer

    Answer: B

    • A: Wrong: cost is not the issue; data isolation is.
    • B: Right: tenant identity is a security boundary. Code should set it from the authenticated session, so no model output can change whose data is read.
    • C: Wrong: listing all tenant IDs leaks them, and the model could still pick the wrong one.
    • D: Wrong: a prompt instruction is advice. Prompt injection or simple confusion can break it.
  6. Question 6

    A coordinator runs two subagents in parallel: one finds the customer's latest order, the other checks the shipping status of "the customer's latest order". The shipping subagent often reports the wrong shipment. What is the best fix?

    • A) Give the shipping subagent a better prompt explaining how to find the latest order.
    • B) Run both subagents twice and keep the answers that agree.
    • C) Merge both jobs into the coordinator so no subagents are needed anywhere in the system.
    • D) Run them in sequence: find the order first, then pass its order ID to the shipping subagent.
    Show answer

    Answer: D

    • A: Wrong: it makes the shipping subagent repeat the first subagent's job, with the same chance of picking a different order.
    • B: Wrong: voting doesn't fix a missing input; both runs are guessing.
    • C: Wrong: it overcorrects. The problem is the ordering, not the use of subagents.
    • D: Right: the two tasks aren't independent. The second needs the first one's result. Sequence them and pass the exact order ID.
  7. Question 7

    A vendor-risk coordinator decides at run time how to split each review. For a cloud-hosting vendor it created "financial health" and "contract terms" subagents. The final report said nothing about security, which was the main risk. What design change best prevents this?

    • A) Give the coordinator a list of areas that every review must cover, and require it to state which areas it assigned and which it skipped, with a reason.
    • B) Always spawn twenty subagents so that every possible area is covered.
    • C) Ask the coordinator to think harder before splitting the task.
    • D) Let each subagent spawn further subagents for anything it thinks is missing.
    Show answer

    Answer: A

    • A: Right: a common failure of dynamic decomposition is a split that is too narrow. A coverage list plus "assigned and skipped, with reasons" makes gaps visible and checkable.
    • B: Wrong: it wastes tokens and time, and still doesn't guarantee the right areas.
    • C: Wrong: "think harder" is not a checkable control.
    • D: Wrong: nested spawning without a coverage rule spreads the problem and makes the run harder to trace.
  8. Question 8

    An investigation agent has a limit of 12 turns. When it hits the limit, the code returns whatever Claude last wrote as the final answer, and users treat it as complete. What is the best change?

    • A) Raise the limit to 50 turns so it is hit less often.
    • B) Remove the limit; good agents finish on their own.
    • C) When the limit is hit, stop and return a clear status ("stopped at the turn limit"), what was found so far, and what was not checked.
    • D) When the limit is hit, silently retry the whole investigation from scratch.
    Show answer

    Answer: C

    • A: Wrong: a higher limit hides the problem less often but still presents partial work as complete.
    • B: Wrong: loops without limits can spin and burn budget.
    • C: Right: a guard must stop honestly. The output has to say it is incomplete, what was found, and what wasn't checked, so a person or the coordinator can decide what to do next.
    • D: Wrong: a silent retry doubles the cost and can hit the same limit again, still without telling anyone.
  9. Question 9

    A workflow step asks Claude for a long JSON list. Sometimes the response stops halfway and the JSON parser fails. The response's stop reason in those cases is max_tokens. What is the best interpretation and next step?

    • A) Claude refused the request; rephrase the prompt more politely.
    • B) The output was cut off at the token limit, so it isn't a finished answer; raise the output limit or split the work into smaller requests, and never parse a max_tokens reply as complete.
    • C) The JSON parser is too strict; use a lenient parser that fills in missing brackets.
    • D) The model is overloaded; retry the same request with backoff.
    Show answer

    Answer: B

    • A: Wrong: a refusal has its own stop reason (refusal).
    • B: Right: max_tokens means generation stopped at the output limit. The answer is incomplete. Raise the limit, or split the work so each response fits.
    • C: Wrong: "repairing" cut-off JSON hides missing data.
    • D: Wrong: overload shows up as an error response (HTTP 529), not as a max_tokens stop.
  10. Question 10

    One agent has 18 tools covering accounts, billing, shipping, refunds, knowledge base and email. It often picks the wrong tool, and simple questions take many calls. Which two changes best fix this? (Choose TWO.)

    • A) Add a sentence to the system prompt: "Think carefully about which tool to use."
    • B) Route requests by type first, and give each path or subagent only the few tools it needs.
    • C) Merge all 18 tools into one generic call_api(endpoint, params) tool.
    • D) Keep the design and switch to a model with a larger context window.
    • E) Rewrite overlapping tool descriptions so each says when to use it and names the tool to use instead when it doesn't apply.
    Show answer

    Answer: B, E

    • A: Wrong: it doesn't remove the overlap that causes the confusion.
    • B: Right: fewer, well-separated tools per agent improve choice and shrink the blast radius, and simple questions take a short path.
    • C: Wrong: a generic tool hides intent and makes both choice and safety worse (Module 4).
    • D: Wrong: context size isn't the cause; too many overlapping tools is.
    • E: Right: Claude chooses from descriptions, so "don't use when" lines that name the other tool remove the guesswork.
  11. Question 11

    A claims system asks a human to approve every step the agent takes: each search, each lookup, each draft. Reviewers now approve almost everything within seconds, and a bad payout slipped through. Which two changes best fix the review step? (Choose TWO.)

    • A) Add a second reviewer for every step.
    • B) Remove human review and rely on a stronger prompt.
    • C) Require approval only for costly or irreversible actions, such as payouts, and review a random sample of the rest.
    • D) Show reviewers the full agent transcript for each step, so they have all the detail.
    • E) Give reviewers a clear proposal for each payout (the action, the reason and the sources) with approve or reject.
    Show answer

    Answer: C, E

    • A: Wrong: more rubber stamps don't fix the overload that caused the rubber-stamping.
    • B: Wrong: it removes the control that matters most, on payouts.
    • C: Right: people go where mistakes are costly, and sampling covers the rest without overloading anyone.
    • D: Wrong: transcripts make review slower and worse; reviewers need a decision they can make.
    • E: Right: a proposal with its reason and sources is something a person can actually judge in a minute.
  12. Question 12

    A log-search subagent hit a timeout and returned the text "No matching errors found." The coordinator concluded the outage had no customer impact. What is the best fix?

    • A) Increase the log search timeout and keep the result format.
    • B) Tell the coordinator in its prompt to be sceptical of subagent results.
    • C) Make subagents return a structured result with a status (complete, partial, failed), the error if any, what they tried, and what they couldn't check, and have the coordinator act on the status.
    • D) Have the coordinator re-run every subagent twice and compare the text.
    Show answer

    Answer: C

    • A: Wrong: a longer timeout makes this failure rarer, but the next failure still looks like success.
    • B: Wrong: the coordinator can't tell from free text that the search never ran.
    • C: Right: a timeout is not "no results". A structured status makes the failure visible, and the coordinator can retry, try another route, or report the gap.
    • D: Wrong: re-running doubles the cost and still compares untrustworthy text.
  13. Question 13

    A coding agent spawns a subagent just to read one value from a config file, then waits for the result. This happens dozens of times per task, and tasks are slow and costly. What should the architect recommend?

    • A) Spawn even more subagents in parallel to hide the latency.
    • B) Let the main agent read the file with a direct tool call; use subagents only for work big enough to flood the main context, independent enough to run alone, or needing its own tool set.
    • C) Cache every subagent's full transcript in the main context.
    • D) Replace the config file with a database.
    Show answer

    Answer: B

    • A: Wrong: more subagents add cost and don't remove the per-call overhead.
    • B: Right: subagents have real overhead. For a small read, a direct tool call is faster and cheaper. Use subagents for isolation, parallel independent work or a reduced tool set.
    • C: Wrong: copying transcripts into the main context defeats the point of isolation.
    • D: Wrong: the storage format isn't the problem; the orchestration is.
  14. Question 14

    In a multi-agent design, subagents send messages directly to each other as they work. When something goes wrong, nobody can tell which subagent passed bad data to which, or in what order. What is the best change?

    • A) Give each subagent a longer memory so it remembers the whole exchange.
    • B) Ask each subagent to write a summary of its conversations at the end.
    • C) Replace the subagents with one large agent with all the tools.
    • D) Route all handoffs through the coordinator (hub and spoke), with structured briefs and results that are logged.
    Show answer

    Answer: D

    • A: Wrong: longer memory doesn't create a traceable record of who passed what.
    • B: Wrong: self-written summaries after the fact are unreliable as an audit trail.
    • C: Wrong: it brings back the "one agent with every tool" problem (Q10).
    • D: Right: hub and spoke keeps one place that sees every handoff. Structured, logged briefs and results make failures traceable.
  15. Question 15

    A marketing team built an "evaluate and improve" loop: one call drafts an email, another critiques it, and the draft is revised until the critic is satisfied. Some emails go through 30 rounds, and costs spiked. What is the best fix?

    • A) Give the critic explicit, checkable criteria, stop when all criteria pass, and cap the loop at a small fixed number of rounds with the best draft returned.
    • B) Remove the critic and send the first draft.
    • C) Let the drafting call critique itself in the same response.
    • D) Run the loop on a cheaper model so 30 rounds cost less.
    Show answer

    Answer: A

    • A: Right: evaluate-and-improve works when the criteria are clear and the loop is bounded. Stop as soon as the criteria pass; cap the rounds and return the best draft so far.
    • B: Wrong: it drops a step that can add value, instead of bounding it.
    • C: Wrong: self-critique in the same response is less independent and still has no stop rule.
    • D: Wrong: cheaper rounds are still unbounded rounds. The missing stop condition is the real problem.

↑ ↓ सार्नुहोस् · ↵ छान्नुहोस् · esc बन्द