Skip to content
Workbench

Workbench / Knowledge & RAG

Embeddings: how search finds related wording

Embeddings help search match related wording, but similarity is not proof that a passage answers the question.

Embeddings are lists of numbers produced by a model from an input such as text or an image. Search systems compare these lists to find related material, including passages that use different words from the question.

A design analogy, with limits

My background is in graphic design, where vector graphics describe shapes mathematically. An embedding is also numerical, but it is not an outline of meaning that can be inspected like a drawing. Its useful properties come from how the model was trained.

For example, an embedding model may place “change a car battery” near “replace a vehicle battery”. That relationship is learned and approximate. Similarity does not prove that a passage answers the question.

Comparing embeddings as numbers

A simplified embedding might look like this:

[0.12, -0.44, 0.83, 0.05, ...]

Real embeddings often have hundreds or thousands of dimensions. Search compares vectors using a measure such as cosine similarity or dot product. Query and document vectors must come from compatible models and use the preprocessing expected by that model.

Why keyword search still helps

Part numbers, exact product names and uncommon abbreviations can matter more than a broad semantic match. Hybrid search combines keyword and vector results so neither method has to solve every query alone.

In RAG, retrieved passages become context for an answer model. Check whether the right passage was found; a high similarity score is not a factual confidence score.