# RecruitmentAssistant-A2A Evaluation Scripts This directory contains evaluation scripts for analyzing the RecruitmentAssistant-A2A (Agent-to-Agent) project results. ## Scripts ### 1. analyze_retry_patterns.py Analyzes RETRY patterns in execution paths. **Features:** - Counts error occurrences by location and type - Calculates RETRY rates per model - Identifies maximum RETRY attempts - Tracks errors by agent and node type **Output:** - `retry_analysis.json` - Detailed JSON results - `retry_summary.csv` - Summary statistics - `error_by_agent.csv` - Error breakdown by agent **Usage:** ```bash python3 analyze_retry_patterns.py ``` ### 2. evaluate_success.py Calculates success rates for each model. **Success Criteria:** - Reports folder exists - Contains at least 2 markdown files **Output:** - `success_detailed_results.json` - Detailed results per session - `success_rate.csv` - Success rate summary **Usage:** ```bash python3 evaluate_success.py ``` ### 3. evaluate_trajectory.py Evaluates trajectory metrics against reference trajectories. **Metrics:** - Exact match - In-order match - Any-order match - Precision - Recall - Single-tool use - Path diversity (unique path ratio, path entropy) **Output:** - `evaluation_results.csv` - Trajectory evaluation results **Usage:** ```bash python3 evaluate_trajectory.py --config reference_trajectory.yaml ``` ### 4. reference_trajectory.yaml Configuration file defining reference trajectories and evaluation parameters. **Key Sections:** - `reference_trajectory` - Ground truth execution path - `target_tools` - Required tools for evaluation - `models` - List of models to evaluate - `extract_types` - Node types to extract from execution paths ## Configuration Edit `reference_trajectory.yaml` to: - Modify reference trajectories - Add/remove models - Adjust tool evaluation criteria - Configure extraction types ## Requirements - Python 3.7+ - pandas - pyyaml Install dependencies: ```bash pip install pandas pyyaml ``` ## Data Structure Expected directory structure: ``` /Users/wzr/TOSEM-2025/RESULTS/ ├── ModelName/ │ └── RecruitmentAssistant-A2A/ │ └── test_results/ │ ├── session_1/ │ │ ├── execution_path.md │ │ └── reports/ │ │ ├── file1.md │ │ └── file2.md │ └── session_2/ │ └── ... ``` ## Notes - All scripts output CSV files for easy analysis - JSON files contain detailed per-session information - Modify `BASE_DIR` in scripts if using a different results directory - The A2A architecture uses standard agent-to-agent communication patterns