Introduction
Quail (QUery Aware Inference Layer) is an open-source, extensible execution engine for AI-SQL, being developed at Full Stack Data Lab at CMU.
AI-SQL is a variant of SQL with operators that let you write logic in natural language for an LLM to evaluate on every row:
SELECT r.id
FROM reviews r
WHERE AI.IF(PROMPT('Does this review discuss the ending?\n\n{0}', r.body))Quail currently supports AI-powered filters, joins, and
EXISTS / NOT EXISTS. We are actively extending Quail with
more operators.
Quail supports two AI-SQL dialects (Snowflake and BigQuery) and a Python builder API.
Requirements
- Python 3.12
- Qwen3 4B fp8, Qwen3 32B fp8, or DiffusionGemma 26B-A4B fp8 (all models)
- One CUDA GPU per model copy (local, or on Modal)
Get started
Install quail-engine from PyPI:
uv pip install quail-engine