Cases & scoring
June 24, 2026 · View on GitHub
What case types test
| Type | What it catches |
|---|---|
happy_path | Agent picks the right tool with correct params |
ambiguous_selection | Two tools could apply — descriptions must be distinct |
missing_parameter | Agent must ask for clarification, not hallucinate |
multi_tool | Chained tool calls in order |
multi_turn | Shallow dialog — clarify first, then call the right tool (2–7 turns) |
Priority modules: base, dba, sec, qlty · Maintained: chat, plot, tmpl
Cases live in cases/<module>.json.
Single-turn format
{
"id": "base_readQuery_happy",
"type": "happy_path",
"description": "What this tests",
"input": "The natural language prompt sent to the agent",
"expected_tools": [
{
"name": "base_readQuery",
"params": { "sql": "SELECT * FROM {EVALS_DATABASE}.evals_employees SAMPLE 10" }
}
]
}
missing_parameter: setexpected_toolsto[]multi_tool: list expected tool calls in order- Param names must match live MCP schemas (e.g.
sqlforbase_readQuery)
Multi-turn format (optional)
Use a turns array instead of top-level input / expected_tools. Scored in one MCP session. 2–7 turns.
{
"id": "base_tablePreview_clarify_then_call",
"type": "missing_parameter",
"description": "Agent asks which table, then previews after user clarifies",
"turns": [
{ "input": "Preview some rows for me", "expect": "clarification" },
{
"input": "Preview rows from {EVALS_DATABASE}.evals_employees",
"expected_tools": [
{
"name": "base_tablePreview",
"params": {
"database_name": "{EVALS_DATABASE}",
"table_name": "evals_employees"
}
}
]
}
]
}
Each turn sets exactly one of "expect": "clarification" or non-empty "expected_tools". IDs should contain clarify_then_call for --type multi_turn filtering.
Scoring
Deterministic checks run first (judge/checks.py), then LLM judge metrics where needed.
Deterministic checks
| Check | Applies to |
|---|---|
| No tool calls | missing_parameter and clarification turns |
| Exact tool name | Primary tool on happy/ambiguous; all tools on multi_tool |
| Exact param values | database_name, table_name, column_name, user_name, role_name |
| Param key presence | sql / query — key required; value judged by LLM |
Structural failures fail immediately without invoking the judge.
LLM judge metrics
| Metric | Applies to |
|---|---|
ToolCorrectnessMetric | Cases with expected_tools |
Clarification Check (GEval) | missing_parameter and clarification turns |
Adding cases for a new tool
- Add a
happy_pathcase (or usebackup/generate_cases.pyto draft from live descriptions). - Add
ambiguous_selection— overlapping tool pair, prompt that could call either,expected_toolsset to the winner. - Add
missing_parameter— vague prompt,expected_tools: []. - Optionally add
multi_turnormulti_toolcases. - Optionally run
backup/audit_cases.pyfor pair coverage.
Use vocabulary different from tool descriptions — evals stress-test routing, not parrot descriptions.