{"slug": "single-database-rewards-are-hackable-counterfactual-execution-for-trustworthy-to", "title": "Single-Database Rewards Are Hackable: Counterfactual Execution for Trustworthy Text-to-SQL RL", "summary": "A counterfactual-database (CF) reward that also runs a text-to-SQL agent's final query on a few hidden databases closes a reward-hacking gap in reinforcement learning for text-to-SQL, according to the research. The single-database reward used in standard RL pays a query when its result matches the reference on one database, but a wrong query can match by luck when the data lack the rows that expose its bug.", "body_md": "Reinforcement learning (RL) for text-to-SQL agents pays a query when its result matches the reference on one database. However, a wrong query can match by luck when the data lack the rows that expose its bug. We study a counterfactual-database (CF) reward that also runs the final query on a few hidd", "url": "https://wpnews.pro/news/single-database-rewards-are-hackable-counterfactual-execution-for-trustworthy-to", "canonical_source": "https://aiflash.com/news/158641/", "published_at": "2026-11-26 17:00:46+00:00", "updated_at": "2026-11-26 17:13:35.299651+00:00", "lang": "en", "topics": ["ai-research", "machine-learning", "large-language-models", "ai-agents"], "entities": [], "also_reported_by": [], "takeaway": "Score text-to-SQL RL rewards against counterfactual databases with rows that expose a query's bugs, not just one reference database where a wrong query can match by luck.", "recommendation": {"advice": "When training or evaluating text-to-SQL agents, run the final query against several counterfactual databases so lucky matches on a single database don't reward buggy queries.", "playbook": "evals-testing", "playbook_url": "https://wpnews.pro/playbooks/evals-testing"}, "alternates": {"html": "https://wpnews.pro/news/single-database-rewards-are-hackable-counterfactual-execution-for-trustworthy-to", "markdown": "https://wpnews.pro/news/single-database-rewards-are-hackable-counterfactual-execution-for-trustworthy-to.md", "text": "https://wpnews.pro/news/single-database-rewards-are-hackable-counterfactual-execution-for-trustworthy-to.txt", "jsonld": "https://wpnews.pro/news/single-database-rewards-are-hackable-counterfactual-execution-for-trustworthy-to.jsonld"}}