Generating impossible queries

Modern databases are not designed to answer queries that rely on information not explicitly stored in their schemas. Here, we present a deep learning-based querying pipeline capable of generating “impossible queries”, those requiring inference over latent relationships, contextual understanding, and multimodal reasoning. Our system integrates Gemini 1.5 Pro and a fine-tuned BERT model to process complex inputs across text, image, and document modalities, enriching static records with derived features. We demonstrate that this architecture enables robust performance across basic, advanced, and integrated reasoning scenarios. Unlike conventional methods limited to explicit fields or handcrafted rules, our approach dynamically identifies subtle attributes, such as the presence of stylized imagery or implicit product features, and translates them into actionable primary key filters. We evaluate the system against state-of-the-art baselines, including CLIP, RAG, and heuristic SQL matches, achieving 99% accuracy across real-world annotated scenarios. The pipeline outperforms traditional CRUD operations in relevance, especially in multi-tenant and cloud-based environments where schema heterogeneity and data complexity are prevalent. Through experiments on Amazon product datasets, we show how our system distinguishes between nuanced cases like stylized versus real photos and infers attributes despite their absence in structured fields. These findings highlight the potential of integrating deep learning into querying frameworks to unlock latent insights and automate reasoning at scale. Our results mark a significant step toward intelligent database systems capable of reasoning beyond their schemas and responding meaningfully to real-world human intent. • Developed a deep learning-based pipeline capable of handling “impossible queries” by interpreting inferred relationships and latent attributes not directly available in database schemas. • Created a dataset that allowed better understanding and responses generation to nuanced queries. • Validated the querying pipeline’s effectiveness and robustness across various real-world scenarios, ensuring its practical utility and scalability. • Enhanced static database records with derived features through multimodal reasoning and contextual understanding, enabling the queries creation. • Demonstrated significant improvements in the performance and scalability of CRUD operations, adapting to diverse data environments including multi-tenant and cloud-based systems.

Authors

Institutions

Publication Details

Journal
Machine Learning with Applications
Published
2025-06-06
DOI
https://doi.org/10.1016/j.mlwa.2025.100677
Primary Topic
Machine Learning and Algorithms
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Generating impossible queries

Yousra Chtouki, Mehdi Nejjar, Aymane Hassini
Machine Learning with Applications
Machine Learning and Algorithms
article

Generating impossible queries

Yousra Chtouki, Mehdi Nejjar, Aymane Hassini
article en

Abstract

Modern databases are not designed to answer queries that rely on information not explicitly stored in their schemas. Here, we present a deep learning-based querying pipeline capable of generating “impossible queries”, those requiring inference over latent relationships, contextual understanding, and multimodal reasoning. Our system integrates Gemini 1.5 Pro and a fine-tuned BERT model to process complex inputs across text, image, and document modalities, enriching static records with derived features. We demonstrate that this architecture enables robust performance across basic, advanced, and integrated reasoning scenarios. Unlike conventional methods limited to explicit fields or handcrafted rules, our approach dynamically identifies subtle attributes, such as the presence of stylized imagery or implicit product features, and translates them into actionable primary key filters. We evaluate the system against state-of-the-art baselines, including CLIP, RAG, and heuristic SQL matches, achieving 99% accuracy across real-world annotated scenarios. The pipeline outperforms traditional CRUD operations in relevance, especially in multi-tenant and cloud-based environments where schema heterogeneity and data complexity are prevalent. Through experiments on Amazon product datasets, we show how our system distinguishes between nuanced cases like stylized versus real photos and infers attributes despite their absence in structured fields. These findings highlight the potential of integrating deep learning into querying frameworks to unlock latent insights and automate reasoning at scale. Our results mark a significant step toward intelligent database systems capable of reasoning beyond their schemas and responding meaningfully to real-world human intent. • Developed a deep learning-based pipeline capable of handling “impossible queries” by interpreting inferred relationships and latent attributes not directly available in database schemas. • Created a dataset that allowed better understanding and responses generation to nuanced queries. • Validated the querying pipeline’s effectiveness and robustness across various real-world scenarios, ensuring its practical utility and scalability. • Enhanced static database records with derived features through multimodal reasoning and contextual understanding, enabling the queries creation. • Demonstrated significant improvements in the performance and scalability of CRUD operations, adapting to diverse data environments including multi-tenant and cloud-based systems.

Machine Learning with ApplicationsVol. 21
Al Akhawayn University (MA)
Openalex Percentile: Top 94%
Machine Learning and Algorithms
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.