GH Repository · eth-sri
lmql
A language for constraint-guided and efficient LLM programming.
- stars
- 4,218
- 30-day movement
- +21/day
- Related entries
- 60
- Connections
- 1
pythonnodenixnode/yarnotherprogramming-languagePythonlanguage-modelhuggingfacechatgpt
LMQL is a programming language for constraint-guided and efficient LLM programming, developed by ETH Zurich's SRI lab. It lets you write queries against language models from providers like ChatGPT and Hugging Face with declarative constraints.
Reach for it when you want to constrain and structure LLM outputs using a dedicated query language rather than ad-hoc prompting code.
Use it to
- Write constraint-guided LLM queries
- Query ChatGPT models programmatically
- Query Hugging Face language models
- Add output constraints to model calls
- Explore the LMQL language source
For Developers programming language models with constraints
- Role
- other
- Language
- Python
- Licence
- Apache-2.0
- Forks
- 220
- Open issues
- 117
- Last push
- 2025-05-22
- Latest release
- v0.0.6.5 · 2023-07-14
topicslanguage-modelprogramming-languagechatgpthuggingfaceconstraintsquery-language