InterCode-SQL
Agents interactively query and refine SQL statements against live MySQL databases with execution feedback across 1,034 Spider tasks.
Interactive SQL coding environment from the NeurIPS 2023 InterCode benchmark suite alongside InterCode-Bash and InterCode-CTF. Scored by execution success rate.
- Made by
- Princeton University
- Released
- June 2023
- Kind
- Data science and SQL
- Level
- University
- Scored
- Checked automatically
- Answers
- Agent task
- Tasks
- All public
- Measures
- Capability
- Language
- English
- Interaction
- Agentic
- Environment
- Code sandbox
- Items from
- Another benchmark
- Refresh
- One fixed set
- Run by
- Anyone
- In views
- Agents
- Strongest model tested
- GPT-4 Jun 2023 #193 on the capability index
- Last model added
- August 2023
- Updated automatically
- Yes, daily
- Scores refreshed
- December 4th, 2026
In the authors’ words
Humans write code in a fundamentally interactive manner and rely on constant execution feedback to correct errors, resolve ambiguities, and decompose tasks. While LLMs have recently exhibited promising coding capabilities, current coding benchmarks mostly consider a static instruction-to-code sequence transduction process, which has the potential for error propagation and a disconnect between the generated code and its final execution environment. To address this gap, we introduce InterCode, a lightweight, flexible, and easy-to-use framework of interactive coding as a standard reinforcement learning (RL) environment, with code as actions and execution feedback as observations. Our framework is language and platform agnostic, uses self-contained Docker environments to provide safe and reproducible execution, and is compatible out-of-the-box with traditional seq2seq coding methods, while enabling the development of new methods for interactive code generation. We use InterCode to create three interactive code environments with Bash, SQL, and Python as action spaces, leveraging data from the static NL2Bash, Spider, and MBPP datasets. We demonstrate InterCode's viability as a testbed by evaluating multiple state-of-the-art LLMs configured with different prompting strategies such as ReAct and Plan & Solve. Our results showcase the benefits of interactive code generation and demonstrate that InterCode can serve as a challenging benchmark for advancing code understanding and generation capabilities. InterCode is designed to be easily extensible and can even be used to create new tasks such as Capture the Flag, a popular coding puzzle that is inherently multi-step and involves multiple programming languages. Project site with code and data: https://intercode-benchmark.github.io
GPT-4 leads with 84.4% among models released by August 2023 GPT-4 leads with 84.4% among models released by August 2023
Best score per entry from the benchmark's own leaderboard, read on December 4th, 2026. Execution success rate (%) across 1,034 interactive Spider SQL tasks. Where a model ran with several settings or harnesses, we keep its best. Every run is in the next chart. Names in gray aren't in our model list: fine-tunes, agent systems, products and older models. They don't count toward leaders. This view shows only models we track, each at its best.
The newest model with a score here came out in August 2023, and nobody has tested a newer one. Among the 20 highest-ranked models on the capability index, these have no score yet:
- Claude Fable 5.2
-
Gemini 4 Neon
- GPT-6.2 Astra
-
Gemini 4 Carbon
- and 16 more
- 1 GPT-4 Jun 2023, Interactive multi-turn 84.4%
- 2 Lemur-70B-Chat Interactive multi-turn 73.4%
- 3 GPT-3.5 Turbo Jun 2023, Interactive multi-turn 72.8%
- 4
Llama 2-70B Interactive multi-turn 67.9%
- 5
Code Llama 34B Instruct Interactive multi-turn 67.8%
- 6
text-bison@001 Interactive multi-turn 12.9%
- 7 chat-bison-001 Interactive multi-turn 9.90%
- 8 StarChat-16B Interactive multi-turn 9.70%
- 9 Vicuna-13B Interactive multi-turn 6.30%
Source: Official InterCode-SQL leaderboard
Source: Official InterCode-SQL leaderboard
| # | Entry | Score | Setting | Released | Run on | Source |
|---|---|---|---|---|---|---|
| 1 | GPT-4 Jun 2023 | 84.4% | Interactive multi-turn | Jun 2023 | Jun 2023 | Official leaderboard |
| 2 | Lemur-70B-Chat | 73.4% | Interactive multi-turn | Oct 2023 | Official leaderboard | |
| 3 | GPT-3.5 Turbo Jun 2023 | 72.8% | Interactive multi-turn | Jun 2023 | Jun 2023 | Official leaderboard |
| 4 | | 67.9% | Interactive multi-turn | Jul 2023 | Oct 2023 | Official leaderboard |
| 5 | | 67.8% | Interactive multi-turn | Aug 2023 | Oct 2023 | Official leaderboard |
| 6 | | 12.9% | Interactive multi-turn | May 2023 | Jun 2023 | Official leaderboard |
| 7 | chat-bison-001 | 9.90% | Interactive multi-turn | Jun 2023 | Official leaderboard | |
| 8 | StarChat-16B | 9.70% | Interactive multi-turn | Jun 2023 | Official leaderboard | |
| 9 | Vicuna-13B | 6.30% | Interactive multi-turn | Jun 2023 | Official leaderboard |
| # | Model | Score | Setting | Released | Run on | Source |
|---|---|---|---|---|---|---|
| 1 | GPT-4 Jun 2023 | 84.4% | Interactive multi-turn | Jun 2023 | Jun 2023 | Official leaderboard |
| 2 | GPT-3.5 Turbo Jun 2023 | 72.8% | Interactive multi-turn | Jun 2023 | Jun 2023 | Official leaderboard |
| 3 | | 67.9% | Interactive multi-turn | Jul 2023 | Oct 2023 | Official leaderboard |
| 4 | | 67.8% | Interactive multi-turn | Aug 2023 | Oct 2023 | Official leaderboard |
| 5 | | 12.9% | Interactive multi-turn | May 2023 | Jun 2023 | Official leaderboard |
Scores at each effort level
Models the leaderboard ran at two or more effort levels. We don’t have enough cost data here to say what the extra effort costs.
Source: Official InterCode-SQL leaderboard
| Model | Effort | Harness | Score | Cost per task | Output tokens |
|---|---|---|---|---|---|
| GPT-4 Jun 2023 | Interactive multi-turn | 84.4% | |||
| GPT-3.5 Turbo Jun 2023 | Interactive multi-turn | 72.8% | |||
| Interactive multi-turn | 67.9% | ||||
| Interactive multi-turn | 67.8% | ||||
| Interactive multi-turn | 12.9% | ||||
| Single-turn (no feedback) | 11.5% | ||||
| GPT-3.5 Turbo Jun 2023 | Single-turn (no feedback) | 10.5% | |||
| GPT-4 Jun 2023 | Single-turn (no feedback) | 9.10% |
Scores at each effort level
Models the leaderboard ran at two or more effort levels. We don’t have enough cost data here to say what the extra effort costs.
Source: Official InterCode-SQL leaderboard
| Model | Effort | Harness | Score | Cost per task | Output tokens |
|---|---|---|---|---|---|
| GPT-4 Jun 2023 | Interactive multi-turn | 84.4% | |||
| GPT-3.5 Turbo Jun 2023 | Interactive multi-turn | 72.8% | |||
| Interactive multi-turn | 67.9% | ||||
| Interactive multi-turn | 67.8% | ||||
| Interactive multi-turn | 12.9% | ||||
| Single-turn (no feedback) | 11.5% | ||||
| GPT-3.5 Turbo Jun 2023 | Single-turn (no feedback) | 10.5% | |||
| GPT-4 Jun 2023 | Single-turn (no feedback) | 9.10% |
2 models have held number one on the official leaderboard since its release in June 2023
Lab claims count from the day the card came out, independent runs from the model’s release.
Source: Official InterCode-SQL leaderboard
Scores over time
All the scores we have, one dot each, so a model tested at several settings appears more than once.
Source: Official InterCode-SQL leaderboard
No lab model card reports it yet
We read the headline results of 665 launch posts from 86 labs, and none of them list this benchmark.
More in Coding
- SWE-bench Verified In use 500 human-validated GitHub issues from 12 Python repos. Agent writes a patch that must pass hidden tests. Claude Opus 4.7 83.5%
- HumanEval In use 164 hand-written Python function problems. Generated code is scored pass@1 against unit tests.
Solar Pro 2 98.8%
- LiveCodeBench v6 In use Competitive programming problems collected after model cutoffs from LeetCode, AtCoder, Codeforces. Scored pass@1 on hidden tests.
DeepSeek-V4-Pro 93.5%
- SWE-bench Multilingual In use 300 GitHub-issue tasks across nine programming languages in SWE-bench format. Patch graded by repository tests. Claude Fable 5.2 96.6%
- DeepSWE In use 113 original long-horizon engineering tasks across 91 repos and five languages, written from scratch. Hand-written verifiers accept alternative solutions. GPT-6 Astra 74.1%
- MBPP In use Models write short Python functions from a one-line task description. A solution counts as correct if it passes the task's three assert tests. Sarvam 30B 92.7%
Data audit
9 of 10 checks pass, 1 warning. Look first at the Newest score check. The newest came 3 years ago, in August 2023, for Code Llama 34B Instruct. Every benchmark
Catalog record 2 pass
- Pass Task access All tasks are public.
- Pass Confidence Checked against a primary source.
Scores 1 warning 3 pass 1 note
- Pass Independent runs Scores from the official leaderboard (9 entries).
- Pass Models scored 5 models we track, plus 4 other entries on its leaderboard.
- Warning Newest score The newest came 3 years ago, in August 2023, for Code Llama 34B Instruct.
- Note Frontier models None of the top 10 has a score. The strongest tested is GPT-4 (#193).
- Pass Headroom The best is 84.4%, under 85%, so it still separates models.
Leaderboard import 3 pass
- Pass Importer We read the board on intercode-benchmark.github.io: 8 rows for models we track and 4 other entries at the last read.
- Pass Last read December 4th, 2026.
- Pass Read worked The last read worked.
Consistency 1 pass 2 notes
- Note Lab claims No model has both a lab number and an independent run.
- Pass Known issues No published audit found problems.
- Note Epoch AI review Epoch AI hasn’t reviewed it.