feat: add new healthcare domain#136
Open
eliot-gtn wants to merge 1 commit intosierra-research:mainfrom
Open
Conversation
Collaborator
|
Thank you for your PR. Do you have more information on how models are performing on this new domain? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces a healthcare domain for tau2-bench that tests agents' ability to handle medical workflows requiring strict privacy compliance, clinical safety awareness, and multi-step coordination. The domain evaluates 8 healthcare scenarios across 152 tasks: appointment scheduling, chronic condition monitoring, telehealth setup, prescription refills, test results access, urgent triage, critical triage, and patient mistake handling. Focus areas include workflow adherence, bidirectional agent-patient coordination, and safety-critical decision making.
Changes Made
Core Domain Implementation
New Files:
src/tau2/domains/healthcare/- Complete domain implementationdata_model.py,user_data_model.py,environment.py- Core models and environmenttools.py(18 agent tools),user_tools.py(20 patient tools) - Bidirectional coordinationREADME.md- Comprehensive domain documentationTask Generation:
src/tau2/domains/healthcare/tasks/- Task generation infrastructureevaluation_functions.py- Centralized evaluation logiccreate_tasks.py,manager.py- Task generation pipeline with composition supportData & Policy:
data/tau2/domains/healthcare/- Domain data and configurationdb.json- 3 patient records with comprehensive medical historiespolicy.md- Unified agent policytasks.json(70 sampled),tasks_full.json(152 complete),tasks_small.json(37 single-intent)split_tasks.json- Train/dev/test splitsTesting:
tests/test_domains/test_healthcare/- 66 tests, all passing (100% pass rate)Registry Integration:
src/tau2/registry.py- Healthcare domain and task registrationKey Healthcare Features
HIPAA-Compliant Privacy - Mandatory identity verification before PHI disclosure, protected health information safeguards
Appointment Scheduling Workflows - Extensive coverage of medical scheduling including booking, insurance verification, availability coordination, and calendar management
Clinical Safety Thresholds - Evidence-based vital sign thresholds (fever ≥103°F, BP ≥180/120, glucose <70/>250, O2 <90%) with clear escalation rules
Multi-Step Workflow Patterns - Hierarchical workflow: identity → assessment → verification → action. Tests workflow adherence, not just outcomes.
Bidirectional Tool Coordination - Agent tools (system operations) + patient tools (real-world actions like measuring vitals, checking insurance card)
Mixed Evaluation Strategy - ENV_ASSERTION (outcome validation) + ACTION (workflow verification with tool call history tracking). Both must pass for full credit. Tool call history tracking validates procedures, not just outcomes.
Tested Capabilities:
Domain Statistics:
Base Framework Enhancement
Behavioral Workflow Verification:
Added
compare_argsfield toToolCallinsrc/tau2/data_model/message.pyto enable partial argument matching for ACTION evaluation.Purpose: The existing
Action.compare_argsmechanism in tasks.py can now match against actual tool calls. This verifies specific arguments (e.g., patient_id, procedure_type) while ignoring non-deterministic ones (e.g., appointment dates/times). Useful for healthcare workflows where exact times vary but procedure sequence matters.Testing
All 66 tests pass (100% pass rate):
Manual testing with Claude models verified policy compliance and workflow adherence.
Documentation
src/tau2/domains/healthcare/README.md- Domain overview, architecture, examples, testing guidedata/tau2/domains/healthcare/policy.md- Complete agent policy with clinical thresholds and workflowsChecklist
compare_argsis optional, backward compatible)Future Development Ideas
Expand Coverage:
Diverse Patient Personas: (TauTrait?)
Enhanced Patient Data:
Enhanced Realism:
Developed for the AgentBeats competition.
Related to Issue #127
Ideas and feedback welcome!