亲爱的研友该休息了!由于当前在线用户较少,发布求助请尽量完整地填写文献信息,科研通机器人24小时在线,伴您度过漫漫科研夜!身体可是革命的本钱,早点休息,好梦!

Prompting Is Programming: A Query Language for Large Language Models

RDF查询语言 计算机科学 数据控制语言 查询语言 程序设计语言 第一代程序设计语言 查询优化 程序设计语言规范 对象查询语言 自然语言处理 人工智能 Web搜索查询 程序设计范式 按示例查询 情报检索 Web查询分类 程序设计域 归纳程序设计 搜索引擎
作者
Luca Beurer-Kellner,M. Fischer,Martin Vechev
出处
期刊:Proceedings of the ACM on programming languages [Association for Computing Machinery]
卷期号:7 (PLDI): 1946-1969 被引量:53
标识
DOI:10.1145/3591300
摘要

Large language models have demonstrated outstanding performance on a wide range of tasks such as question answering and code generation. On a high level, given an input, a language model can be used to automatically complete the sequence in a statistically-likely way. Based on this, users prompt these models with language instructions or examples, to implement a variety of downstream tasks. Advanced prompting methods can even imply interaction between the language model, a user, and external tools such as calculators. However, to obtain state-of-the-art performance or adapt language models for specific tasks, complex task- and model-specific programs have to be implemented, which may still require ad-hoc interaction. Based on this, we present the novel idea of Language Model Programming (LMP). LMP generalizes language model prompting from pure text prompts to an intuitive combination of text prompting and scripting. Additionally, LMP allows constraints to be specified over the language model output. This enables easy adaption to many tasks while abstracting language model internals and providing high-level semantics. To enable LMP, we implement LMQL(short for Language Model Query Language), which leverages the constraints and control flow from an LMP prompt to generate an efficient inference procedure that minimizes the number of expensive calls to the underlying language model. We show that LMQL can capture a wide range of state-of-the-art prompting methods in an intuitive way, especially facilitating interactive flows that are challenging to implement with existing high-level APIs. Our evaluation shows that we retain or increase the accuracy on several downstream tasks, while also significantly reducing the required amount of computation or cost in the case of pay-to-use APIs (26-85% cost savings).
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
jcksonzhj完成签到,获得积分10
3秒前
9527z完成签到,获得积分10
12秒前
14秒前
Everything完成签到,获得积分10
16秒前
32秒前
海豚有海完成签到 ,获得积分10
34秒前
酷酷海豚完成签到,获得积分10
36秒前
45秒前
烟花应助火星上的尔柳采纳,获得30
55秒前
57秒前
1分钟前
懵懂的蜜蜂完成签到 ,获得积分10
1分钟前
1分钟前
SciGPT应助漂亮夏兰采纳,获得10
1分钟前
1分钟前
1分钟前
rb发布了新的文献求助10
1分钟前
1分钟前
1分钟前
1分钟前
1分钟前
脑洞疼应助rb采纳,获得30
1分钟前
andi发布了新的文献求助10
2分钟前
2分钟前
科研通AI6.2应助动听钧采纳,获得10
2分钟前
Hello应助Zhou采纳,获得10
2分钟前
辉哥发布了新的文献求助10
2分钟前
2分钟前
小蘑菇应助辉哥采纳,获得10
2分钟前
3分钟前
动听钧完成签到,获得积分10
3分钟前
3分钟前
3分钟前
3分钟前
xny发布了新的文献求助10
3分钟前
3分钟前
饺子完成签到,获得积分10
3分钟前
饺子发布了新的文献求助10
3分钟前
1255475177完成签到 ,获得积分10
3分钟前
3分钟前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
Les Mantodea de Guyane Insecta, Polyneoptera 2000
The Organometallic Chemistry of the Transition Metals 800
Leading Academic-Practice Partnerships in Nursing and Healthcare: A Paradigm for Change 800
Signals, Systems, and Signal Processing 610
The formation of Australian attitudes towards China, 1918-1941 600
Research Methods for Business: A Skill Building Approach, 9th Edition 500
热门求助领域 (近24小时)
化学 材料科学 医学 生物 纳米技术 工程类 有机化学 化学工程 生物化学 计算机科学 物理 内科学 复合材料 催化作用 物理化学 光电子学 电极 细胞生物学 基因 无机化学
热门帖子
关注 科研通微信公众号,转发送积分 6418730
求助须知:如何正确求助?哪些是违规求助? 8238333
关于积分的说明 17501900
捐赠科研通 5471603
什么是DOI,文献DOI怎么找? 2890707
邀请新用户注册赠送积分活动 1867536
关于科研通互助平台的介绍 1704542