首页|期刊导航|计算机技术与发展|少样本提示驱动的即插即用式复杂任务处理方法

少样本提示驱动的即插即用式复杂任务处理方法OA

Complex Task Handling Method of Plug-and-play with Few-shot Prompting

中文摘要英文摘要

随着大语言模型在复杂任务推理决策领域展现出巨大潜力,越来越多的研究聚焦于如何使用大模型进行任务规划和工具调用.为了达到较好的效果,大多数方法要求对模型进行微调,而优质训练数据总是稀缺,导致这些方法不能快速在领域落地应用.为应对上述问题,提出一种少样本提示驱动的即插即用式复杂任务处理方法(plug-and-play method for complex task handling with few-shot prompting,PnP-FSP).该方法完全采用少样本提示进行复杂任务分析处理,无需开展大模型微调.为使该方法在垂直领域快速应用,提出基于任务规划参考库的任务规划策略,将参考库中与用户问题相似的用例作为提示上下文,辅助完成领域复杂问题的快速规划.同时,引入基于前序任务结果的后续任务调整机制,有效解决一步规划方法强调任务规划的全局性而忽略任务执行过程中动态变化的问题.此外,该方法对任务规划、工具调用等复杂任务处理流程解耦,可根据实际需要选择优势大模型,以即插即用的方式实现大模型集优协同,完成目标任务.实验结果表明,在对监督数据依赖性显著降低的情况下,PnP-FSP优于主流的复杂任务处理方法.

As large language models(LLM)demonstrate significant potential in complex task reasoning and decision-making,an increasing number of studies are focusing on how to utilize LLM for task planning and tool calling.To achieve better results,most methods require fine-tuning of the model,yet high-quality training data is always scarce,preventing these methods from being rapidly applied in the field.To address these issues,we propose a plug-and-play method for complex task handling with few-shot prompting(PnP-FSP).It fully utilizes few-shot prompting for complex task analysis and processing,eliminating the need for LLM fine-tuning.To facilitate rapid application of the proposed method in vertical fields,a task planning strategy based on a task planning reference library is proposed.Use cases in the reference library that are similar to user questions are used as prompt contexts to assist in the rapid planning of complex problems.Additionally,a subsequent task adjustment mechanism based on the results of previous tasks is introduced,effectively addressing the issue of one-step planning methods that emphasize the global nature of task planning while ignoring dynamic changes during task execution.Furthermore,PnP-FSP decouples complex task processing flows such as task planning and tool calling,al-lowing for the selection of advantageous LLM based on actual needs.It achieves optimal collaboration among LLMs in a plug-and-play manner to complete the target task.Experimental results show that PnP-FSP outperforms mainstream complex task handling methods while significantly reducing dependence on supervised data.

何健军

中国电子科技集团公司第十研究所,四川 成都 610036

信息技术与安全科学

大语言模型任务规划工具调用少样本提示深度学习

large language modeltask planningtool callingfew-shot promptingdeep learning

《计算机技术与发展》 2026 (3)

45-52,8

10.20165/j.cnki.ISSN1673-629X.2025.0275

评论