DSABench: Benchmarking Source Discovery, Coordination, and Execution for Multi-Database Agents
Organizations: Institute of Automation, Chinese Academy of Sciences, Beijing, China
Abstract
Most text-to-SQL benchmarks provide the target database. In a large data catalog, however, choosing the sources is part of the problem: an agent must find every database needed for a request, determine how their results fit together, and execute the resulting workflow. We present DSABench to evaluate these capabilities jointly. Its 815 human-reviewed tasks draw on Spider, BIRD, and LiveSQLBench; 618 require several databases to contribute, and 105 allow more than one interpretation of the required sources. Executable contracts define source participation, cross-source dependencies, and source-local execution, while RouteEnv lets agents inspect public catalog evidence without revealing the gold annotations. In our routing-only study across seven model backends, the highest RA-Set score is 60.55%, compared with a highest RA-Graph score of 34.66% when coordination requirements are included. The gap becomes more pronounced when execution is required. Across four backends, median non-privileged Route+Exec-Graph success ranges from 6.69% to 7.98% without clarification and from 11.44% to 13.25% with one clarification; the best observed clarified configuration reaches 16.99%. On ambiguous tasks, clarification improves exact branch-source recovery by 39.8-43.2 percentage points. These findings illustrate why retrieving plausible databases or producing correct local SQL is not enough: an agent must carry the right information through the entire multi-database workflow.
Figures & tables
| Work | Primary routing / evaluation object |
|---|---|
| DBRouting | database answerability / ranking for a single gold database |
| DBCopilot | target-database routing together with relevant-table selection |
| LinkAlign / Bi-SR / MDB-Link | database and schema-item localization for SQL generation |
| DSABench | exact database set, cross-database route structure, and source-local execution |
| Dimension | Category | Tasks / value |
|---|---|---|
| Corpus | Spider / BIRD / LiveSQLBench | 537 / 254 / 24 |
| Behavior | Single / Parallel / Sequential | 92 / 305 / 22 |
| Exploratory / Interactive | 291 / 105 | |
| Multi-source | Jointly required (non-interactive) | 618 / 815 (75.8%) |
| Target lists | More than one entry | 723 / 815 (88.7%) |
| Difficulty | Easy / Medium / Hard | 65 / 516 / 234 |
| Model Backend | LLM Direct | Constrained LLM | ReAct | Hermes | ||||
|---|---|---|---|---|---|---|---|---|
| RA-Set | RA-Graph | RA-Set | RA-Graph | RA-Set | RA-Graph | RA-Set | RA-Graph | |
| Claude Opus 5 | 24.11 | 17.18 | 22.88 | 16.93 | 39.45 | 25.03 | 60.06 | 34.66 |
| GPT-5.6 Sol | 23.74 | 16.32 | 24.17 | 16.93 | 49.82 | 30.67 | 60.55 | 33.01 |
| Kimi K3 | 21.78 | 15.83 | 20.25 | 14.85 | 52.15 | 30.31 | 55.83 | 30.92 |
| DeepSeek-V4-Pro | 18.40 | 12.88 | 19.08 | 13.62 | 42.02 | 26.38 | 50.06 | 27.48 |
| DeepSeek-V4-Flash | 23.25 | 16.44 | 22.58 | 16.32 | 29.75 | 18.65 | 52.33 | 28.83 |
| Backend | Set correct | Graph correct | Route+Exec correct |
|---|---|---|---|
| Kimi K3 | 455 | 253 | 85 |
| GPT-5.6 Sol | 489.5 | 269.5 | 87 |
| Claude Opus 5 | 482.5 | 282 | 94 |
| DeepSeek-V4-Flash | 421.5 | 235 | 87 |
| Backend | Never med. | Never IQR | Ask med. | Ask IQR | Ask max. |
|---|---|---|---|---|---|
| Claude Opus 5 | 7.98 | 6.87–9.20 | 13.25 | 11.40–14.49 | 16.99 |
| GPT-5.6 Sol | 7.79 | 7.24–9.69 | 12.58 | 11.86–14.10 | 15.40 |
| DeepSeek-V4-Flash | 6.69 | 5.61–7.79 | 11.44 | 9.97–13.31 | 16.13 |
| Kimi K3 | 7.85 | 7.15–8.77 | 12.98 | 11.15–14.08 | 16.13 |
| Corpus | Tasks | EA-Micro (%) | Route+Exec-Graph (%) |
|---|---|---|---|
| Spider | 537 | 32.62–37.51 | 9.31–11.73 |
| BIRD | 254 | 22.78–26.07 | 11.81–14.17 |
| LiveSQLBench | 24 | 1.85–5.56 | 0.00–4.17 |
Appendix figures & tables32 assets
Supplementary material from the paper’s appendix.
Appendix
| Item | Frozen value |
|---|---|
| Frozen reviewed records | 815 |
| Main quantitative scope | All 815 frozen tasks |
| Interactive base tasks (two branches) | 105 |
| Joint multi-source tasks | 618 / 815 (75.83%) |
| Source corpora | Spider, BIRD, LiveSQLBench |
| Database registry | 303 names / 304 dataset-scoped instances |
| Source corpus | Final tasks | Observed database instances |
|---|---|---|
| Spider | 537 | 166 |
| BIRD | 254 | 80 |
| LiveSQLBench | 24 | 18 |
| Total | 815 | 264 |
| Dimension | Category | Tasks |
|---|---|---|
| Behavior | Single-target | 92 |
| Parallel | 305 | |
| Sequential | 22 | |
| Exploratory | 291 | |
| Interactive | 105 | |
| Difficulty | Easy | 65 |
| Partition | Representative fields | Purpose |
|---|---|---|
| Public task input | user request, opaque candidate IDs | Model-visible request and candidate allowlist; task IDs remain bookkeeping metadata, not semantic evidence. |
| Frozen contract | source corpus, behavior, difficulty, target/source-unit references | Defines the task family and complete required source set. |
| Structural gold | topology, execution order, dependency edges, output-to-input bindings, clarification branches | Supports graph-, sequential-, and interaction-specific scoring. |
| Executable gold | source questions, read-only SQL, expected execution evidence, aggregation contract | Verifies each local contribution and complete task execution. |
| Review metadata | validation, review, adjudication, and repair decisions | Makes finalization decisions traceable without changing executable semantics. |
| Private identity | dataset-scoped physical map and evaluator-only annotations | Resolves public opaque IDs; never enters a router prompt. |
| Stage | Required judgments | Evidence boundary |
|---|---|---|
| Pass 1 | naturalness/completeness; minimum sufficient source set; apparent uniqueness and behavior; confidence; notes | User request and router-visible catalog evidence; gold source set, SQL, behavior, and contract hidden. |
| Pass 2 | gold-set validity/uniqueness; behavior and multi-source logic; per-source question preservation; SQL/DB mapping; overall validity and severity | Frozen target set, source questions, SQL, dependencies/order, and behavior-specific contract revealed after Pass 1 lock. |
| Adjudication | Keep , Repair , Delete , or expert escalation; severity and rationale | Full audit trail; Repair is restricted to surface wording while every executable field remains frozen. |
| Decision | Tasks |
|---|---|
| KEEP | 106 |
| REPAIR | 53 |
| DELETE | 176 |
| Total adjudicated | 335 |
| Final benchmark after finalization | 815 |
| Stage | TargetRecall@K | AllTargetCoverage@K | |
|---|---|---|---|
| Candidate | 10 | 75.04% | 51.53% |
| Candidate | 20 | 85.09% | 66.99% |
| Candidate | 50 | 93.83% | 86.50% |
| Reranked | 3 | 55.66% | 30.43% |
| Reranked | 5 | 66.76% | 41.84% |
| Reranked | 10 | 78.63% | 57.18% |
| Candidate Top-50 | Reranked Top-10 | |||
|---|---|---|---|---|
| Dataset | TargetRecall | AllCoverage | TargetRecall | AllCoverage |
| BIRD | 100.00% | 100.00% | 91.21% | 81.89% |
| LiveSQLBench | 100.00% | 100.00% | 91.32% | 79.17% |
| Spider | 90.64% | 79.52% | 72.11% | 44.51% |
| Candidate Top-50 | Reranked Top-10 | |||
|---|---|---|---|---|
| Behavior | TargetRecall | AllCoverage | TargetRecall | AllCoverage |
| Single-target | 98.91% | 98.91% | 98.91% | 98.91% |
| Parallel | 97.14% | 90.82% | 83.77% | 60.98% |
| Sequential | 100.00% | 100.00% | 95.45% | 90.91% |
| Exploratory | 96.37% | 84.19% | 76.58% | 44.67% |
| Interactive | 71.43% | 66.67% | 48.10% | 37.14% |
| Candidate Top-50 | Reranked Top-10 | |||
|---|---|---|---|---|
| TargetRecall | AllCoverage | TargetRecall | AllCoverage | |
| 1 | 98.91% | 98.91% | 98.91% | 98.91% |
| 2–3 | 92.09% | 88.75% | 77.13% | 62.99% |
| 4–5 | 96.75% | 86.62% | 79.84% | 40.76% |
| 6–10 | 92.84% | 57.14% | 61.45% | 3.90% |
| Corpus | Tasks | EA-Micro | TEA | Route+Exec-Graph |
|---|---|---|---|---|
| Spider | 537 | 32.62–37.51% | 14.71–18.81% | 9.31–11.73% |
| BIRD | 254 | 22.78–26.07% | 12.80–15.35% | 11.81–14.17% |
| LiveSQLBench | 24 | 1.85–5.56% | 0.00–4.17% | 0.00–4.17% |
| Backend | Configured context | Sampling temperature |
|---|---|---|
| Kimi K3 | 1,048,576 | 1.0 (provider override) |
| DeepSeek-V4-Pro | 1,048,576 | 0.0 |
| GPT-5.6 Sol | 262,144 | 0.0 |
| Claude Opus 5 | 262,144 | 0.0 |
| Qwen3.5-397B-A17B | 262,144 | 0.0 |
| DeepSeek-V4-Flash | 262,144 | 0.0 |
| Factor | Values | Interpretation |
|---|---|---|
| Router | LLM Direct / ReAct / Hermes | source discovery and route induction |
| Data Agent | Text-to-SQL / corpus-specific adapter | downstream source-level SQL |
| Planner | Oracle / LLM | sequential source ordering |
| Interaction | Never Ask / Ask Once | interactive clarification policy |
| Query mode | Privileged / Fused / Router | database-local request representation |
| Action | Function |
|---|---|
| search_catalog(query[, dataset, top_k]) | Retrieve database candidates from the public catalog. |
| inspect_database(database_id[, table_limit]) | Read a database summary, capabilities, and table overview. |
| inspect_table(table_id[, column_limit]) | Inspect a public table card and columns. |
| inspect_column(column_id) | Inspect one public column card. |
| search_capability(query[, dataset, top_k]) | Search normalized capabilities. |
| search_entity(query[, dataset, top_k]) | Search catalog entities. |
| Tool | Role |
|---|---|
| route_search | Search database, table, column, capability, and entity evidence. |
| load_database_skill | Load the public routing card for one opaque candidate. |
| inspect_database | Inspect grounded schema/capability details. |
| inspect_relationships | Inspect cross-source relations without treating compatibility as dependency. |
| submit_route | Submit selected databases, one or more evidence items per database, grounded tables/columns/capabilities, database-local requests, and topology. |
| Corpus/agent | Prompt content | Output and stopping rule |
|---|---|---|
| Spider Text-to-SQL | SQLite DDL and comments followed by the database-local request and “Generate the SQL after thinking step by step:” | Read-only SQL parsed after a seeded SELECT ; fail closed on invalid output. |
| BIRD Text-to-SQL | SQLite schema, external-knowledge block when available, database-local request, and the same generation suffix | Temperature 0; read-only SQL; execution/equivalence scorer. |
| LiveSQLBench Text-to-SQL | PostgreSQL schema, column meanings, external knowledge, and task | Exactly one read-only query in a postgresql code block. |
| Dataset-specific adapter | Frozen DAIL-SQL/ScaleSQL-style prompt and stage configuration appropriate to the upstream corpus | Same source-unit execution boundary and denominator as generic Text-to-SQL. |
| LiveSQLBench agent | PostgreSQL expert instruction with schema/search/query/test/submit tools | At most 30 steps, test before one final submission, and no write operation. |
| Backend | Set Never | Set Ask | Set [CI] | R+E Ask | R+E CI |
|---|---|---|---|---|---|
| Claude Opus 5 | 18.25 | 61.43 | 43.17 [36.51, 49.52] | 38.02 | [31.94, 44.05] |
| GPT-5.6 Sol | 19.84 | 60.32 | 40.48 [34.92, 46.19] | 35.91 | [30.48, 41.35] |
| DeepSeek-V4-Flash | 17.78 | 58.25 | 40.48 [35.08, 45.71] | 36.79 | [30.95, 42.54] |
| Kimi K3 | 18.41 | 58.25 | 39.84 [34.13, 45.40] | 36.23 | [30.79, 41.91] |
| Quantity | Main all-815 | Sensitivity 710 |
|---|---|---|
| Highest routing RA-Set | 60.55% | 66.20% |
| Highest routing RA-Graph | 34.66% | 39.72% |
| Highest Never Ask non-privileged Route+Exec | 11.53% | 13.24% |
| Backend | RA-Set | ||
|---|---|---|---|
| Claude Opus 5 | 66.34% | 59.87% | 33.33% |
| GPT-5.6 Sol | 65.92% | 57.48% | 32.34% |
| DeepSeek-V4-Flash | 56.62% | 58.46% | 37.02% |
| Kimi K3 | 61.13% | 58.29% | 33.60% |
| Policy | RA-Set | RA-Graph | F1 | OR | UR | Valid |
|---|---|---|---|---|---|---|
| Random | 1.47 | 0.86 | 3.88 | 93.99 | 96.85 | 100.00 |
| Rerank | 24.36 | 17.55 | 51.14 | 18.43 | 53.91 | 81.10 |
| Direct | 24.11 | 17.18 | 53.84 | 19.66 | 51.89 | 87.36 |
| Constrained | 22.88 | 16.93 | 49.75 | 19.48 | 55.60 | 81.35 |
| ReAct | 39.45 | 25.03 | 51.19 | 12.00 | 50.81 | 67.48 |
| Hermes | 60.06 | 34.66 | 81.29 | 14.04 | 19.97 | 99.39 |
| Policy | RA-Set | RA-Graph | F1 | OR | UR | Valid |
|---|---|---|---|---|---|---|
| Random | 1.47 | 0.86 | 3.88 | 93.99 | 96.85 | 100.00 |
| Rerank | 23.56 | 16.56 | 50.82 | 19.62 | 55.27 | 84.66 |
| Direct | 23.74 | 16.32 | 53.61 | 19.44 | 53.21 | 88.83 |
| Constrained | 24.17 | 16.93 | 52.63 | 18.53 | 53.74 | 85.89 |
| ReAct | 49.82 | 30.67 | 74.09 | 16.07 | 29.30 | 96.32 |
| Hermes | 60.55 | 33.01 | 81.50 | 14.36 | 20.64 | 100.00 |
| Policy | RA-Set | RA-Graph | F1 | OR | UR | Valid |
|---|---|---|---|---|---|---|
| Random | 1.47 | 0.86 | 3.88 | 93.99 | 96.85 | 100.00 |
| Rerank | 21.23 | 15.34 | 35.65 | 11.51 | 67.31 | 53.87 |
| Direct | 21.78 | 15.83 | 46.74 | 17.47 | 58.40 | 76.32 |
| Constrained | 20.25 | 14.85 | 38.28 | 12.84 | 65.30 | 59.39 |
| ReAct | 52.15 | 30.31 | 70.32 | 14.64 | 32.05 | 89.45 |
| Hermes | 55.83 | 30.92 | 79.03 | 15.35 | 22.94 | 99.26 |
| Policy | RA-Set | RA-Graph | F1 | OR | UR | Valid |
|---|---|---|---|---|---|---|
| Random | 1.47 | 0.86 | 3.88 | 93.99 | 96.85 | 100.00 |
| Rerank | 18.96 | 13.25 | 34.84 | 11.34 | 68.71 | 54.48 |
| Direct | 18.40 | 12.88 | 33.32 | 11.85 | 69.93 | 52.76 |
| Constrained | 19.08 | 13.62 | 35.52 | 11.23 | 68.10 | 54.97 |
| ReAct | 42.02 | 26.38 | 61.29 | 15.11 | 42.07 | 83.07 |
| Hermes | 50.06 | 27.48 | 76.96 | 15.71 | 26.39 | 99.88 |
| Policy | RA-Set | RA-Graph | F1 | OR | UR | Valid |
|---|---|---|---|---|---|---|
| Random | 1.47 | 0.86 | 3.88 | 93.99 | 96.85 | 100.00 |
| Rerank | 22.52 | 16.20 | 51.11 | 16.86 | 55.14 | 82.45 |
| Direct | 23.25 | 16.44 | 51.26 | 16.50 | 55.02 | 82.45 |
| Constrained | 22.58 | 16.32 | 51.50 | 15.95 | 55.10 | 83.07 |
| ReAct | 29.75 | 18.65 | 45.96 | 12.31 | 57.64 | 66.50 |
| Hermes | 52.33 | 28.83 | 77.46 | 15.20 | 26.13 | 99.88 |
| Policy | RA-Set | RA-Graph | F1 | OR | UR | Valid |
|---|---|---|---|---|---|---|
| Random | 1.47 | 0.86 | 3.88 | 93.99 | 96.85 | 100.00 |
| Rerank | 23.80 | 16.93 | 52.24 | 21.37 | 53.35 | 86.26 |
| Direct | 23.80 | 16.81 | 52.89 | 21.95 | 52.76 | 87.98 |
| Constrained | 24.23 | 16.93 | 52.70 | 20.43 | 52.88 | 86.13 |
| ReAct | 36.87 | 23.19 | 56.08 | 13.56 | 47.62 | 77.42 |
| Hermes | 48.34 | 27.12 | 72.70 | 15.03 | 30.56 | 94.11 |
| Policy | RA-Set | RA-Graph | F1 | OR | UR | Valid |
|---|---|---|---|---|---|---|
| Random | 1.47 | 0.86 | 3.88 | 93.99 | 96.85 | 100.00 |
| Rerank | 17.55 | 12.76 | 33.76 | 11.03 | 69.53 | 52.64 |
| Direct | 18.04 | 13.25 | 33.63 | 11.95 | 69.57 | 53.25 |
| Constrained | 15.83 | 12.02 | 31.72 | 10.81 | 71.57 | 50.06 |
| ReAct | 37.18 | 23.44 | 62.80 | 16.67 | 41.76 | 89.20 |
| Hermes | 47.48 | 26.87 | 69.60 | 13.26 | 33.41 | 89.20 |
| Router | Executor | Planner | Policy | Input | EA | R+E |
|---|---|---|---|---|---|---|
| Hermes | Adapter | Direct | Ask | Privileged | 63.69 | 24.79 |
| Hermes | Adapter | Oracle | Ask | Privileged | 63.78 | 24.79 |
| ReAct | Adapter | Direct | Ask | Privileged | 28.98 | 20.25 |
| ReAct | Adapter | Oracle | Ask | Privileged | 29.07 | 20.25 |
| Router | Executor | Planner | Policy | Input | EA | R+E |
|---|---|---|---|---|---|---|
| Hermes | Adapter | Direct | Ask | Privileged | 61.25 | 22.64 |
| Hermes | Adapter | Oracle | Ask | Privileged | 61.25 | 22.64 |
| ReAct | Adapter | Direct | Ask | Privileged | 50.48 | 22.58 |
| ReAct | Adapter | Oracle | Ask | Privileged | 50.48 | 22.58 |
| Router | Executor | Planner | Policy | Input | EA | R+E |
|---|---|---|---|---|---|---|
| Hermes | Adapter | Direct | Ask | Privileged | 58.68 | 22.64 |
| Hermes | Adapter | Oracle | Ask | Privileged | 58.59 | 22.64 |
| ReAct | Adapter | Direct | Ask | Privileged | 26.60 | 19.26 |
| ReAct | Adapter | Oracle | Ask | Privileged | 26.56 | 19.26 |
| Router | Executor | Planner | Policy | Input | EA | R+E |
|---|---|---|---|---|---|---|
| ReAct | Adapter | Direct | Ask | Privileged | 47.17 | 23.37 |
| ReAct | Adapter | Oracle | Ask | Privileged | 47.21 | 23.37 |
| Hermes | Adapter | Direct | Ask | Privileged | 59.09 | 22.64 |
| Hermes | Adapter | Oracle | Ask | Privileged | 59.18 | 22.64 |
| Backend | Ask rate | Change/Ask | Repair/Ask | Harm/Ask |
|---|---|---|---|---|
| Claude Opus 5 | 100.00 | 58.57 | 45.71 | 2.54 |
| GPT-5.6 Sol | 99.37 | 57.03 | 43.13 | 2.40 |
| DeepSeek-V4-Flash | 97.14 | 54.41 | 43.30 | 1.63 |
| Kimi K3 | 94.60 | 56.54 | 44.63 | 2.52 |
Agent Benchmarks
Agent benchmarks measure how well AI systems plan, use tools and memory, and complete tasks in interactive environments.
See all 116 papers