Repository navigation
Derived facts and an all-facts baseline; body layer stores only checked outcomes and retries with feedback - #13
Merged
Conversation
…rse."); [agent] rag_all puts every fact in the prompt
- TMemStore.SyncDerived: a relation fact ("my sister's name" = Ana) and a fact
about that name ("Ana's job is nurse.") give a derived fact "Your sister
Ana's job is nurse." (kind 'derived', subject "my sister's job"): bridge and
inverse questions become one-fact lookups. A plain join after every store and
/forget; stale ones are deleted, a forgotten one never comes back, merges and
the same-subject lookup skip derived facts. [agent] derive_facts (default on)
pending the benchmark. After AI-native memory (2406.18312), A-MEM (2502.12110)
and GraphRAG (2404.16130).
- [agent] rag_all: every active fact in the prompt instead of retrieval, the
baseline Mem0's paper found ahead of its own memory (2504.19413).
- bench_integration.py --derive, --all-facts.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NPVFJHeBeotAKkU7EPbTgn
…retried with feedback
A robot's own "done" is a belief: robots that reported their own success
corrupted their memory (From Language to Action, 2603.03148), and Voyager
lost 73% without its success check (2305.16291).
- protocol: {"op": "check", "claim": ...} -> {"event": "checked", "text":
yes|no|unknown}, for a body whose ready event says "checks": true
- TAgent.RunBody: each step's claim ("The mug is in the left cabinet.") is
checked by the body, else by the judge reading the act's observations
(TJudge.Observed); only a confirmed claim is stored, an unconfirmed one is
reported and left out, a refuted one is retried
- closed loop (Inner Monologue, 2207.05608): a failed act or refuted step goes
back with a line saying what happened, at most [body] retries (1) times; a
body that ran the task's own steps gets only the unfinished ones; a rule
stop is never retried
- the mock keeps a world and answers checks; "!" fails a step once and "~"
claims it once without doing it; the LeRobot stub answers checks, a real
rollout says unknown
- scripts/e2e_body.sh: a loop scenario (fail, retry, refuted claim, retry)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NPVFJHeBeotAKkU7EPbTgn
This was referenced Nov 7, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR holds the two commits that came after #12 was merged. They act on what the papers reviewed this week suggested.
Derived facts (
TMemStore.SyncDerived,[agent] derive_facts, default on)memagent now stores the link between two facts as a fact of its own. It joins a relation fact ("Your sister's name is Ana.") with a fact about that person ("Ana's job is nurse."). The result is a derived fact, "Your sister Ana's job is nurse.", with
kind = 'derived'and subject "my sister's job".This should turn the two kinds of question the benchmark still fails into one-fact lookups:
The ideas come from AI-native memory (2406.18312), A-MEM (2502.12110) and GraphRAG (2404.16130).
How it behaves:
/forget.All facts in the prompt (
[agent] rag_all, default off)Puts every active fact in the prompt instead of retrieving. It is the baseline that Mem0's own paper (2504.19413) found ahead of its memory system.
bench_integration.py --derive / --all-factsruns both.Body: verified outcomes and a closed loop
Only checked claims become facts. A robot's own "done" is a belief: robots that reported their own success corrupted their memory (From Language to Action, 2603.03148), and Voyager lost 73% without its success check (2305.16291).
{"op": "check", "claim": ...}returnsyes,noorunknown. A body opts in with"checks": truein itsreadyevent.TJudge.Observed).Closed loop (Inner Monologue, 2207.05608):
[body] retries(1) times.Drivers:
!fails a step once and~claims it once without doing it.unknownuntil it has a scene check, so its steps are confirmed only by the judge reading its observations.Testing
make test: extraction 710/710, priors 39/39, retrieval, HTTPS and the Python tests pass.scripts/e2e_body.sh: the mock and LeRobot-stub runs pass as before; confirmed steps still become facts. A new loop scenario passes too: the jar step fails and is retried, the box step claims success without doing it, the check refutes it, it is retried, and both facts are stored once./recall Which of my relatives is a nurse?ranks the derived fact first, above the stranger Tom.derive_factsdefaults to on, and that default may change with the result.Generated by Claude Code