Internal knowledge
Staff find answers in SOPs, policies and past tickets without the exact wording.
Read more about Internal knowledge
Staff find answers in SOPs, policies and past tickets without knowing the exact wording.
Search that matches meaning instead of exact words, so different phrasing still finds the answer.
Results are ranked by closeness of meaning, so "leave policy" finds "annual holiday entitlement". It is the retrieval half of RAG.
Semantic search ranks results by how close their meaning is to the query, not by how many words they share with it. A traditional keyword search for "leave policy" misses a document that only says "annual holiday entitlement". Semantic search finds it, because both phrases mean similar things.
It is the "retrieval" half of retrieval-augmented generation: before a language model answers a question, semantic search finds the passages it should read.
Long documents are cut into chunks, keeping headings and source references.
Long documents are cut into chunks of a few paragraphs, keeping headings and source references.
An embedding model turns each chunk into numbers that represent its meaning.
An embedding model turns each chunk into a list of numbers, an embedding, that represents its meaning.
Embeddings go into a vector database or an index such as pgvector.
Embeddings go into a vector database or a vector index inside an existing database such as PostgreSQL with pgvector.
The query is embedded too, and the nearest chunks come back.
The query is embedded the same way, and the database returns the chunks whose vectors are nearest, often measured by cosine similarity.
An optional reranker model rescores the top results for better ordering.
A reranker model rescores the top results against the query for better ordering.
Staff find answers in SOPs, policies and past tickets without the exact wording.
Staff find answers in SOPs, policies and past tickets without knowing the exact wording.
A customer's description is matched to the right help article or past resolution.
Match a customer's description to the right help article or past resolution.
"Shoes for a wet monsoon commute" finds waterproof footwear with no matching words.
"Shoes for a wet monsoon commute" finds waterproof footwear even if no listing uses those words.
Meaning search handles patient questions well but misses exact codes. Hybrid search runs keyword and vector search together, and most production systems end up hybrid.
A clinic indexes its treatment guides and FAQs. A patient asks the chatbot "can I eat after a filling?" and semantic search returns the aftercare section titled "post-restoration instructions". But when staff search for an exact item code like "INV-2291", pure semantic search does poorly, because codes carry little meaning. The fix is hybrid search: run a keyword search (such as BM25) and a vector search together, then merge the results. Most production systems end up hybrid.
Chunks that cut tables or lose headings confuse results. Follow the document's structure.
Chunks that cut a table in half or lose their heading return confusing results. Chunk along the document's real structure.
Filter by what each user may see before ranking, or confidential files surface.
Filter results by what the user is allowed to see before ranking, or the search will surface confidential files.
Pick an embedding model that handles your languages, including Indian ones.
Pick an embedding model that handles your languages, including Indian languages if your content uses them.
Vector search is the most common way to do semantic search: compare embedding vectors and return the nearest ones. Semantic search is the goal, vector search is the method.
Not always. PostgreSQL with pgvector, Elasticsearch, OpenSearch and others can store vectors next to your existing data. Dedicated vector databases help at large scale.
Embeddings capture meaning, and an invoice number or SKU has little meaning to capture. Hybrid search, which adds keyword matching back in, solves this.
Last updated