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
- Yousra Chtouki (ORCID: https://orcid.org/0000-0002-1569-4768)
- Mehdi Nejjar
- Aymane Hassini
Institutions
- Al Akhawayn University (MA)
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