What Are Embeddings and Vectors? A Practical Guide to Semantic Search

Search used to be mostly about matching words. If your page contained the phrase someone typed, it was a candidate.…

Scatter plot of text embeddings in clusters with a query point and its nearest neighbours
On this page

Search used to be mostly about matching words. If your page contained the phrase someone typed, it was a candidate. Modern retrieval systems, including many AI search tools, also compare meaning. The technique behind that is called embeddings: a way of turning text into numbers so that passages with similar meaning end up close together. Understanding embeddings makes it much easier to follow conversations about semantic search, RAG, vector databases and AI retrieval without being intimidated by the jargon.

This guide explains embeddings and vectors in plain English, shows how similarity is calculated, gives you a short script you can run locally for free, and explains what the exercise can and cannot tell you about SEO. It is a general AI and information retrieval topic, so we are careful not to claim that any search engine ranks pages this way.

Key takeaways

  • An embedding is a list of numbers (a vector) that represents the meaning of a piece of text. Similar meanings produce vectors that sit close together.
  • Similarity between two embeddings is usually measured with cosine similarity: how closely two vectors point in the same direction.
  • Embeddings power semantic search, which can match a question to a passage even when they share few words.
  • They are a useful tool for SEO work such as finding overlapping pages, grouping topics and testing passage clarity, but they are not a ranking factor you can optimise for directly.
  • Similarity scores belong to one model. Do not compare scores between models or treat them as quality scores.

How to read the evidence in this guide

Embeddings and vector similarity are established technical concepts from machine learning and information retrieval. Whether and how a particular search engine uses them for ranking is only official documentation where that engine says so. Where we have no source, we describe it as a hypothesis.

What Are Embeddings and Vectors?

A vector is simply an ordered list of numbers, such as three numbers describing a point in space. An embedding is a vector produced by a model to represent something, usually a word, sentence or passage. Typical text embedding models produce hundreds or thousands of numbers per piece of text. You never read them directly; you compare them.

The easiest analogy is a map. A map places cities at coordinates so that nearby cities are close together. An embedding model does something similar for meaning: it places “how do I fix a leaking tap” near “repairing a dripping faucet” and far from “best pasta recipes”, even though the first two share no words. The difference is that a map has two dimensions and an embedding has hundreds.

Why it matters in SEO

Three reasons. First, semantic search systems use embeddings to retrieve passages by meaning, which affects how AI answer tools find content. Second, embeddings give you a practical way to analyse your own site: spotting pages that overlap, grouping queries and testing whether a section clearly answers a question. Third, they give you vocabulary to evaluate vendor claims. If a tool promises “semantic optimisation”, you can now ask what is actually being measured.

Related terms

  • Word embeddings represent individual words. Modern systems more often embed whole sentences or passages.
  • Vector search finds the stored vectors closest to a query vector.
  • Vector databases store vectors and make nearest-neighbour search fast at scale.
  • Latent semantic indexing (LSI) is an older technique, often misused as an SEO buzzword. It is not the same as modern embeddings and “LSI keywords” are not an official concept.

How Embeddings Work

  1. Text is split into tokens. The model breaks the text into small pieces (words or parts of words) it can process. See tokenization.
  2. A neural model processes the tokens. Embedding models are trained on very large amounts of text so that texts used in similar contexts get similar representations.
  3. The model outputs a vector. The vector has a fixed length for a given model, for example several hundred numbers, regardless of how long the text was.
  4. Similarity is calculated. The most common measure is cosine similarity, which compares the direction of two vectors. Scores usually fall between 0 and 1 for many text models, where higher means closer in meaning, though the exact range depends on the model.
  5. The closest vectors are retrieved. A system embeds the question, finds the nearest stored vectors, and returns those passages.
Concept Plain-English meaning Why it matters
Dimension How many numbers are in each vector Fixed per model; vectors from different models cannot be compared
Cosine similarity How closely two vectors point the same way The usual way to rank passages by closeness of meaning
Nearest neighbour The stored vectors closest to the query The basis of vector search
Lexical match Matching actual words Still important for names, codes and exact phrases

Embeddings versus keywords

A keyword system asks, “does the page contain these words?” An embedding system asks, “is this passage close in meaning to the question?” Each has strengths and weaknesses, which is why many real systems combine them. We compare the approaches in keyword vs vector vs hybrid search.

A Real-World Example

This example is illustrative. We describe what you should expect to see; we are deliberately not printing numbers, because exact scores depend on the model and we have not published results from a real run.

Take three short texts:

  • A: “How do I fix a page that Google has not indexed?”
  • B: “Reasons a URL might be missing from Google’s index and how to resolve them.”
  • C: “The best coffee shops in Leeds for working remotely.”

A and B share almost no important words, but they ask about the same problem. When you embed all three and compare, you should typically find that A and B are far more similar to each other than either is to C. A keyword-only check would barely connect A and B. That is the practical meaning of “semantic similarity”.

Run the exercise below to see it for yourself, then replace the sample texts with your own page titles and queries.

Implementation Steps: A Small Similarity Experiment

  1. Set up Python. Install Python 3.9 or later and create a virtual environment.
  2. Install the libraries. pip install sentence-transformers numpy. The first run downloads a small open-source model, so you need an internet connection once. Check current documentation for versions and licences.
  3. Prepare your texts. Use five to ten items: for example, three queries and several page titles or section summaries from your own site.
  4. Run the script.
  5. Inspect the pairs. Sort by similarity. Do the highest pairs genuinely overlap in meaning or intent? Do any surprising pairs appear?
  6. Write down what you learned. Note any false positives (similar wording, different intent) and false negatives.
import numpy as np
from sentence_transformers import SentenceTransformer

texts = [
    "How do I fix a page that Google has not indexed?",
    "Reasons a URL might be missing from Google's index and how to resolve them.",
    "The best coffee shops in Leeds for working remotely.",
]

model = SentenceTransformer("all-MiniLM-L6-v2")
vecs = model.encode(texts, normalize_embeddings=True)
sim = vecs @ vecs.T   # cosine similarity because vectors are normalised

pairs = []
for i in range(len(texts)):
    for j in range(i + 1, len(texts)):
        pairs.append((float(sim[i][j]), texts[i], texts[j]))

for score, a, b in sorted(pairs, reverse=True):
    print(round(score, 3), "|", a, "|", b)

Practical SEO uses once you are comfortable

  • Overlap checks. Embed your page titles and summaries to find near-duplicate intents that may be cannibalising each other.
  • Grouping queries. Cluster Search Console queries by meaning to see natural topic groups.
  • Passage clarity tests. Check whether a section is closest to the question it is supposed to answer, as in our RAG guide.
  • Planning. Feed grouped questions into a query fan-out map.

Free Tools

Tool Use Limits and checks
Python with sentence-transformers and numpy Generate embeddings and compute similarity locally Requires comfort with the command line; first run downloads a model; hardware and licence terms vary
Google Sheets Store texts, scores and your review notes Cannot generate embeddings by itself; use it to record results
Google Search Console Real queries and pages for your test set Not all queries appear; export before data ages out
Screaming Frog (free version) Export titles and metadata for small sites Free version has a crawl limit; check the current limit
Hosted embedding APIs Alternative to local models May require an account and payment. Do not assume free access.

Limitations

  • Similarity is not relevance or quality. Two passages can be close in meaning and one can still be wrong, outdated or unhelpful.
  • Scores are model-specific. A 0.7 from one model does not mean the same as a 0.7 from another. Compare only within the same model and test.
  • Not a ranking factor you can target. No search engine has told site owners to maximise embedding similarity. Treat it as an analysis tool.
  • Domain language can confuse models. Niche jargon, product names and acronyms may be poorly represented in a general model.
  • Intent can differ despite similarity. A “what is X” page and a “buy X” page can be semantically close but serve different intents.
  • Language and bias. Models perform differently across languages and may reflect biases from their training data.

What Google Says About Writing for AI Systems

Google’s guide to generative AI features says AI systems can understand synonyms and the general meaning of what someone is seeking, so you do not need to write in a special way for generative AI search or worry about covering every long-tail variation. That is the practical upside of embeddings: matching by meaning reduces the need to repeat keyword variants. It is also a reason to treat similarity scores as an analysis tool and not a writing target. (Source: Google’s guide.)

Embeddings and Content in Several Languages

Many embedding models are trained on multiple languages, and some can place a question in one language near a passage in another. Performance varies by model and by language, and it is usually weaker for less common languages and for specialist vocabulary. If your site serves more than one language, test with real questions in each language you publish, use a model documented as multilingual, and do not assume a score that works in English means the same thing elsewhere. Keep the same discipline as in the experiment above: one model, one set of questions, results recorded with the model name and date.

A Measurable Experiment

Hypothesis (unverified): Page pairs that an embedding model flags as highly similar are more likely to share meaningful Search Console queries than pairs it rates as dissimilar, so similarity can help prioritise cannibalisation reviews.

  1. Build the sample. Take 20 to 40 pages from your site. For each, use the title plus the first 150 words or a one-paragraph summary.
  2. Calculate all pairwise similarities with the script, saving the scores.
  3. Collect query overlap. From Search Console, export queries per page for a fixed period. For each pair, count shared queries with meaningful impressions.
  4. Compare. Take the top 10 percent of pairs by similarity and the bottom 10 percent. Calculate the share of each group that has two or more shared queries.
  5. Review manually. For the top pairs, judge whether the pages really target the same intent.

Metrics: share of high-similarity pairs with shared queries versus low-similarity pairs; number of confirmed overlaps found. Guardrails: do not merge or redirect pages based on a score alone; always check intent, traffic and links first. Confounders and limits: small sample, one model, summaries that differ in quality, and Search Console data that omits some queries. A strong relationship would make the method a useful triage step, nothing more. A weak one tells you to rely on manual review.

Choosing an Embedding Model

Most SEO experiments do not need the biggest or newest model. They need one you can run repeatably. A practical way to choose:

  • Language. If your content is not in English, pick a model trained for multiple languages and check its documentation.
  • Size and speed. Smaller models run on an ordinary laptop. Larger ones may be more accurate but need more memory and time.
  • Licence. Confirm that the licence allows your use, especially for client work.
  • Stability. Record the exact model name and version in your notes. If you change the model, treat it as a new experiment.
  • Hosted versus local. Hosted models can be easier but may cost money and send your text to a third party. Do not paste confidential client content into a service without checking its terms.

Where Embeddings Fit in the Retrieval Stack

It helps to see embeddings as one component in a larger pipeline rather than a complete search system.

Layer Role Where embeddings appear
Query handling Interpreting and expanding the question Sometimes, to compare the query with known intents
Candidate retrieval Finding possibly relevant passages fast Core use: nearest-neighbour search over vectors, often alongside keyword search
Reranking Ordering candidates carefully Usually a different, more precise model
Answer generation Writing the response Not used directly; the model receives the retrieved text
Quality and safety signals Judging reliability, spam and freshness Mostly separate signals that embeddings do not capture

That last row is important for SEO. Closeness in meaning says nothing about whether a source is trustworthy, current or authoritative. Search systems use many other signals, and we cannot see them.

A Checklist Before You Trust a Similarity Result

  1. Did you use the same model for every text you compared?
  2. Are the texts a similar length and format (for example all titles, or all summaries)?
  3. Did you clean boilerplate such as navigation and footers that can dominate a page’s embedding?
  4. Did you read the top pairs yourself instead of trusting the scores?
  5. Did you check whether high similarity reflects shared wording but different intent?
  6. Did you record the model name, date and settings so the test can be repeated?

Common Mistakes

  • Embedding whole pages with navigation and footers included. Repeated boilerplate pulls every page towards the same point and hides real differences.
  • Treating a high score as a verdict. It is a prompt for human review.
  • Comparing scores across models. The scale differs.
  • Using embeddings to justify keyword stuffing. The experiment is about understanding retrieval, not producing text that matches a score.
  • Sending confidential text to a hosted service without checking data handling terms.

Choosing an Embedding Model

Most SEO experiments do not need the biggest or newest model. They need one you can run repeatably. A practical way to choose:

  • Language. If your content is not in English, pick a model trained for multiple languages and check its documentation.
  • Size and speed. Smaller models run on an ordinary laptop. Larger ones may be more accurate but need more memory and time.
  • Licence. Confirm that the licence allows your use, especially for client work.
  • Stability. Record the exact model name and version in your notes. If you change the model, treat it as a new experiment.
  • Hosted versus local. Hosted models can be easier but may cost money and send your text to a third party. Do not paste confidential client content into a service without checking its terms.

Where Embeddings Fit in the Retrieval Stack

It helps to see embeddings as one component in a larger pipeline rather than a complete search system.

Layer Role Where embeddings appear
Query handling Interpreting and expanding the question Sometimes, to compare the query with known intents
Candidate retrieval Finding possibly relevant passages fast Core use: nearest-neighbour search over vectors, often alongside keyword search
Reranking Ordering candidates carefully Usually a different, more precise model
Answer generation Writing the response Not used directly; the model receives the retrieved text
Quality and safety signals Judging reliability, spam and freshness Mostly separate signals that embeddings do not capture

That last row is important for SEO. Closeness in meaning says nothing about whether a source is trustworthy, current or authoritative. Search systems use many other signals, and we cannot see them.

A Checklist Before You Trust a Similarity Result

  1. Did you use the same model for every text you compared?
  2. Are the texts a similar length and format (for example all titles, or all summaries)?
  3. Did you clean boilerplate such as navigation and footers that can dominate a page’s embedding?
  4. Did you read the top pairs yourself instead of trusting the scores?
  5. Did you check whether high similarity reflects shared wording but different intent?
  6. Did you record the model name, date and settings so the test can be repeated?

Common Mistakes

  • Embedding whole pages with navigation and footers included. Repeated boilerplate pulls every page towards the same point and hides real differences.
  • Treating a high score as a verdict. It is a prompt for human review.
  • Comparing scores across models. The scale differs.
  • Using embeddings to justify keyword stuffing. The experiment is about understanding retrieval, not producing text that matches a score.
  • Sending confidential text to a hosted service without checking data handling terms.

Frequently Asked Questions

Are embeddings the same as LSI keywords?

No. LSI is an older technique and “LSI keywords” is not a concept Google has endorsed. Modern embeddings come from neural models and capture meaning in a different way.

Does Google use embeddings?

Google has not published a full description of how its ranking uses them, and we do not claim specifics. Embeddings are a general retrieval technique that many search and AI systems use, so understanding them is useful either way.

Do I need to know maths to use embeddings?

No. You need to understand that similar meaning gives close vectors and that cosine similarity measures closeness. The script handles the maths.

Should I put “semantically related” words into my content?

Write to answer the reader’s question completely and clearly. Stuffing related words to chase similarity is unnecessary and can make content worse.

What is a vector database and do I need one?

It is a store optimised for finding nearby vectors. For small experiments you do not need one. It matters for large collections.

How do embeddings relate to RAG?

Embeddings are how many RAG systems find relevant passages. Read what RAG is for the full picture.

Sources and Further Reading

Next Step

If you want your site checked for overlapping pages and unclear sections, request a free SEO audit. We will tell you which pages to keep, merge or rewrite, using data and not just scores.

← Back to the SEO Blog