JevMade

Sign in
← Back to guides

JevMade field notes / Worked Spring AI retrieval tutorial

Search widely, then check the passages

Christian Tzolov combines broader document search with Jev checks that filter passages and rank the remaining answer evidence.

Original by Christian TzolovRetrieval
Bookmark: Search widely, then check the passages Keep this in your collection.
Leave a noteWhat would you try with this? : Search widely, then check the passages

Only you can see your notes.

Listen to this guide

JevMade’s plain-English explanation

0:00 /

Our summary

A document search can find text about the right subject without finding an answer. Christian Tzolov's Spring AI tutorial rewrites a reader's question and searches several versions of it. Jev then checks the retrieved passages before a text-generating model uses them to answer the reader.

Four yes-or-no questions check each passage for hostile instructions, contradiction, relevance and answer evidence. After screening hostile instructions, the filter keeps evidence that challenges what the question assumes. Another Jev check ranks the remaining passages. The author's Hurricane Milton example narrows six retrieved passages to two useful ones.

If Jev fails, passages may continue unchecked or unscored. The final passage limit still applies, so contradictory evidence can be lost later. Filtering and ranking add service requests. Two extra text-model calls rewrite the question and produce search variants before retrieval. The example is not a security guarantee.

Key takeaways

  1. Retrieve broadly, then distinguish text about a topic from text that actually answers the question.
  2. Check hostile instructions first. Evidence that passes that check should not be discarded just because it contradicts the question.
  3. Count filtering and ranking requests separately, and decide whether continuing without those checks is acceptable when the service fails.

The author's example was not independently reproduced. Filtering makes one Jev request per passage; ranking makes another for each passage that remains. Each batch allows four requests in progress at once by default. The six-to-two example implies eight Jev requests before retries. Both stages continue on service failure, but the final passage limit still applies.

Spring blog · Original published

Read the original guide Opens the author’s site in a new tab.

Your note

Only you can see this. Clear the text and save to remove it.

Keep what you save

Sign in to keep bookmarks and private notes on every device. We email you a link; there is no password, and the same link creates your account.