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

通过引导链提升大语言模型的一致性

Improving Consistency in Large Language Models through Chain of Guidance

Northeastern University(东北大学);Pennsylvania State University(宾夕法尼亚州立大学);Dalhousie University(达尔豪斯大学);Vijil(维吉尔科技)

Harsh Raj, Vipul Gupta, Domenic Rosati, Subhabrata Majumdar

AI总结:

针对大语言模型推理阶段输出一致性难以控制的问题,提出基于引导链(CoG)的多步提示对齐策略,结合合成数据微调,使模型一致性提升超两倍且泛化性强。

摘要:

一致性是大语言模型(LLM)可信性的核心维度。要让用户信任基于LLM的应用,当输入语义或意图相同时,模型的输出必须保持一致。尽管存在这一需求,目前尚无已知机制能在推理阶段控制并引导LLM提升一致性。本文提出一种新型对齐策略,旨在最大化LLM输出的语义一致性。该策略基于引导链(Chain of Guidance, CoG)——这是一种多步提示技术,可让LLM生成高度一致的输出。在闭卷问答(Q&A)任务中,与直接提示相比,使用CoG生成的输出一致性有所提升。虽然基于模板的回复、多数投票等其他方法也能实现一致性,但本工作聚焦于探索引导式提示的潜力。我们使用由一致输入-输出对构成的合成数据集对LLM进行微调,使其生成既一致又正确的输出。微调后的模型一致性是基础模型的两倍以上,且在未参与微调的数据集上仍能生成一致输出,展现出强大的泛化能力。

英文摘要:

Consistency is a fundamental dimension of trustworthiness in Large Language Models (LLMs). For humans to be able to trust LLM-based applications, their outputs should be consistent when prompted with inputs that carry the same meaning or intent. Despite this need, there is no known mechanism to control and guide LLMs to be more consistent at inference time. In this paper, we introduce a novel alignment strategy to maximize semantic consistency in LLM outputs. Our proposal is based on Chain of Guidance (CoG), a multistep prompting technique that generates highly consistent outputs from LLMs. For closed-book question-answering (Q&A) tasks, when compared to direct prompting, the outputs generated using CoG show improved consistency. While other approaches like template-based responses and majority voting may offer alternative paths to consistency, our work focuses on exploring the potential of guided prompting. We use synthetic data sets comprised of consistent input-output pairs to fine-tune LLMs to produce consistent and correct outputs. Our fine-tuned models are more than twice as consistent compared to base models and show strong generalization capabilities by producing consistent outputs over datasets not used in the fine-tuning process.

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

↑