Agentic Benchmark Generation and Factorial Evaluation of Text-to-SQL Architectures on an Industrial Database
Abstract
Deploying Text-to-SQL in specialized industrial domains demands an evaluation benchmark grounded in real operational needs and an understanding of which architectural choices truly improve accuracy. Human-annotated benchmarks are prohibitively expensive, and current synthetic generators read only the schema, never the data, missing the quirks that make industrial questions hard. We present two contributions. First, an agentic benchmark generation pipeline in which a ReAct agent with five database-exploration tools formulates each question/SQL pair from observed data, enforcing quality through execution validation, vocabulary gates, and dual-layer deduplication; it expands 37 expert-validated seeds into a 169-pair Portuguese benchmark without paid annotation. Second, a controlled factorial study that fixes the model, benchmark, and metadata to isolate how schema presentation and tool access affect six architectures. We find that full-schema access and tool use add accuracy independently, that semantic schema linking helps simple but starves medium-complexity queries, and that self-correction and multi-agent decomposition do not pay off; above all, 57% of questions fail across every architecture, showing that the binding constraint is domain knowledge, not architectural sophistication.