liveBook · Manning

Semantic similarity

As explained in Building Reliable AI Systems

A measure of how closely the meanings of two pieces of content correspond.

Semantic similarity estimates how closely two pieces of content correspond in meaning. In embedding-based retrieval, related documents and queries occupy nearby positions in a high-dimensional meaning space. section 4.1.1

Retrieval systems can use similarity thresholds to keep only passages directly relevant to a query, reducing distracting context. Similarity matching can also help compare generated claims with grounding data during hallucination checks. section 3.6.5 section 9.1.1

Filtering a roaming query

For “How do I set up international roaming?”, a similarity filter can retain the setup FAQ while excluding related rate, destination-coverage, and terms pages. section 3.6.5

Figure 4.3 Visualizing embeddings across a vector space. Each point represents a document that has been mapped to a specific location based on its semantic content.
figure

See how documents with related meanings cluster as neighboring points in a projected vector space. section 4.1.1

How Building Reliable AI Systems covers it

How deep it goes
Explains spatial proximity and threshold filtering, but gives no similarity formula or scoring implementation.
Examples
Uses clustered policy documents, an international-roaming FAQ query, and claim comparisons against knowledge-base data.
What you can do after
Evaluate retrieved passages for relevance and compare generated claims with grounding data.
How it connects
Connects semantic similarity to embeddings, vector search, retrieval-augmented generation, and hallucination evaluation.

Also explained in

Compare how 5 books explain semantic similarity →

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.