Skip to content

Guard licence for derived facts (78 to 88 of 96), a backlog fix for the summary, and LoCoMo - #16

Merged
FMXExpress merged 6 commits into
mainfrom
claude/optimistic-allen-i3bd3d
Nov 8, 2026
Merged

FMXExpress merged 6 commits into
mainfrom
claude/optimistic-allen-i3bd3d

Conversation

@FMXExpress

Copy link
Copy Markdown
Owner

Each change was benchmarked and kept only if it won. The full write-up is in bench/README.md under "Checking what won".

Kept

  • Guard licence for derived facts (Mem.Guard.DerivedLicenses). A derived fact ("Your sister Ana's job is nurse.") now licenses the answer it backs. Ten of the eleven inverse failures were correct answers that the rule guard was withholding. On the 1.5B agent, the integration benchmark goes from 78 to 88 of 96, with inverse questions going from 13 to 22 of 24.
  • The summary catches up on a long backlog a batch per turn (TAgent.MaybeSummarize). After a long import (/log), the running summary sent the whole backlog in one call, 24k tokens for LoCoMo's 419 turns. The call failed, the summary never advanced, and every later turn failed again. Each call now takes what fits in half the context.
  • /log <text>. It stores a message in the searchable conversation log without a reply. It is used to load recorded conversations.
  • LoCoMo runner (bench/bench_locomo.py). Sample 0, 152 questions: F1 19.2 overall, with a mean of 15.9 over the four categories. At Qwen2.5-1.5B, A-MEM reports 8.6 for the whole conversation in the prompt, about 9.4 for MemGPT and MemoryBank, and 20.7 for A-MEM. That puts memagent above full context, MemGPT and MemoryBank, and below A-MEM. Temporal questions are the weakest (0.11).
  • Held-out merge test set (bench/jev/make_merge_cases_heldout.py, 68 pairs).

Measured and not adopted

  • Every fact in the prompt (rag_all) scores 53/96 against 78/96 for retrieval and is 2.5× slower, so it stays off.
  • Merge thresholds on the held-out pairs. The agent's policy makes 0 wrong merges, against 18 for the rules alone, and misses 14 duplicates, against 7. The rescue never fires on reworded attributes because the Related synonym table lacks "profession", "occupation" and "trade", and has no group for "city" and "town". That one-line fix is left for a third test set, so it isn't tuned on the held-out pairs.

Test plan

  • make builds cleanly
  • Integration benchmark, 1.5B: bench/results/integration-small-derive-guard.json (88/96) and integration-small-allfacts.json (53/96)
  • LoCoMo sample 0 after the fix: no context errors across 419 turns and 152 questions (bench/results/locomo-small-s0.json)
  • Held-out merge set scored with bench/jev/score_merge.py

Generated by Claude Code

…er; held-out merge test set

- Mem.Guard.DerivedLicenses: "Your grandpa Zoe's city is Oslo." licenses
  "Zoe lives in Oslo." for "Which of my relatives lives in Oslo?" (and the value
  for "Which city does my grandpa live in?"). With derived facts in memory, all
  11 answers the rule guard withheld were right, 10 of them backed by a derived
  fact. Benchmark pending.
- /log <text>: a message into the conversation log without a reply or fact
  extraction, for loading recorded conversations
- bench/bench_locomo.py: LoCoMo (2402.17753) on the real agent, token F1 per
  category as Mem0 and A-MEM report them
- bench/jev/merge_cases_heldout.json: 68 pairs the merge thresholds were never
  tuned on (nicknames, reworded attributes, addresses; pets, parent/child,
  siblings, same name another relation, past kept as history)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NPVFJHeBeotAKkU7EPbTgn
… turn

After a long import (/log, 419 LoCoMo turns) the running summary tried to send the
whole backlog in one 24k-token call; it failed, the summary never advanced, and every
later turn failed again. Each call now takes what fits in half the context. The bench
parser keeps an answer that starts with a bracketed date.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NPVFJHeBeotAKkU7EPbTgn
@FMXExpress
FMXExpress merged commit 3c13984 into main Nov 8, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants