An embedding is a list of numbers that represents the meaning of a piece of text, produced by an embedding model.
Texts with similar meaning get vectors that are close together, which makes semantic search possible. Vectors from different embedding models cannot be compared with each other.
To search by meaning, you embed every chunk once, store the vectors, then embed each query and look for the nearest vectors. Closeness is usually measured with cosine similarity or dot product.
Common mistake. Switching the embedding model without re-embedding the whole corpus. Old and new vectors live in different spaces, and results become noise.
In practice. Record the model name and version with the index, re-index when you change it, and compare candidate models on your own retrieval eval, not on a public leaderboard alone.
A vector database stores embeddings together with ids and metadata and finds the nearest vectors to a query quickly. Most use approximate nearest-neighbour indexes that trade a little accuracy for speed. You can use a dedicated store, or the pgvector extension in Postgres if you already run it.
Chunking is splitting documents into pieces small enough to index and retrieve individually. The size and boundaries decide what search can find: too large and a chunk mixes topics, too small and it loses the context that makes it meaningful. Splitting along headings and list items usually beats fixed character counts.
Hybrid search combines keyword search, which is good at exact terms such as error codes and names, with vector search, which is good at paraphrases and meaning. The two ranked lists are merged, commonly with reciprocal rank fusion. On most real corpora the combination beats either method alone.
Cite this page
Eldan Abdrashim. "Embedding." Eldan.ai, 23 November 2026. https://eldan.ai/glossary/embedding.
The date you read it is added when you copy.
BibTeX
@online{abdrashim2026embedding,
author = {Eldan Abdrashim},
title = {Embedding},
organization = {Eldan.ai},
date = {2026-11-23},
year = {2026},
month = nov,
url = {https://eldan.ai/glossary/embedding},
langid = {english}
}