Ross ROSS = Recommend OSS · open-source software intelligence for agents

eth-sri/lmql

A language for constraint-guided and efficient LLM programming. observed · 2026-08-28

github.com/eth-sri/lmql · homepage · Python · Apache-2.0 (permissive) observed · 2026-08-28

Health v2 · maintenance only

32/100

  • Activity 22
  • Release rhythm 8
  • Longevity 98
How is this computed?

round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.

  • gap_med: n/a
  • age_days: 1378
  • days_rel: n/a
  • days_push: 468
  • n_releases_24m: 0

Full methodology

Adoption not part of the score

4208 stars · 221 forks observed · 2026-08-28

What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded

LMQL is a query/programming language for large language models, implemented as a Python-based superset that lets developers interleave prompts, control flow, and constraints in normal code. It supports multiple inference backends (OpenAI, HuggingFace Transformers, llama.cpp) with an optimizing runtime that enforces constraints during generation.

Use cases

  • write llm programs with constraints on generated output
  • constrain llm responses to a format or length
  • build multi-step prompting pipelines with control flow
  • run the same prompt code across openai and local models
  • serve a local huggingface or llama.cpp model for prompting
  • modularize reusable prompt components with nested queries

When to choose

  • you need token-level constraints or typed outputs from an llm
  • you want portable prompt programs across multiple model backends
  • you prefer declarative prompting embedded in python code

When to avoid

  • you only need simple one-off api calls to a chat model
  • you rely heavily on chat-only apis with limited constraint support
  • you need a production framework with agents and tooling beyond prompting

Facets

library · maturity active

programming-language llm-inference prompt-engineering sdk cli large-language-models programming-languages artificial-intelligence developer-tools python cli cross-platform dsl constrained-decoding llm-prompting llama-cpp openai huggingface-transformers query-language natural-language-processing gpu

7 sources

Member repositories

RepositoryRoleHealth v2
eth-sri/lmqlmain32

For agents

markdown · JSON · MCP: product_card(name="eth-sri/lmql")

Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem