File size: 2,338 Bytes
8c10cf2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | # MarkdownValidator Analysis Scripts
This directory contains Python scripts for analyzing the performance of various LLM models on the MarkdownValidator task.
## Scripts
### 1. analyze_retry_patterns.py
Analyzes RETRY patterns in execution paths, including:
- Error locations and frequencies
- RETRY counts and rates
- Error types by agent and node type
**Output files:**
- `retry_analysis.json` - Detailed retry statistics
- `retry_summary.csv` - Summary table
- `error_by_agent.csv` - Error breakdown by agent
### 2. evaluate_scores.py
Collects and analyzes score statistics from model executions.
**Output files:**
- `score_analysis.json` - Detailed score data
- `score_summary.csv` - Summary statistics (mean, min, max, perfect rate)
### 3. evaluate_success.py
Calculates success/failure rates for each model.
**Output files:**
- `success-finish_detailed_results.json` - Detailed execution results
- `success-finish_rate.csv` - Success rate summary
### 4. evaluate_trajectory.py
Evaluates execution trajectories against a reference trajectory using multiple metrics:
- Exact match
- In-order match
- Any-order match
- Precision
- Recall
- Single-tool use
- Path diversity (unique_path_ratio)
- Path entropy
**Output files:**
- `evaluation_results.csv` - Trajectory evaluation results
### 5. reference_trajectory.yaml
Configuration file defining the ideal reference trajectory for the MarkdownValidator task.
## Usage
Run each script from the MarkdownValidator directory:
```bash
# Analyze retry patterns
python3 analyze_retry_patterns.py
# Evaluate scores
python3 evaluate_scores.py
# Evaluate success rates
python3 evaluate_success.py
# Evaluate trajectories
python3 evaluate_trajectory.py --config reference_trajectory.yaml
```
## 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
## Data Structure
Scripts expect data in the following structure:
```
/Users/wzr/TOSEM-2025/RESULTS/
├── {Model}/
│ └── MarkdownValidator/
│ └── test_results/
│ ├── session_001/
│ │ ├── execution_path.md
│ │ ├── execution_info.json
│ │ └── summary.json
│ └── ...
```
|