Datasets:
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: other
|
| 5 |
+
task_categories:
|
| 6 |
+
- question-answering
|
| 7 |
+
tags:
|
| 8 |
+
- biomedical
|
| 9 |
+
- RAG
|
| 10 |
+
- BioASQ
|
| 11 |
+
- FAISS
|
| 12 |
+
- PISA
|
| 13 |
+
- information-retrieval
|
| 14 |
+
pretty_name: Lean RAG Indexes for BioASQ Task 14b
|
| 15 |
+
size_categories:
|
| 16 |
+
- 10M<n<100M
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
+
# Lean RAG Indexes for BioASQ
|
| 20 |
+
|
| 21 |
+
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.
|
| 22 |
+
|
| 23 |
+
These indexes support a hybrid (BM25 + dense retrieval) pipeline evaluated on
|
| 24 |
+
[BioASQ Task 14b](http://bioasq.org/).
|
| 25 |
+
|
| 26 |
+
## Repository Structure
|
| 27 |
+
|
| 28 |
+
faiss/
|
| 29 |
+
|
| 30 |
+
└── pubmed2026_ivfsq8_raw_matryoshka.index # Dense vector index
|
| 31 |
+
|
| 32 |
+
pisa/
|
| 33 |
+
|
| 34 |
+
├── pubmed2026_soStopw/ # BM25 index with stopword removal only
|
| 35 |
+
|
| 36 |
+
│ └── ...
|
| 37 |
+
|
| 38 |
+
└── pubmed2026_comDois/ # BM25 index with stopword removal + Porter2 stemming
|
| 39 |
+
|
| 40 |
+
└── ...
|
| 41 |
+
|
| 42 |
+
## Indexes
|
| 43 |
+
|
| 44 |
+
### FAISS (Dense Retrieval)
|
| 45 |
+
- **File:** `faiss/pubmed2026_ivfsq8_raw_matryoshka.index`
|
| 46 |
+
- **Index type:** IVF + Scalar Quantizer (SQ8)
|
| 47 |
+
- **Embedding model:** [NeuML/pubmedbert-base-embeddings-matryoshka](https://huggingface.co/NeuML/pubmedbert-base-embeddings-matryoshka)
|
| 48 |
+
- **Corpus:** PubMed Annual Baseline 2026
|
| 49 |
+
|
| 50 |
+
### PISA — Stopwords only (`pisa/pubmed2026_soStopw/`)
|
| 51 |
+
- **Retrieval model:** BM25
|
| 52 |
+
- **Preprocessing:** Stopword removal using PyTerrier's default stopword list
|
| 53 |
+
- **Stemming:** None
|
| 54 |
+
- **Corpus:** PubMed Annual Baseline 2026
|
| 55 |
+
|
| 56 |
+
### PISA — Stopwords + Porter2 (`pisa/pubmed2026_comDois/`)
|
| 57 |
+
- **Retrieval model:** BM25
|
| 58 |
+
- **Preprocessing:** Stopword removal using PyTerrier's default stopword list
|
| 59 |
+
- **Stemming:** Porter2
|
| 60 |
+
- **Corpus:** PubMed Annual Baseline 2026
|
| 61 |
+
|
| 62 |
+
## Usage
|
| 63 |
+
|
| 64 |
+
### Loading the FAISS index
|
| 65 |
+
|
| 66 |
+
```python
|
| 67 |
+
import faiss
|
| 68 |
+
|
| 69 |
+
index = faiss.read_index("faiss/pubmed2026_ivfsq8_raw_matryoshka.index")
|
| 70 |
+
|
| 71 |
+
index.nprobe= 512 #recommended
|
| 72 |
+
```
|
| 73 |
+
|
| 74 |
+
Or download it first with:
|
| 75 |
+
|
| 76 |
+
```python
|
| 77 |
+
from huggingface_hub import snapshot_download
|
| 78 |
+
|
| 79 |
+
snapshot_download(
|
| 80 |
+
repo_id="dantunes6/lean-rag-indexes",
|
| 81 |
+
repo_type="dataset",
|
| 82 |
+
local_dir="./lean-rag-indexes"
|
| 83 |
+
)
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
### Using the PISA index
|
| 87 |
+
|
| 88 |
+
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.
|
| 89 |
+
|
| 90 |
+
## Corpus Notice
|
| 91 |
+
|
| 92 |
+
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/).
|
| 93 |
+
Please ensure you comply with NLM's terms of use before redistributing this data.
|
| 94 |
+
|
| 95 |
+
|
| 96 |
+
## Credits
|
| 97 |
+
|
| 98 |
+
Developed at [LASIGE](https://www.lasige.pt/), University of Lisbonn by Diogo Antunes.
|
| 99 |
+
Supervised by Francisco M. Couto.
|