SAGE: A Unified Algebra and Self-Adaptive Execution for AI Functions in SQL

📅 2026-08-20
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
SAGE通过统一的代数框架和自适应执行策略,优化了SQL中AI函数的执行效率和质量,特别针对AI_JOIN进行了有效处理。
📝 Abstract
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.
Problem

Research questions and friction points this paper is trying to address.

AI in SQL
Relational Roles
Execution Efficiency
Unified Framework
Innovation

Methods, ideas, or system contributions that make the work stand out.

Unified Framework
Self-Adaptive Execution
Confidence-Gated Interface
AI_JOIN Optimization