arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2401.17390cs.CLcs.AI
收藏

使用对比上下文学习定制语言模型响应

Customizing Language Model Responses with Contrastive In-Context Learning

Intuit AI Research(Intuit 人工智能研究院)

Xiang Gao, Kamalika Das

AI总结:

本文提出对比上下文学习方法,通过正负示例及生成前推理引导LLM理解难以言表的风格与内容偏好,并在StackExchange、Reddit等数据集上验证其优于标准少样本提示。

摘要:

大型语言模型(LLM)在机器学习应用中正变得愈发重要。然而,使LLM与我们的意图保持一致可能具有挑战性,尤其是当我们希望生成比其他内容更可取的内容,或者希望LLM以某种难以描述的风格或语气作出回应时。为应对这一挑战,我们提出了一种使用对比示例来更好描述意图的方法。该方法包括提供阐明真实意图的正例,以及展示我们希望LLM避免哪些特征的负例。负例可以从带标注数据中检索、由人工编写,或由LLM自身生成。在生成答案之前,我们要求模型分析这些示例,以自学应避免的内容。这一推理步骤为模型提供了对用户需求的恰当表述,并引导其生成更好的答案。我们在合成数据集和真实世界数据集(包括StackExchange和Reddit)上测试了该方法,发现与标准少样本提示相比,它显著提升了性能。

英文摘要:

Large language models (LLMs) are becoming increasingly important for machine learning applications. However, it can be challenging to align LLMs with our intent, particularly when we want to generate content that is preferable over others or when we want the LLM to respond in a certain style or tone that is hard to describe. To address this challenge, we propose an approach that uses contrastive examples to better describe our intent. This involves providing positive examples that illustrate the true intent, along with negative examples that show what characteristics we want LLMs to avoid. The negative examples can be retrieved from labeled data, written by a human, or generated by the LLM itself. Before generating an answer, we ask the model to analyze the examples to teach itself what to avoid. This reasoning step provides the model with the appropriate articulation of the user's need and guides it towards generting a better answer. We tested our approach on both synthesized and real-world datasets, including StackExchange and Reddit, and found that it significantly improves performance compared to standard few-shot prompting

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

↑