Think-in-Memory: Recalling and Post-thinking Enable LLMs with Long-Term MemoryDOI: XXXXXXX.XXXXXXXPrice: 15.00ISBN: 978-1-4503-XXXX-X/18/06123-A56-BU3
Lei Liu Note: Work was done when Lei Liu was a research intern at Ant Group. email: OrcID: 0000-0001-8109-5248 Affiliation: CUHK-Shenzhen, Ant Group , Xiaoyan Yang email: Affiliation: Ant Group , Yue Shen Note: Corresponding Author. email: Affiliation: Ant Group , Binbin Hu, Zhiqiang Zhang email: bin.hbb, Affiliation: Ant Group , Jinjie Gu email: Affiliation: Ant Group and Guannan Zhang email: Affiliation: Ant Group
Abstract
Memory-augmented Large Language Models (LLMs) have demonstrated remarkable performance in long-term human-machine interactions, which basically relies on iterative recalling and reasoning of history to generate high-quality responses. However, such repeated recall-reason steps easily produce biased thoughts, i.e., inconsistent reasoning results when recalling the same history for different questions. On the contrary, humans can keep thoughts in the memory and recall them without repeated reasoning. Motivated by this human capability, we propose a novel memory mechanism called TiM (Think-in-Memory) that enables LLMs to maintain an evolved memory for storing historical thoughts along the conversation stream. The TiM framework consists of two crucial stages: (1) before generating a response, a LLM agent recalls relevant thoughts from memory, and (2) after generating a response, the LLM agent post-thinks and incorporates both historical and new thoughts to update the memory. Thus, TiM can eliminate the issue of repeated reasoning by saving the post-thinking thoughts as the history. Besides, we formulate the basic principles to organize the thoughts in memory based on the well-establish
原文 arXiv:2311.08719;中英对照 + 大白话阅读 https://aha.fim.ai/paper/2311.08719v1