Nexuldra

// ai

Embedding

An embedding is a list of numbers — typically a few hundred to a few thousand values — computed from a piece of text so that texts with similar meaning get similar numbers. It lets software compare meaning instead of keywords: the mechanism behind semantic search, recommendations and retrieval in RAG systems.

Embeddings matter because meaning-based search survives paraphrase: a question phrased in words that appear nowhere in your documents still retrieves the right page, because its numbers sit close to the document's. They are produced by models trained on exactly this task — texts appearing near each other should get close embeddings — and cost fractions of a cent per document at business scale. Without them, retrieval would be keyword matching, and a question phrased differently from the manual would find nothing.

Concretely, in a RAG pipeline each document is split into chunks of a few hundred words, each chunk is passed through an embedding model, and the resulting vectors go into a vector database. A question is embedded the same way, and the database returns the closest chunks — usually the top three to five — which land in the prompt as context. The choice of embedding model is a real decision: on domain vocabulary (legal, medical, technical), a model tuned for the domain can measurably beat a general-purpose one, so test with fifty questions whose right answers you already know.

Frequently asked questions

How many dimensions does an embedding have?
Common models output between a few hundred and a few thousand numbers — 384, 768, 1,536 and 3,072 are typical sizes. More dimensions can capture finer distinctions but cost more storage and slightly slower search; for most business corpora the differences are modest.
Can embeddings compare meaning across languages?
Multilingual embedding models map sentences in different languages to nearby points when the meaning matches, which enables cross-lingual search: ask in English, retrieve a document written in Italian. Quality varies by language pair, so test with real queries before relying on it.

// go deeper

Full treatment in the guide: RAG, without the jargon: letting AI answer from your own documents

Related terms