Choosing a prebuilt RAG pipeline, agentic search with tools or the whole corpus in context from the corpus, the queries and the latency and cost limits, and, when indexing wins, setting up contextual retrieval and a fallback for the best results within those limits.
Try each one before opening the answer. Every option is explained, with the Anthropic documentation page that proves it.
Question 1 · choose 1
An operations assistant answers engineers' questions about a large internal runbook repository that dozens of teams edit every hour. Answers must reflect edits made minutes earlier, questions are exploratory and vary widely, and engineers accept answers that take tens of seconds. Which retrieval architecture fits these constraints?
AGive the agent search and file tools over the live repository, so that it loads the pages it needs at query time
BBuild an embedding index of the repository that a nightly job rebuilds, and retrieve the top chunks for each question
CBuild a contextual retrieval index with chunk context and BM25, refreshed by a weekly ingestion job
DLoad the repository's pages into the context up front for every session, so that nothing has to be retrieved later
Show the answer and why
AGive the agent search and file tools over the live repository, so that it loads the pages it needs at query time
Correct
Just-in-time retrieval with lightweight references loads current data at runtime and avoids stale indexing, at a latency cost.
BBuild an embedding index of the repository that a nightly job rebuilds, and retrieve the top chunks for each question
Incorrect
A pre-built index reflects the repository as of its last rebuild, so edits made since then are missed.
CBuild a contextual retrieval index with chunk context and BM25, refreshed by a weekly ingestion job
Incorrect
Better chunk retrieval doesn't help when the index lags the repository by days.
DLoad the repository's pages into the context up front for every session, so that nothing has to be retrieved later
Incorrect
Context engineering aims for the smallest set of high-signal tokens; loading everything up front works against that.
Anthropic's context-engineering guidance describes "just in time" retrieval: the agent keeps lightweight identifiers such as file paths or queries and uses tools to load data into context at runtime. Claude Code works this way with glob and grep, which bypasses the problems of stale indexing. It costs some latency per answer, which these users accept, while a pre-built index is only as current as its last rebuild.
A team indexes quarterly filings for a retrieval pipeline and says it has implemented Contextual Retrieval. Its ingestion step is:for doc in filings:
summary = claude_summarize(doc) # one summary per filing
for chunk in split(doc, max_tokens=800):
vector_index.add(embed(summary + "\n" + chunk))
bm25_index.add(chunk)Retrieval of chunks such as "Revenue grew 3% over the previous quarter" still misses which company and quarter they belong to. Which change brings the step in line with Contextual Retrieval as Anthropic describes it?
AMake each filing's summary longer and more detailed, so that every chunk carries more of the document's facts
BWrite a short chunk-specific context for each chunk from the whole filing, and prepend it before embedding and before BM25 indexing
CWrite a chunk-specific context for each chunk and prepend it before embedding only, leaving the BM25 index on the raw chunk text
DIndex the filing summaries instead of the chunks, and pass the matching filings' full text to the model at query time
Show the answer and why
AMake each filing's summary longer and more detailed, so that every chunk carries more of the document's facts
Incorrect
Adding generic document summaries to chunks gave very limited gains in Anthropic's experiments.
BWrite a short chunk-specific context for each chunk from the whole filing, and prepend it before embedding and before BM25 indexing
Correct
Contextual Retrieval prepends chunk-specific explanatory context to each chunk for both the embeddings and the BM25 index.
CWrite a chunk-specific context for each chunk and prepend it before embedding only, leaving the BM25 index on the raw chunk text
Incorrect
The context goes on the chunk before embedding and before creating the BM25 index (Contextual BM25).
DIndex the filing summaries instead of the chunks, and pass the matching filings' full text to the model at query time
Incorrect
Summary-based indexing was evaluated and showed low performance compared with Contextual Retrieval.
Contextual Retrieval prepends chunk-specific explanatory context, written by Claude from the whole document and usually 50-100 tokens, to each chunk before embedding it (Contextual Embeddings) and before creating the BM25 index (Contextual BM25). Anthropic reports that generic document summaries added to chunks gave very limited gains and that summary-based indexing performed poorly.
A legal team keeps its contract library as the knowledge of one claude.ai project on an Enterprise plan. The library keeps growing and is approaching the context window limit. What does Claude do as the project knowledge grows past that point?
AIt refuses new uploads until older files are removed, since project knowledge is capped by the window
BIt loads the newest files and silently drops the oldest from context until the knowledge fits again
CIt switches the project to RAG mode and retrieves passages with a project knowledge search tool
DIt waits for an admin to turn on retrieval in the project settings first
Show the answer and why
AIt refuses new uploads until older files are removed, since project knowledge is capped by the window
Incorrect
That was the earlier limit; with RAG, a project keeps accepting knowledge beyond the context window.
BIt loads the newest files and silently drops the oldest from context until the knowledge fits again
Incorrect
In RAG mode Claude searches all uploaded content and retrieves the most relevant passages.
CIt switches the project to RAG mode and retrieves passages with a project knowledge search tool
Correct
When project knowledge approaches the context window limit, Claude enables RAG mode automatically.
DIt waits for an admin to turn on retrieval in the project settings first
Incorrect
RAG needs no setup or configuration, and its activation isn't something users control.
On paid plans, when a claude.ai project's knowledge approaches the context window limit, Claude automatically enables RAG mode and uses a project knowledge search tool to retrieve the relevant passages instead of loading all project content at once. Projects use in-context processing whenever possible and can switch back if the knowledge drops below the threshold.