Cortex AISQL: A Production SQL Engine for Unstructured Data
Pawe{\l} Liskowski, Benjamin Han, Paritosh Aggarwal, Bowei Chen, Boxin Jiang, Nitish Jindal, Zihan Li, Aaron Lin, Kyle Schmaus, Jay Tayade, Weicheng Zhao, Anupam Datta, Nathan Wiegand, Dimitris Tsirogiannis

TL;DR
Snowflake's Cortex AISQL is a production SQL engine that seamlessly integrates semantic reasoning with relational queries, optimizing for efficiency and scalability in unstructured data analysis.
Contribution
The paper introduces three novel techniques—AI-aware query optimization, adaptive model cascades, and semantic join rewriting—that significantly improve performance of semantic operations in production.
Findings
Achieves 2-8× speedups through AI-aware query optimization.
Reduces inference costs by 2-6× with adaptive model cascades.
Speeds up join operations by 15-70× via reformulation as classification.
Abstract
Snowflake's Cortex AISQL is a production SQL engine that integrates native semantic operations directly into SQL. This integration allows users to write declarative queries that combine relational operations with semantic reasoning, enabling them to query both structured and unstructured data effortlessly. However, making semantic operations efficient at production scale poses fundamental challenges. Semantic operations are more expensive than traditional SQL operations, possess distinct latency and throughput characteristics, and their cost and selectivity are unknown during query compilation. Furthermore, existing query engines are not designed to optimize semantic operations. The AISQL query execution engine addresses these challenges through three novel techniques informed by production deployment data from Snowflake customers. First, AI-aware query optimization treats AI inference…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
