Improve retrieval quality: measure, then rerank, adapt queries and upgrade embedders in one rebuild
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 24/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- machine-learning, python, sqlite
- Lĩnh vực
- data, machine-learning, search
Hướng nghiên cứu
Start by reading src/litkit/embeddings/specter2.py and src/litkit/embeddings/sbert_mpnet.py, then inspect the FTS5 issue and the build record work in #65. First establish a retrieval test set and evaluation command covering the stated document types; record recall and nDCG for the current configuration before comparing reranking, query adaptation, lexical fusion, and replacement embedders. Done means adopted changes show measured gains and any re-embedding changes ship together with model revisions recorded.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
Retrieval uses models and methods from around 2021–22:
- Paper search:
allenai/specter2_basewithout SPECTER2's ad hoc query adapter (src/litkit/embeddings/specter2.py). Short typed queries are embedded the way abstracts are. - Passage search:
sentence-transformers/all-mpnet-base-v2(src/litkit/embeddings/sbert_mpnet.py). It is a general-domain model, behind current embedding models and not trained on biomedical text. - Two stages: passages are searched only within a Stage 1 shortlist of papers chosen by title and abstract. A relevant passage in a paper whose abstract is about something else is missed (exact mode avoids this).
- Lexical matching: exact-token matching, with no ranked keyword scoring (such as BM25) and no rank fusion with the semantic results.
- Reranking: none in LitKit. Chatty has an optional LLM reranker in its chat path only.
Constraint
Re-embedding PMC OA takes about a day on roughly 20 GPUs and about a month on modest hardware. Changes that need re-embedding should be measured first and then shipped together in one rebuild.
Proposal
- Measure. Build a retrieval test set: queries with known relevant passages, covering biomedical papers and non-scientific documents (manuals, policies). Report recall and nDCG at fixed cutoffs for each configuration.
- Cheap wins (no re-embedding).
- A cross-encoder reranker over the top candidates, for example MedCPT's cross-encoder or a bge reranker. It runs on CPU for a few dozen passages per query.
- SPECTER2's ad hoc query adapter for query embeddings.
- BM25 scoring and reciprocal rank fusion, once the FTS5 index is maintained at scale (see the FTS5 issue).
- Changes that need a rebuild. Compare these on the test set:
- a newer chunk embedder (for example MedCPT for biomedical text, or a current general model such as Qwen3-Embedding or BGE-M3);
- contextual chunks (paper title and section heading prepended before embedding).
- One rebuild. Ship the winners together with the other changes that need a rebuild: the FTS5 index, the build record from #65, and the duplicate-vector fix.
Done when
- The test set and an evaluation command are in the repository, and results for the current configuration are recorded.
- Each adopted change shows a measured gain on the test set.
- Changes that need re-embedding are released together, with the model revisions recorded in the build record.
- Ngôn ngữ chính
- Python
- Star
- 0
- Fork
- 2
- Merge trung bình
- 8 giờ 57 phút
- Pull request đã merge (30 ngày)
- 36
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của lanl/litkit
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 22/100
lanl/litkit#47 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
lanl/litkit#18 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
docs(contributing): the two things that silently block a PRCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởavailable documentation good first issue
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 95/100
Nixitov/Riptide-Native#944 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
JTHCode/secretguard#24 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: middleware documentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
omarelshamy25x/shamy-hijri#63 ·
Maintainer thường phản hồi trong vòng 1 ngày