Semantic Search
Semantic search finds information by what a query means rather than by matching its exact words, usually by comparing embeddings of the query and the documents.
Also known as: Vector search, meaning-based search
How it works
Documents are split into passages and converted to embeddings, which are stored in a vector index. At query time, the query is embedded with the same model and the closest passages are returned. A search for "laptop won't charge" can then find an article titled "Battery not detected" even with no shared words.
Pure semantic search has weak spots. It can miss exact identifiers such as part numbers, error codes or names, where classic keyword search (BM25) excels. Most production systems therefore use hybrid search:
- Run keyword and vector search together.
- Merge the result lists, often with reciprocal rank fusion.
- Pass the top candidates to a reranker for final ordering.
- Apply metadata filters for permissions, dates and categories.
Why it matters
Keyword search fails when users do not know the right words, which is most of the time in support portals, internal wikis and product catalogs. Semantic search reduces "no results" pages and surfaces relevant content across phrasing and, with multilingual models, across languages. It is also the retrieval step inside retrieval-augmented generation, so its quality caps the quality of any AI answer built on it. Measure it with real queries and relevance judgments, using metrics such as recall at k, before and after each change. Gepton builds this in AI-powered search.
Semantic Search in depth
Building a semantic search system
The core idea is simple, but production quality depends on decisions at each stage:
- Content preparation. Extract clean text, keep titles and headings, and attach metadata such as product, language, date and access group.
- Chunking. Split long documents into passages that each make sense on their own, often with the document title prepended.
- Embedding model choice. Pick a model that handles your languages and domain; test a few on your own queries rather than relying on leaderboards.
- Indexing. Store vectors in a vector database or a search engine with vector support, alongside a keyword index.
- Query handling. Embed the query with the same model, run hybrid retrieval with filters, and merge results.
- Reranking. Re-score the top candidates for final order.
- Presentation. Show snippets with highlighted passages, or pass results to an answer generator.
Example: a product catalog search
Example: an industrial supplier's website search fails when customers type descriptions instead of exact product names, such as "pipe joint that doesn't leak under high pressure" or "pani ki motor 1 HP". The team indexes product titles, specifications and descriptions with a multilingual embedding model, and keeps keyword search for part numbers. Queries run through both; results are merged with reciprocal rank fusion and filtered by stock region. Searches for exact SKUs still go straight to the product. The team compares the old and new search on a set of real queries from logs, judged by the sales team, and monitors zero-result searches and click-through after launch.
Evaluating search quality
Use real queries from search logs and support tickets, and label which results are relevant. Then measure:
| Metric | Meaning |
|---|---|
| Recall at k | Share of relevant items found in the top k |
| MRR | How high the first relevant result appears |
| NDCG | Quality of the whole ranking, weighting top positions |
| Zero-result rate | Queries returning nothing useful, from live logs |
| Click-through and refinement rate | Behavior signals after launch |
Break results down by query type: exact codes, short keywords, natural-language questions and non-English queries. Semantic search usually wins on questions and loses on codes, which is why hybrid search exists.
Indian-language and mixed-language search
Users in India often search in romanized Hindi, Devanagari or a mix with English. Multilingual embedding models can match a Hindi query to an English document, but quality varies by model and language. Test with real queries, consider transliteration for keyword search, and keep language metadata so results can be filtered or boosted. Our Indian language AI work covers these cases.
Common mistakes and related terms
Typical problems are pure vector search that misses part numbers and names, passages split mid-sentence, no permission filtering, embedding models changed without re-indexing everything, and evaluation by eyeballing a few queries. Semantic search depends on embeddings and is the retrieval stage in RAG. Gepton builds it in AI-powered search and smart recommendations, which use the same similarity techniques.
Questions about Semantic Search
Something else? Send us your question and an engineer replies with next steps.
Do we need to re-index everything when we change embedding models?
Yes. Embeddings from different models live in different vector spaces and cannot be compared with each other, so a query embedded with the new model will not match documents embedded with the old one. Plan a full re-index when switching, ideally into a new index built in parallel, then switch traffic after evaluating it on your query set. Store the model name and version with each index to avoid mixing.
Is semantic search the same as an AI chatbot?
No. Semantic search returns a ranked list of documents or passages that match the meaning of a query, and users read them. A chatbot built on retrieval-augmented generation uses semantic search as its first step, then has a language model write an answer from the retrieved passages. Many sites benefit from better search alone. A chatbot adds convenience, but also the need to check answers for accuracy.