A production-grade RL environment where AI agents diagnose and fix broken SQL queries through multi-turn agentic interaction with a live database. 20 tasks · 7 tables · Diagnostic mode · Execution diffs.
v4.0.0 · sql_repair_env
Tasks
20
3 difficulty tiers
DB Tables
7
SQLite in-memory
Bug Categories
8
syntax → semantic
Max Attempts
5
+ free diagnostics
Reward Range
0–1
partial credit
✎ What makes this environment exceptional
🔍
Diagnostic Mode
Agents run free exploratory SQL queries to understand the database before fixing — genuine multi-turn agentic behaviour. No other SQL environment supports this.
📊
Execution Diffs
Every step shows the agent exactly what its query returned vs what was expected. Row-level diffs make errors transparent and learnable.
📈
Progress Rewards
A bonus reward is added whenever the agent improves from its previous best score. Prevents reward flattening and encourages convergent behaviour.
🏷️
Bug Categories
8 structured bug categories enable curriculum learning — train on syntax first, then JOIN logic, then hard semantic bugs like self-joins and duplicate counting.
🛡️
Anti-Hack Grader
Penalises submitting the original broken query unchanged or exact duplicate submissions. Forces agents to genuinely reason rather than exploit the reward.