Skip to content
AEO Canon · the reference for answer-engine optimization

Semantic Search vs Keyword Search — What Changes for Writing

Keyword search matches the literal words you type; semantic search matches meaning by embedding your query and comparing it to passages — and modern AI engines run both as hybrid retrieval. The rule for writers is to cover a topic completely and naturally, while still including the exact terms people use.

BBurke Atkerson2 min read

Keyword search matches the words you typed; semantic search matches what you meant — and AI engines run both at once. That is why stuffing exact phrases no longer wins, and why writing clearly and completely does.

Quick answer

Keyword (lexical) search matches literal words with algorithms like BM25 and TF-IDF. Semantic (vector) search embeds your query and your passages, then matches by meaning via cosine similarity. Modern engines use hybrid — both together. So write naturally for meaning, but still include the literal terms people actually use.

How does keyword search work?

It matches literal terms. Keyword search algorithms like BM25 and TF-IDF score a page by how often and how distinctively your query's words appear on it. That makes it excellent for exact names, product codes, and rare terms — but blind to synonyms and paraphrase.

How does semantic search work?

It matches meaning, not spelling. Semantic search turns your query and each passage into embeddings — vectors that encode meaning — and finds the passages whose vectors sit closest to the query via cosine similarity. So it retrieves a passage about "cutting cloud costs" for a query about "reducing AWS spend," even with no shared words.

What should writers do differently?

Serve both systems. Cover the topic completely and phrase it naturally so the meaning is unmistakable to a vector model — but keep the literal terms, names, and phrases your audience actually types, because keyword search still anchors rare and exact queries.

Keyword search (BM25 / TF-IDF)
Matches literal words
Excellent for exact names, codes, rare terms
Transparent and fast
Blind to synonyms and paraphrase
vs
Semantic search (embeddings)
Matches meaning, not spelling
Handles paraphrase and intent
Finds you when wording differs
Can drift onto merely-related topics; weak on rare exact terms
Each method's strength is the other's blind spot — which is why AI engines run both as hybrid retrieval.

Write for meaning first, exact terms second. More in how AI retrieval works, vector search, and BM25.

How does AI retrieval work?

Engines rewrite the query, retrieve candidates with hybrid search, rerank, then cite.

Read the full answer →
What is vector search?

Matching by meaning — comparing embedding vectors with cosine similarity.

Read the full answer →
What is BM25?

A classic keyword-ranking algorithm that scores pages by literal term relevance.

Read the full answer →

Frequently asked questions

What is the difference between semantic and keyword search?
Keyword search, using algorithms like BM25 and TF-IDF, matches the literal words in a query against the literal words on a page. Semantic search converts both the query and your passages into embeddings — numeric vectors — and matches them by meaning using cosine similarity, so it can find you even when your wording differs from the query.
Do AI engines use keyword or semantic search?
Both. Modern answer engines use hybrid retrieval, running keyword and vector search together and merging the scores. Keyword search anchors results to exact terms and rare names, while semantic search catches paraphrases and intent, so the two methods cover each other's blind spots.
How should semantic search change how I write?
Write naturally and cover the topic completely so the meaning is clear to a vector model, but keep including the literal terms, names, and phrases your audience actually searches. Meaning wins retrieval most of the time, yet exact terms still matter for rare names, product codes, and precise queries.

Related reading

Using AI to run your business and being recommended by AI to customers are two different games. You've likely won the first — ChatGPT drafts your emails and quotes — while quietly losing the second, where customers ask AI who to hire and it names a competitor.

4 min read