Cortex AISQL: A Production SQL Engine for Unstructured Data
Paweł LiskowskiBHBenjamin HanParitosh AggarwalBowei ChenBoxin JiangNitish JindalZLZihan LiAaron LinKyle SchmausJay TayadeWeicheng Zhao
Anupam Datta +2 Paweł Liskowski
BHBenjamin Han
Paritosh Aggarwal
Bowei Chen
Boxin Jiang
Nitish Jindal
ZLZihan Li
Aaron Lin
Kyle Schmaus
Jay Tayade
Weicheng Zhao

Anupam Datta
+14
Cortex AISQL is a production SQL engine that integrates native semantic operations into SQL, enabling declarative queries over both structured and unstructured data. It addresses the high cost and unknown selectivity of AI operations through three techniques: AI-aware query optimization treats inference cost as a first-class objective, yielding 2–8× speedups; adaptive model cascades route most rows through a fast proxy model, escalating uncertain cases to a powerful oracle model for 2–6× speedups while maintaining 90–95% of oracle quality; and semantic join query rewriting reduces quadratic join complexity to linear via multi-label classification, achieving 15–70× speedups.

arXiv ·
· November 10, 2025