feat(rag): hybrid BM25 + FAISS retrieval with reciprocal-rank fusion
Maintainers usually reply within 1 day
@DerekRoberts is already working on this.
Since Oct 24, 2026.
Assessment
This issue has not been assessed yet.
Description
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.
- Dominant language
- Python
- Stars
- 2
- Forks
- 1
- Avg merge
- 4h 16m
- Merged PRs (30d)
- 38
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MinionTech/vexilon
-
Difficulty 2/5 Half a day Newbie friendliness 66/100
MinionTech/vexilon#844 ·
Maintainers usually reply within 1 day
-
OHS Part 8 source missing B.C. Reg. 135/2026 (face-seal amendments, in force 2026-11-06)Possibly taken @DerekRoberts claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
MinionTech/vexilon#842 · 1 assignee ·
Maintainers usually reply within 1 day
-
research: consume from canli.orgPossibly taken @DerekRoberts claimed this 1 day ago. Open
MinionTech/vexilon#836 · 1 assignee ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 22/100
MinionTech/vexilon#821 · 1 assignee ·
Maintainers usually reply within 1 day
-
test(rag): retrieval hit-rate eval over golden questionsMay be free again @DerekRoberts claimed this 28 days ago, and no pull request is open. Openenhancement
MinionTech/vexilon#801 · 1 assignee ·
Maintainers usually reply within 1 day
All issues in MinionTech/vexilon
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
cal-itp/data-infra#5887 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
ranacseruet/vaice#139 ·
Maintainers usually reply within 1 day
-
numpy.bytes_ attributes are recorded as a truncated repr instead of their contentPossibly taken @JoeyTan21 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
batocera-linux/batocera.linux#17423 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100