FreeExam

Context engineering basics

An applied AI scientist interview on prompts, retrieved text, and the other pieces that fill a context window.

These prompts are original practice. They are not questions from a named employer or a live hiring loop.

  1. 1.A handbook is on disk, and one paragraph from it is inserted. How much of the rest of the handbook was in the window?

  2. 2.A speaker says the model was told a rule. What must be true for that rule to be in the prompt?

  3. 3.A call contains one question and no retrieved pages. Which piece is the prompt?

  4. 4.A neighbor uses the question's terms but states the opposite rule. Why can it still rank first?

  5. 5.After a prompt-cache hit, what is the model reading at the front of the call?

  6. 6.A system line, a user question, and a worked example are all sent in one call. What do they have in common?

  7. 7.A correct policy uses different words from the question, and a mistaken note uses the question's words. Which outcome can embedding retrieval produce?

  8. 8.The inserted quote stops before a sentence that reverses the claim. The citation looks formally complete. What limits it?

  9. 9.Truncation and a summary can both make an input shorter. What is particular to truncation?

  10. 10.A summary says "follow the usual process," and the source listed three exceptions. What can the model read about those exceptions?

  11. 11.What is a retrieval score, relative to whether a chunk is true?

  12. 12.In embedding retrieval, what is a neighbor?

  13. 13.Two citations appear, and only one source's paragraph was inserted. Which source text is in the window?

  14. 14.A constraint matters, and the summary is what will be inserted. When does the model see that constraint?

  15. 15.Candidates are filtered by date before any of them are pasted into the prompt. When does that filter run?

  16. 16.A tool returns a value, and that value is not written into the prompt. What did the model see of the value?

  17. 17.The first thousand tokens are identical on every call, and the rest changes. What can a prompt cache hold from that pattern?

  18. 18.A grader marks the model wrong for missing a clause that was never pasted in. What is fair to say about that clause?

  19. 19.An old system line is already in the processed tokens, and a new system line is appended after it. What is true of the KV cache?

  20. 20.A "must" clause and an "unless" clause end up in different chunks. Only the "must" chunk is inserted. What should you expect?

  21. 21.A table's cells are never written into the prompt. What does the model see of those cells on this call?

  22. 22.A summary uses fewer tokens than the source it replaces. What was saved, and what can be lost?

  23. 23.A value that changes on every call is placed at the start of the prompt. Why does that work against a prompt cache?

  24. 24.Which claim matches text that was never placed in the context?

  25. 25.A metadata filter requires the topic to be billing. A shipping note is in the index. Where is that note during the call?

  26. 26.Policy text in the window is out of date, and the KV cache for those tokens is still in memory. What actually changes the policy the model read?

  27. 27.More chunks are inserted for one question. What increases for certain?

  28. 28.An exception sits in the tail of a passage, and the caller truncates that tail. What remains of the exception in the window?

  29. 29.An index finds three nearby chunks and those chunks are inserted. What did the embedding step contribute?

  30. 30.What does an embedding search supply for a query when the results are used as context?

  31. 31.Why reuse a KV cache while the next token is produced?

  32. 32.Which description fits retrieval into a context window?

  33. 33.A sentence is left out of the request. What is true of that sentence on this call?

  34. 34.Which order matches a retrieval call that uses a filter?

  35. 35.The source says "send the report, but never include account numbers." The summary says "send the report." What happened?

  36. 36.Two chunks disagree, and both are inserted. What has retrieval established?

  37. 37.Where can a length-based splitter place a boundary?

  38. 38.Why does rewriting an instruction change what the model receives?

  39. 39.A writer leaves 200 words of room under a token limit. Why is that room uncertain?

  40. 40.A constraint lives only in a document this call does not include. Why is that constraint absent from what the window shows?

  41. 41.A permission filter drops three private notes. What does the model see of those notes?

  42. 42.In a context window, what is a prompt?

  43. 43.The KV cache is cleared, and the same stale instruction is sent again. What does the new cache contain once that text is processed?

  44. 44.Why describe ordinary truncation as dropping tokens from a chosen end?

  45. 45.Three solved examples appear before a new question. How do those examples enter the call?

  46. 46.A rule says "approve refunds under $20, except for opened goods." The cut between chunks falls between those clauses. What can go wrong?

  47. 47.A safety filter rejects a chunk, and a later step pastes the chunks that remain. What happens to the rejected chunk?

  48. 48.An answer ends with a source title. The page body was not inserted. How far does that citation go?

  49. 49.Inside the window, what is a citation string by itself?

  50. 50.Why is "nearest neighbor" a weak stand-in for "trusted source"?

  51. 51.The first line of a long instruction is edited, and the rest is unchanged. What happens to a cache of that prefix?

  52. 52.What does a prompt cache store?

  53. 53.A stale instruction has already been processed into the KV cache. What does the cache do to that instruction on its own?

  54. 54.The inserted chunk says "always share the file." The next chunk, which was not inserted, says "never share it outside the team." What did the boundary do?

  55. 55.Which unit decides whether more text still fits in the window?

  56. 56.A language filter keeps only English chunks. A relevant note is in another language and does not appear. Why is it absent?

  57. 57.The oldest instructions are cut so a new question fits. Can the model use those cut instructions on this call?

  58. 58.Two notes use the same product name, and one note is a rumor. Why might the rumor be retrieved?

  59. 59.A bracket names a manual, and none of the manual's sentences are in the window. What can that citation supply?

  60. 60.A limit is written in the first sentence. Truncation keeps the tail and drops the head. What happens to that limit?

  61. 61.Which text is suited to a prompt cache?

  62. 62.A leading line says "answer briefly," and the user then asks a detailed question. How should both parts be described?

  63. 63.Why can an answer quote a retrieved chunk and still be wrong?

  64. 64.Someone treats a reference marker as proof the claim was checked. What is wrong with that treatment?

  65. 65.How is a prompt cache different from adding a new fact?

  66. 66.Does a small distance between a query and a chunk mean the chunk is right?

  67. 67.An instruction is saved in a product setting and left out of the request text. What reaches the model from that instruction?

  68. 68.What can change which texts are in the window without editing the model's weights?

  69. 69.The input is under a person's word allowance, and the call still fails for length. What is a sound account?

  70. 70.The window holds a question and one chunk. A second chunk was found and then left out of the call. Was the second chunk in the window?

  71. 71.The first half of a policy is retrieved and the second half is not. Which conclusion is sound?

  72. 72.Why can one short word spend more than one unit of the context limit?

  73. 73.How is a KV cache different from a prompt cache?

  74. 74.Overlap keeps a span of text on each side of a cut. What risk is that overlap meant to reduce?

  75. 75.Instructions stay in the window beside a summary of a different document. What did that summary replace?

  76. 76.A window holds 8000 tokens. A plan treats that as 8000 words. What is mismatched?

  77. 77.A document was removed by a filter. Someone says the model ignored it. What is the more precise account?

  78. 78.Why can a shorter chunk length raise the chance that a rule is incomplete in the window?

  79. 79.A caller keeps the latest messages and cuts the front of the transcript. What kind of cut is that?

  80. 80.What happens to a retrieved chunk when it is used in a call?

  81. 81.What does a KV cache store?

  82. 82.After a neighbor is chosen and inserted, what does the model read from that search?

  83. 83.How is a summary different from truncation?

  84. 84.Two notes have the same word count. One is full of identifiers and punctuation. What can still differ?

  85. 85.A paragraph looks short on the page and still accounts for a long run of tokens. What does that show?

  86. 86.A plan turns "4096 tokens" into "about 4096 words." What is wrong with that step?

  87. 87.Text does not fit the window, and the caller truncates it. What does truncation do?

  88. 88.Why is a fluent summary not proof that every limit survived?

  89. 89.Tokens that were never sent have no entry in the KV cache. Why?

  90. 90.A chunk says the limit is 10, the real limit is 3, and the chunk is inserted. What does the model read about the limit?

  91. 91.During a long completion the KV cache grows. What is being added?

  92. 92.A heading is in one chunk and the numbered conditions are in the next. Only the heading chunk is inserted. What does the model see of that rule?

  93. 93.The inserted span is the right source and the right passage. How strong is the citation then?

  94. 94.Spaces, pieces of long words, and rare names are in the input. How do they count against the limit?

  95. 95.A chunk was accurate last year and is outdated now, and it is still retrieved. What follows?

  96. 96.A prior turn is omitted when the next call is built. Can the model see that turn in this window?

  97. 97.The model is asked which items a filter removed. Those items were not written into the prompt. What can this window show about them?

  98. 98.After truncation, a sentence that used to be in the prompt is gone. Where is that sentence for this call?

  99. 99.What is a chunk boundary, with respect to a rule in the source?

  100. 100.A long policy is replaced by a short summary before the call. What does the model see of that policy?

  101. 101.Why can a tidy footnote still support a bad answer?

  102. 102.The inserted excerpt contradicts the source, but the source name is right. What does the model have?

  103. 103.A retrieved paragraph states a false date. What has retrieval guaranteed?

  104. 104.Two summaries of the same rules drop different "must" lines. What does that show?

  105. 105.Which phrase matches truncation?

  106. 106.What is wrong with treating a prompt as a channel that sits outside the tokens?

  107. 107.A hit in a prompt cache means which of these?

  108. 108.The cached prefix says "use the 2023 policy." A later line says the policy year changed. What does the prompt cache do to the old line by itself?