Dense vectors don't preserve numbers (BGE-small treats 'Figure 1' and 'Figure 10' as nearly identical), so a query like 'what does Figure 1 show' got out-ranked by chunks describing other figures that share more vocabulary with the question — even after the figure-boundary chunker ensured Figure 1's chunk started with the literal caption. Detect 'Figure N' / 'Table N' (numbered, decimal, appendix-style) references in the query, look up chunks that start with those captions directly, and feed the result as a third RRF source. RRF gives them rank-0 in the third ranking and the fused score lifts them above the dense-vocabulary noise. No-ops when the query has no figure ref. |
||
|---|---|---|
| .. | ||
| parsers | ||
| __init__.py | ||
| bm25.py | ||
| captioner.py | ||
| chunking.py | ||
| db.py | ||
| embeddings.py | ||
| ingestion.py | ||
| reranker.py | ||
| retrieval.py | ||
| scope.py | ||
| tool.py | ||
| vector_store.py | ||