--- viewer: false language: - en license: other license_name: nlm-terms-and-conditions license_link: https://www.nlm.nih.gov/databases/download/terms_and_conditions.html task_categories: - question-answering tags: - biomedical - RAG - BioASQ - CLEF2026 - FAISS - PISA - BM25 - information-retrieval pretty_name: Lean RAG Indexes for BioASQ Task 14b size_categories: - 10M ## Indexes ### FAISS (Dense Retrieval) | | | |---|---| | **File** | `faiss/pubmed2026_ivfsq8_raw_matryoshka.index` | | **Index type** | IVF + Scalar Quantizer (SQ8) | | **Clusters** | 216, trained on a random sample of vectors from the corpus | | **Similarity metric** | Inner product | | **Embedding model** | [NeuML/pubmedbert-base-embeddings-matryoshka](https://huggingface.co/NeuML/pubmedbert-base-embeddings-matryoshka) | | **Embedding dimension** | `768` | | **Encoded text** | `title + abstract` | | **Recommended `nprobe`** | `512` — tuned on the BioASQ training set for the best trade-off between Recall and per-query latency | ### PISA — Stopwords only (`pisa/pubmed2026_soStopw/`) | | | |---|---| | **Retrieval model** | BM25 | | **Preprocessing** | Stopword removal (PyTerrier / Terrier default stopword list) | | **Stemming** | None | | **Recommended BM25 parameters** | `k1=0.6`, `b=0.4` | ### PISA — Stopwords + Porter2 (`pisa/pubmed2026_comDois/`) | | | |---|---| | **Retrieval model** | BM25 | | **Preprocessing** | Stopword removal (PyTerrier / Terrier default stopword list) | | **Stemming** | Porter2 | | **Recommended BM25 parameters** | `k1=0.6`, `b=0.4` | > **This is the configuration used for all reported results.** A grid search over `k1`, `b` and four preprocessing configurations (none, stemming only, stopwords only, both) was run on the BioASQ training set targeting Recall; stopword removal combined with Porter2 stemming came out on top. The `soStopw` index is included for ablation purposes. **The BM25 parameters above are not PyTerrier's defaults** (`k1=1.2`, `b=0.75`). Using the defaults will not reproduce the reported results. ## Usage ### Download ```python from huggingface_hub import snapshot_download snapshot_download( repo_id="dantunes6/lean-rag-indexes", repo_type="dataset", local_dir="./lean-rag-indexes" ) ``` The full set of files is large. To fetch only what you need, use `allow_patterns`: ```python snapshot_download( repo_id="dantunes6/lean-rag-indexes", repo_type="dataset", local_dir="./lean-rag-indexes", allow_patterns=["faiss/*"] ) ``` ### Loading the FAISS index ```python import faiss index = faiss.read_index("faiss/pubmed2026_ivfsq8_raw_matryoshka.index") index.nprobe = 512 # recommended ``` Queries must be encoded with the same model used to build the index (`NeuML/pubmedbert-base-embeddings-matryoshka`) and normalised consistently with it, since the index uses inner product as its similarity metric. ### Using the PISA index The PISA index is used through [pyterrier_pisa](https://pyterrier.readthedocs.io/en/stable/ext/pyterrier_pisa/). Point your retriever at the index directory after downloading, and set the BM25 parameters explicitly: ```python from pyterrier_pisa import PisaIndex index = PisaIndex("pisa/pubmed2026_comDois") bm25 = index.bm25(k1=0.6, b=0.4, num_results=1000) ``` ## 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/). NLM does not endorse or claim any responsibility for derived works, and the data is not covered by copyright in the United States — but records may contain material subject to third-party rights, and NLM's [Terms and Conditions](https://www.nlm.nih.gov/databases/download/terms_and_conditions.html) apply. Please make sure you comply with them before redistributing this data. ## Citation If you use these indexes, please cite the working notes: ```bibtex @inproceedings{antunes2026retrievalbound, author = {Antunes, Diogo M. C. and Lopes, Paulo R. C. and Couto, Francisco M.}, title = {Retrieval-Bound Generation: Lean {RAG} Pipelines for Biomedical {QA}}, booktitle = {Working Notes of the Conference and Labs of the Evaluation Forum ({CLEF} 2026)}, series = {CEUR Workshop Proceedings}, publisher = {CEUR-WS.org}, address = {Jena, Germany}, pages = {123--145}, year = {2026} } ``` *The permanent CEUR-WS volume number and URL will be added once the proceedings are published (September 2026).* ## Credits Developed at [LASIGE](https://lasige.pt/), University of Lisbon, by Diogo Antunes. Supervised by Francisco M. Couto. ## PS I am continuously looking to improve the quality of this dataset. If you spot any inconsistencies, errors, or anomalies in the data, please feel free to report them by opening a new discussion in the Community tab. Your feedback is highly appreciated!