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