Large Language Models (LLMs) can solve previously intractable tasks given only natural-language instructions and a few examples, but they remain difficult to steer precisely and lack a key capability for building reliable software at scale: the modular composition of computations under enforceable contracts. As a result, they are often embedded in larger software pipelines that use domain-specific knowledge to decompose tasks and improve reliability through validation and search. Yet the complexity of writing, tuning, and maintaining such pipelines has so far limited their sophistication. We propose oracular programming: a foundational paradigm for integrating traditional, explicit computations with inductive oracles such as LLMs. It rests on two directing principles: the full separation of core and search logic (allowing the latter to freely evolve without breaking the former), and the treatment of few-shot examples as grounded and evolvable program components. Within this paradigm, programmers express high-level problem-solving strategies as programs with unresolved choice points. These choice points are resolved at runtime by LLMs, which generalize from user-provided examples of correct and incorrect decisions. An oracular program is composed of three orthogonal components: a strategy that consists of a nondeterministic program with choice points that can be reified into a search tree, a policy that specifies how to navigate this tree with the help of LLM oracles, and a set of demonstrations that describe successful and unsuccessful tree navigation scenarios across diverse problem instances. Each component is expressed in a dedicated programming language. We address the key programming language design challenges of modularly composing oracular programs and enforcing consistency between their components as they evolve.


翻译:大语言模型(LLM)仅凭自然语言指令和少量示例即可解决以往难以处理的任务,但其精确控制仍具挑战性,且缺乏大规模构建可靠软件所需的关键能力:基于可执行契约的模块化计算组合。因此,LLM常被嵌入更庞大的软件管道中,这些管道利用领域知识分解任务,并通过验证与搜索提升可靠性。然而,编写、调优和维护此类管道的复杂性至今限制了其精妙程度。我们提出神谕式编程:一种将传统显式计算与归纳性神谕(如LLM)相结合的基础范式。该范式基于两项核心原则:核心逻辑与搜索逻辑的完全分离(允许后者自由演化而不破坏前者),以及将少样本示例视为可落地且可演化的程序组件。在此范式内,程序员将高层次问题求解策略表达为包含未解析选择点的程序。这些选择点由LLM在运行时解析,LLM通过用户提供的正确/错误决策示例进行泛化。神谕式程序由三个正交组件构成:包含可具化为搜索树的选择点的非确定性策略程序;依托LLM神谕指定搜索树导航策略的政策;描述跨不同问题实例的成功/失败树导航场景的演示集合。每个组件均采用专用编程语言表达。我们重点解决了模块化组合神谕式程序及其组件演化时一致性强制要求的关键编程语言设计挑战。

0
下载
关闭预览

相关内容

人们为了让计算机解决各种棘手的问题,使用编程语言 编写程序代码并通过计算机运算得到最终结果的过程。
大型语言模型(LLMs),附Slides与视频
专知会员服务
71+阅读 · 2024年6月30日
绝对干货!NLP预训练模型:从transformer到albert
新智元
13+阅读 · 2019年11月10日
哈工大讯飞联合实验室发布中文XLNet预训练模型
哈工大SCIR
13+阅读 · 2019年8月20日
NLP通用模型诞生?一个模型搞定十大自然语言常见任务
人工智能头条
10+阅读 · 2018年6月29日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Arxiv
18+阅读 · 2023年9月2日
Arxiv
11+阅读 · 2023年8月28日
VIP会员
最新内容
美国从乌克兰无人机战争中学习经验
专知会员服务
1+阅读 · 今天15:03
ICML 2026 | 面向视觉语言模型的语义鲁棒性认证
专知会员服务
1+阅读 · 今天14:31
学习数据的几何:形状空间分析数学综述
专知会员服务
8+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
10+阅读 · 6月17日
相关VIP内容
大型语言模型(LLMs),附Slides与视频
专知会员服务
71+阅读 · 2024年6月30日
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员