FreeExam

Context engineering basics

An AI research scientist interview on retrieval, prompts, and the other context choices a study treats as known.

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

  1. 1.What does retrieval-augmented generation do with the text it fetches?

  2. 2.Must retrieval-augmented generation update the model weights?

  3. 3.How does fine-tuning on corpus text differ from retrieval augmentation that leaves the model frozen?

  4. 4.Two questions are answered by one frozen checkpoint, each with its own retrieved passages. What differs between the calls?

  5. 5.A system includes a retriever, but this call inserts no retrieved text. What is this call?

  6. 6.A retriever turns the query and the passage into vectors and ranks by how close those vectors are. What does it score?

  7. 7.No dense vector exists for a passage, and a retriever still ranks it from shared weighted terms. What is that score based on?

  8. 8.Can a dense ranking and a sparse ranking of the same query disagree?

  9. 9.A query and a passage share no terms, but their vectors are close. Which retriever can still rank that passage highly?

  10. 10.A passage was never embedded. The query shares a rare term with it. Which retriever can rank it from that term?

  11. 11.What does a standard BM25 score combine?

  12. 12.In a sparse weight that uses inverse document frequency, what happens to a term found in a large share of the documents?

  13. 13.A hybrid retriever uses both a dense score and a sparse score. What is that combination?

  14. 14.What does a bi-encoder compute for a query and a passage?

  15. 15.Why can a bi-encoder passage index be built before any query arrives?

  16. 16.At query time, what comparison does a bi-encoder make?

  17. 17.How can an approximate nearest-neighbor index differ from an exact scan of the same vectors?

  18. 18.A passage is edited after its vector is stored, and the old vector is kept. What does a hit on that vector represent?

  19. 19.What does a cross-encoder score?

  20. 20.Why can a full cross-encoder not index every passage ahead of time at the same cost as a bi-encoder?

  21. 21.What is the usual job of a cross-encoder in a retrieval pipeline?

  22. 22.Can a cross-encoder's pair score be stored as a passage vector and reused for the next query?

  23. 23.What does a late-interaction retriever store for a passage before the query arrives?

  24. 24.What does chunking decide?

  25. 25.A fact has its subject in one chunk and its date in the next chunk. What can a retrieval of one chunk return?

  26. 26.Consecutive chunks share a span of text. What does that overlap change?

  27. 27.A chunk boundary falls in the middle of a sentence. What can that chunk contain?

  28. 28.Search runs over short chunks, and the prompt receives the longer section that contains the winning chunk. What is true of those spans?

  29. 29.How does a splitter that cuts every fixed number of tokens differ from a splitter that cuts on sentence boundaries?

  30. 30.What is an inserted passage, relative to the model?

  31. 31.Does inserting a passage, by itself, write that passage into the saved weights?

  32. 32.A prompt says to answer using only the inserted passages. What does that instruction do?

  33. 33.What does lost-in-the-middle name?

  34. 34.Lost-in-the-middle is a statement about which text?

  35. 35.Does the name lost-in-the-middle state how large the effect is?

  36. 36.What has to be known before a study can compare middle evidence with evidence at the ends?

  37. 37.What is a few-shot prompt doing with its examples?

  38. 38.In a k-shot prompt, what does k count?

  39. 39.What does a zero-shot prompt omit that a few-shot prompt includes?

  40. 40.Two prompts use the same three examples in different orders. What does the label 3-shot fix, and what does it leave open?

  41. 41.A demonstration includes a short label that marks the answer, such as a fixed word before the answer text. What is that label?

  42. 42.A methods write-up quotes the instruction and does not say whether it came before or after the passages. What is missing?

  43. 43.The same passage is placed once before the question and once after the question. What are these two setups?

  44. 44.One run orders passages from the strongest retriever score to the weakest. Another run uses the same passages from weakest to strongest. What changed?

  45. 45.A fence of marker tokens is wrapped around each inserted passage. What are those markers?

  46. 46.What is a prompt template, relative to the question and the passages?

  47. 47.What kind of encoding is a summary that stands in for earlier context?

  48. 48.A constraint is stated only in the tokens that a summary replaces. What can the summary do with that constraint?

  49. 49.A summary replaces a longer passage inside a fixed context budget. What is true of the summary's own tokens?

  50. 50.How does conditioning on a summary of a passage differ from conditioning on that passage?

  51. 51.How does an extractive shortening differ from an abstractive summary as a stand-in for a passage?

  52. 52.What does the token identity of a string depend on?

  53. 53.A generator was trained with one tokenizer. The prompt is encoded with a different tokenizer, and those ids are fed in. What is mismatched?

  54. 54.A methods note says a passage is 128 tokens long. What else names that count as a sequence?

  55. 55.Why can two strings with the same character count have different token counts under one tokenizer?

  56. 56.Two chat templates wrap the same question and the same passage with different role tokens. What can differ in the model input?

  57. 57.The method inserts a separator token between the question and a passage. What is that separator?

  58. 58.What is the embedding dimension?

  59. 59.Does a larger embedding width, by itself, make the nearest neighbor more truthful?

  60. 60.Two embedding models both emit vectors of the same width. What follows about their coordinates?

  61. 61.A sequence of token states is pooled once by taking one designated token's state and once by averaging the token states. What differs?

  62. 62.An embedding procedure prepends a fixed phrase that marks the input as a query, then embeds the phrase plus the question. What is that phrase?

  63. 63.A passage vector was computed from a fixed prefix plus the passage. The study later drops the prefix and keeps the old vector. What is that vector?

  64. 64.Can a passage index built with embedding model A be searched with query vectors from embedding model B?

  65. 65.A retriever uses a fixed top-k cutoff, and the k-th score is very weak. What does that rule return?

  66. 66.Neighbor search compares vectors. In a standard retrieval pipeline, what is placed in the generator's context for a hit?

  67. 67.What does cosine similarity do with the magnitudes of the two vectors?

  68. 68.What does a raw dot product do with magnitude when the vectors were not already normalized?

  69. 69.When do a dot product and cosine become the same score?

  70. 70.What does recall at k ask?

  71. 71.A relevant passage is inside the top k, and the generator never uses it. What is recall at k for that item?

  72. 72.What changes in the definition of recall at k when k is raised?

  73. 73.How does a retriever's precision at k differ from recall at k?

  74. 74.How does mean reciprocal rank differ from recall at k?

  75. 75.How is the precision of the generator related to the recall of the retriever?

  76. 76.The gold passage is inside the top k, and the generated sentence states a detail that passage does not support. Which outcome fits?

  77. 77.Can the generator's answer be scored correct when the gold passage is outside the top k?

  78. 78.Exact match says the answer string equals a reference string. What does that match establish about retrieval?

  79. 79.What does a closed-book baseline include in the context?

  80. 80.What does an open-book condition add, relative to a closed-book baseline?

  81. 81.When does the score gap between open-book and closed-book show the effect of the retrieved text?

  82. 82.The study inserts a passage it labeled gold, rather than the passage the retriever ranked. What does the generator's score on that context measure?

  83. 83.A closed-book answer is scored correct. What follows about retrieved text?

  84. 84.What is context length?

  85. 85.Does retrieval raise the maximum context length?

  86. 86.The instruction and the question already occupy tokens in the window. What does that do to room for passages?

  87. 87.The assembled sequence is longer than the context length. What decides which tokens remain?

  88. 88.The corpus index grows sharply and stores many more passage vectors. The model is unchanged. What happens to context length?

  89. 89.What does the KV cache store?

  90. 90.How does the KV cache differ from the retrieval index?

  91. 91.A passage is selected from the vector index. When do its keys and values exist in the KV cache?

  92. 92.Cached keys and values were computed for a prefix. When can a later call reuse them?

  93. 93.The corpus index doubles, and no new tokens are placed in the window. What happens to the KV cache?

  94. 94.What can a citation support from the context?

  95. 95.A study grades whether citations are supported. What record does that grade require?

  96. 96.The model names a real document that was not among the inserted passages. What is that name, as context support?

  97. 97.The answer quotes a span. When is that quote drawn from the inserted context?

  98. 98.What is a negative passage?

  99. 99.How does a prompt that includes negative passages differ from a gold-only prompt?

  100. 100.A passage is irrelevant, and the scorer still ranks it next to the query. What is that passage?

  101. 101.How does contrastive training that uses negative passages differ from an inference prompt that contains only the gold passage?

  102. 102.A negative passage is inserted into the window. What can the generator do with its text?

  103. 103.What does query rewriting change for the retriever?

  104. 104.A pipeline rewrites the question before retrieval. What must the study say about the embedding input?

  105. 105.The prompt shows the user the original question, and the retriever embeds a rewrite. What is true of those two strings?

  106. 106.Where do metadata filters act in the retriever being defined here?

  107. 107.Two pipelines share an embedding model and a similarity function. One keeps only passages tagged as current. What follows?

  108. 108.A date field is used only to drop passages outside a range, and that date is not written into the prompt. What does the generator see of the date?