ClinGen

June 23, 2024 ยท View on GitHub

This is the code for our paper Knowledge-Infused Prompting: Assessing and Advancing Clinical Text Data Generation with Large Language Models, to appear on ACL 2024 Findings.

Model Framework

ClinGen

Dataset

Generated Datasets

The original train/validation/test data, and the generated synthetic training data has been uploaded in Huggingface Dataset Hub (note that KG and LLM stands for two ways of incorporating external knowledge):

Corpus# Train# Test# ClassTaskLink-KGLink-LLM
LitCovid2496062387Text Classificationlitcovidlitcovid
HOC309189810Text Classificationhochoc
GAD47503501Relation Extractiongadgad
CDR843125221Relation Extractioncdrcdr
ChemProt8793108075Relation Extractionchemprotchemprot
MedNLI1123214223Natural Language Inferencemednlimednli
MEDIQA-NLI-4053Natural Language Inferencemediqa-nlimediqa-nli
MEDIQA-RQE85883022Natural Language Inferencemediqa-rqemediqa-rqe
PUBHEALTH980412314Fact Verificationpubhealthpubhealth
HealthVer1059118243Fact Verificationhealthverhealthver
MQP1030332Sentence Similaritymqpmqp
BC5CDR-Disease488250851Named Entity Recognitionbc5cdr-diseasebc5cdr-disease
BC5CDR-Chemical488250851Named Entity Recognitionbc5cdr-chemicalbc5cdr-chemical
NCBI-Disease53369211Named Entity Recognitionncbi-diseasencbi-disease
CHEMDNER14522124301Named Entity Recognitionchemdnerchemdner
CASI51006Attribute Extractioncasicasi

Note:

  • Due to privacy constraint, we are not able to release the training set for MedNLI/MediQA-NLI.
  • train.jsonl stands for the synthetic training set (may contain noise)
  • train_few.jsonl stands for the initial few-shot demonstrations
  • test.jsonl stands for data from the test set

Training Data Generation

First of all, please apply an OpenAI API key here, if you don't have one yet. Then, replace the YOUR_API_KEY in clingen.py with your own API key. Finally, run bash run_clingen.sh with your specified dataset name and keyword type.

Questions?

Feel free to contact ran.xu at emory.edu for any questions regarding this repo. Please try to specify the problem with details so we can help you better and quicker!

Citation

If you find this repository helpful, please kindly consider citing the corresponding paper. Thanks in advance!

@inproceedings{xu2024knowledge,
  title={Knowledge-Infused Prompting: Assessing and Advancing Clinical Text Data Generation with Large Language Models},
  author={Xu, Ran and Cui, Hejie and Yu, Yue and Kan, Xuan and Shi, Wenqi and Zhuang, Yuchen and Jin, Wei and Ho, Joyce and Yang, Carl},
  booktitle={Findings of the Association for Computational Linguistics: ACL 2024},
  year={2024}
}