This repository contains the code and dataset for the paper titled
Enhancing Long-term RAG Chatbots with Psychological Models of Memory Importance and Forgetting.
LUFY is a Retrieval-Augmented Generation (RAG) chatbot that selectively forgets unimportant conversations — managing to forget over 90% of irrelevant content! This approach enables more efficient long-term interaction with reduced memory bloat and improved relevance.
We are releasing the largest known conversation dataset between a human and a system, with each conversation spanning approximately 12,000 tokens or 253 turns for 17 unique users.
The same dataset can be found at Hugginface.
The dataset is released in two configurations:
Each row corresponds to a single dialogue turn.
Fields
user_name: Name of the user (may be anonymized)assistant_name: Name of the assistant personaconversation_id: Identifier for a conversation sessionconversation_date: Date of the conversation (YYYY-MM-DD)turn_id: Turn identifier (used for evidence linking)role: One ofuser,assistant, 'system'(prompt)content: Text content of the turn
Each row corresponds to a question–answer pair derived from the conversations.
Fields
user_nameassistant_nameconversation_idconversation_datequestion: Natural-language questionanswer: Ground-truth answerevidence_turn_ids: List ofturn_ids that support the answer
The fine-tuned RoBERTa-large used for memory-importance (valence/arousal) prediction is hosted on Hugging Face and is downloaded automatically the first time you run LUFY — no Git LFS required.
Step1: conda create --name your_env_name python=3.11
Step2: pip install -r requirements.txt
Step3: #Edit the .env file and write your OPENAI API KEY
Step4: Navigate to LUFY/code directory and type "python chat.py" to start the conversation.
Type "stop" to stop the conversation. Enjoy!
For more details on the project, including the methodology and results, please refer to our paper here or contact the authors (sumida@sap.ist.i.kyoto-u.ac.jp).