Skip to content

中文版 / Chinese version

LongMemEval Benchmark

LongMemEval is a benchmark for long-term memory over multi-session chat histories. Each item provides a chronologically ordered set of chat sessions between a user and an assistant, followed by a probing question whose answer is only recoverable by reasoning over the user-owned memory. ReMe ingests the sessions into an isolated per-item workspace, answers the question via an agentic (ReAct) mode, and scores the answer with an LLM-as-judge.

Question types include single-session (user / assistant / preference), multi-session reasoning, knowledge update, and temporal reasoning.

Install ReMe and the LongMemEval plugin in editable mode from the repository root:

bash
python -m pip install -e ".[as]"
reme plugins install ./plugins/lme --editable
reme plugins validate lme

The runner explicitly enables the installed lme plugin and combines its defaults with ReMe's built-in benchmark preset. Editable installation keeps changes under plugins/lme visible without reinstalling the plugin. Custom application config paths still work through reme.config and can use extends: benchmark. This directory continues to own the runner, evaluation settings, dataset and outputs. Model credentials use the environment variables declared by the shared benchmark configuration.

1. Get the Dataset

ReMe uses only the cleaned-S split, hosted on HuggingFace: agentscope-ai/ReMe_longmemeval_clean_s_v2. The download script fetches it via the hf-mirror.com mirror; to use a different mirror, modify BASE_URL in download.py.

bash
cd benchmark/longmemeval
python download.py            # saves dataset/longmemeval_s_reme_cleaned.json; skips if already present

Ground truth is embedded in the data file.

2. Run

From the repository root:

bash
python benchmark/longmemeval/run.py
python benchmark/longmemeval/run.py --config benchmark/longmemeval/config.yaml
python benchmark/longmemeval/run.py -q                        # quiet: only eval-level logs
python benchmark/longmemeval/run.py --log-level WARNING       # reduce eval runner logs
python benchmark/longmemeval/run.py --reme-log-level WARNING  # reduce reme internal logs
python benchmark/longmemeval/run.py --eval_only               # reuse existing workspaces, query + judge only

3. Pipeline

  1. Load the dataset (ground truth is embedded in the data file).
  2. For each item, create an isolated workspace and ingest sessions in chronological order.
  3. If a custom application configuration enables auto_dream, trigger it when sessions cross the configured hour (default 23:00). The packaged preset leaves it disabled.
  4. Answer each question via agentic (ReAct) mode.
  5. Judge the answer (binary yes/no) with the answer_judge job and print per-type accuracy.

4. Key config — benchmark/longmemeval/config.yaml

KeyMeaning
dataset.pathDataset file to evaluate (e.g. longmemeval_s_reme_cleaned.json); ground truth is included.
dataset.start_index / num_itemsSlice of items to evaluate.
dataset.question_typesFilter by question type; empty = all.
dataset.workspace_rootPer-item workspace root (benchmark/longmemeval/workspaces/longmemeval-s).
evaluation.num_workers0 = auto (cpu-2), 1 = sequential, >1 = parallel.
evaluation.filter_future_sessionsOnly ingest sessions with timestamp ≤ question_date.
reme.configReMe config used (benchmark).
reme.dream_trigger_hour / dream_scan_days / dream_max_unitsDream triggering behavior.
output.dirResults directory (benchmark/longmemeval/results).

5. Outputs

Results are JSON files written to output.dir as results_<timestamp>.json, with a per-type accuracy summary also printed to the console. Logging conventions are shared across benchmarks — see the top-level README.

6. Reference Results

cleaned-s

Basic settings

  1. Modified auto-memory prompt, auto-dream disabled.
  2. All sessions in reme-memory are strictly earlier than the question time.

Results

agentscope==2.0.4.post1, conda reme env, 32 workers, eval-only (reusing prebuilt memory) (2026-08-06, 500 items, total 10.0 min)

TypeAgenticinput tok/qoutput tok/qtotal tok/qtool calls/q
knowledge-update0.91031,58158932,1692.90
multi-session0.84252,8371,47454,3114.21
single-session-assistant1.00015,59627915,8751.89
single-session-preference0.63336,80281837,6203.60
single-session-user0.98627,43335927,7922.60
temporal-reasoning0.90262,67498563,6594.97
OVERALL0.89443,44887644,3243.69

Released under the Apache-2.0 License.