Semantic search is search by the meaning of a query rather than by the occurrence of its words. Both the query and the documents are turned into embeddings by vectorisation, and relevance is determined by their proximity in the latent space, typically by cosine similarity. This overcomes the fundamental weakness of keywords – vocabulary mismatch – where the user picks different expressions than the author: the query “how to cut my car’s fuel use” finds a text about economical driving even if neither of those words appears in it. Conversely, it distinguishes homonyms by context. The search runs over a vector database using approximate nearest-neighbour methods. In practice it is deployed as a hybrid system, because the semantic approach cannot cope with exact identifiers, product codes and rare proper names – those are reliably handled by the classical BM25 score; the two result sets are then merged and reranked by a more accurate but computationally costlier cross-encoder model. Semantic search is the retrieval layer of the RAG architecture and presupposes sensible chunking of documents.
Classical search is a librarian who can do one thing only: find books containing exactly the word you uttered. Say “my throat hurts” and he will find nothing about tonsillitis. A semantic librarian, by contrast, understands what you are talking about and brings books on pharyngeal inflammation even though you never said that word. But he has his weakness: ask him for “part 4B-77X” and he starts bringing you books about similar parts, because to him it is a meaning, not a code. That is why the best libraries employ both – one searching for sense, the other for exact characters.