File size: 3,286 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# GameBuilder Evaluation Scripts

This directory contains evaluation scripts for analyzing the GameBuilder project results across different LLM models.

## Scripts

### 1. analyze_retry_patterns.py
Analyzes RETRY patterns in GameBuilder 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 GameBuilder tasks.

**Features:**
- Analyzes validation 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 GameBuilder 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 (GameBuilder)
- `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 (Python Code Validator)
- `models` - List of models to evaluate

## Project Overview

GameBuilder is a code generation project where:
1. **Senior Software Engineer** generates game code
2. **Software Quality Control Engineer** reviews and validates the code
3. **Chief Software Quality Control Engineer** performs final evaluation

The reference trajectory represents the ideal execution path with:
- 5 LLM calls (1 for code generation, 2 for review, 2 for evaluation)
- 2 tool calls (Python Code Validator used by both QA agents)

## 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
- Validation results are read from `validation_result.json` files
- The Python Code Validator tool is the primary tool tracked for this project