Semantic search vs keyword search, explained
A keyword search for car misses every page that says automobile. How embeddings fix that, when keywords still win, and why many systems now run both.

You type what you mean, and the search box hands back nothing. Or worse, it hands back a page that happens to share one word with your query and misses the ten that were actually about the thing you wanted. That gap between what you typed and what you meant is the whole story of modern search, and it comes down to two very different ways a search engine can work.
The short version: keyword search matches your words, semantic search matches your meaning. One is a librarian who only finds books whose spine contains your exact phrase. The other understood what you were looking for.
The short answer: words vs meaning
Every search box picks a lane, and most of the ones you use every day are in the first:
- Keyword search (also called lexical or full-text search) looks for the exact words you typed, sitting somewhere in the text. Search "car" and it returns documents containing "car." It will not return one that only says "automobile," because to a keyword engine those are two unrelated strings of letters.
- Semantic search (also called meaning-based, vector, or neural search) looks for documents that are about what you typed. Search "car" and it can return the one about "automobiles," "vehicles," or "that sedan I test drove," because it compares meaning, not spelling.
Keyword search asks "do these exact words appear here?" Semantic search asks "is this passage about the same thing as my query?" That single difference is why one feels rigid and one feels like it read your mind.
How keyword search actually works
Keyword search is older, simpler, and still everywhere for good reason. When a system indexes your documents, it breaks each one into individual words (tokens), lowercases and trims them, and builds an inverted index: a big lookup table that maps every word to the list of documents it appears in. Think of the index at the back of a textbook. "Espresso" points to pages 12, 88, and 203.
When you search, the engine tokenizes your query the same way, looks each word up in that table, and returns the documents that contain them, usually ranked by a scoring formula (classic ones are TF-IDF and BM25) that rewards rare words and documents where your terms appear often.
This is genuinely great at some things:
- Exact matches. A product SKU, an error code, a person's
@handle, a legal clause. If you can quote it, keyword search finds it instantly. - Speed and transparency. Looking words up in a table is fast and cheap, and you can see exactly why a result matched.
And it falls down the moment your words and the document's words drift apart:
- Synonyms. Search "laptop," miss every document that only says "notebook."
- Paraphrase. Search "how to stop overspending," miss the article titled "the 50/30/20 rule," because they share no words.
- Vague memory. Search "that minimalist desk setup," and if the post never used those exact words, you get nothing.
Tricks that patch keyword search, but don't fix it
Engines bolt on stemming (so "running" matches "run"), synonym lists, and spell-correction to widen the net. These help, but they work on individual words, and a synonym list only knows the synonyms someone put in it. None of them capture the open-ended "these two sentences mean the same thing" that you do effortlessly.
How semantic search actually works
Semantic search throws out the assumption that matching text means matching meaning. Instead of storing your documents as words to look up, it converts each one into a list of numbers that represents what it's about. That list is called an embedding, and it's the whole trick.
From words to coordinates
An embedding model (a neural network trained on enormous amounts of text) reads a piece of text and outputs a vector: a long list of numbers, often hundreds or thousands of them. You can picture that vector as coordinates that place the text somewhere on a giant map of meaning. The model is trained so that texts about similar things land near each other on that map, and texts about different things land far apart.
So "the 50/30/20 budget rule" and "how do I spend less each month" end up as close neighbors, even though they share no words. "Espresso pre-infusion" lands in a completely different neighborhood. The words are gone; only the location, the meaning, remains.
Finding the nearest neighbors
When you search, your query runs through the same model and becomes a point on the same map. Now the engine doesn't hunt for matching words, it just measures distance: which documents landed closest to your query's point? Those nearest neighbors are your results. Closeness is often measured with cosine similarity (based on the angle between two vectors) and, at scale, sped up with an approximate nearest-neighbor index, either in a dedicated vector database or a regular database with vector support.
That's why semantic search feels like it understands you:
- Paraphrase freely. "The recipe with the crispy tofu" finds the post that said "extra-firm, pressed and pan-fried."
- Describe the vibe. "A calm, minimalist workspace" works with no exact caption or creator name.
- Cross the language of the thing. "Ways to save money" surfaces "frugal living tips" and "cutting monthly expenses" alike.
The cost is that semantic search can be too generous. Ask it for an exact model number and it may hand you things that are merely about that product, because "close in meaning" is fuzzier than "contains this exact string." It leans toward recall, not surgical precision.
Where each one wins
There's a classic trade-off hiding here, and it has names: precision (of what you returned, how much was relevant?) and recall (of everything relevant, how much did you find?).
- Keyword search tends toward higher precision, lower recall. When it matches, you can see the words that matched. But it silently misses everything phrased differently. A common word can still return plenty of noise.
- Semantic search tends toward higher recall, lower precision. It can find the relevant stuff your words never named, but it can also surface loosely related results you didn't want.
Put side by side, they're almost mirror images. These are typical results, not guarantees:
| What you're searching for | Keyword search | Semantic search |
|---|---|---|
| An exact product code or @handle | Yes | No |
| A phrase you can quote word for word | Yes | No |
| "How to stop overspending" | No | Yes |
| "That crispy tofu recipe" | No | Yes |
| A synonym of the word in the text | No | Yes |
| A vague, half-remembered idea | No | Yes |
Look at that table and the conclusion writes itself: you don't want to pick one. You want the row-by-row best of both.
Why the best search uses both: hybrid search
Hybrid search runs your query through keyword search and semantic search at the same time, then merges the two ranked lists into one. Exact matches from the keyword side keep precise queries sharp, and the semantic side catches everything phrased differently. The half you didn't have to think about covers the half you forgot.
A common way to merge them is Reciprocal Rank Fusion (RRF): instead of trying to compare a keyword relevance score against a cosine-similarity score (they're on totally different scales), it just looks at where each result ranked in each list and rewards results that both methods placed near the top. A result that's #1 for keywords and #3 for meaning beats one that only one method ranked, even at #1.
Where reranking fits in
Some systems add a third stage: after hybrid search narrows thousands of documents down to a shortlist, a heavier "reranker" model reads your query against each candidate and re-sorts the final handful for quality. It's slower, so it only runs on the shortlist, not the whole index. Hybrid retrieval plus a reranker is a common setup in AI search and retrieval (RAG) pipelines.
A real example: searching what you saved
Saved posts show why this matters, because you tend to remember the gist and not the wording. Stashr searches saved posts with this hybrid setup: a keyword search, a vector search, and a match against your own tag names, merged with RRF. If the vector side is unavailable, search falls back to keywords and tags instead of failing.
If you came here trying to find a specific post, how to search your saved posts covers what each app can do. The same retrieval also powers AI tools, which is how you can connect ChatGPT and Claude to your bookmarks. If you're shopping for a tool, the best AI bookmark managers shows which ones say they offer meaning-based search.
Common questions
Is semantic search the same as AI search?
Not exactly. "AI search" is a marketing umbrella. The engine underneath is often semantic search powered by embeddings, sometimes combined with keyword search and a reranker, but the label alone doesn't tell you how a product works.
Does semantic search replace keyword search?
No, and that's the common mistake. Semantic search is worse than keyword search at exact matches: names, codes, quotes, and jargon. The winning move isn't to swap one for the other, it's to run both and blend the results. That's why hybrid search, not pure semantic, is such a common choice.
What is an embedding, in one sentence?
An embedding is a list of numbers that represents the meaning of a piece of text (or an image), positioned so that similar things sit close together and different things sit far apart, which lets a computer compare meaning by measuring distance.
Do I need a vector database to do semantic search?
For a handful of documents, no: you can compare vectors directly in memory. A vector database (or a vector-capable database like Postgres with pgvector) earns its keep once you have a lot of documents, because it can find nearest neighbors quickly instead of comparing your query against every single item.
Can semantic search work on images, not just text?
Yes. The same idea extends to images: a model can embed a picture into the same kind of vector, so a text query like "the chart about interest rates" can match a screenshot with no caption. Another approach is to generate a text description of each image and search that, which is what Stashr does on its Pro plan.
See hybrid search on your own saves.
Stashr copies what you save on X, Reddit, Instagram, and the other apps it supports, then runs keyword and semantic search together. 14-day trial, no card required.
14-day free trial · No credit card required · Cancel anytime


