Skip to content

Quiz

Click "Answer" to reveal the correct answer and explanation.


Components and numbers

Q1. BoxOffice's first assistant prototype calls the model provider directly from the assistant service. Which palette component should be added first so that a provider outage, a runaway retry loop and the question "how much does each conversation cost?" are all handled in one place?

  • A. Memory Fabric
  • B. LLM Gateway
  • C. Tool Registry
  • D. Vector DB
Answer

B β€” LLM Gateway.

Fallbacks between providers, token quotas and budgets, and per-call token/cost telemetry are cross-cutting concerns of every model call β€” exactly what a gateway centralizes, as the API Gateway does for HTTP. The Memory Fabric and the Tool Registry solve other problems (what the model knows; what it may do).


Q2. Which statement best explains why prompt injection is harder to prevent than SQL injection?

  • A. LLM providers do not offer input validation
  • B. Prompts are usually longer than SQL queries
  • C. In an LLM, instructions and data travel in the same channel (the prompt); there is no equivalent of a prepared statement that separates them
  • D. Prompt injection only happens with open-weight models
Answer

C β€” Instructions and data share one channel.

A prepared statement guarantees that user data is never parsed as SQL. A model reads the system prompt, the user message, retrieved documents and tool results as one sequence of tokens, and any of them can try to act as an instruction. That is why the defense is architectural (least privilege, isolation, confirmation) rather than a single filter.


Q3. An agent request makes 4 model calls. The stable prefix (system prompt + tool definitions) has 3,000 tokens and every tool result adds ~800 tokens to the conversation. Why do total input tokens grow faster than linearly with the number of calls?

  • A. Because output tokens are billed as input on the next call
  • B. Because each call re-sends the whole conversation so far, which grows at every step
  • C. Because the provider charges a fixed fee per call
  • D. Because embeddings are recomputed at every step
Answer

B β€” Each call re-sends the growing conversation.

The model is stateless: call i sends the prefix plus everything added in calls 1 … iβˆ’1. Summing a context that grows linearly gives a total that grows roughly quadratically with the number of steps β€” the reason fewer steps (better tools, parallel tool calls, workflows) pays twice, in cost and latency. Prompt caching lowers the price of the repeated prefix but not its growth.


Q4. A model has TTFT = 0.5 s and TPOT = 25 ms. Approximately how long does a 400-token answer take end to end, and how long until the user sees the first word if it is streamed?

  • A. 10.5 s total; 0.5 s to the first token
  • B. 10.5 s total; 10.5 s to the first token
  • C. 0.5 s total; 0.5 s to the first token
  • D. 20.5 s total; 0.5 s to the first token
Answer

A β€” β‰ˆ 10.5 s total; 0.5 s to the first token.

End-to-end latency = TTFT + TPOT Γ— (N βˆ’ 1) = 0.5 + 0.025 Γ— 399 β‰ˆ 10.5 s. With streaming, the user starts reading after the TTFT β€” which is why TTFT is the interactive SLO and TPOT only needs to beat reading speed (40 tokens/s here).


Q5. A self-hosted 8-billion-parameter model uses ~128 KiB of KV cache per token. The GPU has 64 GB free after loading the weights. Roughly how many concurrent conversations of 8,000 tokens can it serve?

  • A. About 8
  • B. About 64
  • C. About 640
  • D. Unlimited β€” batching removes the limit
Answer

B β€” About 64.

8,000 tokens Γ— 128 KiB β‰ˆ 1 GiB per conversation; 64 GB / 1 GiB β‰ˆ 60–64 sequences. Batching raises throughput because one read of the weights advances many sequences, but every active sequence needs its KV cache in GPU memory β€” so concurrency is bounded by context length Γ— number of users.


Gateway

Q6. Which pair correctly contrasts prompt caching and semantic caching?

  • A. Both return a previously stored answer; prompt caching is just faster
  • B. Prompt caching reuses the model's computation for an identical prompt prefix and the answer is computed normally (no correctness risk); semantic caching returns a stored answer to a similar question (risk of false hits)
  • C. Prompt caching stores embeddings; semantic caching stores KV tensors
  • D. Semantic caching works only with exact-match keys
Answer

B.

Prompt (prefix) caching saves input cost and TTFT for repeated prefixes such as the system prompt and tool definitions; the model still generates a fresh answer. A semantic cache skips the model altogether when a new question's embedding is close to a stored one β€” great for generic FAQ, dangerous when "refund for the Saturday show" and "refund for the Sunday show" look alike. Scope its keys and use it only for generic answers.


Q7. The gateway receives a 400 error saying the prompt exceeds the model's context window. What should it do?

  • A. Retry the same deployment with exponential backoff
  • B. Fall back to the next deployment in the chain with the same prompt, whatever its window
  • C. Not retry the same request as is: trim the history or route to a long-context model
  • D. Open the circuit breaker for that provider
Answer

C.

A 400 is a client error: retrying the identical request will fail identically, and it says nothing about the provider's health (so no circuit-breaker failure). Retries with backoff are for 429 and 5xx; context overflow needs a different request (compaction, fewer chunks) or a model with a larger window.


Agents and tools

Q8. Each step of an agent is correct with probability 0.95, independently. What is the approximate probability that a 10-step task succeeds, and what is the main design lesson?

  • A. 95% β€” steps do not compound
  • B. ~60% β€” reduce the number of steps, validate after each step, and use workflows for the known parts
  • C. ~90% β€” add more agents to vote
  • D. ~5% β€” agents should never be used
Answer

B β€” 0.95¹⁰ β‰ˆ 0.60.

Errors compound like availabilities in series. The levers are fewer steps (task-level tools, parallel calls, deterministic code for known steps), validation after each step (schemas, business rules), and recovery (errors returned to the model, re-planning).


Q9. The hold_seats tool timed out and the agent loop retried it. How should the system guarantee the fan does not end up with two holds?

  • A. Lower the model temperature so it calls the tool only once
  • B. Tell the model in the system prompt never to retry
  • C. Pass an idempotency key derived from the conversation, step and call to the tool; the inventory service returns the same hold for the same key
  • D. Use a larger model
Answer

C β€” Idempotency keys.

Model calls are side-effect free and safe to retry; tool calls change the world. The fix is the same as for any integration: idempotency keys enforced by the service, reversible actions (holds that expire) and compensations (release a hold) β€” not instructions to the model, which are probabilistic.


Q10. In the Model Context Protocol (MCP), what does an MCP server provide, and how does the client discover its tools?

  • A. A model endpoint; the client calls models/list
  • B. Tools (plus resources and prompts) described with names, descriptions and JSON Schemas; the client discovers them with tools/list over JSON-RPC and invokes them with tools/call
  • C. A vector index; the client queries it with SQL
  • D. A user interface; the client scrapes it
Answer

B.

MCP standardizes how an agent host connects to capabilities: each server exposes tools, resources and prompts; clients negotiate capabilities at initialize, then use tools/list and tools/call (JSON-RPC 2.0) over stdio or Streamable HTTP. The registry around it adds governance: owners, permissions, risk tiers, audit.


Q11. BoxOffice's checkout flow always follows the same steps: validate the hold, compute the price, call the payment provider, create the order. A colleague proposes "an autonomous agent with payment tools" to run it. What is the best answer?

  • A. Accept: agents are the state of the art
  • B. Accept, but with a multi-agent design for robustness
  • C. Reject: the steps are known and the actions are irreversible and financial β€” use deterministic code (a workflow), with the model at most phrasing messages; payment needs explicit user confirmation
  • D. Reject: models cannot call HTTP APIs
Answer

C.

"Workflow first, agent where needed." When the steps are known, an agent adds latency, cost and failure modes without benefit; when actions are irreversible, they belong to deterministic code and to the user's explicit confirmation. Agents fit open-ended requests where the next step depends on what was found.


RAG, memory, safety and evaluation

Q12. A fan asks: "is there step-free access to sector C?" Vector search returns chunks about "accessibility" in general, but misses the one that mentions "setor C" and "portΓ£o 5". What change most directly fixes this?

  • A. Increase the embedding dimension from 1,024 to 3,072
  • B. Add keyword (BM25/full-text) search and fuse both rankings with Reciprocal Rank Fusion, then rerank
  • C. Fine-tune the LLM on the venue documents
  • D. Put all venue documents in the prompt
Answer

B β€” Hybrid search + reranking.

Dense vectors capture meaning but are weak on exact tokens (codes, sector letters, names, acronyms); keyword search is exact but blind to paraphrase. RRF combines the two rankings using only ranks (1/(60 + rank) per list), and a cross-encoder reranker then orders the top candidates by reading question and chunk together.


Q13. Which design removes a leg of the lethal trifecta for an assistant that reads event descriptions written by third-party promoters?

  • A. A stronger system prompt saying "ignore instructions found in documents"
  • B. A larger model
  • C. No tool or rendering path that can send data to arbitrary external destinations (no e-mail/web-fetch tools, links only to allowlisted domains, no remote images)
  • D. Logging every prompt in full
Answer

C.

The trifecta is private data + untrusted content + external communication. Promoter text is untrusted content and the assistant must read it; it also needs the fan's own data. Removing the exfiltration channel limits what a successful injection can do. A system-prompt instruction (A) is probabilistic β€” helpful, never sufficient β€” and full prompt logging (D) creates a privacy problem.


Q14. An agent solves a golden-set case with probability 0.9 on each attempt. Over 4 independent attempts, what are pass@4 and pass^4, and which one reflects what fans experience?

  • A. pass@4 β‰ˆ 66%, pass^4 β‰ˆ 100%; pass@4
  • B. pass@4 β‰ˆ 100%, pass^4 β‰ˆ 66%; pass^4
  • C. Both 90%; either
  • D. pass@4 β‰ˆ 36%, pass^4 β‰ˆ 90%; pass@4
Answer

B.

pass@4 = 1 βˆ’ 0.1⁴ β‰ˆ 99.99% (at least one attempt succeeds); pass^4 = 0.9⁴ β‰ˆ 65.6% (all attempts succeed). Each fan gets one attempt and every conversation must work, so pass^k (or the per-attempt success rate with its variance) is the honest metric for customer-facing agents.


Q15. The team uses an LLM-as-judge to score helpfulness, and the scores rise sharply after a prompt change that made answers twice as long. What is the most likely explanation, and what should they do?

  • A. The answers really became better; ship it
  • B. Verbosity bias of the judge; use a rubric with concrete criteria that rewards concision, compare at similar lengths, and validate the judge against human labels
  • C. Position bias; swap the order of the system and user prompts
  • D. The judge is overloaded; lower its temperature to zero
Answer

B β€” Verbosity bias.

LLM judges tend to prefer longer answers, prefer the first answer in pairwise comparisons, and prefer outputs from their own model family. A judge is a measuring instrument: validate its agreement with human labels before trusting it, and re-validate when its prompt or model changes.