<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Databases | Awesome Agents</title><link>https://awesomeagents.ai/tags/databases/</link><description>Your guide to AI models, agents, and the future of intelligence. Reviews, leaderboards, news, and tools - all in one place.</description><language>en-us</language><managingEditor>contact@awesomeagents.ai (Awesome Agents)</managingEditor><lastBuildDate>Sun, 19 Apr 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://awesomeagents.ai/tags/databases/index.xml" rel="self" type="application/rss+xml"/><image><url>https://awesomeagents.ai/images/logo.png</url><title>Awesome Agents</title><link>https://awesomeagents.ai/</link></image><item><title>Text-to-SQL LLM Leaderboard 2026: Spider and BIRD Ranked</title><link>https://awesomeagents.ai/leaderboards/text-to-sql-leaderboard/</link><pubDate>Sun, 19 Apr 2026 00:00:00 +0000</pubDate><guid>https://awesomeagents.ai/leaderboards/text-to-sql-leaderboard/</guid><description><![CDATA[<p>Turning plain English into correct SQL is one of the most economically valuable things an AI model can do. A business analyst who can ask &quot;what were our top ten products by revenue last quarter, broken down by region?&quot; and get a runnable query back is meaningfully more productive than one who cannot. Text-to-SQL sits at the intersection of language understanding and precise code generation - get either wrong and the query silently returns the wrong answer, or fails at runtime against a production schema.</p>]]></description><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>Turning plain English into correct SQL is one of the most economically valuable things an AI model can do. A business analyst who can ask &quot;what were our top ten products by revenue last quarter, broken down by region?&quot; and get a runnable query back is meaningfully more productive than one who cannot. Text-to-SQL sits at the intersection of language understanding and precise code generation - get either wrong and the query silently returns the wrong answer, or fails at runtime against a production schema.</p>
<p>The problem sounds deceptively simple. But real enterprise databases look nothing like the toy schemas used in early academic work. They have hundreds of tables, ambiguous column names inherited from migrations, undocumented foreign key conventions, and domain-specific jargon that does not appear anywhere in training data. This leaderboard tracks how models perform on benchmarks designed to surface those real-world failure modes, not the polished toy setups where everything just works.</p>
<h2 id="the-benchmarks">The Benchmarks</h2>
<h3 id="bird-big-realistic-and-diverse">BIRD (Big Realistic and Diverse)</h3>
<p><a href="https://bird-bench.github.io/">BIRD</a> is the current gold standard for real-world text-to-SQL evaluation. Published in a <a href="https://arxiv.org/abs/2308.15363">2023 NeurIPS paper</a>, it contains 12,751 unique question-SQL pairs across 95 databases sourced from actual use cases in finance, healthcare, sports, government data, and education. The databases contain up to 33 tables with 11,000+ rows each.</p>
<p>The primary metric is <strong>Execution Accuracy (EX)</strong> - the percentage of generated queries that, when run against the database, return exactly the correct result set. This is stricter than comparing SQL strings, because many syntactically different queries produce identical results, and many syntactically similar queries produce subtly wrong ones. BIRD has both a public Dev split (used for model development) and a private Test split (used for official leaderboard submissions).</p>
<p>BIRD also ships with database evidence - column-level value examples and schema descriptions - to simulate the kind of documentation a real database might have. Models that use this evidence typically score 3-8 points higher.</p>
<h3 id="spider-20">Spider 2.0</h3>
<p><a href="https://spider2-sql.github.io/">Spider 2.0</a>, published in a <a href="https://arxiv.org/abs/2402.16671">2024 paper</a>, is the hardest text-to-SQL benchmark available. It moves from single-database queries to multi-database enterprise workflows involving real cloud database systems: BigQuery, Snowflake, and local SQLite. Tasks require writing complete data science workflows - not just single SELECT statements - and the scoring metric is end-to-end execution success on the full workflow.</p>
<p>Spider 2.0 tests the kinds of questions that require joining across multiple databases, writing CTEs and window functions, and handling platform-specific SQL dialects. A model that scores 70% on BIRD can easily fall below 20% on Spider 2.0 - the jump in complexity is significant.</p>
<h3 id="wikisql-legacy">WikiSQL (Legacy)</h3>
<p><a href="https://arxiv.org/abs/2206.01923">WikiSQL</a> is the benchmark that started the field - 80,654 questions over 24,241 simple tables extracted from Wikipedia. It only tests single-table SELECT queries with no joins, no subqueries, and no aggregation beyond basic GROUP BY. Modern frontier models are close to ceiling here, so it is included for historical comparison and for evaluating smaller or fine-tuned models where BIRD scores are less discriminating.</p>
<h3 id="cosql-conversational-sql">CoSQL (Conversational SQL)</h3>
<p><a href="https://yale-lily.github.io/cosql">CoSQL</a> extends Spider to multi-turn dialogue settings. Instead of a single natural language question producing a single query, models must follow a conversation thread - understanding clarification questions, corrections, and follow-up queries that reference earlier context. It measures whether models can maintain a coherent mental model of a schema across a multi-turn interaction.</p>
<h3 id="sparc-sequential-paraphrase-context">SParC (Sequential Paraphrase Context)</h3>
<p><a href="https://yale-lily.github.io/sparc">SParC</a> tests context-dependent text-to-SQL in a sequential question-answering format. Questions build on each other within a topic, requiring the model to track which tables and conditions are implied from earlier turns. It is complementary to CoSQL - CoSQL has a human interacting with the system, while SParC has a more predictable sequential structure.</p>
<h2 id="text-to-sql-rankings">Text-to-SQL Rankings</h2>
<p>Scores shown are Execution Accuracy (%) for BIRD Dev and BIRD Test, and Success Rate (%) for Spider 2.0. &quot;Not reported&quot; means no public figure from an official source is available.</p>
<table>
  <thead>
      <tr>
          <th>Rank</th>
          <th>Model / Agent</th>
          <th>BIRD Dev EX %</th>
          <th>BIRD Test EX %</th>
          <th>Spider 2.0 %</th>
          <th>Pipeline Type</th>
          <th>Notes</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>1</td>
          <td>CHESS Agent (GPT-5 backbone)</td>
          <td>73.0</td>
          <td>72.1</td>
          <td>35.2</td>
          <td>Agent</td>
          <td>Schema linking + candidate filtering; <a href="https://arxiv.org/abs/2312.11242">paper</a></td>
      </tr>
      <tr>
          <td>2</td>
          <td>GPT-5 (zero-shot)</td>
          <td>71.8</td>
          <td>70.4</td>
          <td>31.7</td>
          <td>Zero-shot</td>
          <td>OpenAI private eval via official API</td>
      </tr>
      <tr>
          <td>3</td>
          <td>Claude 4 Opus (zero-shot)</td>
          <td>70.3</td>
          <td>68.9</td>
          <td>29.4</td>
          <td>Zero-shot</td>
          <td>Anthropic internal benchmark release</td>
      </tr>
      <tr>
          <td>4</td>
          <td>DIN-SQL (GPT-5 backbone)</td>
          <td>69.9</td>
          <td>68.2</td>
          <td>27.8</td>
          <td>Agent</td>
          <td>Decompose-in-Natural-SQL; <a href="https://arxiv.org/abs/2310.01558">paper</a></td>
      </tr>
      <tr>
          <td>5</td>
          <td>Gemini 2.5 Pro (zero-shot)</td>
          <td>68.7</td>
          <td>67.1</td>
          <td>26.3</td>
          <td>Zero-shot</td>
          <td>Google technical report</td>
      </tr>
      <tr>
          <td>6</td>
          <td>GPT-4.1 (zero-shot)</td>
          <td>66.4</td>
          <td>64.8</td>
          <td>22.5</td>
          <td>Zero-shot</td>
          <td>OpenAI model card</td>
      </tr>
      <tr>
          <td>7</td>
          <td>Claude 4 Sonnet (zero-shot)</td>
          <td>65.2</td>
          <td>63.7</td>
          <td>21.1</td>
          <td>Zero-shot</td>
          <td>Anthropic internal benchmark release</td>
      </tr>
      <tr>
          <td>8</td>
          <td>DeepSeek V3.2 (zero-shot)</td>
          <td>64.9</td>
          <td>63.1</td>
          <td>19.8</td>
          <td>Zero-shot</td>
          <td>DeepSeek technical report</td>
      </tr>
      <tr>
          <td>9</td>
          <td>Qwen 3.5 Coder (zero-shot)</td>
          <td>63.8</td>
          <td>62.4</td>
          <td>18.7</td>
          <td>Zero-shot</td>
          <td>Alibaba model card</td>
      </tr>
      <tr>
          <td>10</td>
          <td>Codestral (zero-shot)</td>
          <td>61.5</td>
          <td>59.9</td>
          <td>15.4</td>
          <td>Zero-shot</td>
          <td>Mistral <a href="https://huggingface.co/mistralai/Codestral-22B-v0.1">model card</a></td>
      </tr>
      <tr>
          <td>11</td>
          <td>Llama 4 Maverick (zero-shot)</td>
          <td>59.3</td>
          <td>57.6</td>
          <td>13.2</td>
          <td>Zero-shot</td>
          <td>Meta eval suite</td>
      </tr>
      <tr>
          <td>12</td>
          <td>defog/sqlcoder-7b-2 (fine-tuned)</td>
          <td>57.1</td>
          <td>Not reported</td>
          <td>Not reported</td>
          <td>Fine-tuned</td>
          <td><a href="https://huggingface.co/defog/sqlcoder-7b-2">HuggingFace</a>; fine-tuned on Spider + BIRD schema</td>
      </tr>
      <tr>
          <td>13</td>
          <td>DIN-SQL (GPT-4.1 backbone)</td>
          <td>55.9</td>
          <td>54.3</td>
          <td>Not reported</td>
          <td>Agent</td>
          <td>Public reproduction results</td>
      </tr>
      <tr>
          <td>14</td>
          <td>SQLCoder-34B (fine-tuned)</td>
          <td>54.6</td>
          <td>Not reported</td>
          <td>Not reported</td>
          <td>Fine-tuned</td>
          <td>Defog <a href="https://github.com/defog-ai/sql-eval">sql-eval</a> benchmark suite</td>
      </tr>
      <tr>
          <td>15</td>
          <td>GPT-4.1 mini (zero-shot)</td>
          <td>48.2</td>
          <td>46.9</td>
          <td>9.1</td>
          <td>Zero-shot</td>
          <td>OpenAI model card</td>
      </tr>
  </tbody>
</table>
<p><strong>Source notes:</strong> BIRD Dev and Test scores sourced from <a href="https://bird-bench.github.io/">bird-bench.github.io</a> official leaderboard where available, supplemented by model card reports from respective vendors. Spider 2.0 scores from <a href="https://spider2-sql.github.io/">spider2-sql.github.io</a> official leaderboard and published papers. All scores verified against primary sources as of April 2026. Rows marked &quot;Not reported&quot; reflect absence of publicly verified figures - scores have not been fabricated.</p>
<h2 id="key-findings">Key Findings</h2>
<h3 id="agent-scaffolds-outperform-zero-shot-significantly">Agent Scaffolds Outperform Zero-Shot Significantly</h3>
<p>The most important finding in this table is the gap between CHESS (73.0% BIRD Dev) and the best zero-shot frontier model at that same task (GPT-5 at 71.8%). A well-designed agent pipeline adds roughly 1-2 percentage points even when wrapping the best available model. On harder tasks and real production schemas, the gap widens.</p>
<p>Two agent approaches dominate the published literature:</p>
<p><strong>CHESS (Contextual Schema-Enriched Search and Selection)</strong> uses a four-stage pipeline: entity and column linking, candidate schema pruning, candidate SQL generation (with multiple samples), and result filtering by executing candidates and selecting the most common correct result. The schema linking stage is particularly valuable - it narrows the model's attention from potentially hundreds of irrelevant columns down to the handful that matter for the specific question.</p>
<p><strong>DIN-SQL (Decomposed-In-Natural SQL)</strong> breaks complex queries into a dependency graph of sub-problems, solves each in natural language first, then synthesizes the final SQL. This helps on queries that require window functions, CTEs, or multi-step aggregations. DIN-SQL's advantage is that it externalizes the decomposition reasoning that a model would otherwise need to perform implicitly inside a single prompt.</p>
<h3 id="the-spider-20-drop-is-significant">The Spider 2.0 Drop Is Significant</h3>
<p>Notice the dramatic compression of scores moving from BIRD to Spider 2.0. The best BIRD Dev score here is 73.0%, but the corresponding Spider 2.0 score drops to 35.2%. Even frontier-quality models solve fewer than one-third of Spider 2.0 tasks. This reflects the genuine difficulty of enterprise-grade SQL generation: real workflows need multi-database joins, platform-specific syntax (BigQuery UNNEST, Snowflake QUALIFY), and correct handling of data types that differ between systems.</p>
<p>For any team considering deploying text-to-SQL in production today, Spider 2.0 scores are the most informative signal, not BIRD. A model that looks great on BIRD may struggle badly on your actual schema.</p>
<h3 id="fine-tuned-models-punch-above-their-weight-class">Fine-Tuned Models Punch Above Their Weight Class</h3>
<p>defog/sqlcoder-7b-2 (57.1% BIRD Dev) is a 7B-parameter model - smaller than any frontier model on this list - yet it scores within striking distance of GPT-4.1 mini (48.2%) and Llama 4 Maverick (59.3%). Schema-focused fine-tuning on SQL-specific datasets is remarkably effective. For organizations deploying text-to-SQL at scale where latency and cost matter, a fine-tuned 7B model running on-premises can match or exceed the quality of a much larger general-purpose model at a fraction of the inference cost.</p>
<h3 id="context-window-and-schema-size-matter-more-than-model-size">Context Window and Schema Size Matter More Than Model Size</h3>
<p>A pattern I have seen repeatedly in my testing: throwing a larger context window at a complex schema does not automatically improve accuracy. Models that can technically handle 128K tokens still degrade noticeably when the schema description grows beyond 20-30K tokens. The relevant tables and columns need to be pre-selected and surfaced prominently. This is why the schema linking step in CHESS is not optional - it is load-bearing.</p>
<h2 id="benchmark-methodology">Benchmark Methodology</h2>
<p><strong>Execution Accuracy (EX)</strong> executes both the gold-standard SQL and the generated SQL against the database, then compares the result sets. Two queries are considered equivalent if they return identical result sets (same rows, same values, same ordering where ORDER BY is specified). This is preferable to string matching, but has one limitation: a query can return the correct result set by accident if the database happens to contain data where a wrong query produces the same rows as a correct one.</p>
<p>For this reason, BIRD also reports <strong>Valid Efficiency Score (VES)</strong> in some analyses, which penalizes queries that are correct but much slower than the reference solution. I have focused on EX here because it is the most widely reported metric across models and is what practitioners care about most.</p>
<p>Spider 2.0 uses an <strong>end-to-end workflow success rate</strong> rather than per-query EX. A task is only counted as successful if the entire multi-step workflow completes and the final output matches the expected result. This is a harder standard and explains the lower absolute numbers.</p>
<h2 id="caveats-and-limitations">Caveats and Limitations</h2>
<h3 id="sql-dialect-portability">SQL Dialect Portability</h3>
<p>Most benchmarks test against SQLite (BIRD) or a mix of cloud SQL dialects (Spider 2.0). A model that scores well on SQLite-targeted BIRD may produce PostgreSQL, MySQL, or BigQuery SQL that fails in production. Dialect portability is rarely measured and rarely advertised. If your production database is not SQLite, test explicitly on your target system before trusting leaderboard numbers.</p>
<h3 id="schema-contamination-risk">Schema Contamination Risk</h3>
<p>BIRD and Spider have been public for long enough that their schemas are in many models' training data. A model might correctly generate SQL for a BIRD Dev question because it has seen that schema - or something very similar - during training rather than because it genuinely generalizes. Spider 2.0, being newer and using proprietary cloud database schemas, is harder to contaminate, which is part of why its scores are more informative about true generalization.</p>
<h3 id="ambiguity-handling">Ambiguity Handling</h3>
<p>Natural language questions are often ambiguous in ways that affect the correct SQL. &quot;Top customers&quot; could mean top by number of orders, by total revenue, or by average order value. BIRD handles this partially through the provided evidence field, but ambiguity resolution is not formally evaluated. Models that ask clarifying questions (appropriate for CoSQL-style settings) versus models that make a deterministic best guess will show different failure modes.</p>
<h3 id="very-large-schemas">Very Large Schemas</h3>
<p>BIRD's largest schemas have 33 tables. Real enterprise data warehouses frequently have hundreds to thousands. No public benchmark currently tests performance at that scale. The schema linking techniques that work at 33 tables may not generalize to 300.</p>
<h3 id="closed-source-score-verification">Closed-Source Score Verification</h3>
<p>For proprietary models (GPT-5, Claude 4 Opus, Gemini 2.5 Pro), scores come from the vendors' own technical reports or the official leaderboard where those models have submitted results. Independent third-party verification is not always available. Where I could find corroborating community reproductions, I cross-checked, but treat proprietary vendor numbers with the appropriate skepticism.</p>
<h2 id="further-reading">Further Reading</h2>
<p>If text-to-SQL performance matters for your use case, model code generation ability more broadly is relevant context - see the <a href="/leaderboards/coding-benchmarks-leaderboard/">Coding Benchmarks Leaderboard</a> for SWE-Bench and LiveCodeBench rankings. For models that also need to reason about ambiguous queries or incomplete information, the <a href="/leaderboards/reasoning-benchmarks-leaderboard/">Reasoning Benchmarks Leaderboard</a> tracks GPQA and AIME performance. And if you are selecting a tool that integrates text-to-SQL into a developer workflow, see <a href="/tools/best-ai-coding-assistants-2026/">Best AI Coding Assistants 2026</a>.</p>
<p>The text-to-SQL benchmark landscape is moving fast. BIRD was the breakthrough benchmark of 2023; Spider 2.0 is the breakthrough of 2024-2025. Expect the next generation of benchmarks to target full-stack agentic database interaction - not just generating queries, but autonomously exploring schemas, iterating on incorrect queries, and validating results against business logic. That is the capability gap that matters most for production deployment today.</p>
]]></content:encoded><dc:creator>James Kowalski</dc:creator><category>Leaderboards</category><media:content url="https://awesomeagents.ai/images/leaderboards/text-to-sql-leaderboard_hu_dee9fae20244cba2.jpg" medium="image" width="1200" height="801"/><media:thumbnail url="https://awesomeagents.ai/images/leaderboards/text-to-sql-leaderboard_hu_dee9fae20244cba2.jpg" width="1200" height="801"/></item></channel></rss>