王子睿
restructure + add files
8c10cf2
|
Raw
History Blame Contribute Delete
2.65 kB
# EmailResponder Evaluation Scripts
This directory contains evaluation scripts for analyzing the EmailResponder project results across different LLM models.
## Scripts
### 1. analyze_retry_patterns.py
Analyzes RETRY patterns in EmailResponder project execution paths.
**Features:**
- Extracts error information from execution paths
- Counts RETRY attempts and locations
- Calculates error rates and RETRY rates per model
- Generates detailed statistics by agent and node type
**Output:**
- `retry_analysis.json` - Detailed JSON results
- `retry_summary.csv` - Summary statistics
- `error_by_agent.csv` - Error statistics by agent
**Usage:**
```bash
python3 analyze_retry_patterns.py
```
### 2. evaluate_success.py
Calculates success rates for each model in EmailResponder tasks.
**Features:**
- Analyzes execution results from test sessions
- Computes success/failure rates per model
- Tracks individual session outcomes
**Output:**
- `success-finish_detailed_results.json` - Detailed results
- `success-finish_rate.csv` - Success rate summary
**Usage:**
```bash
python3 evaluate_success.py
```
### 3. evaluate_trajectory.py
Evaluates trajectory metrics for EmailResponder project.
**Features:**
- Parses execution paths and extracts trajectories
- Evaluates 6 trajectory metrics:
- Exact match
- In-order match
- Any-order match
- Precision
- Recall
- Single-tool use
- Calculates path diversity and entropy
**Output:**
- CSV file with evaluation results
**Usage:**
```bash
python3 evaluate_trajectory.py --config reference_trajectory.yaml --output evaluation_results.csv
```
**Arguments:**
- `--config` - Reference trajectory config file (YAML format)
- `--base-dir` - RESULTS directory path (defaults to two levels up)
- `--output` - Output CSV file path
- `--format` - Output format (csv only)
## Configuration
### reference_trajectory.yaml
Defines the reference trajectory (ground truth) for evaluation.
**Key sections:**
- `project_name` - Project identifier
- `extract_types` - Node types to extract (SPAN, Chain, AGENT, LLM, Tool)
- `reference_trajectory` - Expected execution sequence
- `target_tools` - Tools to track for single-tool use metric
- `models` - List of models to evaluate
## Models Evaluated
- GPT-5
- GPT-4o-mini
- DeepSeek-V3-1
- DeepSeek-R1
- Gemini-2.5-flash
- Gemini-2.5-flash-nothinking
- Qwen3-235b
## Requirements
- Python 3.7+
- pandas
- PyYAML
## Notes
- All scripts automatically process test results from the configured base directory
- Results are saved in the same directory as the scripts
- Execution paths are parsed from `execution_path.md` files in test session directories