This repository contains the code and resources for the ICLR 2026 paper titled "Evoking User Memory: Personalizing LLM via Recollection-Familiarity Adaptive Retrieval".
The origin code of submission can be found here: https://openreview.net/attachment?id=f7p0F2X6XN&name=supplementary_material.
RF-Mem (RecollectionβFamiliarity Memory) is an adaptive retrieval framework for Large Language Models, grounded in the dual-process theory of human cognition.
In cognitive science, memory is often described as a combination of two systems:
- Familiarity β fast, effortless recognition that something has been seen before.
- Recollection β slower, deliberate reconstruction of episodic details such as time, place, and context.
This theory motivates RF-Mem: instead of treating retrieval as either one-shot search or full-context prompting, RF-Mem adaptively balances the two.
The RF-Mem framework first measures retrieval uncertainty using mean similarity and entropy.
- If ths system feel familiarity, it selects the Familiarity path for direct retrieval.
- If this system feel unfamiliar, it switches to the Recollection path, where memory items are clustered and iteratively expanded with query reformulation.
This dual-path design enables scalable and efficient personalized memory retrieval, improving both accuracy and efficiency across long-term memory benchmarks such as PersonaBench, PersonaMem, and LongMemEval.
RF_mem
βββLongMemEval/. # LongMemEval experiment data and scripts
β βββ assets/ # Figures of this paper
β βββ data/ # Shared data directory
β βββ LICENSE
β βββ README.md # Project description
β βββ requirements-full.txt # Full dependencies
β βββ requirements-lite.txt # Lightweight dependencies
β βββ run.sh # Quick start script
β
βββ personabench_data/ # PersonaBench experiment data and scripts
β βββ eval_data/ # Evaluation data
β βββ llm_model/ # LLM model wrapper
β βββ retri_mdoel/ # Retrieval model
β βββ eval.py # PersonaBench evaluation entry
β βββ main_batch.py # Batch experiment entry
β βββ run.sh # Quick run script
β βββ utils.py # Utility functions
β
βββ personamem_data/ # PersonaMem experiment data and scripts
βββ apitokens/ # API key configuration
βββ data/ # Data directory
βββ llm_model/ # LLM model wrapper
βββ retri_mdoel/ # Retrieval model
βββ main_batch.py # PersonaMem batch experiment entry
βββ run.sh # Quick run script
βββ utils.py # Utility functions
It is recommended to use Python 3.10+.
pip install -r requirements.txt-
Run LongMemEval experiments
cd LongMemEval bash run.sh -
Run PersonaBench experiments
cd personabench_data bash run.sh -
Run PersonaMem experiments
cd personamem_data bash run.sh
This project is licensed under the MIT License.
- Authors of LongMemEval, PersonaBench & PersonaMem datasets
- OpenAI / HuggingFace model community

