- semantic search finds related meaning through embeddings;
- BM25 rewards exact terms, identifiers, and acronyms.
top_k by the pipeline.
Enable hybrid retrieval
search_type="bm25" for lexical-only search or search_type="semantic" for dense-only search.
Chroma and Qdrant expose the same option.
Persistence behavior
When a store has apersist_directory, RAGLight saves the BM25 corpus as
bm25_<collection_name>.json. It reloads that file on startup. For remote stores, the index is
rebuilt from documents already present in the collection.
The constructor currently accepts
alpha for API compatibility, but hybrid ranking uses RRF rather
than an alpha-weighted score. Tune candidate count with PipelineConfig(top_k=...) and measure
retrieval quality on your own evaluation set.