toolspool
Lmql logo

Lmql

verifiedFreelmql.ai

Open-source programming language for LLMs that adds types, templates, constraints and an optimizing runtime to prompting.

What it does

LMQL is a programming language for LLM interaction from ETH Zurich's SRI Lab. It combines Python control flow with prompt templates, typed variables and hard constraints, and runs the same code portably across multiple model backends.

Core features

Constraint-based, typed prompting
Python control flow and string interpolation
Nested/modular queries
Portable across llama.cpp, OpenAI, Transformers
Tool augmentation and chatbots

Best for

Enforce output format and constraints on LLM responses
Build reusable, modular prompts
Write model-portable LLM programs