Skip to content

Embedding

An embedding is a list of numbers representing aspects of an input so related inputs can be compared mathematically.

The phrases “reset my password” and “cannot sign in” may receive nearby vectors even though they do not share the same words. A semantic retriever can therefore find a login troubleshooting passage for either query.

An embedding is not a generated answer and is not a reversible copy of the source text. Your system still needs the original text and metadata to build context and citations.

Query and document vectors must come from a compatible model configuration. Equal dimensions do not prove compatibility. Pin the provider, model, version, dimensions, preprocessing, input mode, and distance function with the index.

Some models intentionally expose different compatible modes for queries and documents.1 A model change normally requires a new index, re-embedding, and evaluation before cutover.

Evaluate the embedding model with the customer’s language, acronyms, product names, and document types. General benchmark performance does not guarantee useful retrieval in a specialized corpus. Continue to cosine and vector search.

  1. Cohere’s embedding documentation distinguishes compatible search_query and search_document modes.