aiqbench analysis
This research introduces FlockMTL, a database extension that natively integrates Large Language Models and Retrieval-Augmented Generation (RAG) into SQL workflows. By treating prompts and models as first-class schema objects alongside tables, the system enables efficient, cost-optimized analytical pipelines without requiring external orchestration. This advancement addresses critical bottlenecks in managing data movement and context within knowledge-intensive applications, bridging the gap between relational databases and generative AI.
Beyond Quacking: Deep Integration of Language Models and RAG into DuckDB
arXiv:2504.01157v1 Announce Type: cross Abstract: Knowledge-intensive analytical applications retrieve context from both structured tabular data and unstructured, text-free documents for effective decision-making. Large language models (LLMs) have made it significantly easier to prototype such retrieval and reasoning data pipelines. However, implementing these pipelines efficiently still demands significant effort and has several challenges. This often involves orchestrating heterogeneous data systems, managing data movement, and handling low-level implementation details, e.g., LLM context management. To address these challenges, we introduce FlockMTL: an extension for DBMSs that deeply integrates LLM capabilities and retrieval-augmented generation (RAG). FlockMTL includes model-driven scalar and aggregate functions, enabling chained predictions through tuple-level mappings and reductions. Drawing inspiration from the relational model, FlockMTL incorporates: (i) cost-based optimizations, which seamlessly apply techniques such as batching and caching; and (ii) resource independence, enabled through novel SQL DDL abstractions: PROMPT and MODEL, introduced as first-class schema objects alongside TABLE. FlockMTL streamlines the development of knowledge-intensive analytical applications, and its optimizations ease the implementation burden.
Abstract:Knowledge-intensive analytical applications retrieve context from both structured tabular data and unstructured, text-free documents for effective decision-making. Large language models (LLMs) have made it significantly easier to prototype such retrieval and reasoning data pipelines. However, implementing these pipelines efficiently still demands significant effort and has several challenges. This often involves orchestrating heterogeneous data systems, managing data movement, and handling low-level implementation details, e.g., LLM context management. To address these challenges, we introduce FlockMTL: an extension for DBMSs that deeply integrates LLM capabilities and retrieval-augmented generation (RAG). FlockMTL includes model-driven scalar and aggregate functions, enabling chained predictions through tuple-level mappings and reductions. Drawing inspiration from the relational model, FlockMTL incorporates: (i) cost-based optimizations, which seamlessly apply techniques such as batching and caching; and (ii) resource independence, enabled through novel SQL DDL abstractions: PROMPT and MODEL, introduced as first-class schema objects alongside TABLE. FlockMTL streamlines the development of knowledge-intensive analytical applications, and its optimizations ease the implementation burden.
Databases (cs.DB); Artificial Intelligence (cs.AI); Information Retrieval (cs.IR)
arXiv:2504.01157 [cs.DB]
(or arXiv:2504.01157v1 [cs.DB] for this version)
https://doi.org/10.48550/arXiv.2504.01157 Focus to learn more arXiv-issued DOI via DataCite
https://doi.org/10.14778/3750601.3750685 Focus to learn more DOI(s) linking to related resources
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.
Full text under the publisher's open licence · 263 words
Related coverage

NVIDIA GTC Taipei at COMPUTEX: Live Updates on What’s Next in AI
NVIDIA · May 21, 2026

News
Quantum Computing Report · Jul 25, 2026

What can language models teach us about understanding?
LessWrong · Oct 9, 2026

Artmarket.com: H1 2026 Financial Report -- One-of-a - Kind AI Systems Intuitive Artmarket and Blind Spot Will Drive the Next Phase of Growth for
australiannews.net · Sep 29, 2026