Context engineering
An MLOps interview on a served context: the budget, the retrieved chunks, the prompt cache, and the KV cache behind them.
These prompts are original practice. They are not questions from a named employer or a live hiring loop.
1.Policy-qa's retriever hit its 800 ms timeout. The handler caught the exception, set chunks to an empty list, and wrote status ok. The prompt contained no error line. The model stated a coverage limit that appears nowhere in the prompt. What reached the model?
2.The on-call word gate allows 3,000 words. A pasted stack trace on dispatch-bot measured 1,200 words and passed the gate. The serving tokenizer counted 9,000 tokens. The worker rejected the prompt at the 8,192 window. What had the gate counted?
3.At 14:02 a retrieval timeout stored an empty chunk list under the raw question, with status ok. The index was healthy again at 14:05. The same question at 14:06 did not call the index and again sent no chunks. A paraphrase at 14:07 called the index and filled the prompt. What did 14:06 hit?
4.A Chinese warranty paste has no spaces. The word-count gate, splitting on whitespace, saw one word and passed a 3,000-word limit. The serving tokenizer emitted 6,400 tokens, and the worker rejected the prompt. An English note of the same meaning was 700 tokens and passed. What did the gate measure on the Chinese paste?
5.Request A logged retrieval_ms 800, then an exception that the handler cleared, then an empty chunk list. Request B logged retrieval_ms 37, hit_count 0, no exception, and an empty chunk list. Both prompts lack chunks. What did B's search do?
6.A parts list was estimated at 2,000 tokens by dividing characters by four. The serving tokenizer counted 7,400. Admission used the estimate and started prefill. Prefill stopped because the sequence would not fit in the 8,192 window. What did admission trust?
7.After 18:00 the query encoder on shop-help was v5. The index build stamp was still v3. Scores sat below 0.2, and the top chunk was unrelated. The same question encoded with v3 retrieved the right page. The language-model weights were unchanged. What was compared?
8.The budget trim on returns-desk keeps the first 300 tokens and the last 200. The logged prompt contains the greeting and the customer's question. The refund rule lived between them and is absent. The model approved a refund the rule forbids. What did the trim keep?
9.Collection policies-2026-11 holds the re-embedded policy and received no queries. Alias policies-live still points at policies-2024-11. Answers quote the November 2024 sentence. What did the query path search?
10.Prefill of a 4,000-token prompt on outage-desk succeeded. The failure came at output token 900. Device memory rose on each decode step. Weight bytes were flat from process start. The same prompt with a short max_tokens finished. What grew until decode failed?
11.The re-embed job stamped v5 on 40 percent of the warranty vectors and left the rest stamped v3, in one collection. Neighbor results jump between the two stamps on a single question. What did that collection contain?
12.The window is 8,192. The prompt used 8,100 tokens. Max tokens stayed at 1,024, and nothing was reserved for the answer. Prefill finished. The failure hit on a later decode step as the sequence length reached 8,192. The weights stayed at their loaded size. What ran out of room?
13.Five percent of fare pods started embedding queries with encoder v5. The index was built with v3. Those pods retrieve unrelated rules. The other pods still use encoder v3 against the same alias and retrieve the right rule. What did a canary pod compare?
14.Three requests are live. Forty thousand requests have finished since boot. The KV block pool is 100 percent used. The log has no free-block event for the finished sequences. A restart, with the same weights, lets a three-request test fit. What filled the pool?
15.The new query model emits 1,024 floats. The live index has 768 columns. The server sliced the query to the first 768 floats and searched. A real 768-d query from the index's own model returns the right article. What did the slice search with?
16.At 09:12 returns-desk replaced its system prompt. The new file caps a refund at $50. Request 9f3 at 09:40 still approved $200. A prefix-cache bypass, with the same file and the same chunks, approved $50. What did 9f3 reuse?
17.A deploy turned on L2 normalization for query vectors only. Document vectors in the fare index stayed raw. Rankings moved. Turning query normalization off restored yesterday's order on the same index. What changed on one side of the score?
18.Admission counted the user's sentence, 40 tokens. The render added a 2,600-token tool schema at the front and a 900-token balance result at the end. A trim from the end removed the result and left the schema. The model said the balance was not provided. Where was the balance?
19.Clinic-intake asked the shared index for the top 8 chunks, then applied the team filter. Seven chunks were other teams. The one that remained was off topic. An unfiltered debug list shows the authorized protocol at rank 40. What order did the server use?
20.The KV block size is 64 tokens. A 65-token prompt received block 0 and was denied block 1. A 64-token version of the same prompt prefilled. The weights were already loaded. What did the 65th token require?
21.The shipping page was deleted in the CMS at 09:00. The index-delete job failed. At 15:00 the assistant quoted that page. A direct get by page id still returns the vector. What did the search copy into the prompt?
22.The baggage prompt file was updated at 11:00. Its hash on disk matched the new fee. At 11:40 the warm workers still quoted the old fee. The prefix entry was 40 minutes old, and the cache TTL is one hour. The invalidation log has no delete. What kept the old fee in front of the model?
23.Chunk 88's payload text is now a holiday notice. Its vector's source hash still matches the deductible paragraph. A question about deductibles returns chunk 88, and the model recites the holiday notice. What was stale?
24.Before the chat template, the prompt fit with 20 tokens to spare. After render it was 80 tokens over. The added tokens are the role tags. A trim from the end removed the question's last sentence, which held $80. The model used an older amount from history. What pushed the cut onto that sentence?
25.The prefix store holds 30 GB of idle KV in the same pool the decoder allocates from. New decodes fail to get a block. Evicting those idle prefix entries lets the same decodes run. The weight size does not change. What held the idle memory?
26.Both regions read the new disclaimer from the same config service. Us-east answers match it. Eu-west answers still match yesterday's disclaimer. Eu-west's prefix cache shows no delete from the invalidation bus. What was eu-west still attending to?
27.The live index still stores the warranty as one 1,800-token chunk. The refund rule begins near token 1,600. The budget kept the first 500 tokens of the top chunk. The prompt has the warranty greeting and not the rule. A rechunked index puts the rule in its own chunk, and the prompt then includes it. What did the slice keep?
28.The stored assistant reply tokenizes to 40 tokens. The budget ledger subtracted the 512-token reservation for that turn. The next request refused a 300-token chunk. Rendering the real 40-token reply leaves room for the chunk. What did the ledger charge?
29.Requests A and B were packed into one sequence with no attention mask between them. B's answer includes A's refund figure. That figure is not in B's retrieved chunks. Separate runs of the same prompts do not leak. What did B's tokens attend to?
30.A rollback at 16:40 restored system prompt v12 on disk. For 26 minutes the warm process still answered with the v13 rule. The cache stats inside that process listed a resident v13 prefix. A restart made the next answer match v12. What did the warm process keep using?
31.The reranker on subscription-cancel timed out. The prompt's chunk order matches the bi-encoder order, and the error field is empty. Offline, the reranker places that keyword collision last. What order was sent to the model?
32.Chunks A and B on the allergen desk share a 700-token span. Both were inserted whole. The prompt overflowed by about that span, and chunk C, the exception, was dropped. A render that keeps the shared span once has room for C. What did the overlap cost?
33.In a packed batch, B's position ids restart at 0. The attention mask is still all ones. B's answer quotes A's order id, and that id is not in B's prompt text. A block-diagonal mask on the same pack stops the quote. What remained open?
34.Serve-08 and serve-07 share one prefix directory keyed only by token ids. The token ids of the system prompt match. A cache hit on serve-08 produced a sentence that only serve-07 produces. A miss on serve-08, same tokens, followed serve-08. What did the hit attach?
35.The tax question was one line at the end of a thirty-turn shipping argument. The embedding log shows the whole transcript was encoded. The top chunks are shipping chapters. Encoding only the tax line returns the tax chapter. What did the embedder encode?
36.The refund rule is labeled high priority and is two sentences long. The greeting is labeled low and is 900 tokens. The trim log says dropped_shortest and does not mention labels. The rule is gone and the greeting remains. What did the trimmer rank on?
37.The pack mask is block diagonal. B does not quote A's text. B's first token is at position 5,000, which is A's length. B's answer is incoherent. Restarting B at position 0 with the same mask makes the answer coherent. What was wrong with B's positions?
38.At 14:02 the serving tokenizer files were reloaded. The prefix key is the raw prompt string. The next request hit that key. The stored record contains the old token ids, and the new tokenizer would have split the same string differently. What did the hit return?
39.The same allergen paragraph came back from the FAQ index, the policy index, and the inbox index. All three copies were pasted into the prompt. The exception chunk, rank 4, is absent. A render that keeps one copy has room for the exception. What did the three copies do to the budget?
40.Two thousand tokens of room remained. The server inserted five chunks of 1,000 tokens each because the plan asked for five. The logged prompt contains the start of the first chunk and none of the other four. What did five limit?
41.The loaded fare model supports 8,192 rope positions, and rope_scaling is empty. The server max-context setting was raised to 32,768. A 12,000-token prompt was admitted. A 4,000-token prompt on the same worker answered normally. What did the raised setting change?
42.The dashboard counted a prefix hit for 4,200 tokens. On that request the block record says the KV blocks were already gone, and the GPU profile shows a prefill of the same 4,200 tokens. What did the worker do after the key matched?
43.The parking-fine query filtered on region=US. Sampled index rows have no region field. The search returned zero rows, and the model said no US schedule exists. Dropping the filter returns the US schedule from that same index. What did the filter compare?
44.Text admission counted 1,000 tokens for a receipt question and passed. The vision encoder then added 4,500 tokens for the attached image. The combined sequence was rejected at the window. The same words with no image prefilled. What did the text count leave out?
45.This booking model uses a learned position table of 8,192 rows. The max-context setting is 16,384. The request failed when the position-embedding lookup asked for row 8,192. Retrieval had already returned, and the weight load had succeeded at startup. What table was shorter than the setting?
46.The system-prompt token ids were unchanged. An operator flushed the prefix cache because the decode temperature moved from 0.2 to 0.8. The next request prefilled that same prefix from scratch. What did the flush discard?
47.Tuesday's baggage clause is the top keyword hit. The vector index still returns Monday's clause. The merger appends the vector list and then the keyword list. The prompt's first chunk is Monday's clause. What did the merger put first?
48.The client counted 8,192 content tokens, exactly the window. The server log shows a beginning-of-sequence id inserted before that content. The rejected length is 8,193. Dropping one content token lets prefill finish. What did the server add?
49.Linear rope scaling of 4 is loaded on a model trained at 8,192, so the method covers 32,768 positions. The config max context is 65,536. A 40,000-token prompt was admitted. A 20,000-token prompt on the same worker stayed inside the method and answered. What range did the loaded factor cover?
50.A one-line edit to the tool schema dropped the prefix hit length from 2,400 tokens to zero. In a test, the same system prompt was placed ahead of the tool JSON, and the 2,400-token hit returned. Where had the live template put the tool JSON?
51.After a config push, index_env defaulted to staging. A production grocery request logged the host staging-ann. The prompt includes the string TEST SKU. The production index has no such string. What did the query search?
52.A stop string of END was added on a 9,000-token prompt in the hope of shrinking the bill. The worker rejected the prompt before any decode step. The stop string appears only in the decode config. What did the stop string leave at its full size?
53.The compactor wrote a 200-token summary into the subscription thread. The next prompt contains that summary and the original 40 turns. The token count is the old total plus 200. The KV length matches the longer prompt. What did the summary change?
54.A formatter added one trailing newline to the system prompt. The prefix hit rate fell to zero. The index build id did not change. The new token-id list differs from the cached list at that newline. What did the cache compare?
55.The seat-count index already returns the new chunk on a direct get. Repeating the exact user question still inserts yesterday's chunk ids. Twenty minutes remain on a result entry keyed by the raw question. A paraphrase misses that entry and inserts the new chunk. What served the old ids?
56.The history cap keeps 20 messages. Four of those messages are full tool dumps, and the token total is 30,000. Another session with 20 short messages fits the window. The cap log records a message count. What did that cap ignore?
57.The support UI shows only a summary. The captured request body contains the summary and all 40 turns. The prefill count equals the body. The answer uses a shipping detail that appears only in a turn the UI hid. What did the server prefill?
58.The word USD was inserted at token 40 of a cached system prompt. The worker copied KV blocks for tokens 41 onward from the old entry, matched by a hash of those tokens alone. Answers still cited the old line. A full recompute of the tail cited the new line. What was copied?
59.Chunk 41's payload has deleted=true and status=active. The query filter is status=active. The prompt includes chunk 41. Adding deleted=false to the filter removes it. What did the live filter read?
60.The source sentence ends with refund $400. The prompt log ends with refund $40. The cutter recorded a character index and did not call the serving tokenizer. The next source character after the cut is 0. What did the cutter change in the amount?
61.The request body is a summary plus a new question, about 400 tokens. The worker's session cache for that id was already 9,000 tokens, and the log says append. After the call the session KV length is 9,100. The answer mentions a fact that is absent from the body and present in the old session. What did the worker append to?
62.The prefix store is keyed only by the header x-prompt-rev. The first rev-15 request belonged to customer A and included A's order. Customer B's rev-15 request rendered B's own order and still named A's order in the answer. What did B's hit return?
63.The returns index was built with multilingual-v2. A deploy pointed queries at english-only-v1. A Spanish question now retrieves an English glossary. The same Spanish question through multilingual-v2 retrieves the returns policy. Which encoder embedded the failing question?
64.The system rule store credit only was the oldest span in the prompt. Chunks were inserted after the budget check and the render no longer fit. The trim log says drop_oldest. The logged prompt starts with a retrieved page that says always refund cash. What did drop_oldest remove?
65.Yesterday the KV elements on billing-chat were fp8, one byte. A config push set the cache dtype to bf16. Bytes per token doubled, and the same prompt length now fails during decode. The weight file is still bf16, as it was yesterday. What doubled?
66.Across 500 shop-help requests the system-prompt token ids were identical, yet each request prefilled all 2,400 of them. The cache key was a hash of the system prompt plus the user question. What did that key force the server to recompute?
67.The member asked for the dues rule as of March. The chunk in the prompt has effective_date November, and the query carried no date predicate. A debug query with effective_date on or before March returns the March sentence. What did the live query select?
68.The response schema was appended after the budget check. Its last field is refund_cents. A trim from the end removed that field and left the greeting and the schema's opening lines. The model returned a sentence. The field name is absent from the prompt. What did the trim cut?
69.The loaded attention window is the last 4,096 tokens. The session is 30,000 tokens long. The KV allocator grew with the whole session, and decode failed with the cache full. A 3,000-token session on the same model fit. What did the allocator keep?
70.A prefix hit covered the first 1,800 tokens. The worker then prefilled those same 1,800 tokens and wrote the new KV after the cached blocks. The sequence length was 3,600 before the new user message. What did the prompt text do inside that sequence?
71.Tuesday's price edits sit at broker offsets 1,400 through 1,550. After the redeploy the indexer resumed at its committed offset of 1,800 and did not apply those messages. The index still shows Monday's price. What did the resume skip?
72.An editor replaced three refund sentences with codes such as RFND-SC-ONLY-AFTER-SHIP. The characters got shorter. The serving tokenizer produced more tokens than the sentences had used, and the next chunk no longer fit. What did the tokenizer do with the codes?
73.One long answer on research-help owns 80 percent of the KV blocks and is still decoding. Short requests under 500 tokens are refused admission. When the long request finishes and frees its blocks, a short request is admitted. The weights are already loaded and shared. What did the long decode hold?
74.Prefix entries on warranty-line include the retrieved chunks. The TTL is 24 hours. Distinct keys are about equal to the request count, and the GPU memory stays high after requests finish. A system-prompt-only key would be a single entry. What did the server pin?
75.The score floor on concert-tickets was 0.35. During the incident it was set to 0. Chunks scoring 0.11 filled the 2,000-token room. The page scoring 0.42 was rank 6 and is not in the prompt. Restoring 0.35 puts that page in the prompt. What did clearing the floor admit?
76.Eight bare chunks totaled 1,900 tokens, inside a 2,000-token room. Citation headers were wrapped on after that count and added about 320 tokens. The trim dropped the last chunk, which held the transfer exception. The headers are in the prompt. The exception is not. What was added late?
77.One user prompt was expanded into 4 beams. Each beam holds its own KV. The pool was sized for one sequence of that length. Allocation failed on the fourth beam. A rerun with one beam finished. What did the four beams replicate?
78.The prompt had room for the system rule plus about three chunks. The server inserted twelve retrieved chunks, then dropped the oldest tokens. The logged prompt has the later chunks and not the refund rule. The model followed a chunk. What did the oldest-token trim remove?
79.A prefix hit covered 1,800 system tokens. The position-id log shows the first retrieved-chunk token at position 0. A corrected run places that token at position 1,800, and the chunk is then read as a continuation. How did the hit run number the chunk?
80.The license assistant is instructed to cite chunk ids. A template change removed the id lines. The prompt contains the chunk body and no bracketed number. The answer says [3], and [3] does not appear in the prompt. What was missing from the chunk text?
81.A 3,000-word trim ran before tokenization and cut the fare table. During the call the KV pool was 40 percent used. The model described fares that are not in the prompt. The table appears only in the pre-trim log. What removed the table?
82.The draft proposed 8 tokens. The target accepted 2 and rejected 6. The visible answer grew by 2. The target KV length grew by 8. The reject path has no rollback record. What remained in the target cache?
83.The prefill worker computed 20 KV blocks. The transfer to the decode worker delivered 19. The missing block is the last one and holds the user question. Decode answered the system prompt and never mentioned the question. A single-worker prefill of the same prompt answered it. What did decode lack?
84.At 15:00 rope_theta changed on the fare worker. Cache-hit requests became incoherent. Cache-miss requests with the same token ids stayed coherent. The hit's prefix keys are tagged with the old base and the suffix keys with the new base. What was mixed in one sequence?
85.Chunk 17 in the warehouse index is 400 tokens, and the cutoff rule starts at token 240. The retrieval service logged truncated_to 200 before returning it. The prompt-budget log says included 200 of 200, dropped 0. The rule is not in the prompt. Where was the rule removed?
86.Yesterday's system message remains in the thread as a normal turn and still says the cap is $200. Today's system prompt is prepended and says $50. Both sentences are in the logged prompt. The model cited $200. What did the history loader leave in the sequence?
87.Sequence B's logical block 0 is mapped to a physical block last written by sequence A. The mask lists A and B as separate sequences. B's answer contains a sentence that exists only in A's prompt. Repairing the map, with the same mask, removes that sentence. What did B read?
88.The retriever was budgeted from the summary length alone and returned eight chunks. The render also contained the original turns. The combined prompt overflowed, and the trim removed the chunks. The model answered from an old turn. The chunks are in the retrieval log and not in the final prompt. What did the chunk budget ignore?
89.Turn 1 on claims-assist trimmed the refund rule out of the prompt, then stored that trimmed sequence as the session prefix. The rule was restored in the source file. Turns 2 and 3 still missed the rule. A new session on the same file included it. What did turns 2 and 3 reuse?
90.A hotel-west request arrived with the tenant header missing. The query filter clause was empty. The prompt quotes a rate whose payload tenant is hotel-east. That rate is not in the user message. What did the empty filter allow?
91.The admission gate tokenized a part number as one token with a general-purpose tokenizer and counted 3,000. The serving tokenizer splits that same part number into six tokens and counts 5,200. Admission used 3,000. The worker rejected the render. Which count did admission use?
92.The KV pool is a fixed reservation. Decode returned pool exhausted. Memory outside that reservation was still free on the device. The weights were already loaded. Raising the pool into that free memory let the same prompt decode. What was exhausted?
93.B's retrieval log lists only tenant B's chunks. A's order id appears in B's answer. A and B shared a packed batch. When the scheduler separates them, the same retrieval filter produces a B answer with no such id. What mixed the order id into B's answer?
94.The prompt warmer ran from the container image built at 06:00. That image contains the old cancellation text. The config map mounted at 09:00 contains the new text. The warmer log says it read /opt/app/prompt.txt inside the image. First answers match the image. What did the warmer write into the prefix cache?
95.Attempt 1 on baggage-desk timed out in retrieval and never called the model. Attempt 2 is marked retry_idempotent, skips retrieval, and calls the model with an empty chunk list. The answer states a fee that is not in the prompt. What did attempt 2 send?
96.The budget enforcer skips messages with role tool. Those messages tokenize to 4,000 on the inference server. The enforcer reported 1,000 tokens free. The inference server rejected the render. Moving the same text into a user message made the enforcer count it. What did the enforcer skip?
97.The prompt was 7,000 tokens and the window is 8,192. The request asked for 4,096 decode tokens. Admission checked the prompt against the window, then checked 4,096 against the window, as two separate tests. Decode stopped at position 8,192 and the procedure is cut off. What did those two tests fail to add?
98.Eval prompts are under 2,000 tokens and still pass. Production prompts were filled toward the new 32,768 setting with retrieved chunks, and their positions run past the loaded 8,192 rope support. Those answers scramble the chunk wording. The rope method was not changed with the setting. Why did eval stay green?
99.Blue's prefix cache was rebuilt from the new hotel policy. The balancer still sent all traffic to green. Green's prefix entries are dated yesterday, and green's answers quote the old cancellation window. A request pinned to blue quotes the new window. What was green still serving?
100.Bi-encoder scores put the Refunds chunk first. The prompt's first heading is A. Overview, a glossary that says fees vary. The template sorts chunk titles alphabetically before insertion. The refund sentence is in a later chunk. What did the model see first?
101.The chunk sizer counted chunk 9 at 400 tokens with the embedding model's tokenizer. The language-model tokenizer counts that same chunk at 900. The remaining room was 600. The server inserted the chunk based on 400, the render overflowed, and a trim cut the rule at the end of chunk 9. Which count allowed the insert?
102.Request A was still decoding when its KV block 4 returned to the free list and was assigned to request B. A's later tokens changed after B wrote, and A's prompt text had not changed. Holding live blocks out of the free list stops the change. What did the recycler hand out?
103.After decode failures, the KV pool was doubled. Sessions still store the original turns beside the summary. The next day the pool is full again. A session that drops the original turns uses a small fraction of the new pool. The weights were not resized. What did the larger pool leave in place?
104.A returns-v2 adapter was selected on the request. The prefix key was the token hash and did not include the adapter name. The stored KV was written by the base model. An uncached prefill with returns-v2 included an adapter-only exception. The hit omitted it. What did the hit reuse?
105.The raw retrieval text for the tuition row contains 120. The redactor log says digits were replaced. The prompt contains XXX, and the model says the amount is unavailable. The index row still stores 120. What did the model receive for the amount?
106.Prompt tokens equal the window. Completion tokens are 0. The status is 200 and finish_reason is length. No decode step ran. The answer reservation had been cut to zero so the prompt could stay whole. What did the server return?
107.The scheduler estimated 1,000 tokens for every request and admitted eight. Three of them were actually 6,000 tokens. That wave's KV bytes exceeded the pool and the wave failed. Adding the real lengths would have admitted two of the long requests. The weights were already loaded. What did the estimate use?
108.Request B's retrieval timed out. The model was called with no chunks and no error, and B was packed beside request A. B's answer quotes a clause that appears only in A's retrieved chunk. An unpacked retry of B, after the index recovered, does not quote it. Where did B's answer get the clause?