{"data":{"kind":"file","path":"README.md","version_id":"dbzobbqei9sgv2yyaj6bgh67","entry":{"name":"README.md","path":"README.md","is_directory":false,"size":3723,"modified_at":"2026-02-01T15:41:30.865000","content_hash":"9551d38b243e230e8463eb73b3882a3a305f4a7e0c1b513906d343e43fc7cf10"},"entries":[],"content":"# OpenMed LiverTox Environment\n\nDrug-induced liver injury (DILI) risk assessment environment for RL fine-tuning using the LiverTox database - comprehensive hepatotoxicity classification for 1,250+ drugs.\n\n## Task Description\n\nGiven drug information (introduction, background, mechanism of injury), assess the hepatotoxicity risk level. This task requires understanding pharmacology, clinical evidence patterns, and liver injury mechanisms.\n\n## Risk Categories\n\n| Category | Description |\n|----------|-------------|\n| HIGH | Well-established cause of liver injury; multiple documented cases; significant clinical concern |\n| MODERATE | Rare but likely cause; probable hepatotoxicity; several convincing cases reported |\n| LOW | Possible cause; isolated or anecdotal cases; uncertain causality |\n| MINIMAL | No evidence of hepatotoxicity; not associated with liver injury; safe profile |\n\n## Dataset\n\n- **Source**: [cmcmaster/livertox](https://huggingface.co/datasets/cmcmaster/livertox)\n- **Original**: [LiverTox (NIDDK)](https://www.ncbi.nlm.nih.gov/books/NBK547852/)\n- **Total**: 1,250 drugs\n- **Train**: ~1,125 (90%)\n- **Validation**: ~125 (10%)\n- **Format**: 4-class risk classification\n\n## Reward Structure\n\n| Component | Weight | Description |\n|-----------|--------|-------------|\n| Exact Accuracy | 50% | Exact match on risk level (HIGH/MODERATE/LOW/MINIMAL) |\n| Partial Accuracy | 30% | Rewards for being close (1 level off = 0.5, 2 levels = 0.25) |\n| Thinking | 15% | Quality of pharmacological reasoning in `<think>` tags |\n| Format | 5% | Proper `\\boxed{}` answer format |\n\n## Example\n\n**Input:**\n```\nDrug: Aspirin\nDrug Class: Nonsteroidal Antiinflammatory Drugs\n\nIntroduction:\nAspirin is a salicylate and nonsteroidal antiinflammatory drug (NSAID) with\nanalgesic, antipyretic and antiinflammatory properties, used widely for pain\nrelief and cardiovascular protection...\n\nBackground:\nAspirin inhibits cyclooxygenase (COX) enzymes, reducing prostaglandin synthesis.\nIt is one of the most widely used medications worldwide...\n\nMechanism of Injury:\nThe mechanism by which aspirin causes liver injury is not well understood, but\nmay relate to mitochondrial dysfunction or metabolic idiosyncrasy...\n\nBased on the above information, assess the hepatotoxicity risk level for this drug.\nClassify as: HIGH, MODERATE, LOW, or MINIMAL\n```\n\n**Expected Output:**\n```\n<think>\nAspirin is an NSAID with widespread use. While NSAIDs as a class can cause\nhepatotoxicity, aspirin-related liver injury is relatively uncommon:\n\n1. The mechanism suggests possible mitochondrial effects, but this is not\n   well-established\n2. Despite billions of doses taken annually, severe hepatotoxicity is rare\n3. Most cases involve Reye syndrome in children (now rare with usage restrictions)\n4. Occasional elevations in liver enzymes reported but usually reversible\n\nGiven the rare but documented cases with uncertain mechanism, this represents\na LOW risk profile - possible cause with uncommon occurrence.\n</think>\n\\boxed{LOW}\n```\n\n## Usage\n\n```python\nfrom OpenMed_LiverTox import load_environment\n\nenv = load_environment()\n```\n\n## Citation\n\n```bibtex\n@misc{livertox,\n  title={LiverTox: Clinical and Research Information on Drug-Induced Liver Injury},\n  author={{National Institute of Diabetes and Digestive and Kidney Diseases}},\n  year={2012},\n  publisher={National Institutes of Health},\n  url={https://www.ncbi.nlm.nih.gov/books/NBK547852/}\n}\n\n@misc{cmcmaster_livertox,\n  title={LiverTox Dataset},\n  author={McMaster, Christopher},\n  year={2025},\n  howpublished={HuggingFace Datasets},\n  url={https://huggingface.co/datasets/cmcmaster/livertox}\n}\n```\n\n## License\n\nPublic Domain (LiverTox database is produced by NIDDK and is copyright free)\n","encoding":"utf-8","truncated":false,"total_bytes":3723},"status":null}