Incremental Query Refinement (IncreQA)
- Incremental Query Refinement (IncreQA) is an iterative process where query representations are updated with new constraints, feedback, and state changes.
- The approach spans various settings, including relational preference revision, conversational SQL rewriting, and latent-space adjustments for response reranking.
- Empirical evaluations demonstrate that IncreQA effectively enhances retrieval accuracy and system responsiveness across diverse applications.
Searching arXiv for recent and foundational papers on Incremental Query Refinement and closely related formulations. arXiv search query: "Incremental Query Refinement IncreQA interactive query clarification database preferences query changing preferences" Incremental Query Refinement (IncreQA) denotes an iterative mode of query processing in which the operative query representation is updated as additional constraints, preferences, feedback, or system-state changes become available. In EHR-ChatQA, the term is used explicitly for an interaction flow “where users add constraints to existing queries” and the agent must maintain and rewrite SQL over multiple turns (Lee et al., 27 Sep 2025). Closely related formulations revise preference relations in relational databases, clarify ambiguous search requests through simulated interaction, rerank knowledge-graph answers from labeled examples, refine query embeddings in a continuous latent space after retrieval failure, or incrementally update optimizer state when costs change 0607013. This suggests that IncreQA is best understood as a family of iterative update procedures for query semantics and execution behavior rather than a single canonical algorithm.
1. Scope and lineage
A recurrent feature across the literature is that the object being refined differs by setting. In relational preference querying, the refined object is a binary preference relation over tuples; in conversational database access, it is a progressively constrained SQL statement; in interactive IR, it is the ranking of candidate reformulations; in knowledge-graph QA, it is a reranked answer distribution; in video retrieval, it is a latent query embedding; and in adaptive query optimization, it is the optimizer’s declarative search state 0607013.
| Work | Refined object | Incremental signal |
|---|---|---|
| “Database Querying under Changing Preferences” [0607013] | Preference relation | Revised preferences via union, prioritized, and Pareto composition |
| “Interactive Query Clarification and Refinement via User Simulation” (Erbacher et al., 2022) | Ranking over candidate reformulations | Turn-level feedback |
| “From Conversation to Query Execution” (Lee et al., 27 Sep 2025) | SQL query | Newly revealed constraints plus clarification and tool use |
| “Interactive Query Answering on Knowledge Graphs with Soft Entity Constraints” (Daza et al., 19 Aug 2025) | Answer scores | Incremental positive and negative entity labels |
| “VideoSearch-R1” (Lee et al., 1 Jul 2026) | Latent query embedding | Retrieval verification and generated soft query tokens |
| “Enabling Incremental Query Re-Optimization” (Liu et al., 2014) | Datalog-maintained optimizer state | Cost and selectivity deltas |
Historically, the relational treatment of changing preferences provides an early formal foundation: it studies how a query is transformed by revising the preference relation itself and when order-theoretic properties survive revision [0607013]. Later work moves the same incremental logic into interactive retrieval and QA settings, where the update source is no longer a revised binary relation but user feedback, tool-mediated disambiguation, or learned latent corrections (Erbacher et al., 2022, Lee et al., 27 Sep 2025, Daza et al., 19 Aug 2025, Lee et al., 1 Jul 2026). In systems work, the query need not change semantically at all; instead, the optimizer’s internal representation is updated incrementally under changing costs (Liu et al., 2014).
2. Formal models of iterative refinement
Several papers formalize IncreQA as a state-update process. In EHR-ChatQA, the initial question is , the user reveals a sequence of concrete constraints , and the agent must produce an updated SQL query at each step,
with final output 0 (Lee et al., 27 Sep 2025). The refinement function includes clarifications, tool calls, value-linking, and SQL generation.
In interactive clarification for document retrieval, the initial query embedding is 1, the latent user intent embedding is 2, and the system operates over a fixed candidate set of reformulations 3. Each turn returns ordered feedback
4
where the accepted reformulation is selected by dot-product similarity to the latent intent, and after 5 turns the system chooses the highest-ranked reformulation 6 for document retrieval (Erbacher et al., 2022).
In knowledge-graph QA with soft constraints, the base query remains a conjunctive query 7, but refinement acts on scores rather than symbolic syntax. The approximate QA model yields 8, a preference set
9
encodes preferred and non-preferred examples, and the reranked score is
0
The adjustment must raise preferred entities above non-preferred ones while not distorting the original global ranking more than necessary (Daza et al., 19 Aug 2025).
In VideoSearch-R1, the query state is a latent embedding
1
the retriever returns a top-1 video, verification produces a match or not-match label, and when retrieval fails the policy generates a block of soft query tokens 2. The update is written as
3
while the implementation uses concatenation of new embeddings to the original fixed text tokens (Lee et al., 1 Jul 2026).
In the preference-query framework, the formal state is a binary relation 4 over tuples, typically required to be irreflexive and transitive, yielding a strict partial order (SPO). A weak order (WO) is defined as transitive, total, but not necessarily antisymmetric; it partitions tuples into ties and orders the blocks [0607013]. Across these formulations, the constant structural feature is staged update under partial information, but the refined state ranges from symbolic logic to embeddings and optimizer views.
3. Relational preference revision
The most explicit algebra of incremental refinement appears in the treatment of changing preferences in relational databases. Given two preference relations 5 and 6, revision may use union composition, prioritized composition, or Pareto composition [0607013].
Union composition is the set-theoretic union 7. Because this may violate transitivity, it is often followed by transitive closure:
8
Prioritized composition gives strict priority to 9:
0
Pareto composition defines preference when one relation wins and the other does not defeat it:
1
The framework analyzes when order-theoretic properties are preserved. If 2 and 3 are irreflexive, then 4 is irreflexive for 5. Union may fail to be transitive and therefore requires closure. Prioritized composition remains transitive if 6 and 7 are SPOs and 8 is transitive on the 9-incomparability zones. Pareto composition is transitive when both component relations are transitive. When the inputs are weak orders, prioritized and Pareto composition produce weak orders again, possibly after merging tied blocks [0607013].
The paper also gives algebraic laws that enable incremental evaluation rather than full recomputation. Prioritized composition is associative,
0
Pareto composition is commutative,
1
and a distributive law is provided for a mix of union and prioritized composition:
2
These laws permit staged update of already materialized preference components instead of reconstructing the full relation from scratch [0607013].
Two extensions broaden the framework. A finite restriction 3 allows an “unbounded” preference relation to be evaluated only on the current candidate set. An SPO can also be extended into a weak order by taking transitive closure and completing each incomparability class into ties [0607013]. A hotel example illustrates the semantics: price and rating preferences can be Pareto-composed so that a tuple wins by being strictly cheaper and not lower rated, or strictly higher rated and not more expensive; rating can then be prioritized over price, so that any rating win trumps price while equal ratings fall back on price [0607013].
4. Conversational clarification and SQL refinement
In interactive retrieval, refinement is often driven by explicit clarification dialogue rather than algebraic composition. The simulated clarification framework in IR models a two-agent interaction between an IR system agent and a simulated user agent. At each turn, the system ranks the current reformulation pool, selects two candidates under a selection policy such as top-2, random sampling, or K-means, receives ordered preference feedback from the user, optionally prunes the pool, and repeats for up to 4 turns (Erbacher et al., 2022). The ranking model is pairwise and inspired by RankNet: a hierarchical RNN encodes feedback history, and pairwise cross-entropy is used for training. The simulated user is assumed to be greedy and fully cooperative, with no position or presentation bias (Erbacher et al., 2022).
The evaluation uses MS MARCO 2020 Passages, with a test set of 43 queries and a dev subset of 1,000 queries. Final retrieval is performed by a dense retriever with FAISS, and performance is measured with MRR@10 and MAP@10. On the test set, the initial query yields MRR@10 = 0.4554 and MAP@10 = 0.3382; MonoT5 ranking over the reformulation pool yields MRR@10 = 0.4713; after one simulated turn, K-means yields MRR@10 = 0.5232; and by 5, K-means reaches MRR@10 = 0.5515 and MAP@10 = 0.3347 (Erbacher et al., 2022). All selection policies show monotonic gains with more turns, and K-means consistently outperforms alternatives, indicating that semantic diversification better exploits user feedback (Erbacher et al., 2022).
The EHR-ChatQA benchmark instantiates IncreQA as a database-agent workflow in which an LLM-based user begins with a broad question and reveals at most one or two new constraints per turn. The agent scans for missing filter criteria or ambiguous terminology, may ask a clarifying question, explores schema with table_search() and column_search(table), resolves free-text values with value_substring_search(table, column, v) and value_similarity_search(table, column, v), and then rewrites a single new SQL query 6 from scratch, including all constraints in the WHERE clause and following SQLite-specific rules (Lee et al., 27 Sep 2025). Execution occurs through sql_execute(query=S_t), and the returned table is presented in natural language with a brief explanation of how each constraint was enforced (Lee et al., 27 Sep 2025).
The benchmark contains 286 IncreQA instances, with 145 on MIMIC-IV★ and 141 on eICU★, and evaluates robustness across five independent trials per task using 7, 8, and 9 (Lee et al., 27 Sep 2025). Across closed-source LLMs, 0 is approximately 90–95%, but 1 drops by 35–60 percentage points. For o4-mini, 2, 3, and Gap = 36.7%; for Gemini-2.5-Flash, 4, 5, and Gap = 43.4%; and an open-source model such as Llama 3.3-70B reaches approximately 6 and 7 (Lee et al., 27 Sep 2025). Failure analysis distinguishes consistent failures, dominated by Value Linking Errors at approximately 47% and complex SQL-generation mistakes at approximately 25%, from inconsistent failures, which are overwhelmingly due to brittle SQL contexts at approximately 72%, where slight variations in clarification language cause earlier constraints to be dropped when SQL is rewritten (Lee et al., 27 Sep 2025).
5. Soft constraints and latent-space refinement
A major development in recent work is the shift from discrete query reformulation to soft or latent refinement. In knowledge-graph QA, the Neural Query Reranker (NQR) augments an approximate answer distribution with user-supplied examples of preferred and non-preferred entities (Daza et al., 19 Aug 2025). Each entity has a pretrained embedding 8, the preference set is represented as a matrix
9
whose rows are 0, and a Transformer/self-attention module with pooling maps 1 to a preference vector 2 (Daza et al., 19 Aug 2025). For candidate entity 3, the model forms
4
passes it through a two-layer MLP to obtain a scalar adjustment, and reranks all entities accordingly (Daza et al., 19 Aug 2025). The interactive update algorithm appends one labeled preference at a time, rebuilds 5, recomputes 6, and updates all scores; the total computation in the update steps costs 7 because self-attention is 8 and scoring is linear in the number of entities (Daza et al., 19 Aug 2025).
Training balances adaptation to soft constraints against preservation of the original answer distribution. The preference margin loss pushes positives above negatives with margin 9,
0
while
1
preserves the original global ranking distribution, and the total loss is
2
A worked example shows how the preference “Prefer films” can be internalized through a positive label on “Inception” and a negative label on “NobelPrize,” progressively separating film entities from a non-film entity while preserving the original order among film answers (Daza et al., 19 Aug 2025).
VideoSearch-R1 pushes refinement further into continuous latent space. At each turn, a cross-modal retriever computes 3 scores and returns the top-1 video, the agent verifies whether it matches the intent, and if the label is not match, Soft Query Refinement (SQR) autoregressively generates 4 new soft query tokens in 5 (Lee et al., 1 Jul 2026). Supervised fine-tuning uses a contrastive retrieval loss 6 of InfoNCE form on each generated soft block, adds a temporal-grounding loss 7 when a match occurs, and optimizes
8
After supervised fine-tuning, the entire reasoning–retrieval policy is optimized with Group Relative Policy Optimization (GRPO), where the total reward is
9
the advantage is group-normalized, and the objective is a PPO-style clipped objective with a KL penalty (Lee et al., 1 Jul 2026).
The paper argues for soft over hard rewriting on both computational and retrieval grounds. Hard query refinement typically generates 20–30 new text tokens per turn, while SQR needs only 8 dense vectors; continuous tokens are matched directly in the same embedding space as the search engine; fine-grained updates can be made with small steps; and InfoNCE on continuous embeddings provides stronger gradients than next-token prediction (Lee et al., 1 Jul 2026). Empirically, SQR improved R@1 by approximately 7 points versus an approximately 3.7 point gain from hard rewrite, at one-third the token-generation cost (Lee et al., 1 Jul 2026). A plausible implication is that latent-space IncreQA is especially suitable when the retrieval layer itself operates in embedding space and textual rewrites introduce unnecessary surface-form noise.
6. Adaptive optimization, robustness, and limitations
Incrementality can also target execution planning rather than query semantics. The incremental query re-optimizer of “Enabling Incremental Query Re-Optimization” recasts System-R/Volcano-style optimization as recursive Datalog views for plan enumeration, cost estimation, and best-plan selection (Liu et al., 2014). SearchSpace rules enumerate physical plans, PlanCost rules aggregate child costs and local operator costs, BestCost uses a min aggregate over plan costs, and BestPlan materializes the corresponding optimal plan (Liu et al., 2014). When a scan or non-scan cost changes, delta tuples are emitted into base relations such as ScanCost or NonScanCost, and standard incremental view-maintenance techniques propagate the effect through the optimizer state (Liu et al., 2014).
Three pruning techniques are central. Aggregate selection with tuple-source suppression prevents any newly derived PlanCost tuple with cost at least the current BestCost from being propagated further. Reference counting associates each SearchSpace tuple with the number of parent plans that still depend on it and garbage-collects tuples whose count falls to zero. Recursive bounding generalizes branch-and-bound by maintaining a Bound(e,p) relation derived from both local best cost and parent-derived bounds, and any plan whose cost is at least that bound may be pruned (Liu et al., 2014). The implementation stores optimizer state in indexed in-memory relations, keeps small priority queues for BestCost and Bound, memoizes summaries, and revisits only the affected portion of the DAG under a cost change (Liu et al., 2014).
The experimental results show both static and incremental benefits. Across 4–8-way TPC-H joins, the system is within 10–50% of Volcano’s latency, prunes 35–80% of OR-nodes and 55–75% of AND-nodes, and in incremental re-optimization achieves 5–10× speedup over full re-planning for a large-table scan-cost adjustment and 12× to more than 300× speedups for join-selectivity updates (Liu et al., 2014). In the LinearRoad SegToll streaming setting, non-incremental re-optimization takes approximately 200 ms each time and limits adaptivity to approximately 2 re-plans per second, whereas incremental re-optimization drops from approximately 0.4 s to near zero as the stream stabilizes, reaches more than 20 re-plans per second with latencies of 10–100 ms, and reduces total re-optimization time over a 300 s trace from approximately 60 s to 5.8 s (Liu et al., 2014).
Across the broader IncreQA literature, a recurring limitation is that refinement quality depends on the fidelity of the update signal. In simulated IR clarification, the user is unrealistically greedy and fully cooperative, and the reformulation pool is static rather than generated on the fly (Erbacher et al., 2022). In EHR-ChatQA, high 0 combined with much lower 1 indicates sensitivity to dialogue-path variation rather than a lack of one-shot capability (Lee et al., 27 Sep 2025). In knowledge-graph reranking, the objective explicitly constrains the model not to distort the original ranking more than necessary, reflecting a design tension between adaptation and preservation (Daza et al., 19 Aug 2025). In soft video refinement, the method assumes that retrieval verification and downstream temporal grounding can jointly shape the latent update through reward signals (Lee et al., 1 Jul 2026). A common misconception is therefore that incremental refinement is merely iterative query rewriting. The literature shows a broader picture: the refinement target may be a preference order, a candidate-query ranking, a SQL program, an answer-score distribution, a latent embedding trajectory, or an optimizer’s internal search graph 0607013.