| | --- |
| | license: cc-by-4.0 |
| | language: |
| | - en |
| | tags: |
| | - pubmed |
| | - embeddings |
| | - medcpt |
| | - biomedical |
| | - retrieval |
| | - rag |
| | - medical |
| | pretty_name: PubMedAbstractsSubsetEmbedded |
| | --- |
| | |
| | # PubMed Abstracts Subset with MedCPT Embeddings (float32) |
| |
|
| | This dataset contains a probabilistic sample of ~2.4 million PubMed abstracts, enriched with precomputed dense embeddings (title + abstract), 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 |
| |
|
| | --- |
| |
|
| | ## 🔍 How to Access |
| |
|
| | ### ▶️ Option 1: Load via Hugging Face `datasets` |
| |
|
| | ```python |
| | from 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 |
| |
|
| | ```bash |
| | git lfs install |
| | git clone https://huggingface.co/datasets/slinusc/PubMedAbstractsSubsetEmbedded |
| | cd 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.1952481, ... , 0.2887376] |
| | } |
| | ``` |
| |
|
| | > 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. |