Module quiz

Production: cost, serving and observability quiz

45 questions across 5 lessons. Choose an answer, check it, and read why each option is right or wrong.

Checking answers needs JavaScript. You can still read every question and option below.

0 of 45 answered

Keyboard: arrow keys move between options. Space or Enter selects the focused option.

Cost and latency optimization10 questions

ObjectiveInstrument a request by stage (input tokens, output tokens, time to first token, generation time, cost per request, p95) and use the numbers to pick the first bottleneck.

  1. Question 1 of 45A feature has a p95 latency of 9 s and costs twice its budget. Nobody has traces yet. What should the team do first?

    Choose one answer.

  2. Question 2 of 45Traces for a RAG app show about 6,000 input tokens and 150 output tokens per request, with a slow time to first token. Which change targets the dominant term?

    Choose one answer.

ObjectiveEstimate cost per request from token counts and per-token prices, and latency as time to first token plus output tokens divided by output speed.

  1. Question 3 of 45Illustrative prices: 2 dollars per million input tokens and 10 dollars per million output tokens. What does one request with 6,000 input tokens and 500 output tokens cost?

    Choose one answer.

  2. Question 4 of 45A request has a time to first token of 0.8 s, an output speed of 40 tokens per second and 600 output tokens, so it takes 15.8 s. Which single change saves the most time?

    Choose one answer.

ObjectiveChoose among prompt caching, shorter prompts, output limits, model routing, response caches and smaller models, and state each lever's quality or freshness risk.

  1. Question 5 of 45A team enables provider prompt caching on a 3,000-token system prompt but the usage fields show zero cache-read tokens. The prompt begins with the current date and time. What is the likely cause?

    Choose one answer.

  2. Question 6 of 45A support bot uses a semantic cache. Users report that asking to cancel a subscription sometimes returns the steps for cancelling an order. What is the underlying problem?

    Choose one answer.

  3. Question 7 of 45After adding a router that sends most queries to a small model, cost falls by half and average eval accuracy is unchanged. A review finds that legal-policy questions got much worse. What should happen next?

    Choose one answer.

  4. Question 10 of 45A team must halve its LLM bill by Friday. Traces show input tokens dominate cost, and cutting retrieved chunks from 8 to 3 drops the bill by 40 percent. What should they check before calling it done?

    Choose one answer.

ObjectiveSay which levers cut cost, which cut real latency and which only change perceived latency (streaming), and where batching applies (provider batch API versus self-hosting).

  1. Question 8 of 45A team adds streaming to a slow report generator. Afterwards, users say words appear quickly but reports still finish late, and the monthly bill is unchanged. Is this expected?

    Choose one answer.

  2. Question 9 of 45Which statement about batching is correct?

    Choose one answer.

LLM inference and serving12 questions

ObjectiveExplain why decode is limited by memory bandwidth and why KV-cache memory, not the weights, often caps how many requests one GPU can hold.

  1. Question 11 of 45A 7B model in 16-bit numbers has 14 GB of weights and the GPU moves 2,000 GB per second (illustrative). Single-stream decode is slow. Which change raises the speed ceiling the most?

    Choose one answer.

  2. Question 12 of 45A 48 GiB GPU has 85 percent usable and holds 13 GiB of weights. Each 2,048-token request needs 1 GiB of KV-cache. About how many requests fit at once?

    Choose one answer.

ObjectiveSeparate time to first token, inter-token latency, throughput and goodput, and map a symptom (slow first token versus slow streaming) to its likely cause.

  1. Question 13 of 45Users report that the first word of a reply takes a long time at peak hours, but once text starts it streams smoothly. Which diagnosis fits?

    Choose one answer.

  2. Question 14 of 45Server A handles 10 requests per second and 60 percent meet the latency targets. Server B handles 8 requests per second and 95 percent meet them. Which has higher goodput?

    Choose one answer.

  3. Question 22 of 45On a self-hosted model, time to first token climbs only at peak hours, while the speed of tokens for requests already running stays steady. What is the most likely cause?

    Choose one answer.

ObjectiveMatch continuous batching, PagedAttention with prefix caching, chunked prefill, quantization and speculative decoding to the bottleneck each attacks and the cost each adds.

  1. Question 15 of 45When someone submits a 30,000-token prompt, other users' streams stutter for a moment. Which technique targets this?

    Choose one answer.

  2. Question 16 of 45Which statement about speculative decoding is correct?

    Choose one answer.

  3. Question 17 of 45A team turns on automatic prefix caching in vLLM for an assistant that sends the same 3,000-token system prompt with every request. What does it save?

    Choose one answer.

  4. Question 18 of 45A team moves a model from 16-bit to 4-bit weights. Throughput improves, but support tickets about wrong numbers in answers rise. What is the best next step?

    Choose one answer.

  5. Question 21 of 45A server reserves contiguous KV memory for every request's maximum length. Most requests are short, so much reserved memory sits unused and the batch stays small. Which technique targets this?

    Choose one answer.

ObjectiveDecide between a hosted API and self-hosting using volume, utilization, data residency and operational burden, with a break-even estimate.

  1. Question 19 of 45A GPU costs 2.40 dollars per hour and sustains 1,200 output tokens per second at full load (illustrative). At 25 percent utilization, what is the cost per million tokens?

    Choose one answer.

  2. Question 20 of 45A small team has spiky, low-volume traffic and no data-residency rule. Which plan fits best?

    Choose one answer.

Observability and eval pipelines9 questions

ObjectiveList what to record for every LLM request (trace id, prompt and model versions, retrieved ids and scores, tokens, latency, cost, outcome signals) and say why each field exists.

  1. Question 23 of 45A user complains that the assistant quoted the wrong refund policy. Which recorded fields best show whether retrieval or generation failed?

    Choose one answer.

  2. Question 24 of 45Answer quality dropped last week. Prompts did not change, but the team re-embedded the corpus with a new embedding model. Which trace field makes this visible quickly?

    Choose one answer.

ObjectiveExplain what online monitoring catches and what only an offline golden-set evaluation catches, and why neither replaces the other.

  1. Question 25 of 45Which problem is most likely to reach users unnoticed with only live dashboards, but be caught by a golden-set run before release?

    Choose one answer.

  2. Question 26 of 45After a prompt change, the thumbs-down rate stays flat, yet a later review shows answer quality fell. What is the most likely reason?

    Choose one answer.

ObjectiveDescribe the loop from sampled production traces to labelled cases to a golden set that gates changes, and read results per slice rather than as one average.

  1. Question 27 of 45Prompt v12 passes 182 of 200 golden cases against 180 for v11, but its refund slice (20 cases) fell from 18 passes to 10. What is the sensible reading?

    Choose one answer.

  2. Question 28 of 45Support confirms that the assistant gave a wrong answer to a real customer. What should the pipeline do with that case?

    Choose one answer.

ObjectiveChoose alerts on error, latency, cost, abstention and drift signals, and set a privacy policy (redaction, access, retention) for logged prompts and responses.

  1. Question 29 of 45After a deploy the abstention rate ("I don't know") rises from 8 percent to 20 percent, with no change in error rate. What does this suggest?

    Choose one answer.

  2. Question 30 of 45An engineer copies a week of full production traces into a shared repository to build a golden set. What is the main problem?

    Choose one answer.

  3. Question 31 of 45For an hour a RAG assistant gave wrong answers after a source document changed, with no release in that time. Error rate, latency and cost all looked normal. What would have caught it sooner?

    Choose one answer.

Production deployment of RAG8 questions

ObjectiveWhiteboard a deployed RAG system (gateway, guardrails, retrieval with access filters, reranker, LLM gateway, tracing) and name the failure mode of each component.

  1. Question 32 of 45A RAG product adds an output groundedness check, and the team also wants to stream tokens to the user as they are generated. What is the design tension?

    Choose one answer.

  2. Question 33 of 45Latency spikes every night at the time the corpus is re-embedded. Ingestion workers and the serving orchestrator share the same GPU pool. What is the best fix?

    Choose one answer.

ObjectiveDesign an idempotent, incremental, versioned ingestion pipeline with delete propagation, and a zero-downtime re-embedding using an index alias swap.

  1. Question 34 of 45A manager's access to a confidential document was revoked, and the document was deleted at the source, but the assistant still quotes it. What is the likely gap?

    Choose one answer.

  2. Question 35 of 45The team moves queries to a new embedding model while the stored vectors still come from the old one. Retrieval quality collapses. What is the safe procedure?

    Choose one answer.

  3. Question 39 of 45A source system revises one document and withdraws another at midnight. At 2 am the assistant still cites the old text of both, though all caches were cleared. The pipeline runs a weekly full crawl. What is missing?

    Choose one answer.

ObjectiveBuild a latency budget and a cost-per-query estimate for a RAG request, and size the vector index with arithmetic.

  1. Question 36 of 45How much raw memory do 10 million vectors of 1,024 dimensions need at 4 bytes per value, before index overhead?

    Choose one answer.

  2. Question 37 of 45Prices: 2 dollars per million input and 10 per million output tokens (illustrative). A request has 4 chunks of 500 tokens, 350 other input tokens and 200 output tokens. Cutting to 2 chunks lowers cost by about what share?

    Choose one answer.

  3. Question 38 of 45Stage p95 values are 0.5 s guardrails, 0.2 s retrieval, 0.4 s rerank, 0.1 s context, 1.5 s LLM first token and 0.2 s network, which sum to 2.9 s against a 3 s target. Is the target met?

    Choose one answer.

RAG security, reliability and release6 questions

ObjectiveEnforce permissions at retrieval, scope caches by tenant and document version, and choose what to degrade first when a dependency fails.

  1. Question 40 of 45A semantic cache in a multi-tenant RAG service keys only on the embedding of the question. What is the most serious risk?

    Choose one answer.

  2. Question 41 of 45The reranker service is timing out and the 3 s latency target is being missed. What should the system degrade first?

    Choose one answer.

  3. Question 44 of 45A support assistant's prompt says: only answer from documents the user's group may read. Retrieval returns the top results for every user, with no group filter. What is the flaw?

    Choose one answer.

ObjectivePlan a release with an offline eval gate, shadow traffic, a canary and a rollback, versioning every component that can change.

  1. Question 42 of 45A new chunker passes the offline eval gate. In the 5 percent canary the abstention rate doubles. What should happen?

    Choose one answer.

  2. Question 43 of 45An engineer edits the production system prompt directly in an admin console to fix a complaint. Why is this a release-engineering problem?

    Choose one answer.

  3. Question 45 of 45A team swaps only the reranker model and ships it directly, reasoning that the LLM and the index are unchanged. What does the release process say?

    Choose one answer.