arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2308.15022cs.CLcs.AI
收藏

递归总结使大型语言模型具备长期对话记忆能力

Recursively Summarizing Enables Long-Term Dialogue Memory in Large Language Models

the Department of Computer Science and Engineering, Hong Kong University of Science and Technology(香港科技大学计算机科学与工程系);the institute of information engineering, Chinese Academy of Sciences(中国科学院信息工程研究所);the College of Computer, National University of Defense Technology(国防科技大学计算机学院);the University of Sydney(悉尼大学)

Qingyue Wang, Yanhe Fu, Yanan Cao, Shuai Wang, Zhiliang Tian, Liang Ding

AI总结:

针对LLMs在长对话中难以回忆过往信息、回复不一致的问题,提出递归生成摘要/记忆的方法,通过让LLMs先记忆小对话上下文,再递归生成新记忆,提升了长对话一致性,且可补充长上下文及检索增强型LLMs。

摘要:

最近,GPT-4等大型语言模型(LLMs)展现出卓越的对话能力,能围绕各类主题开展动态且上下文相关的对话。然而面对长对话时,这些聊天机器人难以回忆过往信息,易生成不一致的回复。为此,我们提出利用LLMs递归生成摘要/记忆以增强其长期记忆能力。具体而言,该方法先促使LLMs记忆小型对话上下文,再利用先前记忆与后续上下文递归生成新记忆。最终,聊天机器人可借助最新记忆轻松生成高度一致的回复。我们在开源和闭源LLMs上进行评估,基于广泛使用的公开数据集的实验表明,该方法能在长上下文对话中生成更一致的回复。此外,该策略可很好地补充长上下文(如8K和16K)及检索增强型LLMs,进一步提升长期对话性能。值得注意的是,该方法是让LLM建模超长上下文的潜在解决方案。代码和脚本已发布。

英文摘要:

Recently, large language models (LLMs), such as GPT-4, stand out remarkable conversational abilities, enabling them to engage in dynamic and contextually relevant dialogues across a wide range of topics. However, given a long conversation, these chatbots fail to recall past information and tend to generate inconsistent responses. To address this, we propose to recursively generate summaries/ memory using large language models (LLMs) to enhance long-term memory ability. Specifically, our method first stimulates LLMs to memorize small dialogue contexts and then recursively produce new memory using previous memory and following contexts. Finally, the chatbot can easily generate a highly consistent response with the help of the latest memory. We evaluate our method on both open and closed LLMs, and the experiments on the widely-used public dataset show that our method can generate more consistent responses in a long-context conversation. Also, we show that our strategy could nicely complement both long-context (e.g., 8K and 16K) and retrieval-enhanced LLMs, bringing further long-term dialogue performance. Notably, our method is a potential solution to enable the LLM to model the extremely long context. The code and scripts are released.

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

↑