File size: 6,752 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 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | # Full reference trajectory configuration - SQLAssistant-A2A project
#
# This configuration is ported from the SQLAssistant-MCP version with the core kept consistent:
# - It evaluates the same Agent / LLM / Tool structure
# - It uses the same 6 trajectory metrics + path diversity metrics
# Only the trajectory hierarchy is adapted to the actual A2A execution path:
# - Top-level SPAN: sql_assistant_workflow_a2a
# - Second-level SPAN: a2a_execution
# - Then three stage SPANs: generate_sql → check_compliance → interpret_results
# - Intermediate framework SPANs such as a2a_call_xxx / xxx_server_execution are also required steps in the reference trajectory
# Project name (determines where to collect traces from RESULTS/<model>/<project_name>/test_results)
project_name: "SQLAssistant-A2A"
# Trajectory extraction types: same as the MCP version; extracts a multi-layer structure
extract_types:
- "SPAN" # Multi-level SPAN structure (including *_a2a, a2a_execution, generate_sql, etc.)
- "Chain" # Kickoff chain for each Crew
- "Agent" # Agent for each Crew
- "LLM" # LLM calls
- "Tool" # Tool calls
# The A2A version also has no chapter-style repeatable patterns
repeatable_patterns: []
# ==========================================================================
# Reference trajectory (Ground Truth) - A2A architecture, based on code design + trace examples
# ==========================================================================
#
# Ideal execution path hierarchy (no retries, no errors):
#
# [SPAN] sql_assistant_workflow_a2a
# └─ [SPAN] a2a_execution
# ├─ [SPAN] generate_sql
# │ └─ [SPAN] a2a_call_sql_generation
# │ └─ [SPAN] sql_generation_server_execution
# │ └─ [Chain] Crew***.kickoff
# │ ├─ [AGENT] Expert SQL Query Generator
# │ │ ├─ [LLM] *
# │ │ ├─ [Tool] get_database_schema
# │ │ └─ [LLM] *
# │ └─ [AGENT] Senior SQL Code Reviewer
# │ ├─ [LLM] *
# │ ├─ [Tool] validate_sql_syntax
# │ ├─ [LLM] *
# │ ├─ [Tool] get_database_schema
# │ └─ [LLM] *
# ├─ [SPAN] check_compliance
# │ └─ [SPAN] a2a_call_compliance_checker
# │ └─ [SPAN] compliance_checker_server_execution
# │ └─ [Chain] Crew***.kickoff
# │ └─ [AGENT] Data Security and Compliance Auditor
# │ ├─ [LLM] *
# │ ├─ [Tool] get_database_schema
# │ └─ [LLM] *
# └─ [SPAN] interpret_results
# └─ [SPAN] a2a_call_result_interpreter
# └─ [SPAN] result_interpreter_server_execution
# └─ [Chain] Crew***.kickoff
# └─ [AGENT] Business Intelligence Analyst
# ├─ [LLM] *
# ├─ [Tool] run_sql_query
# └─ [LLM] *
#
# Notes:
# - In real A2A traces, framework-level SPANs such as [SPAN] a2a_call_sql_generation and
# [SPAN] sql_generation_server_execution are inserted between stages;
# these intermediate SPANs are now required matching steps.
# - Business retries (business_retry N) and orchestrator-level retries (retry N) are not written into the reference trajectory;
# during evaluation, extra steps and retries are allowed by the in_order / any_order metrics.
reference_trajectory:
# ===== Top-level SPAN (A2A top-level workflow) =====
- "SPAN: sql_assistant_workflow_a2a"
# ===== Second-level SPAN (A2A execution wrapper) =====
- "SPAN: a2a_execution"
# ===== Stage 1: Generate SQL (SQLGenerationCrew) =====
- "SPAN: generate_sql"
- "SPAN: a2a_call_sql_generation"
- "SPAN: sql_generation_server_execution"
- "Chain: Crew***.kickoff"
# Agent 1: SQL Generator (uses key schema exploration tools)
- "Agent: Expert SQL Query Generator"
- "LLM: *" # Decide overall generation strategy
- "Tool: get_database_schema" # Read full schema
- "LLM: *" # Generate candidate SQL based on schema
# Other exploration tools (list_tables / get_table_sample / get_column_stats) are considered optional
# Agent 2: SQL Reviewer (syntax and structure checks)
- "Agent: Senior SQL Code Reviewer"
- "LLM: *" # Read and understand the generated SQL
- "Tool: validate_sql_syntax" # Required: syntax validation
- "LLM: *" # Analyze syntax validation results
- "Tool: get_database_schema" # Required: verify tables/columns exist based on schema
- "LLM: *" # Revise SQL based on schema checks
# ===== Stage 2: Check Compliance (ComplianceCheckerCrew) =====
- "SPAN: check_compliance"
- "SPAN: a2a_call_compliance_checker"
- "SPAN: compliance_checker_server_execution"
- "Chain: Crew***.kickoff"
- "Agent: Data Security and Compliance Auditor"
- "LLM: *" # Initial read of SQL and identify potential risks
- "Tool: get_database_schema" # Required: assess sensitivity with schema context
- "LLM: *" # Provide PASS/FAIL decision
# ===== Stage 3: Interpret Results (ResultInterpreterCrew) =====
# Note: only entered when compliance passes
- "SPAN: interpret_results"
- "SPAN: a2a_call_result_interpreter"
- "SPAN: result_interpreter_server_execution"
- "Chain: Crew***.kickoff"
- "Agent: Business Intelligence Analyst"
- "LLM: *" # Understand the business question and SQL
- "Tool: run_sql_query" # Required: execute SQL to get real data
- "LLM: *" # Produce business interpretation based on results (count_rows is an optional stats tool)
# Target tool list (used by the single_tool_use metric)
# Consistent with the MCP version; covers all core tools (including some optional tools)
target_tools:
# SQL Generation stage - Generator
- "Tool: get_database_schema"
- "Tool: get_table_sample"
- "Tool: get_column_stats"
- "Tool: list_tables"
# SQL Generation stage - Reviewer
- "Tool: validate_sql_syntax"
- "Tool: check_table_exists"
# Compliance stage (shares get_database_schema / check_table_exists; do not duplicate)
# Result Interpretation stage
- "Tool: run_sql_query"
- "Tool: count_rows"
# Models to evaluate (same as the MCP version; only the path changes to SQLAssistant-A2A)
models:
- "GPT-5"
- "GPT-4o-mini"
- "DeepSeek-V3-1"
- "DeepSeek-R1"
- "Gemini-2.5-flash"
- "Gemini-2.5-flash-nothinking"
- "Qwen3-235b"
# Usage (brief):
# - Run from: RQ-Failure_Breakdown/SQLAssistant-A2A
# python3 evaluate_trajectory-Filter_Tools.py --config reference_trajectory.yaml
# - evaluate_trajectory-Filter_Tools.py will automatically read execution_path.md from
# RESULTS/<model>/SQLAssistant-A2A/test_results based on project_name.
|