Practice — Context Management & Reliability
20 questions — none attempted yet.
A long-running coding assistant appends every tool result verbatim to the conversation — full file listings, full build logs — across a session that has now run 40 turns.
What's the primary architectural concern here?
An architect is asked to explain what actually competes for space inside a single API call's context window.
Which of these share the same finite context budget?
A customer-support agent's context balloons because it appends a customer's entire 50-order history to every message, even though only the current order is relevant to the question being asked.
What's the best fix?
A team debates whether "context engineering" is just a rebrand of writing better prompts.
Which best describes context engineering as an architectural discipline?
A long research agent's conversation has grown to 30 turns of intermediate tool calls and results. The team wants to reclaim context budget without losing information the agent still needs.
What's the appropriate compaction strategy?
A team's compaction step summarizes an agent's older turns but drops a constraint the user stated 20 turns earlier ("never contact Vendor X"). Five turns after compaction runs, the agent contacts Vendor X.
What does this failure reveal about the compaction design?
A team treats summarization/compaction and retrieval as interchangeable fixes for a full context window.
What's the actual distinction between the two?
A support assistant needs to answer questions against a 5,000-page policy manual, far larger than any single context window.
What's the right approach?
A retrieval-augmented agent returns the top 20 search results for every query and inserts all of them into context, regardless of how narrow the question is.
What's the issue with this design?
An architect is designing a Q&A agent over product documentation that changes weekly and is far too large for any single context window.
Which design best fits these requirements?
An agent sends the same lengthy system prompt and tool definitions on every call in a long-running session, paying full processing cost for that same prefix each time.
What's the relevant optimization here?
A team enables prompt caching for an agent's system prompt and tool definitions, but inserts a current timestamp at the very beginning of the system prompt on every call.
What's wrong with this setup?
An agent's tool call to a downstream API occasionally fails with a rate-limit (429) response.
What's the appropriate response to this specific failure?
An engineer adds retry-with-backoff to a flaky tool call but sets no maximum retry count, reasoning "it'll eventually succeed."
What's the risk, and what's the fix?
A tool call returns a response that fails schema validation (malformed JSON) roughly 2% of the time due to an upstream bug.
What's the best way to handle this in the agent loop?
An agent occasionally produces a wrong final answer in production, but the team has no record of which tool calls it made, what results it got, or why it stopped when it did.
What's missing here?
A team ships a prompt change to their production agent, relying only on a couple of people's informal spot checks before deploying, with no automated evaluation step.
What's the risk, and the mitigation?
A team says "we already have observability, so we don't need evals" after adding detailed per-run logging to their production agent.
Is this reasoning sound?
An architect is designing a long-running, customer-facing agent expected to run for months in production, handling a high volume of conversations and tool calls.
Which combination best describes a production-reliable design?
A production agent's retrieval step fails to return any documents for a query due to an index outage. The current implementation silently proceeds with an empty context, and the model confidently answers anyway with no real grounding.
What does "degrading gracefully" mean here, and what should happen instead?