LMQL
A programming language for robust, modular LLM interaction

LMQL (Language Model Query Language) is a programming language designed for interacting with large language models. It allows developers to write prompts using Python control flow, typed variables, and hard constraints enforced at runtime. The project is created by the SRI Lab at ETH Zurich and supports multiple LLM backends.
Developers write query functions in Python-like syntax with special prompt strings, typed variables, and constraint expressions that the LMQL runtime enforces during LLM generation.
software developers and researchers working with large language models
Background.
- Status
- launched
- Business model
- open-source
- Company
- SRI Lab @ ETH Zurich
Similar projects.
Editorial take on the space this project sits in — momentum signals, adjacent moves, our call on whether the wedge is real. Get pinged when we publish a new read or when the landscape shifts.
Have a take on this space?
Tell us what you’d build differently, where you think the incumbents miss, or what we’ve gotten wrong about this project. Comments + reactions are coming soon.