APPL: A Prompt Programming Language for Harmonious Integration of Programs and Large Language Model Prompts

2024年06月19日
  • 简介
    大型语言模型(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.
许愿开讲
PDF
原文
点赞 收藏
向作者提问
NEW
分享到Link

提问交流

提交问题,平台邀请作者,轻松获得权威解答~

向作者提问