poml  by microsoft

Structured prompting for LLMs

Created 9 months ago
4,497 stars

Top 11.0% on SourcePulse

GitHubView on GitHub
Project Summary

POML (Prompt Orchestration Markup Language) is a novel markup language designed to bring structure, maintainability, and versatility to advanced prompt engineering for Large Language Models (LLMs). It addresses challenges like lack of structure, complex data integration, and format sensitivity, empowering developers to create more sophisticated and reliable LLM applications.

How It Works

POML employs an HTML-like syntax with semantic components (<role>, <task>, <example>) for modular design, enhancing readability and reusability. It features specialized data components (<document>, <table>, <img>) for seamless integration of external data sources with customizable formatting. A CSS-like styling system decouples content from presentation, allowing style modifications without altering core prompt logic, mitigating LLM format sensitivity. A built-in templating engine supports variables, loops, and conditionals for dynamic prompt generation.

Quick Start & Requirements

  • Installation: VS Code Extension (from Marketplace or .vsix), Node.js (npm install pomljs), Python (pip install poml).
  • Prerequisites: Configured LLM model, API key, and endpoint in VS Code extension settings or settings.json.
  • Documentation: POML Documentation (link not directly provided in README, but implied).
  • Demo: POML Introduction & Demo (placeholder link).

Highlighted Details

  • HTML-like syntax with semantic components for structured prompting.
  • Comprehensive data handling for text, tables, and images.
  • CSS-like styling for decoupled presentation.
  • Integrated templating engine for dynamic prompts.
  • VS Code IDE Extension with syntax highlighting, auto-completion, and testing.
  • SDKs for Node.js and Python.

Maintenance & Community

The project is maintained by Microsoft and welcomes contributions via a CLA. It adheres to the Microsoft Open Source Code of Conduct.

Licensing & Compatibility

Licensed under the MIT License, permitting commercial use and integration with closed-source applications.

Limitations & Caveats

Prompt testing requires explicit configuration of LLM provider, API key, and endpoint. The research paper is noted as "coming soon."

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
43
Issues (30d)
19
Star History
1,107 stars in the last 30 days

Explore Similar Projects

Starred by Clement Delangue Clement Delangue(Cofounder of Hugging Face), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
10 more.

promptsource by bigscience-workshop

0.2%
3k
Toolkit for creating, sharing, and using natural language prompts
Created 4 years ago
Updated 1 year ago
Feedback? Help us improve.