keyword search
Searching by the words a query shares with each document, rather than by meaning.
In more detail
Keyword search catches exact names, error codes and product terms that embeddings blur, and misses paraphrases. BM25 is the standard scoring function, and full-text engines such as Elasticsearch build on it.
Related terms
- BM25 — The standard keyword ranking function, which scores a document on the query words it contains, weighted by rarity, saturated for repeats and normalised for length.
- semantic search — Searching by meaning: embedding the query and returning the stored items whose vectors are closest.
- hybrid search — Combining keyword and semantic search results, so exact names and paraphrases are both found.
- inverted index — A search structure that maps each word to the list of documents containing it.
Taught in
- What An Embedding Is — AI Engineering: LLM Apps, RAG & Agents
- Vector Indexes And Databases — AI Engineering: LLM Apps, RAG & Agents
- Keyword And Hybrid Search — AI Engineering: LLM Apps, RAG & Agents
- Capstone: The Tasks Assistant — AI Engineering: LLM Apps, RAG & Agents
References
- Elasticsearch reference: similarity settings (BM25 k1 and b defaults)
- Anthropic: Introducing Contextual Retrieval