Skip to content

What is an embedding? Vectors and semantic similarity

An embedding is a dense numeric representation (a vector) of text, an image, or an entity, placed in a space where proximity reflects semantic similarity. Popularized by Word2Vec (Mikolov et al.) and generalized by encoders like BERT, embeddings power semantic search, clustering, and RAG. They do not “understand” alone—they measure useful distances.

In one sentence

An embedding turns content into a vector to compare meaning, not just words.

Key points

  • Semantically close texts have close vectors (cosine / dot product).
  • Foundation of semantic search and RAG with LLMs.
  • Quality depends on the encoder model and domain.
  • You must store and index vectors (vector DB) to scale.

Term at a glance

Embedding
Vector embedding · Dense representation
English term
Embedding
Domain
Artificial intelligence
Category
Representation / NLP
Level
Intermediate

What does “embedding” mean exactly?

Word2Vec showed vectors learned from co-occurrence capture analogies. BERT and modern encoders produce contextual embeddings: the same word changes with the sentence.

In SME practice: split documents, compute a vector per chunk, index, then retrieve chunks close to a question before passing them to an LLM.

Pitfalls: similarity ≠ truth; off-topic but lexically close docs can rank if chunking is poor.

How do you implement embeddings?

  1. 01

    Prepare the corpus

    Clean, chunk, add metadata (source, date).

  2. 02

    Choose the encoder

    Multilingual model if FR/EN/ES; test on your queries.

  3. 03

    Index

    Vector database + metadata filters.

  4. 04

    Evaluate retrieval

    Precision@k on real business questions.

A concrete embedding example

An industrial distributor indexes 4,000 tech sheets. A buyer asks for a “steam-resistant food-grade gasket.” Lexical search misses synonyms; embedding search surfaces the right sheet. Sales saves minutes per call.

What are embeddings used for?

Semantic search

Docs, tickets, catalog.

RAG

Relevant context for an LLM.

Dedup / clustering

Group similar tickets or products.

Recommendation

Similar content or items.

Benefits and limits of embeddings

  • Robust to synonyms
  • Foundation for RAG
  • Scalable with ANN indexes
  • Reusable across use cases
  • Indexing and re-indexing cost
  • Quality tied to model and chunking
  • Similarity ≠ factual accuracy
  • Sensitive data in the index must be protected

How do embeddings differ from keyword search (BM25)?

EmbeddingLexical search (BM25)
SignalVector semantic proximityTerm overlap
SynonymsOften handled betterWeak without explicit synonyms
Exact matchSometimes weaker (SKU, codes)Excellent on identifiers
PracticeOften hybrid (vector + lexical)Simple and predictable

Why embeddings matter for Quebec SMEs

Your knowledge is buried in PDFs and tickets. Embeddings make it findable by intent, not only exact words—a prerequisite for a credible document assistant.

Frequently asked questions

Do we re-index often?

Yes when the corpus changes; automate the pipeline for new docs.

What vector dimension?

Whatever the chosen model uses; bigger is not always better for your domain.

Multilingual?

Use a multilingual encoder and test FR↔EN on real pairs.

Where to store?

Managed vector DB or pgvector; encrypt and control access like any sensitive DB.

Related terms

Sources and references

Want search that understands intent? We implement embeddings, indexing, and evaluation on your corpus.

Build semantic search
Glossary