An AI agent environment for processing real-world clinical records — a genuine daily operational challenge in healthcare. Agents must extract, structure, and reconcile medical data from unstructured clinical notes.
Difficulty: Easy — note is well-structured with clear field values. Agent must locate and normalize each field.
Expected baseline score: ~0.75–0.85
Task 2: SOAP Note Structuring (Medium)
Objective: Parse a narrative clinical encounter into the standard SOAP format (Subjective, Objective, Assessment, Plan).
The note intentionally mixes content from all sections, and the agent must correctly classify each piece of information.
Difficulty: Medium — requires understanding of clinical terminology to avoid cross-contamination between sections. Grader penalizes content placed in wrong sections.
Expected baseline score: ~0.55–0.70
Task 3: Medication Reconciliation (Hard)
Objective: Reconcile a complex 3-encounter medication history. Identify current medications (with correct doses), discontinued medications, dose changes, drug interactions, and patient non-adherence events.
Difficulty: Hard — involves tracking changes across multiple encounters, recognizing drug interactions (Warfarin+Ibuprofen, Glipizide+Ibuprofen), and detecting patient self-discontinuation.
Expected baseline score: ~0.35–0.55
Action & Observation Spaces
Observation
json
1{2"task_id":"string",3"task_description":"string — full extraction schema and instructions",4"clinical_note":"string — the raw clinical note",5"attempt_number":"integer — current step number",6"last_feedback":"string | null — grader feedback from previous step",7"max_attempts":"integer — max steps for this task"8}
Action
json
1{2"extraction":"string — valid JSON matching the task schema",3"done":"boolean — set true to end episode early"4}
Reward Function
Rewards are non-sparse and shaped to encourage iterative improvement:
Base reward: Grader score (0.0–1.0) on the submitted extraction
Improvement bonus: +0.05 when agent improves on its best score
Stagnation penalty: –0.02 per step (after step 2) when agent fails to improve
Final score: Best raw grader score achieved across all steps
All rewards clamped to [0.0, 1.0]
Each grader uses weighted field scoring with partial credit — agents receive signal for each correctly extracted field even if the overall answer is incomplete.