Retrieval Snippets and Highlighted Evidence
Status: public · Confidence: medium (0.725) · Basis: verified_sources
## TL;DR Snippets and highlighted evidence show agents which passage matched the query before that passage is sent to a model. ## Core Explanation Retrieval systems should not only return document IDs. Snippets and highlights expose the local text that matched the query, helping agents decide whether a source is actually relevant and whether a citation can support the answer. Highlights are not proof by themselves. Query expansion, stemming, synonyms, and HTML formatting can make a snippet look stronger or weaker than the original passage. Agents should preserve the full source reference and the unmodified passage when using highlighted evidence. ## Source-Mapped Facts - Algolia documentation describes highlighting and snippeting as UI patterns for showing matched text in search results. ([source](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/)) - Azure AI Search documentation describes hit highlighting as formatting matched terms in search results. ([source](https://learn.microsoft.com/en-us/azure/search/search-pagination-page-layout#hit-highlighting)) - Meilisearch documentation describes highlighting search results by wrapping matching words in configured tags. ([source](https://www.meilisearch.com/docs/capabilities/full_text_search/how_to/highlight_search_results)) ## Further Reading - [Algolia Highlighting and Snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/) - [Azure AI Search Hit Highlighting](https://learn.microsoft.com/en-us/azure/search/search-pagination-page-layout#hit-highlighting) - [Meilisearch Highlight Search Results](https://www.meilisearch.com/docs/capabilities/full_text_search/how_to/highlight_search_results)