feat: v5 — LongMemEval benchmark improvements (fact extraction, timestamp-aware retrieval) #17
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Background
OmniMem v2-raw was benchmarked against LongMemEval (500 items, GPT-4o judge) with the following results:
Single-session retrieval is strong. The weak spots are multi-session (51.9%) and temporal-reasoning (51.1%), which together make up 266/500 items (53% of the benchmark). These are exactly what OmniMem's pipeline is designed to address — but this run used raw mode (verbatim storage, no enrichment).
Proposed v5 improvements
1. Fact extraction at ingest (full mode)
Instead of storing raw conversation turns, use Claude to extract discrete facts before storing:
This directly improves multi-session reasoning — facts are compact, semantically precise, and deduplicable across sessions. OmniMem's contradiction detection then handles knowledge updates correctly.
2. Timestamp-aware query expansion
For temporal questions ("What did I do last Tuesday?"), include date context in search variants. The
haystack_datesfield in LongMemEval provides session timestamps — these should be surfaced in recall scoring.3. Preference detection at ingest
Single-session-preference scored 50.0% — preferences are subtle ("I prefer leather straps", "I like earthy tones") and often buried mid-conversation. A dedicated preference extraction pass at ingest would surface these as structured
preferencememory types (related to the preference memory type design from earlier work).Expected impact
Based on the category breakdown, fixing multi-session and temporal alone (266 items) could move the overall score from 65% to 80%+. Fact extraction is the highest-leverage change.
Benchmark repo
Full benchmark code, results, and evaluation scripts:
~/Downloads/omnimem-longmemeval(to be pushed to Forgejo).Related issues
remember_document()— chunking strategies needed for fact extraction pipelineStatus update (2026-07-08) — leaving this open because its acceptance criterion is a benchmark number, but all three proposed improvements are now code-complete on
v5:INGEST_MODE=full), made asynchronous in v5.2.0 (#19). The architecture flaw that made it hurt scores (facts crowding out verbatim content, timestamps stripped — the 33.6% vs 65.6% regression) was fixed in v5.3.1 (#20): facts now supplement verbatim chunks from the knowledge namespace, inherit temporal anchors via anevent_datefallback chain, and the verbatim wording wins direct recall.event_dateproximity boost), and as of v5.3.1 the boost also applies to query-expansion variants and to extracted facts via inherited anchors.preferencenamespace with its own index and recall path.Related recall-quality work that should help the multi-session categories specifically: v5.3.0 pushed project/state filters into the vector search and scaled the candidate pool, fixing result starvation under project filters.
What remains for this issue: re-run LongMemEval (raw vs full) against current
v5to confirm full mode now beats the 65.0% raw baseline, especially on temporal-reasoning and multi-session. Closing then, with the numbers.