一、关于 POML
1、项目概览
POML(Prompt Orchestration Markup Language)是一种创新的标记语言,专为大型语言模型(LLM)的高级提示工程而设计。它通过结构化语法解决提示开发中的常见挑战,如缺乏组织性、复杂数据集成、格式敏感性等问题。
2、相关链接资源
- Github:https://github.com/microsoft/poml
- 官方文档:https://microsoft.github.io/poml/
- VSCode扩展:https://marketplace.visualstudio.com/items?itemName=poml-team.poml
- PyPI包:https://pypi.org/project/poml/
- npm包:https://www.npmjs.com/package/pomljs
- 测试状态:https://github.com/microsoft/poml/actions/workflows/test.yml
- License:https://opensource.org/licenses/MIT
- Discord社区:https://discord.gg/FhMCqWzAn6
- 演示视频:https://youtu.be/b9WDcFsKixo
3、功能特性
-
结构化提示标记
采用类HTML语法,包含<role>、<task>等语义组件,提升提示的可读性和可维护性 -
全面数据处理
支持<document>、<table>等组件,可嵌入或引用外部数据源 -
解耦式呈现样式
类CSS样式系统,通过<stylesheet>定义实现内容与样式分离 -
集成模板引擎
支持变量({{ }})、循环(for)、条件(if)等动态生成功能 -
丰富开发工具
- VSCode扩展:提供语法高亮、实时预览等功能
- 多语言SDK:支持Node.js和Python集成
二、快速入门
<poml>
<role>You are a patient teacher explaining concepts to a 10-year-old.</role>
<task>Explain photosynthesis using the provided image.</task>
<img src="photosynthesis_diagram.png" alt="Diagram of photosynthesis" />
<output-format>
Keep the explanation simple and under 100 words.
</output-format>
</poml>
三、安装配置
1、VSCode扩展
通过应用市场安装,或手动下载.vsix文件安装。
配置步骤:
- 在VSCode设置中搜索"POML"
- 配置LLM提供商、API密钥和端点URL
2、Node.js安装
npm install pomljs
3、Python安装
pip install poml
四、学习资源
其他
参考项目
伊织 xAI 2025-08-15(五)
874

被折叠的 条评论
为什么被折叠?



