ExploraCoder:通过规划与链式探索推进面向多个未见API的代码生成
ExploraCoder: Advancing code generation for multiple unseen APIs via planning and chained exploration
AI总结:
ExploraCoder提出免训练框架,通过任务规划与链式API探索,使LLM能调用多个未见API,在pass@10上较检索法提升11.99%,较预训练法提升17.28%。
摘要:
大型语言模型在编码涉及训练语料中未见过的API时面临固有局限性。随着库的不断演进,用新的API知识对LLM进行穷举式再训练变得不切实际。这一局限性阻碍了LLM解决需要新引入或私有维护库的编程问题。受人类探索式编程范式的启发,我们提出ExploraCoder,一个免训练框架,通过(1)将复杂问题规划为多个API调用子任务,以及(2)通过新颖的API探索链在中间步骤实验正确的API用法,使LLM能够在代码解决方案中调用多个未见API。我们在涉及复杂API交互的程序合成任务上进行了评估。实验结果表明,ExploraCoder显著提升了缺乏先验API知识的模型的性能,在pass@10指标上相比基于检索的方法实现了高达11.99%的绝对提升,相比基于预训练的方法实现了17.28%的绝对提升。
英文摘要:
Large language models face intrinsic limitations in coding with APIs that are unseen in their training corpora. As libraries continuously evolve, it becomes impractical to exhaustively retrain LLMs with new API knowledge. This limitation hampers LLMs from solving programming problems which require newly introduced or privately maintained libraries. Inspired by exploratory programming paradigm in human behavior, we propose ExploraCoder, a training-free framework that empowers LLMs to invoke multiple unseen APIs in code solution by (1) planning a complex problem into several API invocation subtasks, and (2) experimenting with correct API usage at intermediate steps through a novel chain-of-API-exploration. We conduct evaluation on program synthesizing tasks involving complex API interactions. Experimental results demonstrate that ExploraCoder significantly improves performance for models lacking prior API knowledge, achieving absolute increases of up to 11.99% over retrieval-based approaches and 17.28% over pretraining-based methods in pass@10.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。