This directory contains comprehensive evaluation tests for all agents in the NexShift nurse rostering system, following Google ADK evaluation patterns.
eval/
├── test_config.json # Global evaluation configuration
├── test_agent_eval.py # Pytest runner for all evaluations
├── README.md # This file
│
├── compliance/ # ComplianceOfficer agent tests
│ ├── compliance.evalset.json
│ └── compliance_validation.test.json
│
├── coordinator/ # RosteringCoordinator agent tests
│ ├── coordinator.evalset.json
│ └── query_routing.test.json
│
├── empathy/ # EmpathyAdvocate agent tests
│ ├── empathy.evalset.json
│ └── empathy_review.test.json
│
├── solver/ # RosterSolver agent tests
│ ├── solver.evalset.json
│ └── roster_generation.test.json
│
├── context_gatherer/ # ContextGatherer agent tests
│ ├── context_gatherer.evalset.json
│ └── context_gathering.test.json
│
├── presenter/ # RosterPresenter agent tests
│ ├── presenter.evalset.json
│ └── presentation.test.json
│
├── workflow/ # End-to-end workflow tests
│ ├── workflow.evalset.json
│ └── scenarios/
│ └── e2e_workflows.test.json
│
└── test_data/ # Test fixtures
├── nurses/ # Nurse team configurations
├── rosters/ # Sample roster data
└── shifts/ # Shift requirement configurations
pytest evals/test_agent_eval.py -v# ComplianceOfficer tests
pytest evals/test_agent_eval.py -v -k "compliance"
# Coordinator tests
pytest evals/test_agent_eval.py -v -k "coordinator"
# EmpathyAdvocate tests
pytest evals/test_agent_eval.py -v -k "empathy"
# RosterSolver tests
pytest evals/test_agent_eval.py -v -k "solver"
# ContextGatherer tests
pytest evals/test_agent_eval.py -v -k "context_gatherer"
# RosterPresenter tests
pytest evals/test_agent_eval.py -v -k "presenter"
# E2E Workflow tests
pytest evals/test_agent_eval.py -v -k "workflow"pytest evals/test_agent_eval.py -v -k "validate_roster_with_explicit_id"python evals/test_agent_eval.py --reportEach .test.json file contains test cases with the following structure:
{
"description": "Description of the test suite",
"test_cases": [
{
"name": "test_case_name",
"description": "What this test verifies",
"input": "User input to the agent",
"expected_tool_trajectory": [
{"tool_name": "tool_name", "args": {"arg1": "value1"}}
],
"expected_response_contains": ["keyword1", "keyword2"],
"expected_response_not_contains": ["unwanted1"],
"session_state": {
"key": "initial session state value"
}
}
]
}Measures whether the agent calls the expected tools:
- 1.0: All expected tools called
- 0.5-0.9: Partial match
- 0.0: No expected tools called
Threshold: 0.85-0.9 (configurable per evalset)
Measures response content quality:
- Checks for expected keywords/phrases
- Checks absence of unwanted content
Threshold: 0.5-0.6 (configurable per evalset)
- Tool calling correctness
- Error handling (non-existent rosters)
- Specific compliance checks (certifications, seniority, hours)
- Information retrieval
- Query routing (nurse, shift, staffing queries)
- Roster management operations
- HRIS management (hiring, promotions)
- Direct validation
- Basic fairness review
- Detailed analysis (nurse-by-nurse)
- Specific checks (fatigue, preferences, weekends, nights)
- Recommendations
- Basic roster generation
- Custom periods and dates
- Staffing simulations
- Overlap handling
- Failure recovery
- Full context gathering
- Specific queries
- Ready-for-generation assessment
- Presentation formatting
- Approval/rejection flow
- Failure handling
- Roster management
- Complete generation workflow
- Multi-turn conversations
- Failure recovery
- Query-then-generate patterns
- Add test cases to the appropriate
.test.jsonfile - Update categories in the corresponding
.evalset.jsonif needed - Run
pytestto verify the new tests
normal_team.json: 10 nurses with varied certificationsminimal_team.json: 2 nurses for capacity failure testsno_icu_team.json: No ICU certified nurseshigh_fatigue_team.json: All nurses with high fatigue
valid_roster.json: All compliance rules satisfiedconsecutive_violation_roster.json: >5 consecutive shiftsnight_day_violation_roster.json: Night-to-day transitionsunderstaffed_roster.json: Missing required coverage
standard_requirements.json: Normal ward requirementsicu_requirements.json: ICU-specific requirements