Redefining Prompt Development: How POML Makes AI Application Development as Simple as Web Design
August 19, 2025 – Microsoft Research’s newly introduced POML (Prompt Orchestration Markup Language) is transforming how we write prompts. Through component-based design, style control systems, and intelligent development tools, complex AI application development has been simplified into an intuitive process similar to web page creation.
Why Do We Need POML?
When building applications based on Large Language Models (LLMs), have you encountered these challenges?
-
Prompts are like clay – difficult to shape – Traditional prompts mix all content together, requiring complete restructuring with any single change [citation:1] -
Multimodal data integration difficulties – Documents, tables, images, and other data formats are challenging to systematically embed [citation:2][citation:3] -
Format sensitivity issues – Minor formatting changes can lead to completely different output results [citation:4] -
Lack of development tools – Absence of modern development experiences like version control, auto-completion, and real-time preview [citation:5]
Microsoft Research engineers discovered: Traditional prompts are like sculpting with a single block of clay, while POML aims to provide building blocks and a toolbox.
Core Features of POML
1. Component-Based Structural Design
POML adopts a markup language structure similar to HTML, breaking down prompts into reusable modules:
<poml>
<role>Professional Translator</role>
<task>Translate the following table content into English</task>
<table src="data.csv" format="markdown"/>
<output-format syntax="json"/>
</poml>
Main component types:
Component Type | Function | Example |
---|---|---|
Basic Structural Components | Text formatting and grouping | <b>Bold text</b> , <div> sectioning |
Intention Components | Define core logic | <role> , <task> , <example> |
Data Components | Integrate external data | <document> , <table> , <img> |
2. Multimodal Data Support
POML includes 7 built-in data components that seamlessly integrate various data sources:
Document Component
<document src="report.pdf"
pages="1-3"
preserveFormat="true"
excludeImages="false"/>
-
Supports PDF/Word/text files [citation:6] -
Allows specifying page ranges -
Preserves original formatting options
Table Component
<table src="sales.csv"
format="html"
headers="true"
columns="product,region"/>
-
Supports CSV/Excel/JSON [citation:7] -
Allows selecting output format (Markdown/HTML/CSV) -
Smart column filtering
Folder Component
<folder path="/project"
depth="2"
filter="*.py"
summary="true"/>
-
Visualizes directory structure -
Supports file filtering -
Automatically generates summaries
3. Style Control System
Manage prompt presentation like CSS:
{
"styles": {
"table": {
"syntax": "html",
"captionStyle": "header"
},
"example": {
"bodyStyle": "hidden"
}
}
}
-
Centralized format management [citation:8] -
Style settings by component type -
Supports global/local style overrides
4. Dynamic Template Engine
Use JSX-like syntax for dynamic content:
<let users={["Alice", "Bob"]}>
<list>
<item for="user in users">
<b>User: {{user}}</b> report:
<document src="{{user}}.docx"/>
</item>
</list>
</let>
-
Variable interpolation {{variable}}
-
Loop rendering <item for="...">
[citation:9] -
Conditional rendering <if condition="...">
Development Toolchain
POML provides comprehensive development support:
1. VS Code Extension Features

-
Syntax highlighting and auto-completion -
Real-time preview panel [citation:10] -
Error diagnostics -
Git version control integration
2. Multi-language SDKs
// JavaScript SDK Example
import { POML } from '@microsoft/poml';
const prompt = new POML()
.addComponent('role', 'Data Analysis Expert')
.addTable('data.csv', { format: 'json' })
.render();
# Python SDK Example
from poml import POML
poml = POML()
poml.add_role("Translator")
poml.add_document("article.pdf")
print(poml.render())
Practical Application Cases
Case 1: PomLink iOS Prototype
A functional prototype completed in just two days:
-
Supports multimodal input including documents/tables/images [citation:11] -
Real-time file content preview -
Automatically adapts to optimal table formats for different LLMs

Case 2: TableQA Performance Optimization
Achieved through style control:
-
Significant differences in optimal formats across models [citation:12] -
GPT-3.5 Turbo accuracy improvement of 929% -
Phi-3 Medium accuracy improvement of 4450%

Technical Principle Deep Analysis
Three-Stage Rendering Architecture
-
Parsing Stage: Validate syntax → Expand templates → Apply styles -
Intermediate Representation: Generate tree structure with complete metadata -
Output Stage: Select renderer based on target format

Data Processing Flow
Raw Data → POML Components → Intermediate Representation → Target Format
↑ ↑ ↑ ↑
File System → Template Engine → React Rendering → Serialization
Best Practice Guide
1. Component-Based Design Principles
-
Each functional module corresponds to an independent <component>
-
Use <include>
to reuse common parts -
Manage data source paths using variables
2. Style Management Recommendations
-
Create a base stylesheet -
Derive variants by task type -
Version control different style configurations
3. Performance Optimization Tips
-
Paginate large documents -
Precompile complex templates -
Encrypt sensitive data
Future Outlook
POML is exploring:
-
Multi-turn conversation template support -
Automatic style optimization algorithms -
Cross-platform rendering engines -
Education-specific component libraries
FAQ
Q: How is POML different from traditional prompts?
A: Traditional prompts are like a single block of clay, with all content mixed together. POML provides building blocks (components) and a toolbox (style control), giving prompts structured, reusable, and visual development characteristics.
Q: Do I need programming background to use it?
A: Basic usage doesn’t require programming; the VS Code extension provides visual assistance. However, advanced features suggest understanding basic HTML concepts.
Q: What data formats are supported?
A: Documents (PDF/DOCX/TXT), tables (CSV/Excel/JSON), images (PNG/JPG), web pages, folder structures, etc.
Q: How to handle format differences between different LLMs?
A: Use <stylesheet>
to define model-specific style sheets, specifying output format through the syntax
attribute.
Q: Does it support Chinese development?
A: Yes, component attributes support multilingual naming.