Semantic Search: Meaning, Not Keywords
You search for will it rain and the best answer says clear skies tomorrow, never once using your words. Watch meaning win where matching letters cannot.
Semantic Search: Meaning, Not Keywords
Type will it rain and the answer you want, dry with clear skies tomorrow, shares none of your words. Keyword search reads letters, so it cannot find that line, and it will happily rank a rock song called purple rain instead. Semantic search reads direction in a space of meaning. Pick a query below and watch the two rankings split apart.
Each document is a direction in concept space. Rank by the cosine of the angle to the query.
Count how many query words appear verbatim in each document. No word in common means a score of zero.
The match that wins, dry with clear skies, shares not one word with your query. Keyword search ranks a rock song called purple rain first because the letters line up.
Every document and every query word is placed along the same handful of concept axes. Two lines about money point the same way even with no shared words, so the cosine between them is near one. A weather query and a cooking note point in different directions, so their cosine is near zero. Direction is the meaning.
Embeddings put meaning into geometry: similar ideas become nearby directions, unrelated ideas become perpendicular ones. Cosine similarity reads only that direction, ignoring how long a vector is, so it asks do these mean the same thing rather than do they share the same letters. That is why a paraphrase or a synonym still lands on the right document, and why a coincidental word match gets pushed down where it belongs.
Keyword search has the opposite failure: it can only rank what it can spell. When your words and the answer's words diverge, it returns the wrong line or nothing at all. Meaning fills exactly that gap.
These vectors are hand placed along seven named topics so you can read the geometry directly. Real systems learn the embedding from text with a neural model, and the space has hundreds or thousands of dimensions with no human-readable labels. The cosine ranking math is exactly the same; only the source and size of the vectors change. At scale the query embedding is compared against millions of document embeddings in a vector database, and feeding the top matches to a language model is what retrieval augmented generation, RAG, actually does.
The query vector is the average of the selected word vectors; each semantic score is the cosine between it and a document vector, and each keyword score counts shared words. Both rankings update live from those numbers.