# microsoft/poml

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/microsoft-poml).**

4,853 stars · 248 forks · TypeScript · mit

## Links

- GitHub: https://github.com/microsoft/poml
- Homepage: https://microsoft.github.io/poml/
- awesome-repositories: https://awesome-repositories.com/repository/microsoft-poml.md

## Topics

`llm` `markup-language` `prompt` `vscode-extension`

## Description

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 schemas and the exchange of requests and responses between prompts and models.

The project covers a broad surface of prompt engineering capabilities, including modular composition, conditional rendering, and data iteration. It includes tools for data acquisition from external documents and webpages, as well as observability features for logging execution and capturing prompt snapshots. Developer tooling is provided via an SDK and IDE integrations that support real-time syntax validation and live render previews.

## Tags

### Artificial Intelligence & ML

- [Prompt Templates](https://awesome-repositories.com/f/artificial-intelligence-ml/prompt-templates.md) — Provides a system for defining reusable prompt structures using a semantic markup language. ([source](https://microsoft.github.io/poml/stable/language/basic/))
- [Structured Prompting Tools](https://awesome-repositories.com/f/artificial-intelligence-ml/structured-prompting-tools.md) — Provides a framework for designing complex LLM inputs using modular templates, variables, and conditional logic.
- [Step-wise Task Specifications](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/agent-capabilities-skills-tooling/ai-agent-capabilities/dynamic-agent-switching/task-specific-prompting-strategies/step-wise-task-specifications.md) — Defines the primary action or directive the model must perform, including concrete completion steps. ([source](https://microsoft.github.io/poml/stable/python/reference/prompt/))
- [Prompt Persona Definitions](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/integration-deployment/agent-frameworks/configuration-and-specifications/agent-persona-definitions/persona-assignments/prompt-persona-definitions.md) — Assigns a specific role or perspective for the model to assume to influence tone and context. ([source](https://microsoft.github.io/poml/stable/python/reference/prompt/))
- [Persona and Behavioral Instructions](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-prompt-engineering-templates/automated-prompt-generation/persona-and-behavioral-instructions.md) — Defines the model's persona, specific tasks, and stepwise instructions to direct the response. ([source](https://microsoft.github.io/poml/stable/language/components/))
- [LLM Tooling Integrations](https://awesome-repositories.com/f/artificial-intelligence-ml/artificial-intelligence-tooling/language-model-integrations/llm-tooling-integrations.md) — Provides a configuration interface to define function schemas and manage requests and responses between models and external tools.
- [LLM Tool Definitions](https://awesome-repositories.com/f/artificial-intelligence-ml/llm-tool-definitions.md) — Provides tools for creating and exposing functional API schemas for discovery and execution by language models.
- [Model Output Formatting](https://awesome-repositories.com/f/artificial-intelligence-ml/model-output-formatting.md) — Defines schemas for generated output to ensure the model returns data in a predictable and parsable format. ([source](https://microsoft.github.io/poml/stable/language/meta/))
- [Schema Enforcement Layers](https://awesome-repositories.com/f/artificial-intelligence-ml/model-response-parsers/schema-enforcement-layers.md) — Provides mechanisms to force model outputs to adhere to strict JSON schemas for predictable, machine-parsable responses.
- [Modular AI Components](https://awesome-repositories.com/f/artificial-intelligence-ml/modular-ai-components.md) — Organizes prompts into reusable, swappable building blocks that can be composed from separate files.
- [Conversational Message Schemas](https://awesome-repositories.com/f/artificial-intelligence-ml/natural-language-interfaces/conversational-dialogue-systems/conversational-message-schemas.md) — Organizes exchanges between system, human, and AI participants using standardized message schemas. ([source](https://microsoft.github.io/poml/stable/typescript/reference/components/))
- [Prompt Templates](https://awesome-repositories.com/f/artificial-intelligence-ml/prompt-elements/prompt-component-cascading/prompt-templates.md) — Creates structured, reusable prompt building blocks that can be referenced across different templates. ([source](https://microsoft.github.io/poml/stable/typescript/reference/base/))
- [Integration SDKs](https://awesome-repositories.com/f/artificial-intelligence-ml/prompt-engineering/integration-sdks.md) — Ships a set of libraries for integrating structured prompt logic and rendering workflows across multiple programming languages.
- [Markup Parsing](https://awesome-repositories.com/f/artificial-intelligence-ml/prompt-engineering/markup-parsing.md) — Converts structured prompt markup into rich content or speaker messages for language models. ([source](https://microsoft.github.io/poml/stable/typescript/reference/))
- [Prompt Management Workflows](https://awesome-repositories.com/f/artificial-intelligence-ml/prompt-engineering/prompt-management-workflows.md) — Implements a development workflow for authoring, testing, and managing structured prompt templates within a code editor.
- [Output Formatting Constraints](https://awesome-repositories.com/f/artificial-intelligence-ml/prompt-engineering/structural-formatting-frameworks/output-formatting-constraints.md) — Dictates the specific structural format for the response, such as JSON, XML, or CSV. ([source](https://microsoft.github.io/poml/stable/typescript/reference/components/))
- [Prompt Formatting](https://awesome-repositories.com/f/artificial-intelligence-ml/prompt-formatting.md) — Provides standardized structures and templates to produce chat messages or plain text strings compatible with AI frameworks. ([source](https://microsoft.github.io/poml/stable/python/reference/integration/))
- [Prompt Rendering Pipelines](https://awesome-repositories.com/f/artificial-intelligence-ml/prompt-rendering-pipelines.md) — Processes markup through a pipeline of parsing, variable substitution, and serialization to produce final strings or chat messages.
- [Structural Prompt Design](https://awesome-repositories.com/f/artificial-intelligence-ml/structural-prompt-design.md) — Organizes prompt components and data into a structured markup format for consistent intermediate representation. ([source](https://microsoft.github.io/poml/0.0.8/))
- [Structured Output Enforcements](https://awesome-repositories.com/f/artificial-intelligence-ml/structured-output-enforcements.md) — Enforces data models or schemas on task outputs to ensure reliable, machine-parsable processing. ([source](https://microsoft.github.io/poml/stable/python/integration/openai/))
- [Application Integration SDKs](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/agent-orchestration-multi-agent/integration-surfaces/application-integration-sdks.md) — Provides language-specific SDKs to embed structured prompt workflows and rendering capabilities into external applications. ([source](https://microsoft.github.io/poml/))
- [Conversation Simulators](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/conversational-voice-interaction/conversational-ai-agents/conversation-simulators.md) — Models conversational exchanges between humans and AI, including tool requests and responses. ([source](https://microsoft.github.io/poml/stable/language/components/))
- [External Tool Integration](https://awesome-repositories.com/f/artificial-intelligence-ml/external-tool-integration.md) — Provides capabilities for the model to interact with external APIs and data sources dynamically at runtime. ([source](https://microsoft.github.io/poml/stable/python/integration/mcp/))
- [Function Signature Definitions](https://awesome-repositories.com/f/artificial-intelligence-ml/external-tool-integration/function-signature-definitions.md) — Defines function signatures and parameters that allow an AI model to interact with external code. ([source](https://microsoft.github.io/poml/stable/language/meta/))
- [Model Parameters](https://awesome-repositories.com/f/artificial-intelligence-ml/model-parameters.md) — Allows setting execution parameters to control the performance and reasoning characteristics of the language model. ([source](https://microsoft.github.io/poml/stable/language/meta/))
- [Community Prompt Galleries](https://awesome-repositories.com/f/artificial-intelligence-ml/prompt-elements/prompt-component-cascading/prompt-templates/community-prompt-galleries.md) — Provides a gallery for storing, editing, and organizing built-in and custom prompt templates. ([source](https://microsoft.github.io/poml/stable/vscode/features/))
- [Prompt Engineering Patterns](https://awesome-repositories.com/f/artificial-intelligence-ml/prompt-engineering-patterns.md) — Includes a browser for exploring and implementing proven prompt engineering patterns and structures. ([source](https://microsoft.github.io/poml/stable/vscode/))
- [Prompt Debugging Utilities](https://awesome-repositories.com/f/artificial-intelligence-ml/prompt-engineering/prompt-debugging-utilities.md) — Captures the final rendered prompt structure and context variables for debugging and unit testing. ([source](https://microsoft.github.io/poml/stable/python/trace/))
- [Prompt Serialization Controls](https://awesome-repositories.com/f/artificial-intelligence-ml/prompt-serialization-controls.md) — Specifies serialization modes and markup languages to customize how nested content renders in the final prompt. ([source](https://microsoft.github.io/poml/stable/deep-dive/ir/))
- [Conditional Logic](https://awesome-repositories.com/f/artificial-intelligence-ml/prompt-templates/conditional-logic.md) — Includes or excludes prompt sections based on logical conditions evaluated against the runtime context. ([source](https://microsoft.github.io/poml/stable/tutorial/expense_part1/))
- [Prompt Template Testing](https://awesome-repositories.com/f/artificial-intelligence-ml/prompt-templates/prompt-template-testing.md) — Validates reusable prompt structures by sending rendered outputs to model providers without running application code. ([source](https://microsoft.github.io/poml/stable/tutorial/expense_part2/))
- [Reasoning Steering](https://awesome-repositories.com/f/artificial-intelligence-ml/reasoning-models/reasoning-steering.md) — Inserts helpful tips and guided questions to steer the model toward the correct output. ([source](https://microsoft.github.io/poml/stable/typescript/reference/components/))
- [Tool-Calling Schemas](https://awesome-repositories.com/f/artificial-intelligence-ml/tool-calling-schemas.md) — Converts schema definitions into compatible tool declarations to enable automated function calling. ([source](https://microsoft.github.io/poml/stable/tutorial/expense_part1/))
- [Few-Shot Pattern Exemplification](https://awesome-repositories.com/f/artificial-intelligence-ml/zero-and-few-shot-learning/few-shot-pattern-exemplification.md) — Includes sample input-output pairs to demonstrate the desired structure, tone, and detail for the response. ([source](https://microsoft.github.io/poml/stable/language/components/))

### Content Management & Publishing

- [Data-Driven Prompt Generation](https://awesome-repositories.com/f/content-management-publishing/template-driven-generation-engines/data-driven-prompt-generation.md) — Uses a templating engine with variables, loops, and conditionals to create complex, data-driven prompts. ([source](https://cdn.jsdelivr.net/gh/microsoft/poml@main/README.md))

### Development Tools & Productivity

- [Prompt Templates](https://awesome-repositories.com/f/development-tools-productivity/prompt-information-providers/contextual-prompt-tooltips/prompt-templates.md) — Implements reusable instruction blocks and dynamic variables to generate consistent and structured model inputs. ([source](https://microsoft.github.io/poml/stable/tutorial/expense_part1/))
- [Prompt Template Injection](https://awesome-repositories.com/f/development-tools-productivity/argument-injection-utilities/prompt-template-injection.md) — Evaluates variables and expressions to insert dynamic content into a prompt template. ([source](https://microsoft.github.io/poml/stable/language/template/))
- [Prompt Variable Definitions](https://awesome-repositories.com/f/development-tools-productivity/template-variable-orchestrators/prompt-variable-definitions.md) — Sets values and imports data from external sources to be reused across the prompt structure. ([source](https://microsoft.github.io/poml/stable/language/template/))
- [Message Role Wrapping](https://awesome-repositories.com/f/development-tools-productivity/text-wrapping-utilities/delimiter-wrapping/message-role-wrapping.md) — Wraps content as system, human, or AI messages to maintain clear speaker boundaries in model inputs. ([source](https://microsoft.github.io/poml/stable/python/reference/prompt/))
- [Code Completion](https://awesome-repositories.com/f/development-tools-productivity/code-completion.md) — Offers intelligent suggestions for tags and attributes to ensure prompt files adhere to the required syntax. ([source](https://microsoft.github.io/poml/stable/vscode/features/))
- [Prompt Rendering Engines](https://awesome-repositories.com/f/development-tools-productivity/custom-prompt-apis/prompt-rendering-engines.md) — Renders structured prompts into final strings using software development kits for various programming languages. ([source](https://microsoft.github.io/poml/latest/))
- [IDE Integrated Tooling](https://awesome-repositories.com/f/development-tools-productivity/development-workflow-optimization/ide-integrated-tooling.md) — Integrates syntax highlighting, auto-completion, and real-time previews directly within the code editor. ([source](https://cdn.jsdelivr.net/gh/microsoft/poml@main/README.md))
- [Tool Schema Management](https://awesome-repositories.com/f/development-tools-productivity/local-function-execution/agent-integrated-functions/tool-function-registrations/tool-schema-management.md) — Defines tool schemas and manages the exchange of requests and responses between the prompt and the model. ([source](https://microsoft.github.io/poml/stable/python/integration/openai/))
- [Content Importance Prioritization](https://awesome-repositories.com/f/development-tools-productivity/task-prioritization/content-source-prioritization/content-importance-prioritization.md) — Assigns importance levels to text segments to determine which content is preserved when space is limited. ([source](https://microsoft.github.io/poml/stable/language/token/))

### Part of an Awesome List

- [LLM Observability and Evaluation](https://awesome-repositories.com/f/awesome-lists/ai/llm-observability-and-evaluation.md) — Captures and logs final rendered prompts and context variables for debugging and performance auditing.

### Data & Databases

- [LLM Schema Outputs](https://awesome-repositories.com/f/data-databases/data-governance-modeling/data-modeling-schemas/data-schemas/schema-validated-data-structures/schema-enforced-output-parsers/llm-schema-outputs.md) — Transforms data models into strict JSON schemas to enforce structured and validated output from LLMs. ([source](https://microsoft.github.io/poml/stable/tutorial/expense_part1/))
- [Intermediate Representations](https://awesome-repositories.com/f/data-databases/data-processing-pipelines/data-processing-frameworks/intermediate-representations.md) — Transforms semantic XML-like syntax into a structured internal tree for consistent processing across different models.
- [Structured JSON Generation](https://awesome-repositories.com/f/data-databases/data-processing-pipelines/data-serialization/json-schema/structured-json-generation.md) — Enforces strict JSON schema adherence, including required properties, during the generative process of the model. ([source](https://microsoft.github.io/poml/stable/python/reference/integration/))
- [Structured Prompt Data Types](https://awesome-repositories.com/f/data-databases/data-structure-definitions/structured-prompt-data-types.md) — Stores arbitrary data values and JSON objects within prompt markup to provide programmatic context. ([source](https://microsoft.github.io/poml/stable/deep-dive/ir/))
- [Hierarchical Data Structures](https://awesome-repositories.com/f/data-databases/hierarchical-data-structures.md) — Renders information using tables and directory trees to preserve nested layouts for better model comprehension. ([source](https://microsoft.github.io/poml/stable/language/components/))
- [Schema-Adherent Generation](https://awesome-repositories.com/f/data-databases/json-schema-modeling/schema-adherent-generation.md) — Includes a tool that converts data models into strict JSON schemas to enforce schema-adherent model generation.

### Programming Languages & Runtimes

- [Context-Aware Variable Resolution](https://awesome-repositories.com/f/programming-languages-runtimes/context-aware-variable-resolution.md) — Resolves dynamic variables and logical expressions within prompts by injecting runtime data objects.

### Software Engineering & Architecture

- [Intermediate Representations](https://awesome-repositories.com/f/software-engineering-architecture/data-formats/intermediate-representations.md) — Employs a hierarchical intermediate representation using semantic tags to organize prompt text and metadata. ([source](https://microsoft.github.io/poml/stable/deep-dive/ir/))
- [Logic and Presentation Separation](https://awesome-repositories.com/f/software-engineering-architecture/logic-and-presentation-separation.md) — Decouples core prompt logic from visual presentation using an external stylesheet-based approach.
- [Prompt Composition Patterns](https://awesome-repositories.com/f/software-engineering-architecture/modular-program-composition/prompt-composition-patterns.md) — Injects contents of external files into main templates to organize prompts into modular, reusable pieces. ([source](https://microsoft.github.io/poml/stable/language/template/))
- [Data Serialization Formats](https://awesome-repositories.com/f/software-engineering-architecture/data-serialization-formats.md) — Serializes files and data structures into model-optimized formats like CSV, XML, or plain text. ([source](https://microsoft.github.io/poml/stable/tutorial/expense_part1/))
- [Model Response Validation Wrappers](https://awesome-repositories.com/f/software-engineering-architecture/data-validation/model-response-validation-wrappers.md) — Verifies model responses by displaying them within the editor to validate output quality and format. ([source](https://microsoft.github.io/poml/stable/vscode/features/))
- [Logic-Rendering Decouplers](https://awesome-repositories.com/f/software-engineering-architecture/headless-logic-decoupling/logic-rendering-decouplers.md) — Separates core prompt logic from presentation using a styling system to modify output formats independently. ([source](https://cdn.jsdelivr.net/gh/microsoft/poml@main/README.md))

### User Interface & Experience

- [Prompt List Iteration](https://awesome-repositories.com/f/user-interface-experience/data-iterators/prompt-list-iteration.md) — Repeats specific prompt elements for every item in a list using iteration attributes. ([source](https://microsoft.github.io/poml/stable/language/template/))
- [Token-Aware Truncation](https://awesome-repositories.com/f/user-interface-experience/adaptive-content-truncation/token-aware-truncation.md) — Truncates text based on character or token counts and inserts markers to indicate where content was removed. ([source](https://microsoft.github.io/poml/stable/language/token/))
- [Markup Element Styling](https://awesome-repositories.com/f/user-interface-experience/common-ui-element-styling/primitive-element-styling/markup-element-styling.md) — Applies consistent attributes to markup elements using a JSON stylesheet for uniform visual and structural style. ([source](https://microsoft.github.io/poml/stable/language/meta/))
- [Template Element Visibility](https://awesome-repositories.com/f/user-interface-experience/dynamic-input-fields/conditional-visibility-logic/template-element-visibility.md) — Toggles specific prompt components based on feature flags or conditional logic to customize output. ([source](https://microsoft.github.io/poml/stable/language/meta/))
- [Expression Evaluators](https://awesome-repositories.com/f/user-interface-experience/layout-utilities/presentation-engines/template-engines/control-flow-directives/expression-evaluators.md) — Evaluates dynamic logic and data transformations within prompt templates using provided context files. ([source](https://microsoft.github.io/poml/stable/tutorial/expense_part2/))
- [Side-by-Side Editor Previews](https://awesome-repositories.com/f/user-interface-experience/live-preview-integrations/side-by-side-editor-previews.md) — Provides a side-by-side live rendering of prompt structures and styles that updates automatically during editing. ([source](https://microsoft.github.io/poml/stable/vscode/features/))
- [Scroll Synchronization](https://awesome-repositories.com/f/user-interface-experience/live-preview-integrations/side-by-side-editor-previews/split-editor-groups/scroll-synchronization.md) — Synchronizes scroll position and selection highlighting between the prompt editor and its live preview pane. ([source](https://microsoft.github.io/poml/stable/vscode/configuration/))
- [Component Styling](https://awesome-repositories.com/f/user-interface-experience/styling-theming-systems/content-styling/component-styling-tools/component-styling.md) — Defines global and local properties for prompt markup syntax and text formats using a centralized stylesheet. ([source](https://microsoft.github.io/poml/stable/typescript/reference/base/))

### Web Development

- [Conditional Prompt Rendering](https://awesome-repositories.com/f/web-development/conditional-rendering/conditional-prompt-rendering.md) — Shows or hides prompt elements based on the truth value of a variable or expression. ([source](https://microsoft.github.io/poml/stable/language/template/))
- [API Parameter Generation](https://awesome-repositories.com/f/web-development/third-party-api-integrations/chat-api-integrations/api-parameter-generation.md) — Converts structured prompt files into dictionaries containing messages and runtime parameters compatible with chat completion APIs. ([source](https://microsoft.github.io/poml/stable/python/integration/openai/))

### DevOps & Infrastructure

- [Template Variable Replacement](https://awesome-repositories.com/f/devops-infrastructure/automation-orchestration/task-execution-frameworks/automation-frameworks/config-templating/configuration-template-management/automation-variable-definitions/template-variable-replacement.md) — Replaces placeholders within prompt templates with dynamic values from a global context object during rendering. ([source](https://microsoft.github.io/poml/stable/deep-dive/proposals/poml_extended/))

### System Administration & Monitoring

- [Observability Platform Exporters](https://awesome-repositories.com/f/system-administration-monitoring/diagnostic-log-exporters/observability-platform-exporters.md) — Transmits captured prompt data to external monitoring frameworks for centralized analysis and auditing. ([source](https://microsoft.github.io/poml/stable/python/trace/))
- [Observability Platform Log Exporting](https://awesome-repositories.com/f/system-administration-monitoring/monitoring-and-observability/observability-platforms/log-management-systems/log-management-services/observability-platform-log-exporting.md) — Records prompt calls and results and exports them to external observability platforms for monitoring. ([source](https://microsoft.github.io/poml/stable/python/reference/integration/))
- [Prompt and Agent Versioning](https://awesome-repositories.com/f/system-administration-monitoring/monitoring-and-observability/observability-platforms/metric-performance-monitors/model-performance-tracking/prompt-and-agent-versioning.md) — Publishes prompt sources, stylesheets, and context as versioned entities to track changes over time. ([source](https://microsoft.github.io/poml/stable/python/integration/weave/))

### Testing & Quality Assurance

- [Real-time Syntax Checking](https://awesome-repositories.com/f/testing-quality-assurance/real-time-syntax-checking.md) — Detects syntax errors and validates prompt attributes in real-time within the editor. ([source](https://microsoft.github.io/poml/stable/vscode/features/))
