Spaces:
Sleeping
Sleeping
KevinIsInCoding Claude Sonnet 4.6 commited on
Commit ·
3c9dd57
1
Parent(s): 42fb3af
feat(rag): switch embedding model to BioLORD-2023-C
Browse filesReplace all-MiniLM-L6-v2 with FremyCompany/BioLORD-2023-C.
BioLORD is anchored to UMLS/SNOMED CT/MeSH ontologies during training,
so it natively resolves biomedical synonyms (TARDBP↔TDP-43, SOD1↔superoxide
dismutase) without relying on exact string matches. This improves retrieval
quality for physician queries that use clinical phrasing rather than gene
symbol abbreviations — the primary trust signal for a physician-facing tool.
ChromaDB collection rebuilt: 510 chunks at 768d (vs 384d for MiniLM).
Smoke test: query 'superoxide dismutase mutation motor neuron' returns
all SOD1-specific papers at top-3 with no abbreviation in the query.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- rag/indexer.py +3 -1
rag/indexer.py
CHANGED
|
@@ -13,7 +13,9 @@ from models import ALSPaper
|
|
| 13 |
|
| 14 |
_logger = get_logger("rag.indexer")
|
| 15 |
|
| 16 |
-
|
|
|
|
|
|
|
| 17 |
|
| 18 |
|
| 19 |
def _chunk_paper(paper: ALSPaper) -> list[dict]:
|
|
|
|
| 13 |
|
| 14 |
_logger = get_logger("rag.indexer")
|
| 15 |
|
| 16 |
+
# BioLORD-2023-C: anchored to UMLS/SNOMED CT/MeSH ontologies — natively understands
|
| 17 |
+
# biomedical synonyms (TARDBP = TDP-43, SOD1 = superoxide dismutase) and clinical phrasing.
|
| 18 |
+
_EMBED_FN = SentenceTransformerEmbeddingFunction(model_name="FremyCompany/BioLORD-2023-C")
|
| 19 |
|
| 20 |
|
| 21 |
def _chunk_paper(paper: ALSPaper) -> list[dict]:
|