Organize reusable prompt workflows with POML
Use Microsoft's POML to turn advanced prompts into structured, reusable prompt assets with markup, data components, templating, styling, SDK rendering, and VS Code testing.
Prerequisites
POML VS Code extension, Python poml package, or npm pomljs package; source-controlled prompt files; configured LLM provider settings for interactive testing
Installation
Use the upstream install or setup path that matches your environment:
- npm install pomljs
- pip install poml
- For development or local installation, you might use pip install -e . from a cloned repository.
Requirements and caveats from upstream:
- Software Development Kits (SDKs): Offers SDKs for Node.js (JavaScript/TypeScript) and Python for seamless integration into various application workflows and popular LLM frameworks.
- mini-poml-rs – Experimental Rust-based POML renderer for environments without JavaScript or Python interpreters.
- ai-chatbot-with-python-and-angular – A chatbot built with Python and Angular (version 20), utilizing POML for prompting and the Langchain framework...
Basic usage or getting-started notes:
Structured Prompting Markup: Employs an HTML-like syntax with semantic components such as , , and to encourage modular design, enhancing prompt readability, reusability, and maintainability.
Here's a very simple POML example. Please put it in a file named example.poml. Make sure it resides in the same directory as the photosynthesis_diagram.png image file.
xml
Extracted from upstream docs: https://raw.githubusercontent.com/microsoft/poml/HEAD/README.md