# Quail

An execution engine that runs SQL extended with natural-language operators, so a query can ask a language model to evaluate a condition on every row instead of filtering only on structured columns.

Quail, short for Query Aware Inference Layer, is an open-source execution engine for AI-SQL, developed at a university data lab. AI-SQL is SQL extended with operators that let a query express row-level logic in natural language for a language model to evaluate, for example filtering reviews by whether each one discusses a particular topic.

It supports two existing AI-SQL dialects, Snowflake's AI_FILTER and BigQuery's AI.IF, as well as its own Python builder API, and currently implements AI-powered filters, joins and existence checks, with classification, extraction and mapping operators planned. An optional server component runs on the machine holding the GPU, accepts submitted queries that keep running after the client disconnects, and lets a client fetch the saved result later.

It requires Python 3.12 and a CUDA GPU, and supports a small, growing list of models and GPU types.

Website: https://fsdatalab.github.io/quail
