JOURNAL / REPRESENTATIONS & SEARCH

What are AI embeddings?
Meaning, mapped into numbers.

Embeddings turn text, images, or other inputs into numerical representations that a system can compare. They make semantic search possible—but similarity is a way to find candidates, not a verdict about truth.

A long aisle of books in a warmly lit library, with readers in the distance.SEARCH / REPRESENTATION / SYMPLOKA
A MAP HELPS YOU FIND A PLACE

Search is a map of the material you actually have.

An embedding lets software compare items by a learned representation. The index helps retrieve likely matches; the original source still carries the detail and evidence.

01 / THE REPRESENTATION

An embedding is a learned numerical description of an input.

An embedding model converts an input—such as a sentence, paragraph, image, or audio segment—into a list of numbers called a vector. Its training shapes which patterns the vector retains. In a model designed for semantic search, passages that are useful for similar questions may end up near each other under a chosen comparison rule.

That vector is a compact representation, not a miniature copy of the source. It does not preserve every word, nuance, date, or qualification. Keep the original content and its source details alongside the vector so a system can retrieve and show the actual evidence.

Different embeddings serve different tasks. A token embedding inside a language model, a sentence representation for search, and an image embedding for matching are not interchangeable just because all are arrays of numbers.

02 / THE SEARCH

Vector search ranks stored items against a query representation.

  1. Prepare the collection. Extract text and preserve document IDs, locations, dates, and access rules.
  2. Choose boundaries. Split long material into passages that keep enough surrounding context to make sense.
  3. Embed and index. Run each passage through a compatible embedding model and store its vector with a link to the source.
  4. Represent the question. Embed the query using the compatible query path for that model.
  5. Retrieve candidates. Rank vectors using the index’s selected metric, then apply filters or a reranker where the task needs them.
  6. Inspect the originals. Return the passages and source metadata so a person or a later model stage can assess the evidence.

Cosine similarity, dot product, and Euclidean distance are comparison choices with different assumptions. A score is not a calibrated probability that a passage is correct or even relevant. Treat it as a ranking signal and test it against examples from the task.

03 / WHERE IT FITS IN RAG

Embeddings help find context; they do not write or verify the answer.

In retrieval-augmented generation, a search stage selects candidate material and supplies it to a generative model as context. The answer stage is a separate step. It can omit the useful passage, misunderstand it, or make a claim that the passage does not support. Follow the full RAG pipeline from index to answer ↗.

Vector search is not the only retrieval method. Keyword search can be stronger for exact names, identifiers, and rare technical terms. A hybrid search can combine lexical and semantic candidates; a reranker can then compare the question with each candidate more directly. Added stages should earn their place in a measured comparison.

For the wider architecture, read RAG or fine-tuning? ↗. For a diagnostic workflow, continue with How to evaluate a RAG system ↗.

04 / THE FAILURE MODES

A good-looking match can still be the wrong passage.

Chunking loses contextA split can separate a definition from its exception, or a value from the heading that explains it. Keep boundaries that reflect the source and task.
Terminology is unevenA model may miss product codes, new names, unusual jargon, or a language it handles less well. Compare semantic retrieval with keyword search on real queries.
Similar is not authoritativeA passage can be semantically close and still be outdated, speculative, or about a different jurisdiction. Preserve dates, provenance, and document status.
Access rules are not optionalApply authorization before material reaches a model. A vector index does not replace tenant boundaries or source permissions.

Changing the embedding model, its settings, or the text preparation can change the vector space. Re-embed and rebuild the index when required; do not compare vectors from incompatible spaces as if their scores meant the same thing.

05 / TEST THE WHOLE PATH

Measure whether useful evidence appears—and what happens next.

  1. Write representative questions. Include exact terms, paraphrases, multiple topics, and questions whose answer is absent.
  2. Label relevant passages. Record which sources genuinely contain evidence for each question.
  3. Compare retrieval. Check Recall@k and ranking measures such as MRR or nDCG, then read misses and false matches directly.
  4. Check permissions and freshness. Test updates, removals, filters, and users who should not see a source.
  5. Evaluate the answer separately. Check whether answer claims follow from retrieved passages and whether the system abstains when evidence is missing.

Keep a fixed test set and compare one change at a time: passage boundaries, embedding model, search metric, hybrid weighting, or reranking. A higher retrieval score is useful only if the target workflow improves without introducing a costly failure elsewhere.

For practical retrieval metrics and grounded answer checks, see the RAG evaluation guide ↗ and the broader guide to reading AI benchmarks ↗.

KEEP LEARNING

From vectors to systems people can trust.

Embeddings give a system one way to find related material. The choices around the index—source quality, permissions, ranking, and evaluation—decide whether that search is useful. Explore the AI field guide ↗ or follow the full retrieval design discussion ↗.

RESEARCH & OPEN TOOLSReimers & Gurevych, Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks (2019) ↗Karpukhin et al., Dense Passage Retrieval for Open-Domain Question Answering (2020) ↗Meta Research, Faiss: similarity search and clustering of dense vectors ↗Lewis et al., Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks (2020) ↗