AI Queries: Methods & Applications
- AI Queries are a diverse set of techniques that convert natural language or intent into executable, reviewable procedures across structured and multimodal data repositories.
- They integrate methods such as automatic query generation, semantic normalization, and multi-agent orchestration to optimize retrieval, ranking, and execution safety.
- Evaluations emphasize trade-offs in precision, recall, and fairness while underscoring the need for transparency, robustness, and integrated governance in query design.
In current research, AI queries appear as natural-language questions, reformulations, semantic frames, SQL programs, algebraic plans, retrieval prompts, and automatically generated probes used to access, rank, validate, and explain information across structured, semi-structured, and multimodal repositories. The literature spans automated MedDRA query generation in pharmacovigilance, spatial Text-to-SQL, schema-grounded public-sector GIS querying, enterprise query algebras, multimodal tool orchestration, and generative image retrieval, indicating that the term denotes not a single interface but a family of methods for converting intent into executable, reviewable information access procedures (Vandenhende et al., 8 Dec 2025, Kazazi et al., 23 Oct 2025, Azhdari et al., 20 May 2026, Wenz et al., 23 Apr 2026, Erfanian et al., 29 Mar 2026).
1. Query types and conceptual scope
A central distinction in the recent literature is between query content and query execution strategy. The AI Search Paradigm classifies queries as factual, exploratory, multi-hop reasoning, data analysis/code execution, and tool-using tasks, then routes them to Writer-only, Executor-inclusive, or Planner-enhanced configurations through a Master agent that assesses complexity and intent (Li et al., 20 Jun 2025). In enterprise settings, this abstraction becomes explicit query algebra: RUBICON introduces AQL with Find, From, and Where, plus JOIN, aggregates, schema inspection, and housekeeping commands such as SAVE, OUTPUT, and DELETE, so that complex questions are decomposed into inspectable query plans rather than hidden chains of tool calls (Wenz et al., 23 Apr 2026).
Other work treats the query itself as a dynamic object rather than a static input string. In e-commerce search, a session is modeled as a query trajectory that is segmented by bbowac events into source, transitional, and converging queries; the substantive claim is that real-world exploratory search is multi-stage and that transitional queries capture the “how” of intent refinement (Yetukuri et al., 25 Jul 2025). In fairness and robustness research, query type is defined by epistemic status rather than task structure: Fact-or-Fair separates objective queries, which test factual world knowledge, from subjective queries, which test whether models avoid overgeneralizing demographic priors to individuals (Huang et al., 9 Feb 2025). Presupposition research adds a second axis, varying the strength of built-in assumptions from neutral information-seeking to writing demands that presuppose a claim as factual (Sathyanathan et al., 4 May 2026).
This body of work suggests that “query” is best understood as a typed interactional artifact. It may be a single question, a sequence, a semantic frame, a typed DAG, or a bounded algebraic plan, depending on whether the system is optimizing for retrieval, decomposition, governance, or robustness.
2. Query formation, reformulation, and semantic normalization
One branch of the literature studies automatic query production from data itself. Automatic query generation for AI repositories derives queries from ingested corpora using journalism interrogatives, object pairs with verbs, comparative adjectives, analogies, correlations, and knowledge-graph paths, then selects diverse, informative subsets via information-gain and submodular-selection objectives (Altman, 2018). In commercial search, the emphasis is not on domain-agnostic probing but on behavioral intent flow: structured query sequence mining reconstructs user journeys from logs, applies a backward similarity filter over query embeddings, and then uses Solar-10B-Instruct to generate alternate converging queries that preserve evolving intent while differing from mined converging queries (Yetukuri et al., 25 Jul 2025).
A second branch addresses ambiguous or underspecified user requests by normalizing them into constrained intermediate representations. MASQRAD uses a RoBERTa multilabel interpreter to produce “clues” such as measures, dimensions, filters, temporal scopes, and candidate chart types, with LLaMA-2-13b adding contextually rich suggestions before Actor and Critic agents generate and refine Python scripts for analysis and visualization (Rahman et al., 17 Feb 2025). The transportation-safety framework uses an LLM only to produce a JSON semantic frame containing targets, references, spatial constraints, attribute constraints, temporal constraints, and ranking parameters; a deterministic Validation and Repair Layer then checks schema conformance, normalizes units and aliases, resolves anchors, and repairs structural inconsistencies before any execution occurs (Azhdari et al., 20 May 2026).
Domain-specific systems frequently combine lexical matching, embeddings, and threshold calibration. SafeTerm’s Automated Medical Query embeds MedDRA Preferred Terms in a unified multidimensional vector space, computes cosine similarity, applies two-means clustering to separate a high-similarity cluster from a low-similarity cluster, and uses the Knee method for threshold selection; the automated threshold averaged across 110 Tier-1 SMQs (Vandenhende et al., 8 Dec 2025). In agricultural helpline automation, seq2seq transformer fine-tuning over approximately 4 million Tamil Nadu KCC queries is used instead of explicit query planning; among the reported models, flan-t5-base obtained BLEU $0.555$, ROUGE-1 $0.724$, and BERTScore F1 $0.837$ on the test set (Didwania et al., 2024).
Across these systems, semantic normalization is not an auxiliary convenience. It is the mechanism by which flexible language is constrained into valid entity sets, operator vocabularies, schema fields, and decision thresholds.
3. Planning, orchestration, and deterministic execution
Recent architectures diverge sharply on where query intelligence should reside. Multi-agent Text-to-SQL systems distribute it across specialized agents. The spatial Text-to-SQL framework defines an Entity Extraction Agent, Metadata Retrieval Agent, Query Logic Agent, SQL Generation Agent, and Review Agent; orchestration governs workflow and security, the knowledge base stores schema profiling and semantically enriched narratives, and the Review Agent performs logic checking, sandboxed dry runs, programmatic parsing, and repairs such as AddColumn or CRS/type correction (Kazazi et al., 23 Oct 2025). The AI Search Paradigm generalizes this decomposition into Master, Planner, Executor, and Writer agents, with the Planner building a DAG of atomic subtasks and the Executor handling retries, fallbacks, and tool sequencing through MCP servers (Li et al., 20 Jun 2025).
A different line of work centralizes control in a single supervisor. The multimodal framework “One Supervisor, Many Modalities” encodes each query as a structured state object, uses RouteLLM for text-only routing and SLM-assisted modality decomposition for non-text paths, and dispatches to tools such as YOLO, OCR, Whisper, and PDF parsers while maintaining memory layers for short-term, relevant, modality-specific, and compressed context (Bishwas, 12 Mar 2026). On 2,847 queries across 15 task categories, this Supervisor reduced time-to-accurate-answer by 72%, conversational rework by 85%, and cost by 67% relative to a matched hierarchical baseline while maintaining accuracy parity (Bishwas, 12 Mar 2026).
Public-sector and enterprise systems often reject opaque orchestration in favor of bounded execution. The transportation-safety framework compiles validated semantic frames into a typed DAG of spatial operations and then into PostGIS primitives such as ST_Buffer, ST_Intersects, and ST_DWithin, yielding deterministic execution against an authoritative database (Azhdari et al., 20 May 2026). RUBICON makes the same design choice at the enterprise level: wrappers enforce access control, schema alignment, result normalization, rate limits, pagination, and error semantics, while AQL plans remain explicit and auditable. On the paper’s seven multi-source benchmark queries, RUBICON achieved 100% accuracy, whereas vanilla LLMs and ReAct agents achieved 0% because of missing-source and incomplete-join failures (Wenz et al., 23 Apr 2026).
| System | Intermediate representation | Execution boundary |
|---|---|---|
| Spatial Text-to-SQL | JSON payloads and logical plans | SQL generation plus review/repair |
| AI Search Paradigm | DAG of atomic subtasks | MCP tools with Master oversight |
| Supervisor multimodal framework | Structured state object and execution graph | Tool routing with local repair |
| Transportation safety framework | Validated semantic frame and typed DAG | Deterministic PostGIS |
| RUBICON | AQL blocks and compiled query plans | Wrapper-mediated governed sources |
The common architectural move is the insertion of an intermediate representation between language and execution. What differs is whether that representation is optimized for tool flexibility, governance, or strict reproducibility.
4. Retrieval, ranking, and answer production
AI queries are not limited to generating executable plans; they also define the ranking machinery by which candidate answers are retrieved and fused. Needle and NeedleDB convert complex natural-language image queries into image-to-image retrieval by synthesizing guide images from the query, embedding them with multiple vision models, running approximate nearest-neighbor search, filtering anomalous guides with Local Outlier Factor, and aggregating results with weighted reciprocal-rank fusion grounded in a Monte Carlo estimator with exponential concentration in the number of guide images and embedders (Erfanian et al., 2024, Erfanian et al., 29 Mar 2026). NeedleDB reports Mean Average Precision improvements “up to 93% over the strongest baseline” on hard queries, and its Fast pipeline achieves 0.203 s end-to-end latency on LVIS 100K images (Erfanian et al., 29 Mar 2026).
For relational data, semantic retrieval often relies on embeddings plus post hoc interpretability. AI-DB embeds relational values, column names, and primary keys with db2Vec, exposes semantic SQL functions such as AI_SIMILARITY, and explains ranked results through global column-level scores and local token co-occurrence statistics stored in a probabilistic Count-Min Sketch serialized in CSR form (Kudva et al., 2023). The probabilistic approach yields the same interpretability quality as precise counting while providing up to 8X space savings (Kudva et al., 2023).
Aggregate query answering introduces another retrieval regime: approximation with explanation. Aggregate Lineage constructs a small summary by weighted random sampling with replacement, estimates SUM queries with an unbiased estimator, and provides tuple- and group-level contributions as provenance-like explanations for why a large sum occurs. Its size parameter depends on , , and the number of target queries through , and is practically independent of the original dataset size (Afrati et al., 2013).
These systems share a structural property: ranking is rarely a single similarity score. It is typically coupled with fusion, filtering, sketch-based summarization, or provenance computation so that answer production remains both computationally tractable and inspectable.
5. Evaluation regimes and performance trade-offs
Evaluation of AI queries is usually framed as a trade-off among accuracy, sensitivity, precision, diversity, latency, cost, and reviewability. In pharmacovigilance, SafeTerm’s threshold sweep over 110 Tier-1 SMQs makes the trade-off explicit: at , mean recall is approximately 0 and mean precision approximately 1; at 2, mean precision reaches 3 but mean recall falls to 4; and when the threshold is chosen per SMQ to maximize F1, the mean optimum occurs around 5, yielding Precision 6, Recall 7, and F1 8 (Vandenhende et al., 8 Dec 2025). In spatial Text-to-SQL, the critical trade-off is between one-shot generation and validated execution: the Review Agent raises KaggleDBQA accuracy from 68.7% to 81.2% and SpatialQueryQA accuracy from 76.7% to 87.7%, with the largest gain on advanced spatial tasks, from 66.7% to 80.0% (Kazazi et al., 23 Oct 2025).
The same pattern appears in other domains. MASQRAD defines accuracy as the fraction of visualization queries without discrepancies in the selected Vi(E)va layers and reports 87% accuracy on 500 NVBench/NL4DV-subset queries, compared with 43–50% for several strong NL2VIS baselines (Rahman et al., 17 Feb 2025). In the schema-grounded transportation-safety framework, all 80 evaluation queries executed successfully, and the Validation and Repair Layer corrected 23 of 80 queries, or 29%, before compilation (Azhdari et al., 20 May 2026). AgriLLM reports strong aggregate text-generation metrics but notable variation by query type: for flan-t5-base, Fertilizer Use queries achieved BLEU 9 and Government Scheme queries BLEU $0.555$0, reflecting different levels of grounding difficulty (Didwania et al., 2024).
| System | Benchmark or task | Reported outcome |
|---|---|---|
| SafeTerm AMQ | 110 Tier-1 SMQs | Auto-threshold $0.555$1: Precision $0.555$2, Recall $0.555$3, F1 $0.555$4 |
| Spatial Text-to-SQL | SpatialQueryQA | 87.7% with review vs 76.7% without review |
| MASQRAD | 500 NL2VIS queries | 87% accuracy |
| AgriLLM flan-t5-base | Tamil Nadu KCC test set | BLEU 0.555; ROUGE-1 0.724; BERTScore F1 0.837 |
| Supervisor multimodal framework | 2,847 multimodal queries | 72% TTA reduction; 85% rework reduction; 67% cost reduction |
What these evaluations make clear is that AI query systems are rarely optimized for a single scalar objective. Their operating points are chosen according to whether recall, semantic alignment, determinism, or execution safety is the dominant requirement.
6. Fairness, privacy, and societal implications
A substantial recent literature treats AI queries themselves as objects of governance. Fact-or-Fair formalizes a tension between factuality and fairness: objective queries should reproduce true demographic distributions, whereas subjective person-level queries should avoid applying group-level priors to individuals. It defines factuality as accuracy over categorical choices, fairness through an entropy term and a KL-based alignment term, and proves an upper bound on maximum achievable normalized entropy as a function of accuracy for $0.555$5-way choices (Huang et al., 9 Feb 2025). This makes query design a normative choice, not merely a prompt-engineering choice.
Robustness to misleading query framing remains limited even in reasoning models. On presupposition-laden queries spanning health, science, and general knowledge, reasoning models improve overall factual accuracy by about 2–11% relative to non-reasoning variants, yet still fail to challenge 26–42% of false presuppositions overall; at the strongest presupposition level, 37–70% of false claims go unchallenged (Sathyanathan et al., 4 May 2026). In mental-health support, linguistic analysis over 24,114 posts and 138,758 community responses shows that AI responses are more verbose, readable, analytically structured, formal, empathetic, and polite than human responses, but substantially less diverse and less narrative, with an absence of back-and-forth clarification (Saha et al., 12 Apr 2025).
Privacy and market structure introduce further constraints. ProxyGPT uses volunteer browser proxies, Tor, end-to-end encryption, TLSNotary-based integrity audits, and Chaum blind-signature e-cash so that users can query identity-restricted chatbots without binding their own email or phone number to the conversation; the prototype reports a mean total wait time of 15.41 s per request and audit times around 100–130 s (Pham et al., 2024). At web scale, AI search reshapes exposure itself: Google AI Overviews expanded from 7 countries in 2024 to 229 in 2025, Covid-query exposure rose from 1% to 66%, and AI search showed lower response variety, significantly fewer long-tail sources, and significantly more low-credibility and right- and center-leaning sources than traditional search (Aral et al., 13 Feb 2026).
Taken together, these results indicate that AI queries are inseparable from policy questions about accountability, neutrality, anonymity, and information-market concentration. The technical literature increasingly treats validation layers, provenance, transparency reports, and bounded execution not as optional additions but as constitutive parts of the query system itself.