liveBook · Manning

Hybrid search

As explained in LLM Customization and Fine-Tuning

A retrieval approach that combines multiple methods, commonly lexical search and vector similarity search.

Hybrid search combines vector similarity with keyword search, typically BM25. Vector search handles paraphrases well but can miss rare terms; BM25 helps retrieve product codes, part numbers, and error identifiers. A weighted sum combines their scores, with weights tuned to the corpus. section 4.5.5

Practical considerations:

  • Start with a 0.6 vector / 0.4 BM25 split, then tune the weights for the corpus. section 4.5.5
  • Azure AI Search and Vertex AI Search provide hybrid retrieval by default; open-source vector databases need glue code to combine BM25 with a vector index. section 4.5.5
  • When the correct document is indexed but the answer-bearing chunk ranks too low, investigate hybrid search or reranking. section 4.5.6

How LLM Customization and Fine-Tuning covers it

How deep it goes
Defines weighted score combination, gives a starting split, and recommends corpus-specific tuning.
Examples
Uses product codes, part numbers, and error identifiers as rare terms that keyword search can retrieve.
What you can do after
Apply it by combining vector and BM25 scores, starting with a 0.6/0.4 split and tuning per corpus.
How it connects
Pairs vector similarity with BM25 and addresses wrong-chunk ranking alongside reranking.

Also explained in

Compare how 15 books explain hybrid search →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of LLM Customization and Fine-Tuning. The section links point to the parts of the book it draws on.