SAGE: A Unified Algebra and Self-Adaptive Execution for AI Functions in SQL
Not on the map. Why?
Abstract (arXiv)
SQL systems increasingly expose AI functions for tasks such as classification, extraction, filtering, ranking, retrieval, joining, and summarization. Despite their diverse APIs, these functions play only three relational roles: transforming individual rows, aggregating groups, or generating relationships between row pairs. We present SAGE (Self-Adaptive Generative Execution), a unified logical and physical framework that captures these roles with three typed primitives, AI_SCALAR, AI_AGG, and AI_JOIN, and composes them naturally with standard relational operators. All primitives share a confidence-gated execution interface while supporting physical strategies tailored to their relational shape. The main challenge is AI_JOIN, where SAGE analyzes the predicate, decomposes compound conditions when possible, and uses a recipe card together with a small label-free probe to select among complete execution strategies. Across a broad audit of public AI operators and evaluations spanning scalar, aggregate, and join workloads, this formulation covers common AI functionality while consistently improving execution quality and efficiency. SAGE achieves the strongest overall SemBench performance and, on a representative factorable join, reduces pairwise model calls by more than two orders of magnitude, yielding a 358-fold measured cost reduction.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 22 of its 39 references that are in the map. First posted on arXiv 21 Aug 2026.
Builds on
22 of 39 references.
References · 22
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,442
- 2025gpt-oss-120b & gpt-oss-20b Model Cardcited by 1,386
- 2023FrugalGPT: How to Use Large Language Models While Reducing Cost and Improving Performancecited by 853
- 2024RouteLLM: Learning to Route LLMs with Preference Datacited by 682
- 2020Fact or Fiction: Verifying Scientific Claimscited by 554
- 2018FewRel: A Large-Scale Supervised Few-Shot Relation Classification Dataset with State-of-the-Art Evaluationcited by 254
- 2024BRIGHT: A Realistic and Challenging Benchmark for Reasoning-Intensive Retrievalcited by 158
- 2023Shifting Attention to Relevance: Towards the Predictive Uncertainty Quantification of Free-Form Large Language Modelscited by 150
- 2020Multi-XScience: A Large-scale Dataset for Extreme Multi-document Summarization of Scientific Articlescited by 97
- 2024DocETL: Agentic Query Rewriting and Evaluation for Complex Document Processingcited by 52
- 2020X-Stance: A Multilingual Multi-Target Dataset for Stance Detectioncited by 43
- 2024A Declarative System for Optimizing AI Workloadscited by 37
10 more
- 2024Semantic Operators: A Declarative Model for Rich, AI-based Data Processingcited by 34
- 2024UQE: A Query Engine for Unstructured Databasescited by 21
- 2025Beyond Quacking: Deep Integration of Language Models and RAG into DuckDBcited by 15
- 2025GLiClass: Generalist Lightweight Model for Sequence Classification Taskscited by 15
- 2023SUQL: Conversational Search over Structured and Unstructured Data with Large Language Modelscited by 13
- 2025GLiREL -- Generalist Model for Zero-Shot Relation Extractioncited by 12
- 2024Towards Accurate and Efficient Document Analytics with Large Language Modelscited by 11
- 2025SemBench: A Benchmark for Semantic Query Processing Enginescited by 9
- 2025Featurized-Decomposition Join: Low-Cost Semantic Joins with Guaranteescited by 5
- 2026Sema: A High-performance System for LLM-based Semantic Query Processingcited by 3
Built on by
Not cited yet.