awesome-repositories.com
博客
MCP
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目关于排名机制媒体报道MCP 服务器
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
microsoft avatar

microsoft/guidance

0
View on GitHub↗
21,502 星标·1,170 分支·Jupyter Notebook·MIT·13 次浏览

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.
  • 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 历史

microsoft/guidance 的 Star 历史图表microsoft/guidance 的 Star 历史图表

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI

Guidance 的开源替代方案

相似的开源项目,按与 Guidance 的功能重合度排序。
  • guidance-ai/guidanceguidance-ai 的头像

    guidance-ai/guidance

    21,502在 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
    在 GitHub 上查看↗21,502
  • microsoft/pomlmicrosoft 的头像

    microsoft/poml

    4,853在 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
    在 GitHub 上查看↗4,853
  • normal-computing/outlinesnormal-computing 的头像

    normal-computing/outlines

    13,965在 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
    在 GitHub 上查看↗13,965
  • dottxt-ai/outlinesdottxt-ai 的头像

    dottxt-ai/outlines

    13,446在 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
    在 GitHub 上查看↗13,446
查看 Guidance 的所有 30 个替代方案→

常见问题解答

microsoft/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.

microsoft/guidance 的主要功能有哪些?

microsoft/guidance 的主要功能包括:Interleaved Logic Execution, Output Constraint Engines, Generation Flow Orchestrators, Schema Enforcement Layers, Prompt Templates, Schema Enforcement Tools, Structured Output Enforcements, Grammar-Constrained Samplers。

microsoft/guidance 有哪些开源替代品?

microsoft/guidance 的开源替代品包括: 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…