File size: 2,431 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
98
99
100
101
# MarkdownValidator-MCP Evaluation Scripts

This directory contains evaluation scripts for analyzing the MarkdownValidator-MCP project results across different LLM models.

## Scripts

### 1. analyze_retry_patterns.py
Analyzes RETRY patterns in execution paths, including:
- Error locations and frequencies
- RETRY counts and rates
- Error distribution by agent and node type

**Usage:**
```bash
python3 analyze_retry_patterns.py
```

**Outputs:**
- `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 for each model.

**Usage:**
```bash
python3 evaluate_scores.py
```

**Outputs:**
- `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.

**Usage:**
```bash
python3 evaluate_success.py
```

**Outputs:**
- `success-finish_detailed_results.json` - Detailed execution results
- `success-finish_rate.csv` - Success rate summary

### 4. evaluate_trajectory.py
Evaluates trajectory metrics including:
- Exact match
- In-order match
- Any-order match
- Precision and Recall
- Single-tool use
- Path diversity (unique_path_ratio)
- Path entropy

**Usage:**
```bash
python3 evaluate_trajectory.py --config reference_trajectory.yaml
```

**Options:**
- `--config` - Path to reference trajectory YAML file (default: reference_trajectory.yaml)
- `--base-dir` - RESULTS directory path (default: two levels up from script)
- `--output` - Output CSV file path (default: evaluation_results.csv)
- `--format` - Output format: csv or both (default: csv)

**Outputs:**
- `evaluation_results.csv` - Trajectory evaluation results

## Configuration

### reference_trajectory.yaml
Defines the ideal reference trajectory for evaluation, including:
- Project name and extraction types
- Reference trajectory steps
- Target tools for evaluation
- 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 read from `/Users/wzr/TOSEM-2025/RESULTS` by default
- Scripts output CSV and JSON files for further analysis
- Trajectory evaluation supports wildcard matching for flexible comparison