arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.14310cs.CL
收藏

先提示后求解的提示方法:引导大语言模型有效利用已编码知识

Hint-before-Solving Prompting: Guiding LLMs to Effectively Utilize Encoded Knowledge

National University of Singapore(新加坡国立大学);School of Computer Science, Fudan University(复旦大学计算机科学学院);Shanghai AI Laboratory(上海人工智能实验室)

Jinlan Fu, Shenzhen Huangfu, Hang Yan, See-Kiong Ng, Xipeng Qiu

AI总结:

本文提出先提示后求解的提示方法HSP,通过先引导LLM生成关键提示再生成推理步骤,在多个推理基准上有效提升准确率,并构建HSPMATH数据集微调模型以超越GPT-3.5等基线。

摘要:

大语言模型(LLMs)近期在多个领域展现出卓越的泛化能力。尽管拥有广泛的知识,LLMs在高效利用已编码知识来构建准确且合乎逻辑的推理过程方面仍面临挑战。为缓解这一问题,我们提出了先提示后求解的提示方法(Hint-before-Solving Prompting,HSP),该方法引导模型首先生成用于解决问题的提示(例如特定知识或关键思路),随后生成包含中间推理步骤的解答。由于HSP与提示方法(如思维链(Chain-of-Thought,CoT))正交,我们将HSP应用于CoT、Least-to-Most、Plan-and-Solve以及标准提示方法。在6个推理基准和4个开源LLMs上进行的大量实验结果表明,HSP能够有效提升推理任务的准确率:(1)通过将高质量提示增强的HSP应用于CoT提示,Llama2-70B-Chat的准确率提升了9.7。(2)除探索无需训练的LLM能力外,我们还基于HSP构建了HSPMATH数据集,并对Llemma-7B进行了微调,准确率达到64.3,超越了GPT-3.5和WizardMath-13B。我们已将代码和数据集公开发布于\url{https://github.com/jinlanfu/HSP}。

英文摘要:

Large Language Models (LLMs) have recently showcased remarkable generalizability in various domains. Despite their extensive knowledge, LLMs still face challenges in efficiently utilizing encoded knowledge to develop accurate and logical reasoning processes. To mitigate this problem, we introduced Hint-before-Solving Prompting (HSP), which guides the model to generate hints (e.g., specific knowledge or key ideas) for solving the problem and then generate solutions containing intermediate reasoning steps. Since HSP is orthogonal to prompting methods (e.g., Chain-of-Thought (CoT)), we applied HSP to CoT, Least-to-Most, Plan-and-Solve, and Standard promptings. The results of extensive experiments on 6 reasoning benchmarks and 4 open-source LLMs demonstrate that HSP can effectively improve the accuracy of reasoning tasks: (1) By applying high-quality hint-enhanced HSP to CoT prompting, Llama2-70B-Chat shows an improvement of 9.7. (2) Beyond exploring training-free LLM capabilities, we built the HSPMATH dataset based on HSP and fine-tuned Llemma-7B, reaching 64.3 accuracy, surpassing GPT-3.5 and WizardMath-13B. We make our code and dataset publicly available at \url{https://github.com/jinlanfu/HSP}.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑