File size: 1,544 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
# SQLAssistant-MCP Evaluation Scripts

Evaluation tools for analyzing SQLAssistant-MCP multi-agent system execution results across different LLM models.

## Scripts

### analyze_retry_patterns.py
Analyzes RETRY patterns in execution traces, including:
- Orchestrator-level retries (exception handling)
- Business logic retries (compliance check failures)

**Output:** `retry_summary.csv`, `retry_analysis.json`, `error_by_agent.csv`, `business_retry_chapters.csv`

### evaluate_scores.py
Collects score statistics from `execution_log.json` files.

**Output:** `score_summary.csv`, `score_analysis.json`

### evaluate_success.py
Measures success rate based on whether `get_database_schema` tool was called (indicates proper database exploration vs hallucination).

**Output:** `success_rate.csv`, `success_detailed_results.json`

### evaluate_trajectory-Filter_Tools.py
Evaluates trajectory metrics against reference trajectory:
- Exact match
- In-order match
- Any-order match
- Precision / Recall
- Single-tool use
- Path diversity metrics

**Output:** `evaluation_results.csv`, `any_order_match_failures.csv`

## Configuration

`reference_trajectory.yaml` defines:
- Reference trajectory (ground truth)
- Target tools for evaluation
- Models to evaluate
- Extraction types (SPAN, Chain, Agent, LLM, Tool)

## Usage

```bash
python analyze_retry_patterns.py
python evaluate_scores.py
python evaluate_success.py
python evaluate_trajectory-Filter_Tools.py --config reference_trajectory.yaml
```

## Requirements

- Python 3.8+
- pandas
- pyyaml