NaghmehAI commited on
Commit
c8eff55
·
verified ·
1 Parent(s): c3ad384

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +140 -3
README.md CHANGED
@@ -1,3 +1,140 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ ---
4
+
5
+ # PerMedCQA: Persian Medical Consumer QA Benchmark 🧠🇮🇷
6
+
7
+ **PerMedCQA: Benchmarking Large Language Models on Medical Consumer Question Answering in Persian**
8
+
9
+ PerMedCQA is the first large-scale, real-world benchmark for Persian-language medical consumer question answering. It contains anonymized medical inquiries from Persian-speaking users paired with professional responses, enabling rigorous evaluation of large language models in low-resource, health-related domains.
10
+
11
+ ---
12
+
13
+ ## 📊 Dataset Overview
14
+
15
+ - **Total entries**: 68,138 QA pairs
16
+ - **Source platforms**: DrYab, HiSalamat, GetZoop, Mavara-e-Teb
17
+ - **Timeframe**: Nov 10, 2022 – Apr 2, 2024
18
+ - **Languages**: Persian only
19
+ - **Licensing**: [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/)
20
+
21
+ ---
22
+
23
+ ## 🧬 Metadata & Features
24
+
25
+ Each example in the dataset includes:
26
+
27
+ - `instance_id`: Unique ID for each QA pair
28
+ - `Title`: Short user-submitted title
29
+ - `Question`: Full Persian-language consumer medical question
30
+ - `Expert_Answer`: Doctor’s response
31
+ - `Category`: Medical topic (e.g., “پوست و مو”)
32
+ - `Specialty`: Expert’s medical field (e.g., “متخصص پوست و مو”)
33
+ - `Age`: Reported patient age
34
+ - `Weight`: Reported weight (optional)
35
+ - `Sex`: Patient gender (`"man"` or `"woman"`)
36
+ - `dataset_source`: Name of the platform (e.g., DrYab, Getzoop)
37
+ - `Tag`: ICD‑11 label and rationale
38
+ - `QuestionType`: Question classification tag (e.g., "Contraindication", "Indication") and reasoning
39
+
40
+ ---
41
+
42
+ ## 📁 Dataset Structure
43
+
44
+ ```json
45
+ {
46
+ "Title": "قرمزی پوست نوزاد بعد از استفاده از پماد",
47
+ "Category": "پوست و مو",
48
+ "Specialty": "متخصص پوست و مو",
49
+ "Age": "1",
50
+ "Weight": "10",
51
+ "Sex": "man",
52
+ "dataset_source": "HiSalamat",
53
+ "instance_id": 32405,
54
+ "Tag": {
55
+ "Tag": 23,
56
+ "Tag_Reasoning": "The question addresses a skin reaction in an infant following the application of a cream, indicating a dermatological condition."
57
+ },
58
+ "Question": "سلام خسته نباشید. من واسه پسر ۱ ساله‌ام که جای واکسنش سفت شده بود، پماد موضعی استفاده کردم. ولی الان پوستش خیلی قرمز شده و خارش داره. ممکنه حساسیت داده باشه؟ باید چکار کنم؟",
59
+ "Expert_Answer": "احتمالا پوست نوزاد به ترکیبات پماد حساسیت نشان داده است. مصرف آن را قطع کنید و در صورت ادامه علائم به متخصص پوست مراجعه کنید.",
60
+ "QuestionType": {
61
+ "Explanation": "The user asks about an adverse skin reaction following the use of a topical medication on an infant, which is a case of possible side effects.",
62
+ "QuestionType_Tag": "SideEffect"
63
+ }
64
+ }
65
+ ```
66
+
67
+ ---
68
+
69
+ ## 📥 How to Load
70
+
71
+ ```python
72
+ from datasets import load_dataset
73
+
74
+ ds = load_dataset("NaghmehAI/PerMedCQA", split="train")
75
+ print(ds[0])
76
+ ```
77
+
78
+ ---
79
+
80
+ ## 🚀 Intended Uses
81
+
82
+ - 🧠 **Evaluation** of multilingual or Persian-specific LLMs in real-world, informal medical domains
83
+ - 🛠️ **Few-shot or zero-shot** fine-tuning, instruction-tuning
84
+ - 🌍 **Cultural insights**: Persian language behavior in health-related discourse
85
+ - ⚠️ **NOT for clinical use**: Informational and research purposes only
86
+
87
+ ---
88
+
89
+ ## ⚙️ Data Processing Pipeline
90
+
91
+ ### Stage 1: Column Transformation (`change_columns.py`)
92
+ - Reads CSV/JSON input and transforms them into structured JSON format
93
+ - Handles single-turn, multi-turn, and multi-expert Q&A data
94
+ - Cleans and formats the text, removing unnecessary whitespace and newlines
95
+ - Creates a chat-style JSON file with `user` and `assistant` roles
96
+
97
+ ### Stage 2: QA Preprocessing (`preprocess_for_qa.py`)
98
+ - Truncates multi-turn dialogues to first Q&A pair
99
+ - Removes:
100
+ - Empty or invalid messages
101
+ - Q&A pairs shorter than 3 words
102
+ - Duplicate Q&A instances
103
+ - Adds:
104
+ - `dataset_source` and `instance_id` to each item
105
+ - Merges cleaned records into `All_QA_preprocessed.json`
106
+
107
+ ### Dataset Cleaning Results:
108
+ | Dataset | Step 1 Removed | Step 2 Removed | Step 3 Removed | Final Records |
109
+ |--------------|----------------|----------------|----------------|----------------|
110
+ | Dr_Yab | 63 | 1083 | 25 | 37,905 |
111
+ | GetZoop | 1005 | 1352 | 8 | 25,502 |
112
+ | Hi-Salamat | 9580 | 121 | 1 | 5,220 |
113
+ | Mavara-e-Teb | 0 | 1034 | 92 | 4,789 |
114
+
115
+ ---
116
+
117
+ ## 📚 Citation
118
+
119
+ If you use **PerMedCQA**, please cite:
120
+
121
+ ```bibtex
122
+ @misc{jamali2025permedcqa,
123
+ title={PerMedCQA: Benchmarking Large Language Models on Medical Consumer Question Answering in Persian Language},
124
+ author={Jamali, Naghmeh and Mohammadi, Milad and Baledi, Danial and Rezvani, Zahra and Faili, Heshaam},
125
+ year={2025},
126
+ eprint={2505.18331},
127
+ archivePrefix={arXiv},
128
+ primaryClass={cs.CL},
129
+ url={https://arxiv.org/abs/2505.18331}
130
+ }
131
+ ```
132
+
133
+ ---
134
+
135
+ ## 📬 Contact
136
+
137
+ For collaboration or questions:
138
+
139
+ 📧 Naghmeh Jamali – naghme.jamali.ai@gmail.com
140
+ 🔗 [LinkedIn / ORCID / Google Scholar – optional]