slinusc's picture
Update README.md
f241756 verified
metadata
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) and was used in the paper Efficient and Reproducible Biomedical QA using Retrieval-Augmented Generation.

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

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

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:

{
  "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.
MedCPT embeddings were generated using the 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://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.
For questions or collaborations, open a discussion on the HF Hub.