{"data":{"kind":"file","path":"README.md","version_id":"qm2st2q5hpw159zxry20wux9","entry":{"name":"README.md","path":"README.md","is_directory":false,"size":2592,"modified_at":"2026-01-27T10:13:36.713000","content_hash":"0f9d687f6b87c0701d668cbc5bfc7acde4d51ac685cc9a0850ce93f6ef766481"},"entries":[],"content":"# OpenMed TrialMatch Environment\n\nClinical trial eligibility matching environment for RL fine-tuning using NCBI TrialGPT criterion-level annotations.\n\n## Task Description\n\nGiven a patient clinical note and a specific eligibility criterion from a clinical trial, determine whether the patient meets that criterion:\n\n| Class | Label | Description |\n|-------|-------|-------------|\n| A | included | Patient MEETS this INCLUSION criterion (qualifies for trial) |\n| B | not included | Patient DOES NOT MEET this INCLUSION criterion (disqualified) |\n| C | excluded | Patient MEETS this EXCLUSION criterion (disqualified from trial) |\n| D | not excluded | Patient DOES NOT MEET this EXCLUSION criterion (still eligible) |\n| E | not enough information | Cannot determine from available clinical data |\n\n## Dataset\n\n- **Source**: [ncbi/TrialGPT-Criterion-Annotations](https://huggingface.co/datasets/ncbi/TrialGPT-Criterion-Annotations)\n- **Original**: [TrialGPT Framework (NIH/NLM)](https://github.com/ncbi-nlp/TrialGPT)\n- **Total**: 1,015 expert-annotated patient-criterion pairs\n- **Train**: ~766 examples (80%)\n- **Eval**: ~192 examples (20%)\n- **Patients**: 53 unique patients\n- **Trials**: 103 unique clinical trials\n\n## Reward Structure\n\n| Component | Weight | Description |\n|-----------|--------|-------------|\n| Accuracy | 70% | Exact match on eligibility determination (A-E) |\n| Thinking | 20% | Quality of clinical reasoning in `<think>` tags |\n| Format | 10% | Proper `\\boxed{}` answer format |\n\n## Example\n\n**Input:**\n```\nClinical Trial: A Study of Drug X for Type 2 Diabetes\nTrial ID: NCT00123456\n\nPatient Clinical Note:\nA 58-year-old woman with a history of type 2 diabetes mellitus diagnosed 5 years ago...\n\nEligibility Criterion (INCLUSION):\n\"Patient must have a diagnosis of type 2 diabetes mellitus\"\n```\n\n**Expected Output:**\n```\n<think>\nThe criterion is an inclusion criterion requiring patients to have type 2 diabetes mellitus.\nLooking at the patient's clinical note, it states \"58-year-old woman with a history of\ntype 2 diabetes mellitus diagnosed 5 years ago.\"\nThis clearly documents that the patient has type 2 diabetes mellitus.\n</think>\n\\boxed{A}\n```\n\n## Usage\n\n```python\nfrom OpenMed_TrialMatch import load_environment\n\nenv = load_environment()\n```\n\n## Citation\n\n```bibtex\n@article{jin2024trialgpt,\n  title={TrialGPT: Matching Patients to Clinical Trials with Large Language Models},\n  author={Jin, Qiao and Wang, Zifeng and Floudas, Charalampos S and others},\n  journal={Nature Communications},\n  year={2024}\n}\n```\n\n## License\n\nPublic Domain (following NCBI data policy)\n","encoding":"utf-8","truncated":false,"total_bytes":2592},"status":null}