Guide : Embeddings

Embeddings are dense numerical vectors que encode the meaning of text — how semantic search, Google's ranking, and RAG match content by meaning au lieu de keywords.

Première publication : 24 juin 2026 · Dernière mise à jour : 3 août 2026 · Advanced
Langues

An embedding is a liste of numbers — a dense vector — que encodes the meaning of a word, sentence, or document in a high-dimensional space, so semantically similaire text lands fermer ensemble. Encoder models, pas generative LLMs, produce les; similarity is mesuré with cosine similarity. Embeddings power semantic search, clustering, and the retrieval couche in RAG, and Google uses embedding-based retrieval (Neural Matching / RankEmbed, RankEmbedBERT) alongside its keyword index. The SEO upshot n’est pas a knob to turn — Danny Sullivan said of BERT 'there's nothing to optimize pour' — but topically coherent content clusters cleanly near the requêtes it devrait réponse.

TL;DR — An embedding is a dense vector of floating-point numbers (typically hundreds to a few thousand dimensions) que encodes meaning, produced by an encoder model — pas a generative LLM. Similaire meaning → nearby vectors, mesuré with cosine similarity. The field déplacé from static word embeddings (word2vec, GloVe) to contextual ones (BERT) to sentence-level and modern API embeddings. Google uses embedding-based retrieval (Neural Matching / RankEmbed, RankEmbedBERT) alongside its keyword index — hybrid, pas a replacement. Embeddings are aussi the retrieval backbone of RAG. There’s aucun embedding knob to turn; topical coherence is ce que rend content cluster near the correct requêtes.

Ce que an embedding en réalité is

Embeddings prise en charge similarity and retrieval, but ils ne sont pas a direct mesurer of truth, quality, or ranking valeur. Evidence for this claim Embeddings represent inputs as numerical vectors that can be compared for relatedness and used for search, clustering, and classification. Scope: OpenAI embedding models and documented uses; vector dimensions and behavior vary by model. Confidence: high · Verified: OpenAI: Embeddings guide Rerésultats de recherche depend on the trained model and evaluation setting. Evidence for this claim Learned vector representations can encode useful distributional relationships between words. Scope: Word2vec-era language representations; observed vector relationships are model- and training-data-specific, not ground truth. Confidence: high · Verified: Mikolov et al.: Efficient Estimation of Word Representations

An embedding is a dense numerical vector — a liste of floating-point numbers — que represents text (or images, audio, video) as a point in a high-dimensional space. OpenAI’s documentation states it plainly: “An embedding is a vector (liste) of floating point numbers.”

The defining property is geometric: semantically similaire content has similaire vectors. Text que signifie roughly the même chose points in roughly the même direction; unrelated text points elsewhere. That’s pas a happy accident — the model is trained so que words and phrases utilisé in similaire contexts fin up with similaire vectors. Meaning becomes position.

Embeddings turn semantic similarity into distance: related meanings land nearby even when the exact wording differs. Source : /ai-search/how-search-works/embeddings/

A conceptual semantic space places the query reset my password near documents titled Forgot-password guide, Account recovery steps, and Cannot log in. The unrelated document Enterprise pricing sits farther away. Near means more semantically similar; far means less similar. Actual embedding spaces have many more dimensions and model-specific geometry.

© Patrick Stox LLC · CC BY 4.0 ·

A few choses worth getting precise:

  • Encoder, pas generator. Embeddings come from encoder models whose job is to compress meaning into a fixed-size vector. That’s a différent architecture and objectif from a generative LLM, qui predicts the suivant token. (Plus on the internal-vs-API distinction ci-dessous.)
  • Dense, pas sparse. Unlike one-hot or bag-of-words representations (mostly zeros, un slot per vocabulary word), embeddings pack meaning into every dimension. Google’s ML glossary frames embeddings as lower-dimensional, dense representations que fix ce que one-hot encoding can’t express — ils let a model recognize que “hot dogs and shawarmas are more related than hot dogs and salads.”
  • Plus élevé dimensions ≠ toujours meilleur. Plus dimensions peut capture plus nuance, but ils cost plus to store and compute, and the gain is task-dependent. It’s a trade-off, pas a “bigger is better” dial.

Measuring similarity: cosine similarity

To comparer two embeddings vous mesurer the distance — or really the angle — entre les. The standard metric is cosine similarity: it measures the angle entre two vectors regardless of leur length, scoring from −1 (opposite) via 0 (unrelated/orthogonal) to 1 (identical direction). Plus petit distance = plus connexe.

Nombreux embedding APIs normalize vectors to unit length, qui rend cosine similarity and dot product produce the même ranking — OpenAI notes cosine is the conventional, slightly cheaper choice. Voyage AI (the embedding provider Anthropic recommends) puts the intuition cleanly: “the cosine similarity entre two embeddings captures the semantic relatedness of the corresponding original passages.” Doing que nearest-neighbor comparison at scale is its propre problem — that’s the job of vector search.

How we got ici: the evolution

The story runs from unique words to whole passages, and from fixed meanings to context-aware ones.

  • word2vec (Google, 2013). Mikolov et al. introduced two architectures (CBOW and Skip-Gram) pour learning dense word vectors from huge corpora. The famous result: the vector “King” − “Man” + “Woman” lands closest to “Queen” — evidence que vector arithmetic captures semantic relationships. (Caveat: que analogy is illustrative, pas guaranteed every temps; selon the model it peut land on “kings” or “monarch.”) Ces are static embeddings — un fixed vector per word, so “bank” obtient the même vector in “river bank” and “bank account.”
  • GloVe (Stanford, 2014). A count-based alternative construit on global co-occurrence statistics plutôt que a predictive network — différent objective, similarly utile embeddings. Aussi static.
  • Universal Sentence Encoder (Google, 2018). Embeddings pour whole sentences, pas simplement words. The core idea: “Sentences are semantically similaire si ils have a similaire distribution of réponses” — “How old are vous?” and “Ce que is votre age?” invite the même réponses, so ils embed fermer ensemble.
  • BERT (Google, 2018; deployed in Search Oct 2019). The big shift: contextual embeddings. The même word obtient a différent vector selon the surrounding sentence, parce que BERT is bidirectional — it reads the words avant and après a token to fix its meaning. So “bank” in “river bank” and “bank account” finalement obtenir différent vectors.
  • Sentence-BERT (2019). Solved BERT’s scaling problem pour similarity search. Vanilla BERT nécessite les deux sentences fed in ensemble, qui is computationally brutal at scale; SBERT produces fixed-size sentence embeddings vous pouvez comparer with cosine similarity, cutting the cost of finding the la plupart similaire pair in a grand corpus from hours to seconds.
  • Modern embedding APIs (2024–présent). OpenAI’s text-embedding-3 family, Google’s Gemini embeddings, Voyage, and Cohere’s embed-v4.0 — multilingual, increasingly multimodal (text, image, audio, video in un space), and resizable via Matryoshka Representation Learning (truncate the vector to fewer dimensions sans retraining, trading a little accuracy pour storage and speed).

Google’s ranking pipeline isn’t purely semantic or purely keyword — it’s hybrid, and the embedding pieces supplement the classic inverted index plutôt que replacing it. From Google’s propre ranking-systems documentation and Pandu Nayak’s DOJ antitrust testimony, the named systems inclure:

  • BERT — Google’s words-in-context system. At launch it helped Search “meilleur comprendre un in 10 searches in the U.S. in English,” surtout plus long conversational requêtes où prepositions comme “for” and “to” modifier the meaning.
  • Neural Matching / RankEmbed — embedding-based retrieval que translates requêtes and documents into the même vector space to surface conceptually matching results même sans shared keywords. Nayak décrit it as a supplement: “RankEmbed identifies a few plus documents to ajouter to ceux identified by the traditional retrieval.” Retrieval là is fondé on a dot product / distance mesurer in the embedding space.
  • RankEmbedBERT — a plus tard evolution combining RankEmbed’s retrieval with BERT’s language understanding, trained on quality-rater scores and search logs, and notably meilleur on complex, long-tail requêtes.

The practical reading: keyword presence encore matters parce que lexical retrieval (the inverted index, BM25-style) encore fait the first-pass narrowing. The embedding systems ajouter conceptually-related candidates and re-rank. Les deux signals are in play — qui is exactly pourquoi “BERT killed keywords” is incorrect.

Embeddings in AI search (the RAG pipeline)

Ce is où embeddings touch AI Overviews and AI search assistants la plupart directement. Retrieval-Augmented Generation (RAG) uses embeddings as its retrieval couche:

  1. Index: content is chunked into passages, chaque passage is embedded, and the vectors go into a vector database.
  2. Retrieve: the user’s requête is embedded, a nearest-neighbor search trouve the closest chunks (via vector search), and the top-K chunks are handed to the LLM as context.
  3. Generate: the LLM writes an réponse grounded in ceux retrieved chunks.

Structure matters ici parce que chaque chunk is retrieved in isolation. Dan Petrovic’s research (cited in Ahrefs’ Ce que We En réalité Know À propos de Optimizing pour LLM Search) trouvé Chrome processes seulement the premier ~30 passages of une page pour embeddings and chunks les in roughly 200-word passages with overlap to preserve cross-chunk context. Si a section can’t stand on its propre une fois it’s pulled out of lune page, it represents votre content poorly.

Token embeddings vs. text embedding APIs

A distinction que trips personnes up: the embeddings à l’intérieur an LLM and the embeddings vous obtenir from an API ne sont pas the même chose.

  • Token embeddings are the model’s internal representations — chaque token obtient a vector that’s transformed couche by couche during generation. They’re machinery pour producing the suivant token.
  • Text embedding APIs (OpenAI, Google, Voyage, Cohere) produce a unique fixed-size vector pour an entier input string, purpose-built pour retrieval and similarity. Souvent a separate model with a différent training objective.

Quand SEOs talk à propos de “embedding a page” or running cosine similarity pour internal linking or keyword clustering, ils mean the API kind.

Ce que cela signifie pour le SEO

  • Semantic coherence beats keyword density. Parce que models comprendre context, “laptop for gaming” and “high-performance laptop” déjà sit fermer. Stuffing doesn’t aider — it produces topically scattered content with a muddier embedding.
  • Structure pour chunked retrieval. Passages obtenir embedded and retrieved on leur propre. Put important content early, garder sections self-contained, utiliser clair semantic HTML.
  • Topical comprehensiveness. Content que genuinely covers a subject ends up near plus of the connexe requêtes in vector space. That’s the mechanism behind “construire topical authority.”
  • There’s aucun embedding knob. Danny Sullivan, on BERT: “There’s nothing to optimize pour… The fundamentals of us seeking to reward great content remain unchanged.” The cosine-similarity scores vous obtenir from a outil are analysis aids, pas inputs vous submit to Google.

Embeddings are the connective tissue sous la plupart of ce cluster: they’re ce que semantic search runs on, ce que vector search compares, ce que chunking prepares text pour, and the retrieval backbone of RAG. They’re aussi pourquoi exploration encore matters premier — content has to be récupéré avant quelconque system peut embed it.

Add an expert note

Pin an expert quote

New person? Create their unclaimed profile at /admin/experts/ → Pin a quote first.