NeFut Logo NeFut
Admin Login

[CS.AI] SAGE: A Unified Algebra and Self-Adaptive Execution for AI Functions in SQL

Published at: 2026-08-24 22:00 Last updated: 2026-08-29 12:04
#AI #Machine Learning #optimization

SQL systems are increasingly exposing AI capabilities such as classification, extraction, filtering, ranking, retrieval, joining, and summarization. Despite diverse APIs, these functions essentially play only three relational roles: transforming individual rows, aggregating groups, or generating relationships between row pairs. SAGE (Self‑Adaptive Generative Execution) introduces 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 lies in AI_JOIN: SAGE analyzes the join predicate, decomposes compound conditions when possible, and uses a “recipe card” together with a small label‑free probe to automatically select the optimal strategy from a complete set of execution plans. We conduct a broad audit over public AI operator libraries and benchmark suites covering scalar, aggregate, and join workloads, confirming that this formulation covers common AI functionality while consistently improving execution quality and efficiency. Experiments show SAGE achieves the strongest overall performance on the SemBench benchmark, and on a representative factorable join it reduces pairwise model calls by more than two orders of magnitude, yielding a measured 358‑fold cost reduction.

Blogger's Review: SAGE provides a clear and efficient path for integrating AI functions into SQL through its unified abstraction and self‑adaptive execution, with particularly impressive gains in cutting down model invocation costs.

Original Source: https://arxiv.org/abs/2608.20630

[h] Back to Home