#generative-ai #sql #component-model #artificial-intelligence #query #model-serving #portions

spnl

A Span Query is a declarative way to specify which portions of a generative AI (GenAI) program should be run directly on model serving components

14 unstable releases (3 breaking)

Uses new Rust 2024

new 0.15.0 Feb 10, 2026
0.14.3 Feb 4, 2026
0.13.9 Jan 29, 2026
0.12.9 Jan 20, 2026

#811 in Machine learning

Apache-2.0

470KB
10K SLoC

Span Queries

What if we had a way to plan and optimize GenAI like we do for SQL?

A Span Query is a declarative way to specify which portions of a generative AI (GenAI) program should be run directly on model serving components. As with SQL, this declarative structure is safe to run on the backend and provides a clean starting point for optimization. Also like SQL, some GenAI programs will be entirely expressible as queries, though most will be expressed as the programmatic interludes around the declarative queries.

Dependencies

~2–100MB
~1.5M SLoC