Sign up to save tools and stay up to date with the latest in AI
bg
bg

Lmql

No reviews
Lmql screenshot
Website
✨ Generated by ChatGPT

LMQL Overview

LMQL, or Language Model Query Language, is an innovative programming language designed specifically for interacting with language models. It allows users to supercharge their prompting with a range of features including constraints, a debugger, decoders, transformers, templates, retrieval, interaction, distributions, token masking, and control flow. LMQL is a project by the SRI Lab at ETH Zürich and is available in a web-based Playground IDE or can be installed via the Python package manager. It supports high-level constraints, regular Python control-flow, and even async functions, enabling users to query external web services during decoding. LMQL also supports OpenAI Chat models, including ChatGPT and GPT-4.

LMQL Highlights

  • LMQL allows users to express natural language prompts that also contain code, enabling them to steer the language model's reasoning process.
  • Users can specify high-level, logical constraints over the language model output. These constraints are automatically converted into token-level prediction masks, which can be enforced eagerly during text generation.
  • LMQL includes a Playground IDE for query development, enabling users to inspect the interpreter state, validation result, and model results at any point during generation.

All Reviews (0)