ANPL: Towards Natural Programming with Interactive Decomposition
Not on the map. Why?
Abstract (arXiv)
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/.
Key facts. Cited by 13 papers in the map (data through 7 Oct 2026). Builds on 40 of its 71 references that are in the map. First posted on arXiv 29 May 2023.
Builds on
40 of 71 references.
References · 40
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,072
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,064
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,317
- 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,579
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
- 2023Teaching Large Language Models to Self-Debugcited by 963
- 2021Measuring Coding Challenge Competence With APPScited by 879
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
- 2023Visual ChatGPT: Talking, Drawing and Editing with Visual Foundation Modelscited by 659
28 more
- 2023ViperGPT: Visual Inference via Python Execution for Reasoningcited by 591
- 2023MM-REACT: Prompting ChatGPT for Multimodal Reasoning and Actioncited by 511
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
- 2022CodeT: Code Generation with Generated Testscited by 369
- 2022CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learningcited by 342
- 2022Binding Language Models in Symbolic Languagescited by 224
- 2022Grounded Copilot: How Programmers Interact with Code-Generating Modelscited by 216
- 2023TaskMatrix.AI: Completing Tasks by Connecting Foundation Models with Millions of APIscited by 184
- 2020DreamCoder: Growing generalizable, interpretable knowledge with wake-sleep Bayesian program learningcited by 159
- 2022Synchromesh: Reliable code generation from pre-trained language modelscited by 156
- 2022PromptChainer: Chaining Large Language Model Prompts through Visual Programmingcited by 134
- 2022Language Model Cascadescited by 104
- 2017Learning a Neural Semantic Parser from User Feedbackcited by 98
- 2023InternGPT: Solving Vision-Centric Tasks by Interacting with ChatGPT Beyond Languagecited by 96
- 2021Hierarchical Task Learning from Language Instructions with Unified Transformers and Self-Monitoringcited by 53
- 2023"What It Wants Me To Say": Bridging the Abstraction Gap Between End-User Programmers and Code-Generating Large Language Modelscited by 48
- 2021People construct simplified mental representations to plancited by 45
- 2021Leveraging Language to Learn Program Abstractions and Search Heuristicscited by 44
- 2021In-IDE Code Generation from Natural Language: Promise and Challengescited by 41
- 2021Communicating Natural Programs to Humans and Machinescited by 35
- 2021Fast and flexible: Human program induction in abstract reasoning taskscited by 33
- 2019People infer recursive visual concepts from just a few examplescited by 23
- 2020Learning abstract structure for drawing by efficient motor program inductioncited by 23
- 2020Learning Adaptive Language Interfaces through Decompositioncited by 22
- 2015Program Synthesis from Polymorphic Refinement Typescited by 20
- 2017Naturalizing a Programming Language via Interactive Learningcited by 20
- 2023Large Language Model Programscited by 11
- 2020Resource-rational Task Decomposition to Minimize Planning Costscited by 9
Built on by
Citing papers per year: 2024: 4; 2025: 6; 2026: 3.
13 papers.
Sort:
By area:
- 2024Cut the Crap: An Economical Communication Pipeline for LLM-based Multi-Agent Systemscited by 129
- 2024Combining Induction and Transduction for Abstract Reasoningcited by 53
- 2024CodeS: Natural Language to Code Repository via Multi-Layer Sketchcited by 28
- 2025SOP-Agent: Empower General Purpose AI Agent with Domain-Specific SOPscited by 11
- 2025The Stochastic Parrot on LLM's Shoulder: A Summative Assessment of Physical Concept Understandingcited by 11
- 2025Enhancing LLM-Based Code Generation with Complexity Metrics: A Feedback-Driven Approachcited by 10
- 2025ARC-GEN: A Mimetic Procedural Benchmark Generator for the Abstraction and Reasoning Corpuscited by 8
- 2024Automated Prompt Engineering for Cost-Effective Code Generation Using Evolutionary Algorithmcited by 5
- 2025Understanding LLMs' Fluid Intelligence Deficiency: An Analysis of the ARC Taskcited by 4
- 2026NVIDIA-labs OO Agents: Native Python Object-Oriented Agentscited by 3
- 2025Sharing State Between Prompts and Programscited by 2
- 2026GraphSeek: Next-Generation Graph Analytics with LLMscited by 1
1 more
- 2026NVIDIA-labs OO Agents: Native Python Object-Oriented Agents22 Jul 2026
- 2026GraphSeek: Next-Generation Graph Analytics with LLMs11 Feb 2026
- 2026The New Compiler Stack: A Survey on the Synergy of LLMs and Compilers5 Jan 2026
- 2025Sharing State Between Prompts and Programs16 Dec 2025
- 2025ARC-GEN: A Mimetic Procedural Benchmark Generator for the Abstraction and Reasoning Corpus31 Oct 2025
- 2025Enhancing LLM-Based Code Generation with Complexity Metrics: A Feedback-Driven Approach29 May 2025
- 2025The Stochastic Parrot on LLM's Shoulder: A Summative Assessment of Physical Concept Understanding13 Feb 2025
- 2025Understanding LLMs' Fluid Intelligence Deficiency: An Analysis of the ARC Task11 Feb 2025
- 2025SOP-Agent: Empower General Purpose AI Agent with Domain-Specific SOPs16 Jan 2025
- 2024Combining Induction and Transduction for Abstract Reasoning4 Nov 2024
- 2024Cut the Crap: An Economical Communication Pipeline for LLM-based Multi-Agent Systems3 Oct 2024
- 2024Automated Prompt Engineering for Cost-Effective Code Generation Using Evolutionary Algorithm20 Aug 2024
1 more
- 2024Combining Induction and Transduction for Abstract Reasoningcited by 53
- 2024CodeS: Natural Language to Code Repository via Multi-Layer Sketchcited by 28
- 2025The Stochastic Parrot on LLM's Shoulder: A Summative Assessment of Physical Concept Understandingcited by 11
- 2025Enhancing LLM-Based Code Generation with Complexity Metrics: A Feedback-Driven Approachcited by 10
- 2025ARC-GEN: A Mimetic Procedural Benchmark Generator for the Abstraction and Reasoning Corpuscited by 8
- 2024Automated Prompt Engineering for Cost-Effective Code Generation Using Evolutionary Algorithmcited by 5
- 2025Understanding LLMs' Fluid Intelligence Deficiency: An Analysis of the ARC Taskcited by 4
- 2025Sharing State Between Prompts and Programscited by 2
- 2026GraphSeek: Next-Generation Graph Analytics with LLMscited by 1
- 2026The New Compiler Stack: A Survey on the Synergy of LLMs and Compilerscited by 0
- 2026GraphSeek: Next-Generation Graph Analytics with LLMs11 Feb 2026
- 2026The New Compiler Stack: A Survey on the Synergy of LLMs and Compilers5 Jan 2026
- 2025Sharing State Between Prompts and Programs16 Dec 2025
- 2025ARC-GEN: A Mimetic Procedural Benchmark Generator for the Abstraction and Reasoning Corpus31 Oct 2025
- 2025Enhancing LLM-Based Code Generation with Complexity Metrics: A Feedback-Driven Approach29 May 2025
- 2025The Stochastic Parrot on LLM's Shoulder: A Summative Assessment of Physical Concept Understanding13 Feb 2025
- 2025Understanding LLMs' Fluid Intelligence Deficiency: An Analysis of the ARC Task11 Feb 2025
- 2024Automated Prompt Engineering for Cost-Effective Code Generation Using Evolutionary Algorithm20 Aug 2024
- 2024CodeS: Natural Language to Code Repository via Multi-Layer Sketch25 Mar 2024