On this page7 sections
Why it matters for founders and small teams
Embeddings are why an AI engine can match a buyer’s question to your page even when you never used their exact words, and why a page stuffed with keywords but vague on meaning loses to one that plainly answers the question. For a small team that’s good news: you don’t need an expensive keyword tool to compete, you need pages whose sections each mean one clear thing.
How do vector embeddings work?#
Vector embeddings work by running text through a model that outputs a fixed-length list of numbers, positioned so that texts with similar meaning land close together; a search system then compares the query’s vector with each passage’s vector and ranks the closest.
OpenAI’s documentation defines an embedding as a “vector (list) of floating point numbers” where “the distance between two vectors measures their relatedness” (OpenAI). Its current embedding models return 1,536 numbers (text-embedding-3-small) or 3,072 (text-embedding-3-large) for any input, from a single word to a long passage.
- Each dimension is a learned feature, not a human-readable one. No single number means “pricing”; meaning is spread across all of them.
- Closeness is usually measured with cosine similarity, where 1 means pointing the same way and 0 means unrelated. OpenAI recommends it, and because its embeddings are normalized to length 1, a simple dot product gives the same result.
- The idea is old; the scale is new. Word-level embeddings went mainstream with Google’s word2vec in 2013 (Mikolov et al.), and sentence-level models such as Sentence-BERT made it practical to embed whole passages for search.
How do AI search engines use vector embeddings?#
AI search engines use vector embeddings to retrieve candidate passages by meaning, usually alongside keyword matching: the query and each indexed passage are embedded, the nearest passages are pulled, and a reranker picks the few the answer will cite.
Perplexity documents this directly: lexical and embedding retrieval run in parallel and merge into one candidate set before cross-encoder rerankers make the final cut (Perplexity Research). Google has matched queries to pages by concept since neural matching arrived in Search in 2018, which it describes as understanding “how queries relate to pages” through “fuzzier representations of concepts” (Google).
0.602 vs 0.484
semantic similarity of ChatGPT prompts to the titles of pages it cited, versus pages it didn't
0.656
similarity of cited titles to their closest ChatGPT fan-out query — higher than to the prompt itself
9–19 pts
gain in top-20 passage retrieval accuracy for an embedding retriever over BM25 keyword search
The Ahrefs figures are a correlation measured from outside, not a view inside ChatGPT, but they point the same way as the mechanism: pages whose titles mean what the engine’s sub-query means get cited more. See query fan-out for where those sub-queries come from.
Worked example
The Three-Number Similarity Walkthrough
Real embeddings have well over a thousand dimensions, but the math is the same with three. This toy example uses illustrative vectors, not output from a real model, to show why a focused section beats a catch-all one for the same question about a fictional tool called Plannora.
- 1
The query vector
“How much does Plannora cost?” Imagine three features — pricing, onboarding, security. The query is almost all pricing.
Q = (0.9, 0.1, 0.1)
- 2
A focused pricing section
A section that states the price in its first sentence and stays on topic.
A = (0.8, 0.2, 0.1)
- 3
A catch-all overview section
“Why teams choose Plannora” — pricing, onboarding and security in one passage.
B = (0.5, 0.5, 0.5)
- 4
Cosine similarity of Q and A
Dot product 0.72 + 0.02 + 0.01 = 0.75. Lengths √0.83 ≈ 0.911 and √0.69 ≈ 0.831. Similarity = 0.75 ÷ (0.911 × 0.831).
≈ 0.99
- =
Cosine similarity of Q and B
Dot product 0.45 + 0.05 + 0.05 = 0.55. Lengths 0.911 and √0.75 ≈ 0.866. Similarity = 0.55 ÷ (0.911 × 0.866).
≈ 0.70
The result: Against the same question, the focused section scores 0.99 and the catch-all 0.70, even though both mention pricing. In a real engine, a gap like that decides which passage reaches the reranker’s short list. Split catch-all sections into one question each, and every one of them gets its own chance to be the closest match.
Free to use and adapt. If you cite it, link to rankbox.xyz/glossary/vector-embeddings.
Vector embeddings vs keywords: what's the difference?#
Keyword matching scores a page on the exact words it shares with the query, while vector embeddings score it on shared meaning — so embeddings can match “cheap tool to track sales leads” to a page about “affordable CRM for small teams” with no words in common.
| Keyword matching (BM25) | Vector embeddings | |
|---|---|---|
| Matches on | Exact terms and how often they appear | Meaning and intent |
| Synonyms and paraphrases | Missed unless the words overlap | Matched — similar meanings land close together |
| Strong at | Names, product codes, rare terms, numbers | Conversational questions, different wording |
| Weak at | Different words for the same idea | Exact identifiers the query depends on |
| Used in AI search? | Yes — lexical retrieval | Yes — semantic retrieval |
Engines use both because each covers the other’s blind spot. Anthropic’s contextual retrieval research notes that embedding models “can miss crucial exact matches” and pairs them with BM25, which is “particularly effective for queries that include unique identifiers or technical terms.” For your pages the lesson is to write for both: explain the idea naturally, and still use the exact names buyers type — product names, category terms, units. See semantic search.
How do you optimize content for vector embeddings?#
Optimize content for vector embeddings by making each section mean one thing: a heading phrased like the question, a first sentence that answers it, and a body that stays on topic — because an embedding blends everything in a passage into a single point.
- One question per section. A passage that covers pricing, onboarding and security embeds to a point between all three and matches none of them well.
- Phrase headings as buyers ask. “How much does Plannora cost for a team of five?” sits closer to that question than “Flexible plans for every stage.”
- Answer in the first sentence. It anchors the passage’s meaning and is the part most likely to be quoted. See answer-first content.
- Keep the subject explicit. Name the product instead of writing “it”, because the passage is embedded without the paragraph before it. See content chunking.
- Don’t chase synonyms. Google tells site owners that “AI systems can understand synonyms and general meanings,” so repeating variants adds noise, not coverage.
Related terms#
- How LLMs answerSemantic searchA retrieval method that matches a query to content by meaning and intent — typically by comparing vector embeddings — instead of by the exact words both contain, so a page can be found for phrasings it never uses.Read the entry
- How LLMs answerRerankingA second retrieval stage in which a more precise model re-scores the top results of a first, faster search against the query and reorders them — the step that decides which few passages an AI answer engine actually reads and cites.Read the entry
- How LLMs answerContent chunkingThe splitting of a page into smaller passages — often a heading and the text beneath it — that an AI retrieval system indexes, scores and quotes individually, which makes the section, not the whole page, the unit that competes for a citation.Read the entry
- RAGHow LLMs answerRetrieval-augmented generationA technique in which an AI system first retrieves relevant documents from an index and then gives them to a large language model to write its answer, so the response can cite current sources instead of relying only on what the model memorized in training.Read the entry
- How LLMs answerQuery fan-outAn AI search technique in which the engine rewrites one user question into several narrower sub-queries, runs them in parallel and builds its answer from the combined results — which is why a page can be cited for a prompt it doesn’t rank for.Read the entry
- Content & relevanceSearch intentThe goal behind a query — to learn something, reach a specific site, compare options or buy — and matching it decides which kind of page, from a guide to a product page to a comparison, search engines and AI answers treat as relevant.Read the entry
Sources
- 1.Vector embeddingsOpenAI API · developers.openai.com ↗
- 2.Efficient Estimation of Word Representations in Vector SpaceMikolov et al., Google, 2013 · arxiv.org ↗
- 3.Sentence-BERT: Sentence Embeddings using Siamese BERT-NetworksReimers & Gurevych, EMNLP 2019 · arxiv.org ↗
- 4.Dense Passage Retrieval for Open-Domain Question AnsweringKarpukhin et al., EMNLP 2020 · arxiv.org ↗
- 5.Architecting and evaluating an AI-first search APIPerplexity Research · research.perplexity.ai ↗
- 6.Why ChatGPT cites the pages it doesAhrefs · ahrefs.com ↗
- 7.Optimizing your website for generative AI featuresGoogle Search Central · developers.google.com ↗
- 8.Introducing Contextual RetrievalAnthropic · anthropic.com ↗
