feat(rag): hybrid BM25 + FAISS retrieval with reciprocal-rank fusion

Aperta
#802 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@DerekRoberts ci sta già lavorando.

Dal 24/10/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

enhancement

Problem

Steward questions often name exact references ("s. 21", "Article 32.04", "Schedule 1") or defined terms. A small embedding model (bge-small) handles these poorly, while BM25 keyword search handles them well. The corpus is small (about 3k chunks), so BM25 in memory needs no new service.

Proposed change

Run BM25 (e.g. rank_bm25) over the existing chunk text and combine its results with FAISS candidates using reciprocal-rank fusion, before the existing tier re-scoring in search_index_batch. Keep FAISS.

Dependencies

  • Blocked by #801. The eval from that issue decides this one. If the eval shows no gain, close this unmerged.

Note for #699

When BC Laws PDF ingestion is built, keep section and part numbers in the chunk header prefix ([Source - Header]). That makes keyword matching on references work better at no extra cost.

Acceptance criteria

  • Hybrid retrieval raises the eval's hit rate on section-number and defined-term questions, with no drop overall. Otherwise this is closed unmerged.
Lingua principale
Python
Stelle
2
Fork
1
Merge medio
4h 16m
PR unite (30g)
38

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di MinionTech/vexilon

Tutte le issue di MinionTech/vexilon

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.