| # 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 |
| │ └── ... |
| ``` |
| |