When a visitor types "I'm moving house, what happens to my contract?", they use neither the word "termination" nor the word "transfer", which nevertheless appear in your terms. A classic keyword search finds nothing. Semantic search looks for the meaning of the question and finds the passages that discuss it, even when they are worded differently.
Keywords or meaning: two ways to search
Keyword search compares the words of the question with those of the documents. It is fast, precise on exact terms and easy to explain: a document is found because it contains the word searched for. Classic search engines improve this principle with weighting methods such as BM25, which give more weight to rare words and to documents where they appear often.
Semantic search compares meaning. Each document passage and each question is turned into embeddings, series of numbers that represent their meaning. The system then finds the passages whose meaning is closest, even without a shared word.
| Situation | Keyword search | Semantic search |
|---|---|---|
| Synonyms ("rate" and "price") | Often misses the passage | Finds it |
| Question in everyday language | Depends on the words chosen | Works well |
| Exact reference, number, code | Very precise | Less reliable |
| Question in a different language from the document | Fails | Works with a multilingual model |
| Explaining the result | Simple: the word is there | Harder: the meaning is close |
Why it is useful for an AI assistant
Visitors do not know your company's vocabulary. They write the way they speak, in their own words, sometimes with typos, sometimes in another language. Semantic search bridges that gap and lets the assistant find the right information in the knowledge base.
In assistants that work with RAG, it is the first step: finding the relevant passages, then passing them to the language model so it can write the answer. The passages are usually stored in a vector database, which makes this search fast even at large volume.
Hybrid search
The two methods have complementary strengths. Many systems combine them: keyword search finds exact terms (a product name, a form number), semantic search finds different wordings. The results are then merged and ranked. This hybrid search usually gives better results than either method alone, especially in fields where technical vocabulary sits alongside everyday language.
The limits of semantic search
- Close does not mean correct. A passage about the guarantee on a new appliance will be close to a question about the guarantee on a repair, without applying to it. The model and its instructions must then check the scope
- How documents are split matters. A passage that is too long mixes topics, one that is too short loses its context. Clear sections with an explicit heading improve the results
- Numbers are poorly represented. "14-day period" and "30-day period" have very similar meanings for an embedding model, whereas the difference matters to the customer
- The result is harder to explain. When a wrong passage comes up, it is harder to understand why than with a word-based search
These limits explain why search is never enough on its own: citing the source, the instruction to say "I don't know" and reviewing conversations remain necessary.
How to write documents that are easy to find
Whatever the search method, a few writing habits help the assistant:
- An explicit heading for each section, using the words your customers would use: "Cancelling or transferring your contract when you move"
- The subject repeated in important paragraphs, rather than a pronoun pointing back to a heading three paragraphs up
- Common synonyms mentioned once: "the call-out rate (price)"
- The terms in all three languages for key notions, if your audience is multilingual
And in KernChat?
KernChat does not use embedding-based semantic search at present. The sources of the knowledge spaces go into the model's context in full, and the model reads the documents itself and understands different wordings. When the sources exceed an assistant's size limit, a BM25-style keyword search ranks those that share the most words with the question so they go in first. For an SME's documentation, this approach avoids missed passages and keeps every rule in its full context.