The Case for Intent-Based Query Rewriting

📅 2025-11-25
📈 Citations: 0
Influential: 0
📄 PDF

career value

190K/year
🤖 AI Summary
This paper addresses the failure of conventional equivalence-based query rewriting when original data tables are inaccessible due to access control policies, privacy constraints, or prohibitive retrieval costs. To overcome this, we propose INQURE, a semantic intent-preserving query rewriting framework. Unlike traditional approaches relying on syntactic equivalence and query plan optimization, INQURE introduces, for the first time, large language model (LLM)-driven intent understanding and cross-table reconstruction—enabling semantically consistent rewriting across structurally heterogeneous and non-aligned schemas. The system incorporates pre-filtering of candidate tables, pruning heuristics, and learned ranking to form an end-to-end rewriting pipeline. Evaluated on a benchmark spanning 900+ real-world database schemas, INQURE demonstrates superior rewriting quality and practical utility. A user study further confirms its effective trade-off between execution feasibility and fidelity of analytical insights.

Technology Category

Application Category

📝 Abstract
With this work, we describe the concept of intent-based query rewriting and present a first viable solution. The aim is to allow rewrites to alter the structure and syntactic outcome of an original query while keeping the obtainable insights intact. This drastically differs from traditional query rewriting, which typically aims to decrease query evaluation time by using strict equivalence rules and optimization heuristics on the query plan. Rewriting queries to queries that only provide a similar insight but otherwise can be entirely different can remedy inaccessible original data tables due to access control, privacy, or expensive data access regarding monetary cost or remote access. In this paper, we put forward INQURE, a system designed for INtent-based QUery REwriting. It uses access to a large language model (LLM) for the query understanding and human-like derivation of alternate queries. Around the LLM, INQURE employs upfront table filtering and subsequent candidate rewrite pruning and ranking. We report on the results of an evaluation using a benchmark set of over 900 database table schemas and discuss the pros and cons of alternate approaches regarding runtime and quality of the rewrites of a user study.
Problem

Research questions and friction points this paper is trying to address.

Rewriting queries to preserve insights while altering structure and syntax
Enabling data access despite access control, privacy, or cost constraints
Developing intent-based query rewriting using large language models
Innovation

Methods, ideas, or system contributions that make the work stand out.

Intent-based query rewriting alters query structure
INQURE system uses LLM for query understanding
Combines table filtering with rewrite pruning
🔎 Similar Papers
No similar papers found.