Retrieval Quality: Dense, Sparse, Hybrid and Reranking

Harry · 13 Sep 2026 · 1 views

Dense Retrieval

Dense retrieval embeds the question and chunks, then finds the closest vectors with a vector database. It understands meaning, so synonyms and rephrased questions still match.

Sparse and Hybrid

Keyword methods such as BM25 match exact terms, which helps with product codes and rare names. Hybrid search runs both and merges the results, combining precision and meaning.

Practical Hybrid Step

hits = collection.query(
    query_texts=[question],
    n_results=8,
    where={"source": {"$ne": "draft"}},
)

Add keyword scores in code and merge ranks, or use a platform that combines both natively.

Reranking

Retrieve a wide net (say 20 chunks), then pass them through a reranker model that scores relevance properly, keeping only the best few for the prompt.

# pseudo-code: reranker.score(question, candidates)
top = reranker.top_n(question, candidates, n=3)
# answer = call_your_llm(f"Context: {top}...")

Key Points

  • Dense retrieval matches by meaning.
  • Hybrid search covers exact terms too.
  • Retrieve wide, rerank, then generate.
  • Reranking is the biggest quality boost per effort.
Share this post:

Comments (0)

Please login or register to comment.