slinusc commited on
Commit
cbf641c
·
verified ·
1 Parent(s): 5818a3b

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +102 -0
README.md ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ language:
4
+ - en
5
+ tags:
6
+ - pubmed
7
+ - embeddings
8
+ - medcpt
9
+ - biomedical
10
+ - retrieval
11
+ - rag
12
+ - medical
13
+ pretty_name: PubMedAbstractsSubsetEmbedded
14
+ ---
15
+
16
+ # PubMed Abstracts Subset with MedCPT Embeddings (float32)
17
+
18
+ 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).
19
+
20
+ Each entry includes:
21
+ - `title`: Title of the publication
22
+ - `abstract`: Abstract content
23
+ - `PMID`: PubMed identifier
24
+ - `embedding`: 768-dimensional float32 vector from MedCPT
25
+
26
+ The original identifier (`id`) was removed to reduce redundancy since the `PMID` serves as a unique key.
27
+
28
+ ---
29
+
30
+ ## 🔍 How to Access
31
+
32
+ ### ▶️ Option 1: Load via Hugging Face `datasets`
33
+
34
+ ```python
35
+ from datasets import load_dataset
36
+
37
+ dataset = load_dataset("slinusc/PubMedAbstractsSubsetEmbedded", streaming=True)
38
+
39
+ for doc in dataset:
40
+ print(doc["PMID"], doc["embedding"][:5]) # print first 5 dims
41
+ break
42
+ ```
43
+
44
+ > Each vector is stored as a list of 768 `float32` values (compact, no line breaks).
45
+
46
+ ---
47
+
48
+ ### 💾 Option 2: Git Clone with Git LFS
49
+
50
+ ```bash
51
+ git lfs install
52
+ git clone https://huggingface.co/datasets/slinusc/PubMedAbstractsSubsetEmbedded
53
+ cd PubMedAbstractsSubsetEmbedded
54
+ ```
55
+
56
+ ---
57
+
58
+ ## 📦 Format
59
+
60
+ Each file is a `.jsonl` (JSON Lines) file, where each line is a valid JSON object:
61
+
62
+ ```json
63
+ {
64
+ "title": "...",
65
+ "abstract": "...",
66
+ "PMID": 36464820,
67
+ "embedding": [-0.1952, 0.0266, ..., 0.0843]
68
+ }
69
+ ```
70
+
71
+ > The embeddings are 768-dimensional dense vectors, serialized as 32-bit floats.
72
+
73
+ ---
74
+
75
+ ## 📚 Source and Licensing
76
+
77
+ 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).
78
+ MedCPT embeddings were generated using the [ncbi/MedCPT-Article-Encoder](https://huggingface.co/ncbi/MedCPT-Article-Encoder) model.
79
+
80
+ ---
81
+
82
+ ## 📣 Citation
83
+
84
+ If you use this dataset or the included MedCPT embeddings, please cite:
85
+
86
+ > **Stuhlmann et al. (2025)**
87
+ > *Efficient and Reproducible Biomedical Question Answering using Retrieval Augmented Generation*
88
+ > [arXiv:2505.07917](https://arxiv.org/abs/2505.07917)
89
+ > [https://github.com/slinusc/medical_RAG_system](https://github.com/slinusc/medical_RAG_system)
90
+
91
+ ---
92
+
93
+ ## 🏷️ Version
94
+
95
+ - `v1.0` – Initial release (2.39M samples, 24 JSONL files, float32 embeddings, ~23 GB total)
96
+
97
+ ---
98
+
99
+ ## 📬 Contact
100
+
101
+ Maintained by [@slinusc](https://huggingface.co/slinusc).
102
+ For questions or collaborations, open a discussion on the HF Hub.