- 简介大型语言模型(LLMs)在良好设计的提示和外部工具的帮助下,越来越能够处理各种任务,但随着任务复杂度的提高,涉及LLMs的工作流程可能变得复杂,因此难以实现和维护。为了解决这个挑战,我们提出了APPL,一种提示编程语言,它充当计算机程序和LLMs之间的桥梁,允许将提示无缝嵌入Python函数中,反之亦然。APPL提供了直观的Python本地语法、具有异步语义的高效并行运行时以及支持有效故障诊断和重放的跟踪模块,而无需额外成本。我们通过三个代表性场景展示了APPL程序的直观、简洁和高效:具有自一致性的思维链(CoT-SC)、ReAct工具使用代理和多代理聊天。对三个可并行化工作流的实验进一步表明,APPL可以有效地并行化独立的LLM调用,具有几乎与估计相匹配的显着加速比。
-
- 图表
- 解决问题APPL: A Prompt Programming Language for Seamless Integration of Large Language Models
- 关键思路APPL is a Python-native prompt programming language that bridges computer programs and LLMs, providing an intuitive and efficient way to embed prompts into Python functions and vice versa. It also supports parallelized runtime with asynchronous semantics and a tracing module for effective failure diagnosis and replaying without extra costs.
- 其它亮点The APPL programs are intuitive, concise, and efficient, and the paper demonstrates this through three representative scenarios: Chain-of-Thought with self-consistency (CoT-SC), ReAct tool use agent, and multi-agent chat. The experiments show that APPL can effectively parallelize independent LLM calls, with a significant speedup ratio that almost matches the estimation.
- Recent related studies in this field include GPT-3, Codex, and other LLM-based programming tools.
NEW
提问交流
提交问题,平台邀请作者,轻松获得权威解答~
向作者提问

提问交流