| # RecruitmentAssistant-MCP Evaluation Scripts |
|
|
| This directory contains evaluation scripts for analyzing the RecruitmentAssistant-MCP 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_3x` - Reference for 3 web searches |
| - `reference_trajectory_4x` - Reference for 4 web searches |
| - `target_tools` - Required tools for evaluation |
| - `models` - List of models to evaluate |
| - `permutable_tool_groups` - Tool groups that can appear in any order |
|
|
| ## Configuration |
|
|
| Edit `reference_trajectory.yaml` to: |
| - Modify reference trajectories |
| - Add/remove models |
| - Adjust tool evaluation criteria |
| - Configure dynamic matching patterns |
|
|
| ## 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-MCP/ |
| │ └── 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 |
|
|