arXiv:2609.03898cs.DBSep 2026

Manuscript Offprint

arXiv:2609.03898

From Data Querying to Data Investigations: Rethinking Natural Language Interfaces for Databases

Fabian Wenz, Zixuan Chen, Carsten Binnig

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Natural language (NL) interfaces to databases have been optimized for the wrong problem. The dominant Text-to-SQL paradigm assumes that users ask questions that can be answered by single SQL queries. In practice, however, users seek assistance with solving data problems. This requires searching a database by sequences of SQL queries while reasoning over intermediate results instead of just running one SQL query. This paper therefore introduces a new paradigm for NL interfaces to data, which we call data investigations. We present D2D^{2}, a first prototype of a data investigation system that embodies this vision by autonomously searching, reasoning over, and collecting data to solve data problems. Using a newly constructed benchmark based on the Murder Mystery dataset, we demonstrate the potential of D2D^{2} for tasks that require data investigations with evidence-backed decisions, extending beyond the capabilities of traditional single-query question answering.

1 Introduction

Text-to-SQL is the wrong abstraction. Natural language (NL) interfaces to databases have advanced rapidly in recent years. Their dominant formulation is Text-to-SQL: a user asks a question in NL, and the system translates it into a SQL query whose result answers that question. Benchmarks such as Spider [10] and BIRD [6] have driven impressive progress under this paradigm. Yet they are built on a fundamental assumption. We argue that it is way too limiting to assume that users formulate requests that correspond to a single SQL query. In practice, they do not [3]. Users neither think in terms of SQL queries nor care whether their request requires one SQL statement or multiple ones. They simply expect a system to help them solve a problem using their data.

From querying data to investigating data. Consider a physician interacting with a hospital database. Asking for the average age of patients with COVID-19 is a valid database query, but it is rarely the question that matters. A physician is much more likely to ask: Which treatment is more effective for older COVID-19 patients? Answering this question cannot be reduced to generating a single SQL query. Instead, the system must identify alternative treatment strategies, compare medications, account for differences in patient populations, analyze recovery outcomes, and reason about all factors contributing to successful treatments. Also, the outcome is not a single query answer but a collection of competing hypotheses (i.e., different treatments), each supported by different pieces of evidence. Recent studies on natural language interfaces suggest

Figure

Figure 1: Comparison of traditional Text-to-SQL and Data Investigations. Text-to-SQL maps an NL question to a single SQL query, producing a direct result. In contrast, Data Investigations decompose a high-level NL question into multiple exploratory queries and reasoning steps, iteratively collecting and synthesizing evidence to verify or falsify potential solutions as output for the user question.

that this investigative interaction is what users actually expect: they seek assistance in solving data-driven problems, which we call data investigations, rather than asking simple database queries [5]. Figure 1 contrasts this data investigative paradigm with the traditional Text-to-SQL workflow. By exploring alternative treatments, gathering supporting and contradicting evidence, and making the reasoning process transparent, data investigations enable users to understand, verify, and ultimately trust the system's conclusions. This is a new data management workload. And the principle of data investigations extends far beyond healthcare. A business analyst may ask "why customer retention suddenly declined", a manufacturer may ask "where to build the next production facility", or a city planner may ask "why a traffic light behaved unexpectedly". None of these questions has a unique SQL query that provides the answer. Instead, the system must iteratively explore the available data, formulate possible hypotheses based on the data, collect supporting and contradicting evidence, revise its understanding as new observations emerge, and ultimately communicate well-supported conclusions to the user. We argue that this investigative process constitutes a fundamentally new data management workload that is distinct from translating natural language into SQL.

Current systems are not designed for this workload. Today's Text-to-SQL approaches primarily optimize the translation from NL into SQL [2, 6, 10]. While this is an important capability, it addresses only one component of the broader problem of a data investigation. Investigative workloads require managing an evolving search over the data, involving sequences of queries whose execution depends on reasoning over intermediate results rather than generating a single query upfront. One might argue that recent LLM agents equipped with database tools already provide this

This paper is published under the Creative Commons Attribution 4.0 International (CC-BY 4.0) license. Authors reserve their rights to disseminate the work on their personal and corporate Web sites with the appropriate attribution, provided that you attribute the original work to the authors and CIDR 2027. 17th Annual Conference on Innovative Data Systems Research (CIDR '27). January 24-27, Amsterdam, The Netherlands.

Wenz et al.

NL: Which treatment is most effective for older COVID-19 patients?

the data

investigation

question

Figure

DATA INVESTIGATION BOARD

(the detectives' shared memory)

HYPOTHESES

H1: drug A helps older patients?

H2: effect depends on comorbidity?

EVIDENCE

xcontradict

supported

inconclusive

E1 deaths per drug

old patients

SQL: ... WHERE

age > 65 ...

drug_A|n=84|death

=22

NULL|n=224|death=24

No drug has less

deaths

E2 deaths per drug

& comorbidity

old patients

SQL: ... JOIN

comorbidities...

asthma|drug_B|n=

214|deaths=20

drug_B & asthma

has low death rate

E3 cured per

dosage & drug

old patients

SQL: ...

dose_mg ≥ 200 ...

...n=12|deaths=1

n=202|deaths=24

low cure rate

doesn't say much

evaluate

NEW POTENTIAL HYPOTHESIS

asthma subgroup

dosage effect

query

rationalize

1 HYPOTHESIZER

explores data and creates

hypothesis

2 ORCHESTRATOR

organizes explanations

and coordinates

3 EVIDENCE COLLECTOR

find data based facts to

support or falsify hypothesis

4 JUDGE

weighs support vs.

counter-evidence

5 REPORTER

summarizes & rationalizes

DB

OUTPUT (evidence based)

Drug A is effective

  1. SUPPORTED if people have

ASTHMA, SQL:...

  1. CONTRADICTED if people have

diabetes, SQL:...

treatment X is ...

treatment Y is ...

Figure 2: Architecture of a Data Investigation System with two main system abstractions: (1) The Data Detective, a multi-agent team that iteratively inquires the database, formulates and evaluates hypotheses. (2) The team stores supporting and contradicting evidence on a shared Data Investigation Board before producing an evidence-backed result. The result is the verdict on each hypothesis (supported or contradicted) and the summary of its evidence.

capability [4, 8, 9]. Such systems represent an important step toward data investigations. However, as we show later in this paper, today's pure agentic approaches remain insufficient. First, agents typically tend to terminate early once they identify one plausible answer to a question, whereas many real-world data problems have multiple equally relevant solutions—for example, several effective treatments for COVID-19. Second, their reasoning process is often difficult for users to inspect as it is "buried" in a long text trace.

Towards Data Investigation Systems. The central argument of this paper is that NL interfaces should no longer be viewed primarily as Text-to-SQL. The ultimate goal should instead be to help users solve problems based on the available data. We argue that this requires a new systems layer between users and relational databases, which we coin data investigation systems. As a first step toward this vision, we present D2D^{2}, a prototype that introduces two new system abstractions for hypothesis-driven data analysis: the Data Detective and the Data Investigation Board. The Data Detective is a team of specialized agents that collaboratively investigates a data problem by generating hypotheses, and collecting supporting or contradicting evidence for each hypothesis – i.e., how efficient different treatments are in our example. The Data Investigation Board serves as the detective's workspace, externalizing the reasoning process as shared investigation state between agents. By making the investigation state a first-class systems object, D2D^{2} enables systematic exploration of all alternative hypotheses and enables an easier verifiability of the outcome of an analysis for humans.

Our contributions. To summarize, as the main contribution, this paper introduces data investigations, a new paradigm for NL interfaces to data that shifts the focus from directly answering queries to solving more open-ended data problems. We present D2D^{2}, a very first prototype realizing this paradigm. We further introduce a benchmark of data investigation workloads and use it to study the capabilities and limitations of current systems. Finally, we outline an agenda for building future data investigation systems.