lmql-constraints

Community

Type-safe LLM generation with LMQL.

AuthorHermeticOrmus
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill enables the creation of LLM outputs that are guaranteed to conform to specific grammatical structures, logical conditions, and type constraints, ensuring reliable and predictable AI-generated content.

Core Features & Use Cases

  • Constrained Decoding: Enforces grammar and logic on LLM outputs.
  • Type-Safe Prompting: Integrates with Python type hints and Pydantic models for structured data generation.
  • Use Case: Generate JSON objects from an LLM that strictly adhere to a predefined schema, or ensure a generated summary is exactly three sentences long.

Quick Start

Use the lmql-constraints skill to generate a JSON object with 'name', 'age', and 'city' fields, ensuring the age is a valid integer.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: lmql-constraints
Download link: https://github.com/HermeticOrmus/hermetic-claude/archive/main.zip#lmql-constraints

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.