NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Exploring Exploratory Querying

Marcelo Arenas, Enrico Franconi, Janik Hammerer, Olaf Hartig, Katja Hose, Laura Koesten, George Konstantinidis, Leonid Libkin, Wim Martens, Yuya Sasaki, Stefanie Scherzinger, Katherine Thornton, Hsiang-Yun WuPVLDB 2025

Introduction

Traditional database research has long operated under the "static query" myth: the assumption that a highly trained expert writes a perfect, one-shot query against a well-understood schema. In reality, the modern data landscape is far messier. With the rise of massive public datasets like Wikidata and the integration of Large Language Models (LLMs) into data workflows, querying has become an iterative, conversational process. This paper argues for a paradigm shift toward exploratory querying—a sociotechnical approach that treats query development as a continuous cycle of design, debugging, and maintenance.

Defining Exploratory Querying

A critical distinction must be made between general data exploration and exploratory querying. While data exploration involves "wandering" through a dataset without a specific goal, exploratory querying occurs when a user has a clear intent but struggles to translate that intent into formal code (e.g., SQL or SPARQL).

The spectrum of query intent, distinguishing between general exploration and goal-oriented exploratory querying.

As query intent becomes clearer, the process shifts from discovery to refinement. However, current database engines are often "agnostic" to this struggle, providing little feedback beyond a result set or a timeout. This gap between intent and execution is where the "vibe-dialogue" of modern querying takes place, often facilitated by LLMs that help users co-develop queries through iterative natural language prompts.

The Iterative Lifecycle

The authors propose a new model for database interaction that moves beyond the execution of a single command. Instead, they view the process as a loop involving three distinct phases that bridge the gap between the user's intent and the database engine's execution.

The sociotechnical lifecycle of exploratory querying, spanning user intent, interface interaction, and engine execution.
  1. Design Phase: The user creates a "draft zero" query. This is rarely perfect and serves as a starting point for exploration.
  2. Debugging Phase: The user iteratively tinkers with the query based on engine feedback. This might involve correcting syntax, fixing URI typos, or adjusting filters to narrow down results.
  3. Maintenance Phase: Queries are not static; they must be updated as schemas evolve, data distributions change, or external factors (like cloud hosting prices) make a previously efficient query too expensive.

Empirical Evidence: How Users Struggle

To ground this vision in real-world behavior, the authors analyzed 3.57 million queries from organic Wikidata logs. By extracting "streaks"—sequences of at least three queries from the same user within a short timeframe—they identified 24,050 instances of clear iterative behavior. Manual inspection of these streaks revealed six primary patterns of struggle:

  • Result Refinement & Generalization: Adding filters when results are overwhelming, or removing constraints when a query returns nothing.
  • Result Extension: Adding more attributes or columns to the output to gain more context.
  • Query Refinement: Tinkering with complex features (like property paths or aggregates) to align the code with a specific intent.
  • Bug Fixing: Correcting basic syntax errors or typos in identifiers.
  • Shifting Intent: Moving to a related but different topic mid-session as new information is discovered.

The prevalence of these patterns confirms that exploratory querying is the norm for modern data users, not the exception.

A Roadmap for Future Research

Embracing exploratory querying requires rethinking both database engines and Human-Computer Interaction (HCI). The authors suggest several key directions for a "sociotechnical" research program:

  • Flexible Engines: Systems should allow users to trade accuracy for speed during the debugging phase. A user might prefer a "fast and approximate" answer (e.g., "give me 5 representative rows") over a "perfect but timed-out" one.
  • New Success Metrics: We must move beyond raw latency and throughput. Success should be measured by time-to-insight, query refinement count (how many "tries" it took), and result diversity.
  • HCI and Visualizations: Interfaces should visualize the "query path," allowing users to backtrack and explore different branches of their logic without losing their place.

By treating the database as a collaborative partner in a dialogue, we can bridge the gap between complex, vast data schemas and the diverse users who seek to extract meaning from them.

Summary updated

BibTeX
@article{arenas2025exploring,
  author = {Marcelo Arenas and Enrico Franconi and Janik Hammerer and Olaf Hartig and Katja Hose and Laura Koesten and George Konstantinidis and Leonid Libkin and Wim Martens and Yuya Sasaki and Stefanie Scherzinger and Katherine Thornton and Hsiang-Yun Wu},
  title = {{Exploring Exploratory Querying}},
  journal = {Proc. VLDB Endow.},
  year = {2025},
}
Figure