Create README.md
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102---license: cc-by-4.0language:- entags:- pubmed- embeddings- medcpt- biomedical- retrieval- rag- medicalpretty_name: PubMedAbstractsSubsetEmbedded---
# PubMed Abstracts Subset with MedCPT Embeddings (float32)
This dataset contains a 10% probabilistic sample of ~24 million PubMed abstracts, enriched with precomputed dense embeddings from the **`ncbi/MedCPT-Article-Encoder`** model. It is derived from public metadata made available via the [National Library of Medicine (NLM)](https://pubmed.ncbi.nlm.nih.gov/) and was used in the paper [*Efficient and Reproducible Biomedical QA using Retrieval-Augmented Generation*](https://arxiv.org/abs/2505.07917).
Each entry includes:- `title`: Title of the publication- `abstract`: Abstract content- `PMID`: PubMed identifier- `embedding`: 768-dimensional float32 vector from MedCPT
The original identifier (`id`) was removed to reduce redundancy since the `PMID` serves as a unique key.
---
## 🔍 How to Access
### ▶️ Option 1: Load via Hugging Face `datasets`
```pythonfrom datasets import load_dataset
dataset = load_dataset("slinusc/PubMedAbstractsSubsetEmbedded", streaming=True)
for doc in dataset: print(doc["PMID"], doc["embedding"][:5]) # print first 5 dims break```
> Each vector is stored as a list of 768 `float32` values (compact, no line breaks).
---
### 💾 Option 2: Git Clone with Git LFS
```bashgit lfs installgit clone https://huggingface.co/datasets/slinusc/PubMedAbstractsSubsetEmbeddedcd PubMedAbstractsSubsetEmbedded```
---
## 📦 Format
Each file is a `.jsonl` (JSON Lines) file, where each line is a valid JSON object:
```json{ "title": "...", "abstract": "...", "PMID": 36464820, "embedding": [-0.1952, 0.0266, ..., 0.0843]}```
> The embeddings are 768-dimensional dense vectors, serialized as 32-bit floats.
---
## 📚 Source and Licensing
This dataset is derived from public domain PubMed metadata (titles and abstracts), redistributed in accordance with [NLM data usage policies](https://www.nlm.nih.gov/databases/download/data_distrib_main.html). MedCPT embeddings were generated using the [ncbi/MedCPT-Article-Encoder](https://huggingface.co/ncbi/MedCPT-Article-Encoder) model.
---
## 📣 Citation
If you use this dataset or the included MedCPT embeddings, please cite:
> **Stuhlmann et al. (2025)** > *Efficient and Reproducible Biomedical Question Answering using Retrieval Augmented Generation* > [arXiv:2505.07917](https://arxiv.org/abs/2505.07917) > [https://github.com/slinusc/medical_RAG_system](https://github.com/slinusc/medical_RAG_system)
---
## 🏷️ Version
- `v1.0` – Initial release (2.39M samples, 24 JSONL files, float32 embeddings, ~23 GB total)
---
## 📬 Contact
Maintained by [@slinusc](https://huggingface.co/slinusc). For questions or collaborations, open a discussion on the HF Hub.README.mdAdded+102