Introduction
Prompt engineering has evolved from simple text instructions into a complex, iterative process. As Large Language Models (LLMs) are integrated into sophisticated agents and Retrieval-Augmented Generation (RAG) systems, the prompts driving them have become massive, unstructured, and difficult to maintain. Current practices often involve concatenating large strings of text, mixing roles, instructions, and data in a way that is prone to errors and sensitive to minor formatting changes—a phenomenon known as the "butterfly effect" in prompt engineering. Furthermore, existing tools lack the robust IDE support common in traditional software development, such as syntax highlighting and live previews.
The POML Framework
To address these challenges, we introduce Prompt Orchestration Markup Language (POML). Inspired by modern web development paradigms like HTML, CSS, and React, POML separates prompt logic, data integration, and presentation styling. This modular approach allows developers to treat prompts as structured UI components rather than monolithic text blocks.
Structured Markup and Data Integration
POML utilizes an HTML-like syntax to define "Intention Components" such as <role>, <task>, and <example>. This structure makes the logical flow of a prompt immediately apparent. One of the most significant features of POML is its native support for complex data types through specialized components. For instance, the <document> tag can automatically extract text from PDFs, while the <table> tag handles tabular data from various sources, rendering it into the format most suitable for the target LLM.
Decoupled Styling and Templating
Similar to how CSS styles HTML, POML uses JSON-based stylesheets to decouple content from presentation. This allows developers to change the visual syntax of a prompt (e.g., from Markdown to XML) without altering the underlying logic. A built-in templating engine supports variables, loops, and conditionals, enabling dynamic prompt generation.
Developer Ecosystem
A key component of the POML framework is its developer toolkit. We developed a VSCode extension that provides a rich development environment, including live previews, inline diagnostics, and interactive testing. This environment allows developers to see exactly how their markup renders into the final prompt string sent to the LLM.
Evaluation and Results
The effectiveness of POML was evaluated through a series of experiments and a user study.
The Impact of Formatting
Using a subset of the WikiTableQuestions (WikiTQ) dataset, we tested how different prompt styles impact LLM accuracy. The results were striking: formatting alone caused massive performance swings. For example, GPT-3.5-Turbo's accuracy improved from 6.0% to 61.8%—a 929% relative increase—based solely on the applied POML stylesheet. Different models showed distinct preferences; while DeepSeek and Gemini performed better with HTML/XML tables, Claude and Phi-3 preferred CSV formats.
Rapid Prototyping: PomLink
To demonstrate POML's utility in real-world applications, we built "PomLink," a multimodal iOS agent capable of processing documents, tables, and images. The entire prototype was developed in just two days, with the core logic residing in six concise POML files.
User Feedback
A study with seven developers confirmed that POML significantly reduces the friction of data integration. Participants particularly valued the <document> and <table> components, which eliminated the need for custom data-parsing scripts.
Conclusion and Future Work
POML brings much-needed structure and professional tooling to the field of prompt engineering. By treating prompts as modular, styleable components, it enables systematic optimization and maintainability. Future work includes open-sourcing the framework and exploring automated prompt engineering, where algorithms search for the optimal POML stylesheet for specific tasks and models.
Summary updated