liveBook · Manning

Semantic relevance filtering

As explained in Building Reliable AI Systems

A retrieval technique that filters information according to semantic similarity to a query or other reference.

Semantic relevance filtering selects retrieved passages by their similarity to a query before they are passed to a language model. A minimum similarity threshold can keep passages that address the question directly and exclude those that are only topically related. section 3.6.5

Filtering keeps retrieved context focused. Passing many long or tangential documents to a model can bury key facts and make them harder to use, increasing the risk of hallucination. Metadata categories such as billing, troubleshooting, and features can further narrow retrieval. section 3.6.5

International roaming support

For a query about enabling international roaming, a knowledge base might return an FAQ, a rates page, a travel-coverage blog, and terms and conditions. Similarity filtering can retain the FAQ with setup instructions and exclude related documents that do not directly answer the question. section 3.6.5

How Building Reliable AI Systems covers it

How deep it goes
Describes minimum-threshold selection and its rationale without detailing similarity calculation or threshold choice.
Examples
Uses a telecom roaming query to contrast a setup FAQ with related rates, travel-coverage, and terms documents.
What you can do after
Understand how a similarity threshold can focus retrieved context on passages that directly address a query.
How it connects
Connects retrieval-augmented generation with metadata filtering and hallucination reduction.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Building Reliable AI Systems. The section links point to the parts of the book it draws on.