Start with two independent retrieval paths

Treat dense and sparse retrieval as separate signals rather than assuming one can replace the other. In Talqora’s architecture, regional S3 Vectors provides the dense-search path and Quickwit BM25 provides the sparse-search path. Each path can receive the same user query, although the dense path commonly uses an embedding generated from that query.

Keep the first stage deliberately simple: ask each retriever for its top K document or chunk identifiers. The goal is not to decide the final order immediately. It is to produce a candidate pool that includes semantic matches as well as exact-term matches.

  • Dense candidates can surface conceptually related passages.
  • BM25 candidates can preserve matches for exact vocabulary and rare tokens.
  • Use stable document or chunk IDs so candidates from both paths can be deduplicated.
  • Choose a bounded K for each source to control downstream work.

Union candidates before making ranking decisions

After both searches return, create a set keyed by candidate ID. A candidate found by both systems should appear once, with metadata recording which retrieval paths returned it and what rank it received in each list. This produces an auditable input to later ranking logic.

A union avoids a common failure mode: allowing one retrieval method to exclude useful results before the other method has a chance to contribute. It also gives the application a place to apply business filters, such as access controls, content type restrictions, or document freshness requirements.

  • Deduplicate by a canonical candidate ID, not display text.
  • Retain source membership, ranks, and any available retrieval scores separately.
  • Apply authorization filters before returning candidates to a user.
  • Log candidate counts from each path to help diagnose empty or skewed result sets.

Use rank-based fusion when score scales differ

Dense similarity values and BM25 scores are not automatically comparable. Their ranges and distributions can vary with the index, query, and retrieval configuration. Adding raw scores together without validation can cause one source to dominate for reasons unrelated to relevance.

A rank-based fusion method is a useful baseline because it uses list position instead of assuming comparable score scales. For example, assign each candidate a contribution based on its rank in each list, sum contributions for candidates appearing in one or both lists, and sort by the resulting fused score. Evaluate this policy against representative queries before changing K values or ranking weights.

  • Use retrieval rank as the initial cross-system signal when raw score meaning is unclear.
  • Give candidates returned by both paths credit from both rankings.
  • Build a query set containing semantic, exact-term, identifier, and mixed-intent searches.
  • Review failures by retrieval path so tuning remains explainable.