lean-rag-indexes / README.md
dantunes6's picture
Update README.md
0242cce verified
|
Raw
History Blame
2.85 kB
---
viewer: false
language:
- en
license: other
task_categories:
- question-answering
tags:
- biomedical
- RAG
- BioASQ
- FAISS
- PISA
- information-retrieval
pretty_name: Lean RAG Indexes for BioASQ Task 14b
size_categories:
- 10M<n<100M
---
# Lean RAG Indexes for BioASQ
Prebuilt retrieval indexes for the **Lean RAG Pipelines for Biomedical Question Answering** project, developed as part of a Master's dissertation at LASIGE, University of Lisbon.
These indexes support a hybrid (BM25 + dense retrieval) pipeline evaluated on
[BioASQ Task 14b](http://bioasq.org/).
## Repository Structure
```bash
faiss/
└── pubmed2026_ivfsq8_raw_matryoshka.index #Dense vector index
pisa/
├── pubmed2026_soStopw/ #BM25 index with stopword removal only
│ └── ...
└── pubmed2026_comDois/ #BM25 index with stopword removal + Porter2 stemming
└── ...
corpus/
└──pubmed2026.lmdb #Embedded database for key-value data
└── ...
jsonl2026/
└── ... #PubMed2026 Annual Baseline
```
## Indexes
### FAISS (Dense Retrieval)
- **File:** `faiss/pubmed2026_ivfsq8_raw_matryoshka.index`
- **Index type:** IVF + Scalar Quantizer (SQ8)
- **Embedding model:** [NeuML/pubmedbert-base-embeddings-matryoshka](https://huggingface.co/NeuML/pubmedbert-base-embeddings-matryoshka)
- **Corpus:** PubMed Annual Baseline 2026
### PISA — Stopwords only (`pisa/pubmed2026_soStopw/`)
- **Retrieval model:** BM25
- **Preprocessing:** Stopword removal using PyTerrier's default stopword list
- **Stemming:** None
- **Corpus:** PubMed Annual Baseline 2026
### PISA — Stopwords + Porter2 (`pisa/pubmed2026_comDois/`)
- **Retrieval model:** BM25
- **Preprocessing:** Stopword removal using PyTerrier's default stopword list
- **Stemming:** Porter2
- **Corpus:** PubMed Annual Baseline 2026
## Usage
### Loading the FAISS index
```python
import faiss
index = faiss.read_index("faiss/pubmed2026_ivfsq8_raw_matryoshka.index")
index.nprobe= 512 #recommended
```
Or download it first with:
```python
from huggingface_hub import snapshot_download
snapshot_download(
repo_id="dantunes6/lean-rag-indexes",
repo_type="dataset",
local_dir="./lean-rag-indexes"
)
```
### Using the PISA index
The PISA index is used via [PISA](https://pyterrier.readthedocs.io/en/stable/ext/pyterrier_pisa/). Point your retriever at the `pisa/` directory after downloading.
## Corpus Notice
The corpus used to build these indexes consists of PubMed abstracts from the **PubMed Annual Baseline 2026**, distributed by the [National Library of Medicine (NLM)](https://pubmed.ncbi.nlm.nih.gov/download/).
Please ensure you comply with NLM's terms of use before redistributing this data.
## Credits
Developed at [LASIGE](https://lasige.pt/), University of Lisbon by Diogo Antunes.
Supervised by Francisco M. Couto.