You may also want to check out BAML https://github.com/BoundaryML/baml - a DSL for prompt templates that are literally treated like functions.
the prompt.yaml format (which this project uses) suffers from the fact that it doesn't address the structured outputs problem. Writing schemas in yaml/xml is insanely painful. But BAML just feels like writing typescript types.
I'm the sole code contributor of POML, maybe except for Codex and cc. I think I've found where all that GitHub stars suddenly came from. :)
I'm from a small group under Microsoft Research. POML originally came from a research idea that Prompt should have a view layer like the traditional MVC architecture in the frontend system. The view layer should take care of the data, the styles and rendering logic, so that the user no longer needs to care how some table needs to be rendered, how to present few-shot examples, how to reformat the whole prompt with another syntax (e.g., from markdown to XML).
I have to admit that I spent so much time on making POML work well with VSCode, building all the auto completion, preview, hover stuff. The time is long enough that the codebase is almost becoming a monster for an individual developer to handle. The outside environment is also changing drastically. The rise of Agentic AI, tool calls, response format. The models today are no longer sensitive to small changes in prompt format as they used to. AI-aided programming can simply give you code to read in PDFs, Excels and render them in any style you want. With all that in mind, I used to feel hopeless about POML.
Nevertheless, after several months of working on another projects, I recently noticed that the view layer can be more of just a view layer. With proper user interface (e.g., a VSCode live preview), it can deliver a very smooth experience in prompt debugging, especially in a multi-prompt agent workflow. I also noticed that the "orchestration" idea can go beyond a XML-like code. I'll share more details when I had a tutorial / screenshot to share.
Going through this thread, I saw a lot of thoughts that once went through my mind. We love markdowns. We love template engines like jinja. We need those response formats. I'm thinking what is the missing piece here. I've spend so much time writing prompts and building agents in the past few months. What's my biggest pain points?
I'm quite surprised that the news hit me first before I'm ready to hit the news. If you have tried POML, please send me feedbacks. I'll see what I can do; or maybe we end up not needing a prompt language at all.
Awesome idea, for some reason I've never thought about using MVC patterns with LLM prompts. I got carried away and tried implementing this with ASP.NET Razor components, imagining the possibilities with this pattern.
Does anybody find it mildly ironic that LLM prompts, which are intended to be plain informal text, accumulate more and more structure around them, including a markup language in question?
This is not unlike the way the language of legal documents is highly formulaic, structured, and codified. When precise meaning is desirable, firmer structures tend to arise. With a bit more time, proper code languages may start to appear, to help tell LLMs exactly what we mean or want.
<let name="objVar" type="object" value="{{ { key: 'value' } }}"/>
<item for="item in ['apple', 'banana', 'cherry']">{{item}}</item>
<p if="isVisible">This paragraph is visible.</p>
This looks like JSX but worse. What's wrong with throwing a bit of imperative syntax into a DSL if you need imperativity? It seems unnecessary to put code into strings.
21 comments
[ 2.6 ms ] story [ 46.4 ms ] threadthe prompt.yaml format (which this project uses) suffers from the fact that it doesn't address the structured outputs problem. Writing schemas in yaml/xml is insanely painful. But BAML just feels like writing typescript types.
I'm one of the developers!
I'm from a small group under Microsoft Research. POML originally came from a research idea that Prompt should have a view layer like the traditional MVC architecture in the frontend system. The view layer should take care of the data, the styles and rendering logic, so that the user no longer needs to care how some table needs to be rendered, how to present few-shot examples, how to reformat the whole prompt with another syntax (e.g., from markdown to XML).
I have to admit that I spent so much time on making POML work well with VSCode, building all the auto completion, preview, hover stuff. The time is long enough that the codebase is almost becoming a monster for an individual developer to handle. The outside environment is also changing drastically. The rise of Agentic AI, tool calls, response format. The models today are no longer sensitive to small changes in prompt format as they used to. AI-aided programming can simply give you code to read in PDFs, Excels and render them in any style you want. With all that in mind, I used to feel hopeless about POML.
Nevertheless, after several months of working on another projects, I recently noticed that the view layer can be more of just a view layer. With proper user interface (e.g., a VSCode live preview), it can deliver a very smooth experience in prompt debugging, especially in a multi-prompt agent workflow. I also noticed that the "orchestration" idea can go beyond a XML-like code. I'll share more details when I had a tutorial / screenshot to share.
Going through this thread, I saw a lot of thoughts that once went through my mind. We love markdowns. We love template engines like jinja. We need those response formats. I'm thinking what is the missing piece here. I've spend so much time writing prompts and building agents in the past few months. What's my biggest pain points?
I'm quite surprised that the news hit me first before I'm ready to hit the news. If you have tried POML, please send me feedbacks. I'll see what I can do; or maybe we end up not needing a prompt language at all.
This is not unlike the way the language of legal documents is highly formulaic, structured, and codified. When precise meaning is desirable, firmer structures tend to arise. With a bit more time, proper code languages may start to appear, to help tell LLMs exactly what we mean or want.
https://developer.signalwire.com/ai/pom/technical-reference