Oracle introduced PLSQLBench on December 1, 2026. It is a dataset and benchmark, built together with the AI company Turing, that measures whether language models can write, change and fix Oracle PL/SQL programs that actually run. A research paper describing it was accepted at the EMNLP 2026 Industry Track.
The benchmark matters because a huge amount of business logic lives in PL/SQL, yet no dedicated test existed for it. Popular coding benchmarks focus on Python, Java and C++, and text-to-SQL benchmarks only cover single queries. The first results show that today's best models still fail most multi-step PL/SQL sessions.
What PLSQLBench contains
PLSQLBench holds 2,865 instances. Of these, 2,594 are single-turn tasks and 271 are multi-turn conversations that add up to 978 turns. The material comes from three existing benchmark families and is organized into five subsets:
- Spider2-ST: 510 single-turn generation and repair tasks on enterprise-style schemas.
- Spider2-MT: 271 conversations where a program is developed over several requests.
- Spider-PLSQL: 970 programs that answer Spider 1.0 questions.
- MBPP-PLSQL: 806 short programming problems converted to PL/SQL.
- MBPP+-PLSQL: 308 programming problems with a larger set of tests.
The Spider subsets check whether a model uses a database schema correctly. The MBPP subsets concentrate on procedural logic and need no permanent tables. To build the schema-based tasks, Oracle converted data types, identifiers and date literals from SQLite, Snowflake and BigQuery sources into Oracle form.
Oracle PL/SQL specialists wrote the task descriptions, reference programs and tests for the Spider 2.0 subsets. Every task went through automated review, and more than 60 percent were also reviewed by people.
How correctness is measured
PLSQLBench does not compare generated code with a reference text, because the same behavior can be coded in many ways. A program that compiles can also still return wrong results. So every answer is judged by running unit tests inside Oracle Database.
Three scores are reported. Mean Test Pass@1 is a partial-credit score that averages the share of tests one generated solution passes. Suite Pass@1 marks a task solved only if all of its tests pass, and Episode Pass@1 requires a clean pass on each turn of a conversation.
In the multi-turn tasks, a model keeps working on its own earlier output and on the database objects that output created. An early mistake therefore carries into later turns, much as it would in a real project.
How the models scored
Oracle tested eight models that produced code directly. On the average partial-credit score across the three test subsets, the leaders were:
- GPT-5.4: 64.96 percent
- Claude Opus 4.8: 63.49 percent
- Gemma 4 31B, an open-weight model: 62.26 percent
- GPT-5.6-Sol: 61.71 percent
No model was best on every subset. The strict multi-turn score is far lower than the partial-credit numbers suggest. GPT-5.4, the strongest direct model, finished only 33.33 percent of test conversations without a single failed test.
Giving a model database access helped. Oracle also ran agents built on the Codex CLI with Oracle SQL and PL/SQL skills and database tools. With that setup, GPT-5.6-Sol raised its multi-turn partial-credit score from 66.81 to 81.29 percent, and its fully correct conversations rose from 22.22 to 41.27 percent.
Even so, the best agent still failed somewhere in more than half of the conversations. The gain also did not carry over evenly to the MBPP-based problems.
Where the models go wrong
Oracle sorted the failures into groups. About 82.5 percent came from wrong procedure logic or wrong output. Invalid or unfinished PL/SQL made up 13.3 percent, and mistakes in interfaces, signatures or schema use made up 4.2 percent.
One failure described by Oracle is a report procedure that compiled without errors. When its cursor found no rows, the code raised an exception too early, so the report headers the task required were never printed. Compiling the code would not reveal that bug, only running it would.
What it means for developers
The practical lesson is that PL/SQL produced by a model needs tests, not just a successful compile. Most failures were logic errors in code that looked reasonable. Pay special attention to empty result sets and the order of exception handlers, and review how exceptions propagate in PL/SQL if generated handlers look suspicious.
Second, connect your AI assistant to a development database when you can. The agents that could inspect the schema and run code scored clearly higher than the same model working blind. Keep that access limited to a sandbox schema with test data.
Third, be careful with long chat sessions. Models often satisfied the newest request while silently dropping an earlier one. Rerun the full test suite after each change, and check implicit cursor results with SQL% cursor attributes where generated code skips those checks.
The benchmark has limits that Oracle states openly. Its tasks avoid permanent inserts, updates and deletes, and they do not cover transactions, privileges, performance or deployment. A high score is therefore not proof that a model is safe for production database work.
How to use the benchmark
Oracle says a public PLSQLBench repository holds 2,391 development instances along with the schema files. The other 474 instances stay private as a held-out evaluation set, which helps keep future scores honest. The development and test splits for the Spider 2.0 subsets also use different databases.
Teams choosing an AI coding tool for Oracle work can use the published tables as a starting point. Compare the strict multi-turn numbers instead of the partial-credit averages, because they are closer to real maintenance work.
Conclusion
PLSQLBench gives the Oracle community its first execution-based way to compare AI models on PL/SQL generation, repair and step-by-step development. The early numbers are encouraging for single tasks and sobering for longer sessions, where even a tool-using agent succeeded less than half the time. Human review and unit tests remain essential.
Sources
See my articles more often when you search Google.
