arXiv:2409.12979cs.HCcs.AI2024-09被引 1

用自动学习的指南代替示例,让模型推理更高效。

Can we only use guideline instead of shot in prompt?

  • 通过反馈、指南、树状聚合三阶段自动提炼任务专用推理指南。
  • 在多个任务上表现优于传统示例法,证明指南提示的有效性。
  • 适合希望减少人工设计示例、提升推理一致性的研究者。

当前提示技术主要分为两类:1)示例法通过模仿示例中的解答步骤隐式引导模型,如少样本思维链(few-shot CoT);2)指南法通过明确指令显式指导模型遵循特定推理规则,包含简洁的任务专属知识。示例法面临示例类型选择、数量设定及推理步骤设计等难题,因此提出疑问:能否仅用指南替代示例?为此,本文提出FGT框架,从包含反馈(Feedback)、指南(Guideline)和树状聚合(Tree-gather)代理的数据集中自动学习任务专用指南。首先,反馈代理评估每个问答对的正确与错误结果,提取优化策略;其次,指南代理从反馈中提炼指南并存入本地记忆;最后,树状聚合代理通过层级结构整合所有指南,全局去重获取完整指南集。此外,诱导模型生成中间推理过程以保证与指南一致。实验表明,该方法在多个任务上均取得更优性能,验证了指南提示的有效性。

原文摘要 · Abstract (English)

Currently, prompting techniques can be mainly divided into two categories:1)shot method implicitly inspires the model to answer the question by mimicing the steps in the given example, e.g., the few-shot CoT. 2) Guideline method explicitly instructs the model to reason by following guidelines, which contains succinct and concise task-specific knowledge. Shot method is prone to difficulties in terms of selection of shots type, the number of shots, and the design of the reasoning steps, so a question arises: can we only use guideline instead of shot in the prompt? To this end, we propose the FGT framework to automatically learn task-specific guidelines from dataset consisting of Feedback, Guideline, and Tree-gather agents. First, the feedback agent is designed to evaluate the outcomes, both right and wrong, of each Q&A to gather insights guiding more effective optimization strategies. Next, the guideline agent is tasked with deriving guidelines from each piece of feedback and storing them in local memory. Lastly, the tree-gather agent aggregates all guidelines hierarchically through a tree structure, ultimately obtaining all unduplicated guidelines from a global perspective. In addition, we induce the model to generate intermediate processes to ensure the reasoning consistent with the guidelines. Experimental results demonstrate that our approach achieves superior performance across multiple tasks, thereby highlighting the effectiveness of using the guidelines in prompt.

提示工程自动推理指南学习

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。