王子睿
restructure + add files
8c10cf2
|
Raw
History Blame Contribute Delete
1.54 kB

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

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