DocuStore.io

Entity-Constrained Search

Hybrid search with hard entity filtering, RRF fusion, and cross-encoder reranking.

/ The problem

Generic vector search returns documents that mention the right words in the wrong context. A query about 'CDK4 inhibitors' retrieves passages where CDK4 is mentioned in passing alongside unrelated compounds. Without entity-aware filtering, every search result is contaminated by context pollution — the number one failure mode of RAG in pharmaceutical documents.

/ How DocuStore solves it

DocuStore uses extracted entities as hard pre-retrieval constraints. Before any vector similarity computation, the search pipeline filters candidates to only those chunks where the queried entities appear in the extracted metadata. Results then undergo hybrid dense+sparse fusion via Reciprocal Rank Fusion (RRF), combining neural semantic matching with exact identifier matching. A cross-encoder reranking pass scores the final candidates for query-passage relevance.

23 resultsBRD4 ✓BMS-986158 ✓23 → 4 pages0.940.910.880.85RRF + cross-encoder rerank

/ Pipeline

User Query: "What is the IC50 of BMS-986158 against BRD4?"
  ↓ Entity extraction from query
Entities: [BMS-986158 (compound), BRD4 (target)]
  ↓ Hard filter: Qdrant payload must contain both entities
Candidate pool: 23 chunks → 4 chunks
  ↓ Dense similarity (nomic-embed) + Sparse exact match
Two ranked lists
  ↓ Reciprocal Rank Fusion (RRF)
Merged ranking
  ↓ Cross-encoder reranking
Final results with relevance scores

/ Key capabilities

  • Hard entity filtering eliminates context pollution before similarity search
  • Hybrid dense + sparse fusion via Reciprocal Rank Fusion (RRF)
  • Cross-encoder reranking for precise query-passage relevance scoring
  • Hierarchical search across summaries and text chunks simultaneously
  • Structured bioactivity lookup for known compound-target-assay records
  • Chemical structure similarity search via SMILES embeddings