{"data":{"kind":"file","path":"README.md","version_id":"yf7n5js3cnvhslcwjhqjnufy","entry":{"name":"README.md","path":"README.md","is_directory":false,"size":3025,"modified_at":"2026-02-01T14:53:52.826000","content_hash":"321745689f3875b32a38e18e5edb7fdc8caf944ecc3178b431d20703f722dc6a"},"entries":[],"content":"# OpenMed HeadQA Environment\n\nHealthcare multiple-choice question answering environment for RL fine-tuning using HEAD-QA v2 - challenging medical exam questions from Spanish professional qualification exams.\n\n## Task Description\n\nGiven a medical exam question with multiple answer choices (typically 4-5 options), select the correct answer. These questions require specialized healthcare knowledge across multiple domains.\n\n## Categories\n\n| Category | Description |\n|----------|-------------|\n| Medicine | Clinical medicine and diagnostics |\n| Nursing | Patient care and nursing practice |\n| Psychology | Mental health and behavioral science |\n| Chemistry | Medical chemistry and biochemistry |\n| Pharmacology | Drug mechanisms and interactions |\n| Biology | Human biology and physiology |\n\n## Dataset\n\n- **Source**: [alesi12/head_qa_v2](https://huggingface.co/datasets/alesi12/head_qa_v2)\n- **Original**: Spanish MIR (Medico Interno Residente) exams\n- **Language**: English (translated from Spanish)\n- **Total**: 12,751 questions\n- **Train**: ~11,500 (90%)\n- **Validation**: ~1,275 (10%)\n- **Format**: Multiple choice with 4-5 options\n\n## Reward Structure\n\n| Component | Weight | Description |\n|-----------|--------|-------------|\n| Accuracy | 80% | Exact match on correct answer (A-E) |\n| Thinking | 15% | Quality of medical reasoning in `<think>` tags |\n| Format | 5% | Proper `\\boxed{}` answer format |\n\n## Example\n\n**Input:**\n```\nCategory: Pharmacology\n\nQuestion:\nWhich of the following drugs acts primarily by inhibiting cyclooxygenase (COX)\nenzymes, thereby reducing prostaglandin synthesis?\n\nOptions:\nA. Metformin\nB. Aspirin\nC. Atenolol\nD. Omeprazole\n```\n\n**Expected Output:**\n```\n<think>\nThis question asks about mechanisms of drug action, specifically COX inhibition.\n\nA. Metformin - Acts on AMP-activated protein kinase for glucose metabolism\nB. Aspirin - Known COX inhibitor, reduces prostaglandin synthesis (NSAID)\nC. Atenolol - Beta-blocker, affects adrenergic receptors\nD. Omeprazole - Proton pump inhibitor, reduces gastric acid\n\nAspirin is an NSAID that works by irreversibly inhibiting COX-1 and COX-2,\nwhich reduces prostaglandin synthesis.\n</think>\n\\boxed{B}\n```\n\n## Usage\n\n```python\nfrom OpenMed_HeadQA import load_environment\n\nenv = load_environment()\n```\n\n## Citation\n\n```bibtex\n@inproceedings{vilares-gomez-rodriguez-2019-head,\n    title = \"{HEAD}-{QA}: A Healthcare Dataset for Complex Reasoning\",\n    author = \"Vilares, David and G{\\'o}mez-Rodr{\\'i}guez, Carlos\",\n    booktitle = \"Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics\",\n    year = \"2019\",\n    publisher = \"Association for Computational Linguistics\",\n    url = \"https://aclanthology.org/P19-1092\",\n    pages = \"960--966\",\n}\n\n@misc{head_qa_v2,\n  title={HEAD-QA v2: An Expanded Healthcare Dataset},\n  author={Alesi12},\n  year={2024},\n  howpublished={HuggingFace Datasets},\n  url={https://huggingface.co/datasets/alesi12/head_qa_v2}\n}\n```\n\n## License\n\nCC BY-SA 4.0 (following original HEAD-QA license)\n","encoding":"utf-8","truncated":false,"total_bytes":3025},"status":null}