Skip to content

About

Reproducible LoCoMo benchmark harness — frozen answerer/judge protocol, per-run results

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LoCoMo benchmark harness

A reproducible harness for the LoCoMo long-term conversational-memory QA benchmark. It runs a frozen protocol — fixed answerer, fixed judge, fixed prompts — against a memory server exposed over a small REST contract, and ships the certified per-run results so the numbers can be recomputed.

Repository: https://github.com/Astrix-Labs/locomo-harness

The dataset is not included

LoCoMo is licensed CC BY-NC 4.0 (Creative Commons Attribution-NonCommercial 4.0 International) by Maharana et al. (SNAP Research). It is not redistributed in this repo. Fetch it from the official source before running:

python download_locomo.py        # writes locomo10.json next to the scripts

Install

pip install -r requirements.txt
cp .env.example .env       # then set OPENAI_API_KEY

Backend contract

The harness talks to a memory server over HTTP only (it imports nothing from any server implementation). The server must expose three endpoints, keyed by an X-User-Id header for per-conversation isolation:

Method & path Purpose
POST /api/memories store one memory (content, created_at, …)
POST /api/recall retrieve top-k memories for a query
POST /api/admin/clear-user clear a user scope before ingest

Default base URL is http://localhost:8000 (override with --api).

Run

locomo_run.py is the canonical, self-contained pipeline. For each conversation it clears the user scope, ingests that conversation's turns, recalls + answers each question, then judges every answer at the end:

python locomo_run.py --samples all --k 90 --route on --ingest turn --query-expand on

The result JSON (metadata + per-question results) is written to --output (default locomo_judged.json). run_variants.sh launches several full runs and hands their outputs to variant_analysis.py.

Frozen protocol

  • Answerer: gpt-4o-mini, temperature=0.
  • Judge: gpt-4o-mini, temperature=0, forced JSON output; the Mem0-era ACCURACY_PROMPT verbatim (including the temporal-leniency clause). A judge parse failure scores WRONG — never defaults toward CORRECT.
  • Questions: n = 1540 across categories 1–4 — Multi-hop (282), Temporal (321), Open-domain (96), Single-hop (841). Category 5 (adversarial) is excluded by default (known-broken ground truth).
  • The J-score is the fraction of answers the judge labels CORRECT.

Certified result

Over the 10 certified k=90 runs in cert/:

mean J = 85.55, std = 0.37.

About cert/*.json.gz

Each file holds the per-question records of one certified run: sample_id, question_idx, category, predicted_answer, num_memories_retrieved, prompt_used, verdict, is_correct, plus a run metadata block (models, config, per-category and per-conversation J-scores). This is enough to recompute every J-score.

The LoCoMo-derived text fields (question, gold_answer, evidence) and the model's chain-of-thought (full_completion) are redacted in these files under the dataset's CC BY-NC 4.0 license. To materialize full records, run the harness yourself against the downloaded locomo10.json.

Analyze

# recompute per-run / per-category J, frozen guardrails, and the retention
# ledger of your run(s) against the certified 10-run consensus:
python variant_analysis.py --runs locomo_judged.json

Tests

pytest -q

The reranker parity tests self-skip when the (unshipped) probe modules are absent; the freeze guards pin the frozen prompt texts and the request path.

License

Harness code: MIT (see LICENSE). The LoCoMo dataset is CC BY-NC 4.0 and carries its own upstream license — it is downloaded, not redistributed here.

About

Reproducible LoCoMo benchmark harness — frozen answerer/judge protocol, per-run results

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages