Back to the research
Context Engineeringretrieval relevancecontext selection

When Retrieval Returns Off-Topic Papers, Leave Them Out

A search for context engineering returned physics and signal-processing papers. The results show why a relevance check should come before context assembly.

What should an AI system do when retrieval returns nothing relevant?

It should say so and leave the results out. In one example, a search for "context engineering AI systems" returned five recent papers, and none was about AI context. Adding them to a prompt would add noise, and the model might treat them as support for an answer. A relevance check before assembly prevents that.

At a glance

  • Finding: Five results matched the query's wording but not its meaning.
  • Why it matters: Retrieved text that doesn't fit the task can distort an answer. Extra context is not automatically better.
  • Limit: This is one query, and only the papers' abstracts were reviewed. It shows a failure pattern, not how often it happens.

What the search returned

The five results came from different fields, with index dates from 24 to 30 November 2026. They covered:

None of the abstracts discusses prompts, retrieval, memory, tool results or language models. Four of the five use the word "system" or "systems" in the title or abstract. That overlap is a plausible reason they surfaced. I can't confirm the cause, because I didn't see how the search ran.

Why a weak match is risky

Suppose an assistant is asked, "How should I choose which documents go into a model's context window?" (This example is invented for illustration.) If the retrieval step must return its top five items, it will pass along those five papers.

The model then has material that looks authoritative, with titles, authors and an arXiv format. A careless answer might cite the zeta-function paper as a "systems theory" view of context. The paper's abstract supports no such claim.

The failure is in context selection, not in the model's writing. The system never checked whether the evidence answered the question.

A relevance gate before assembly

A gate is a separate check between retrieval and prompt-building. A simple version asks three things of each candidate:

  1. Does it address the user's actual task, not just share a term with it?
  2. Does it contain a claim the answer can use?
  3. Is its scope and date clear enough to state honestly?

If no candidate passes, the system should return "no relevant evidence found". It can then broaden the query, ask the user a question or say it can't answer. Padding the context to fill a quota of results is the wrong response.

What remains uncertain

This is a single query, so it says nothing about how often such mismatches happen or how any particular search tool ranks results. The papers may be excellent in their own fields. They are simply the wrong evidence here.

The abstracts also don't show whether a stricter query or a different index would have found better material.

Next steps

  • Test an empty result: Run 20 queries you know your knowledge base can't answer. Measure how often the system returns "nothing relevant" instead of weak matches.
  • Log rejected candidates: Record what the gate removed and why. Review a sample for wrongly rejected items.
  • Compare answers with and without the gate: Check whether answers cite fewer unsupported sources. Treat this as an experiment on your own data, not a proven gain.
← Explore more research