用PDL语言让提示词可调可优化,提升合规智能体性能4倍
Representing Prompting Patterns with PDL: Compliance Agent Case Study
- 提出PDL语言,将提示词作为核心表达,支持手动与自动调优
- 实测合规智能体性能提升最高达4倍,优于固定模板方案
- 适合需要灵活定制大模型提示的开发者和企业级应用
大模型提示工程仍复杂难控,现有框架或隐藏底层逻辑,或提供僵化模板,难以定制,制约智能体编程。本文提出提示声明语言(PDL),将提示词置于核心位置,支持人工与自动调优,同时整合LLM调用、规则代码与外部工具的组合逻辑。通过抽象化这些组合细节,PDL提升开发效率,并提供可优化的声明式表达。论文以合规智能体为真实案例验证其有效性:优化提示模式后,性能相较固定模板方案最高提升4倍。
原文摘要 · Abstract (English)
Prompt engineering for LLMs remains complex, with existing frameworks either hiding complexity behind restrictive APIs or providing inflexible canned patterns that resist customization -- making sophisticated agentic programming challenging. We present the Prompt Declaration Language (PDL), a novel approach to prompt representation that tackles this fundamental complexity by bringing prompts to the forefront, enabling manual and automatic prompt tuning while capturing the composition of LLM calls together with rule-based code and external tools. By abstracting away the plumbing for such compositions, PDL aims at improving programmer productivity while providing a declarative representation that is amenable to optimization. This paper demonstrates PDL's utility through a real-world case study of a compliance agent. Tuning the prompting pattern of this agent yielded up to 4x performance improvement compared to using a canned agent and prompt pattern.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。