ANPL: Towards Natural Programming with Interactive Decomposition
Di Huang, Ziyuan Nan, Xing Hu, Pengwei Jin, Shaohui Peng, Yuanbo Wen, Rui Zhang, Zidong Du, Qi Guo, Yewen Pu, Yunji Chen
摘要
Though LLMs are capable of generating plausible programs, it's challenging to interact with the LLMs further to revise the program, especially if the user's specific requirements are different from the initial proposal. In this paper, we introduce ANPL, an interactive programming system that ensures users can always refine the generated code towards their specific programmatic intents via structured decompositions. Borrowing the paradigm of sketching from program synthesis, an ANPL program consists of a set of input-outputs that it must satisfy, a sketch'' -- control/data flow expressed in precise code (e.g. Python), and holes'' -- sub-modules to be implemented by the LLM specified with natural language. The user revises an ANPL program by either modifying the sketch, changing the language used to describe the holes, or providing additional input-outputs to a particular hole, turning it into a sub-ANPL program that can be solved recursively. This workflow allows the users to offload programming burdens to the LLM as much as possible while retaining the ability to pinpoint and resolve bugs locally, without exposing the rest of the program to the LLM. We deploy ANPL on the Abstraction and Reasoning Corpus (ARC), a set of unique tasks that are challenging for state-of-the-art AI systems, showing it outperforms baseline programming systems that (a) without the ability to decompose tasks interactively and (b) without the guarantee that the modules can be correctly composed together. Additional evaluations on APPS, HumanEval, and real-world programming tasks have validated that the ANPL framework is applicable to multiple programming domains. We release the ANPL solutions to the ARC tasks as a dataset, providing insights into how humans decompose novel tasks programmatically. See our code at https://iprc-dip.github.io/ANPL/.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 7 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Cut the Crap: An Economical Communication Pipeline for LLM-based Multi-Agent Systems 引用了 Reflexion: language agents with verbal reinforcement learning
- Sharing State Between Prompts and Programs 引用了 CoPrompt: Supporting Prompt Sharing and Referring in Collaborative Natural Language Programming
- Dependency Matters: Enhancing LLM Reasoning with Explicit Knowledge Grounding 引用了 Toolformer: Language Models Can Teach Themselves to Use Tools
- Teaching Large Language Models to Self-Debug 引用了 Self-Refine: Iterative Refinement with Self-Feedback
- Reflexion: language agents with verbal reinforcement learning 引用了 Self-Refine: Iterative Refinement with Self-Feedback
- Reflexion: language agents with verbal reinforcement learning 引用了 Teaching Large Language Models to Self-Debug
- Reflexion: language agents with verbal reinforcement learning 引用了 Toolformer: Language Models Can Teach Themselves to Use Tools
- Reflexion: language agents with verbal reinforcement learning 引用了 HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in Hugging Face
- CoLadder: Manipulating Code Generation via Multi-Level Blocks 引用了 CoPrompt: Supporting Prompt Sharing and Referring in Collaborative Natural Language Programming
- HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in Hugging Face 引用了 Toolformer: Language Models Can Teach Themselves to Use Tools
引用它的顶会 Paper7
- CoPrompt: Supporting Prompt Sharing and Referring in Collaborative Natural Language ProgrammingLi Feng, Ryan Yen, Yuzhe You, Mingming Fan 等CHI 2024 · 28 次引用
- CoLadder: Manipulating Code Generation via Multi-Level BlocksRyan Yen, Jiawen Stefanie Zhu, Sangho Suh, Haijun Xia 等UIST 2024 · 22 次引用
- Sharing State Between Prompts and ProgramsEllie Y. Cheng, Logan Weber, Tian Jin, Michael CarbinICLR 2026 · 3 次引用
- Dependency Matters: Enhancing LLM Reasoning with Explicit Knowledge GroundingXiangyu Wen, Min Li, Junhua Huang, Jianyuan Zhong 等NeurIPS 2025 · 2 次引用
- Cut the Crap: An Economical Communication Pipeline for LLM-based Multi-Agent SystemsGuibin Zhang, Yanwei Yue, Zhixun Li, Sukwon Yun 等ICLR 2025
它引用的 Paper17
- Toolformer: Language Models Can Teach Themselves to Use ToolsTimo Schick, Jane Dwivedi-Yu, Roberto Dessì, Roberta Raileanu 等NeurIPS 2023 · 5,989 次引用
- Reflexion: language agents with verbal reinforcement learningNoah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan 等NeurIPS 2023 · 5,828 次引用
- Self-Refine: Iterative Refinement with Self-FeedbackAman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan 等NeurIPS 2023 · 4,972 次引用
- HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in Hugging FaceYongliang Shen, Kaitao Song, Xu Tan, Dongsheng Li 等NeurIPS 2023 · 1,778 次引用
- Teaching Large Language Models to Self-DebugXinyun Chen, Maxwell Lin, Nathanael Schärli, Denny ZhouICLR 2024 · 1,085 次引用
相关 Paper
- APPL: A Prompt Programming Language for Harmonious Integration of Programs and Large Language Model PromptsHonghua Dong, Qidong Su, Yubo Gao, Zhaoyu Li 等ACL 2025
- Interactive and Expressive Code-Augmented Planning with Large Language ModelsAnthony Zhe Liu, Xinhe Wang, Jacob Sansom, Yao Fu 等ACL 2025 · 4 次引用
- Hypothesis Search: Inductive Reasoning with Language ModelsRuocheng Wang, Eric Zelikman, Gabriel Poesia, Yewen Pu 等ICLR 2024 · 156 次引用
- Parsel🦆: Algorithmic Reasoning with Language Models by Composing DecompositionsEric Zelikman, Qian Huang, Gabriel Poesia, Noah D. Goodman 等NeurIPS 2023 · 90 次引用
- CodeIt: Self-Improving Language Models with Prioritized Hindsight ReplayNatasha Butt, Blazej Manczak, Auke J. Wiggers, Corrado Rainone 等ICML 2024 · 29 次引用
