arXiv:2610.21382cs.LGOct 2026

Manuscript Offprint

arXiv:2610.21382

RDL-Bench: A Benchmark for Task-Aware Question Answering over Relational Databases

Yao Cheng, Siqiang Luo

Yao Cheng

College of Computing and Data Science

Nanyang Technological University

Singapore

yao.cheng@ntu.edu.sg

Siqiang Luo

College of Computing and Data Science

Nanyang Technological University

Singapore

siqiang.luo@ntu.edu.sg

Abstract—Relational databases (RDBs) remain the primary infrastructure for storing and managing structured data across enterprise and scientific domains. Natural-language (NL) interfaces to RDBs aim to let users ask questions without writing SQL, but real user needs go beyond SQL-style lookup: some questions require reasoning over the observable database state, while others require predictive inference from historical relational records under temporal constraints. Existing benchmarks address these goals in isolation. To address this gap, we introduce RDL-Bench, a benchmark for task-aware question answering (QA) over real RDBs. RDL-Bench organizes diverse user questions into reasoning-oriented questions, whose answers are determined by the current database state, and prediction-oriented questions, whose answers depend on future outcomes under temporal constraints. Each instance contains an NL question, task metadata, schema information, temporal context, either executable evidence or target-construction logic, and denotation-level ground truth. RDL-Bench supports two evaluation settings: native solvers under their intended capabilities, and task-aware modular systems where a router dispatches each question to an appropriate execution module. Experiments across seven domains yield several key findings. Current reasoning methods achieve at most 0.49 macro-average denotation score, with context augmentation providing no consistent improvement, revealing that schema grounding, relational composition, and answer normalization remain jointly unsolved. LLM predictive competitiveness is format-driven and collapses on scalar regression, showing that binary predictive QA overestimates LLM relational understanding. Task-aware routing exposes a capability threshold: large LLMs route reliably while small LLMs develop systematic bias that degrades end-to-end performance below random baseline. Datasets and code are available at https://github.com/cy623/RDL-Bench.

Index Terms—relational databases, relational deep learning, question answering

I. INTRODUCTION

Relational databases (RDBs) remain the core infrastructure for storing and managing structured data in domains such as finance, healthcare, e-commerce, transportation, social platforms, and public services [7], [38]. As natural-language (NL) interfaces to RDBs mature, users increasingly expect to ask diverse questions over the same database without writing Structured Query Language (SQL). These questions go beyond SQL-style lookup. Some ask what is true in the current database state, such as factual retrieval, analytical aggregation, or multi-hop relational reasoning. Others ask what is likely to happen in the future, such as future counts, labels, scores, or rankings inferred from historical relational records. For example, a user may ask which cities had the most customers in a given period, or whether a seller is likely to receive low ratings next month. Both are NL questions over relational data, but answering them requires different forms of database grounding, temporal reasoning, and task execution.

Current-state query answering and future-oriented prediction are studied in text-to-SQL [19], [44] and relational-learning benchmarks [30], respectively. This motivates the problem of task-aware relational QA, where a system must not only produce an answer but also identify the appropriate execution mechanism from the question alone. In realistic user-facing settings, users do not pre-declare whether a question should be answered by querying the observable database state or by making a future-oriented prediction. Moreover, the same user may ask both types of questions in sequence over the same database. A practical relational QA system must therefore understand the user intent, ground the question in the schema and temporal context, identify the capability required to answer it, and invoke an appropriate execution mechanism. The key challenge is thus not only producing an answer, but also deciding how the question should be answered.

Existing benchmarks cover important parts of this broader goal, but mostly in isolation. Table question answering (Table QA) and text-to-SQL benchmarks evaluate NL access to structured data, typically by answering questions over existing database states or generating executable SQL queries [19], [27], [44], [45]. Recent complex analytical QA benchmarks further stress reasoning over structured databases, including nested queries, time-series analysis, and computations over aggregate results [26]. In parallel, relational deep learning (RDL) benchmarks such as RelBench [30] evaluate supervised prediction over relational databases. However, these benchmark families do not provide a unified user-facing workload in which NL questions over the same type of relational data may require either current-state reasoning or future-oriented prediction. In these settings, the required capability is typically specified in advance, leaving the system-level impact of inferring task requirements outside the evaluation.

To address the above gap, we introduce RDL-Bench, a benchmark for task-aware QA over real multi-table RDBs. Figure 1 summarizes the benchmark space considered in this work. RDL-Bench is built around a unified NL interface: each instance is formulated as a user question over an RDB and evaluated against ground truth. To support task-aware evaluation, each instance further includes task metadata, schema information, temporal context, and either executable evidence or target-construction logic.

RDL-Bench covers the core capabilities required by practical relational QA systems. For reasoning-oriented questions, answers are determined by the observable database state, and ground truth is obtained by executing validated SQL queries. For prediction-oriented questions, answers depend on outcomes after a reference time treft_{ref}; the input context is restricted to records observed before treft_{ref}, and labels are constructed under strict temporal constraints to avoid information leakage. This design enables RDL-Bench to evaluate whether a system can understand the user question, identify the required capability, invoke the appropriate execution mechanism, and produce the correct answer.

RDL-Bench supports two evaluation settings. The first setting measures native solvers under their intended capabilities, including large language model (LLM)-based and text-to-SQL methods for reasoning-oriented questions, as well as tabular and graph-based RDL models for prediction-oriented questions. The second setting assesses task-aware modular QA systems, where a router predicts the required task route and dispatches the question to either a reasoning module or a prediction module. By comparing an LLM-based router with an oracle router that uses ground-truth task metadata, RDL-Bench separates execution errors from routing errors and quantifies the system-level gap caused by imperfect task understanding. Routing thus serves as a system-level diagnostic within the unified QA workload. In summary, our contributions are as follows:

• We introduce RDL-Bench, a benchmark for task-aware QA over real multi-table RDBs under a unified NL interface.

• We define an NL workload covering both current-state reasoning and future-oriented prediction, organized under a shared instance schema with task metadata, temporal context, and denotation-level ground truth.

• We introduce a two-level evaluation protocol measuring native solver performance and modular QA performance, including the routing-induced gap between an LLM-based router and an oracle router, across seven domains.

Key Findings. Experiments across seven real-world domains yield the following findings:

• Relational reasoning remains limited by denotation alignment. The best seven-domain native reasoning macro-average is 0.49, with performance varying across domains and answer forms. Current methods struggle to align user intent, schema grounding, relational composition, and answer normalization.

• More relational context is not always sufficient. Two-hop context helps in some domains but does not consistently improve over schema-only prompting, indicating that more local records alone do not resolve query planning and answer-form errors.

• LLM predictive performance is format-driven. LLMs can be competitive on Boolean prediction from schema and historical statistics but remain unstable on scalar regression, showing that Boolean predictive QA can overestimate relational understanding.

• Routing separates schema grounding from capability understanding. Strong LLMs route accurately, whereas Llama8B can identify relevant tables yet fail to distinguish reasoning from prediction. Routing requires recognizing the execution capability implied by the question.

References (41)