awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
microsoft avatar

microsoft/guidance

0
View on GitHub↗
21,502 stars·1,170 forks·Jupyter Notebook·MIT·40 views

Guidance

Guidance is a control framework and generation orchestrator for large language models. It provides a programming layer to steer model outputs through structured templates, schema enforcement, and logical flow management.

The framework distinguishes itself by interleaving model generation with local code execution, enabling the use of loops and conditional branching within a single session. It employs grammar-based token constraints and regular expressions to force models to sample only from tokens that satisfy a specific structural format, ensuring strict adherence to predefined data models.

The project further optimizes performance by injecting known tokens directly into the output stream to bypass unnecessary model computation. It also includes a mock execution layer for debugging generation logic and validating prompts without calling external APIs.

Features

  • Interleaved Logic Execution - Allows interleaving of model generation with local code execution for complex loops and conditional branching.
  • Output Constraint Engines - Enforces structured output formats like JSON or specific grammars during model inference.
  • Generation Flow Orchestrators - Coordinates complex sequences of model calls and conditional logic to manage generation workflows.
  • Schema Enforcement Layers - Provides layers that force model outputs to strictly adhere to specific JSON schemas during generation.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI
  • Prompt Templates - Combines static text and dynamic variables into structured templates for language model prompts.
  • Schema Enforcement Tools - Ensures language model responses strictly adhere to specific data formats and structural schemas.
  • Structured Output Enforcements - Ensures generated data strictly follows predefined schemas or formats for reliable machine parsing.
  • Grammar-Constrained Samplers - Implements mechanisms that restrict token sampling based on formal grammars to enforce structured output.
  • LLM Development Frameworks - Provides a programming layer to constrain and steer LLM outputs through structured templates and logical flow.
  • Schema-Enforced Output Parsers - Constrains model responses using regular expressions and grammars to prevent hallucinations in structured fields.
  • Generator-Based Flow Control - Interleaves model generation with logic like conditionals and loops to steer execution paths.
  • LLM Reasoning Workflows - Orchestrates complex sequences of model calls integrated with logic, loops, and conditionals.
  • Custom Generation Functions - Provides the ability to create reusable functions that build complex, consistent structural outputs with the model.
  • Prompt Debugging Utilities - Enables validating generation logic and refining prompts locally with mock models before deploying to APIs.
  • Generation Speed Optimizers - Improves generation speed by inserting known tokens directly into the output stream to reduce GPU passes.
  • In-Stream Token Injections - Implements performance gains by injecting known tokens into the output stream to reduce GPU compute and latency.
  • Inference Compute Optimizations - Reduces GPU costs and latency by inserting known tokens to bypass unnecessary model computation.
  • Token Stream Injections - Optimizes performance by injecting known tokens directly into the output stream to bypass redundant model computation.
  • Generation Logic Simulation - Provides a utility to validate candidate strings and test execution flows locally using a mock model.
  • API Mocking - Provides a mock execution layer to simulate model responses for testing generation logic without API calls.
  • Application Development - Library for interleaving generation, prompting, and logical control.
  • Large Language Models - Control language model output with structured prompts.
  • Large Language Models (LLMs) - Listed in the “Large Language Models (LLMs)” section of the The Incredible Pytorch awesome list.
  • Star history

    Star history chart for microsoft/guidanceStar history chart for microsoft/guidance

    How this analysis was created: This summary and feature list are AI-generated from collected project material and can contain mistakes. Stars, license and language are imported from GitHub. Inclusion does not mean that we have tested or audited this project. Check the source documentation for any feature you depend on. Learn more on our About page.

    Frequently asked questions

    What does microsoft/guidance do?

    Guidance is a control framework and generation orchestrator for large language models. It provides a programming layer to steer model outputs through structured templates, schema enforcement, and logical flow management.

    What are the main features of microsoft/guidance?

    The main features of microsoft/guidance are: Interleaved Logic Execution, Output Constraint Engines, Generation Flow Orchestrators, Schema Enforcement Layers, Prompt Templates, Schema Enforcement Tools, Structured Output Enforcements, Grammar-Constrained Samplers.

    Which projects share features with microsoft/guidance?

    Projects with overlapping indexed features include: guidance-ai/guidance — Guidance is a generative AI orchestration framework designed to manage complex interactions with language models by… microsoft/poml — Poml is a prompt management framework and templating engine designed for authoring, versioning, and rendering… normal-computing/outlines — Outlines is a guided generation framework designed to enforce structural constraints on large language model output in… dottxt-ai/outlines — Outlines is a library designed to ensure machine-readable output from generative models by applying programmatic… instructor-ai/instructor — Instructor is a schema enforcement and validation library designed to transform language model outputs into… outlines-dev/outlines — Outlines is a guided text generation framework and structured output engine for large language models. It enforces…

    Projects sharing features with Guidance

    These projects share indexed features with Guidance. Shared tags can include platform or build tooling; verify the primary use case before treating a result as a replacement.
    • guidance-ai/guidanceguidance-ai avatar

      guidance-ai/guidance

      21,502View on GitHub↗

      Guidance is a generative AI orchestration framework designed to manage complex interactions with language models by embedding programmatic control directly into the prompt generation process. It functions as a prompt programming environment that allows developers to interleave raw text with executable logic, enabling the construction of sophisticated, multi-step agentic workflows. The framework distinguishes itself through grammar-constrained token sampling and stateful stream interception, which restrict the model's output distribution based on formal language rules. By enforcing these const

      Jupyter Notebook
      View on GitHub↗21,502
    • microsoft/pomlmicrosoft avatar

      microsoft/poml

      4,853View on GitHub↗

      Poml is a prompt management framework and templating engine designed for authoring, versioning, and rendering structured prompts for large language models. It uses a semantic markup language to organize prompts into reusable templates, combining them with dynamic context and data to generate formatted inputs. The system distinguishes itself by decoupling core prompt logic from final presentation through a stylesheet-based approach. It provides a dedicated JSON schema output generator to enforce strict, machine-parsable model responses and a configuration interface for managing function tool s

      TypeScriptllmmarkup-languageprompt
      View on GitHub↗4,853
    • normal-computing/outlinesnormal-computing avatar

      normal-computing/outlines

      13,965View on GitHub↗

      Outlines is a guided generation framework designed to enforce structural constraints on large language model output in real time. It serves as a structured output generator that ensures model responses adhere to predefined JSON schemas, regular expressions, or fixed sets of choices to produce predictable and parsable results. The project provides an interface for tool calling by extracting structured function parameters from natural language prompts for programmatic execution. It also includes a prompt templating engine that decouples prompt logic from application code through reusable templa

      Python
      View on GitHub↗13,965
    • dottxt-ai/outlinesdottxt-ai avatar

      dottxt-ai/outlines

      13,446View on GitHub↗

      Outlines is a library designed to ensure machine-readable output from generative models by applying programmatic constraints during the token sampling process. It functions as a toolkit for forcing large language models to generate text that strictly adheres to JSON schemas, regular expressions, and formal grammars, enabling the integration of model responses into existing software systems. The library distinguishes itself by integrating formal language rules directly into the sampling loop. It achieves this by converting regular expressions into deterministic finite automata and utilizing lo

      Pythoncfggenerative-aijson
      View on GitHub↗13,446
    Compare all 30 related projects→