Embeddings and vector search

Home Learn Embeddings and vector search

In short

An embedding represents information as a list of numbers so software can compare it with other information. Vector search finds nearby representations according to a chosen similarity measure. That can help find related material even when the question and the document use different words.

Why it matters

A help article may say “credential reset,” while a person asks how to get back into an account. Exact word matching can miss that connection. Semantic search looks for relationships in meaning, which can help bridge different wording. The result still has to be the right article for the situation, its current version, and material the person is allowed to see.

How it works

Represent and compare

A vector is an ordered list of numbers. An embedding model converts an input, such as a sentence, into a vector. Its training influences which inputs end up near each other. The Sentence-BERT research describes sentence representations designed for similarity comparisons.

A similarity measure is a rule for comparing vectors. Cosine similarity, for example, compares their directions. A nearby vector can suggest related content, but “nearby” depends on the representation and the comparison method. It isn’t an independent judgment that the source answers your question.

An index organizes representations so software can search them efficiently. Some indexes use approximate nearest-neighbor search: a method that trades some exactness for efficient retrieval. The similarity-search research listed below describes indexing and search techniques for large collections. You don’t need to know the mathematics to inspect whether the returned passage is useful.

Retrieval is a selection problem

A document collection is often split into chunks, which are smaller passages prepared for retrieval. Chunking affects whether a definition stays beside its exception. Metadata supplies information about a passage, such as its title, owner, date, and source location.

Filters can restrict results by category or permission. Ranking puts candidate results in an order. A retrieval system may combine exact-word search with vector search, then recheck the candidates. Each part can influence what reaches the assistant.

Similarity is not permission or truth

A related passage may concern a different product or an older policy. Access must be enforced before restricted material is delivered, including snippets and citations. Review questions people actually ask, including ambiguous ones. I’d check whether the retrieved passage contains the answer, not just language that sounds connected to it.

Example

Illustrative example: this scenario is invented.

Eli works in IT support and security. Their document collection contains “Recover a locked account” and “Replace a damaged keyboard.” Someone asks, “I can’t sign in; how do I regain access?”

A similarity-based search may connect that wording to the account article. Eli still checks which kind of account it covers and whether the passage includes the required identity check. A result about a different account system can be semantically close and operationally wrong. The search helps select evidence; it doesn’t authorize the recovery action.

What it doesn’t mean

  • An embedding isn’t a verified summary of everything an input means.
  • A similarity score isn’t a probability that an answer is correct.
  • Related material isn’t automatically current, sufficient, or permitted for the person asking.

Try it

Spend about ten minutes inventing short article descriptions about account access, keyboard replacement, and changing a mailing address. Ask an assistant which passage best fits a request to regain access, and why.

Then add a second account article for a different system. Ask what information is needed to choose between them. This exercise explores retrieval decisions without creating real embeddings. Check whether the assistant notices the missing system name and preserves the identity-check requirement. The useful habit is inspecting the selected evidence before accepting the resulting advice.

Keep going

Sources

Share this page