mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[GH-ISSUE #1272] [Issue]: LTM recall: graph links can never inject a memory, so the graph weight does nothing #647
Labels
No labels
agent: chess
agent: conversation-calls
agent: eightball
agent: haptic
agent: hierarchical-maps
agent: hierarchical-maps
agent: illustrator
agent: poker
agent: rock-paper-scissors
agent: tic-tac-toe
agent: uno
artifacts
bug
bugfix
build
catalog
ci
client
dependencies
docs
documentation
enhancement
feature
fixed-in-staging
in-pr
normal-scope
packages
pull-request
qol
regression
roadmap
scope-risk
server
soup
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Agents#647
Loading…
Add table
Add a link
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?
Originally created by @Promansis on GitHub (Oct 8, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1272
Originally assigned to: @Promansis on GitHub.
Summary
The graph lane cannot change which memories are recalled. A graph match scores at most half its lane weight, and every recall preset keeps that under the default 0.35 threshold, so a memory is never injected because it is linked to a memory that matched. The graph weight therefore has no effect in any preset. In the
customstyle, a weight below 0.7 does nothing, and a weight of 0.7 or more lets every one-hop neighbour through, relevant or not. This issue proposes letting a linked memory borrow relevance from the memory it is linked to, and asks for a prototype measurement before the change ships.Follow-up to #1258 and #1264, which left graph scoring as is and deferred this until the BM25 and keyword lanes that seed the graph were fixed. #1264 shipped in 1.4.16.
Affected package
long-term-memory1.4.18:graph.ts,retrieval.ts,ranking.tsunderpackages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/constants.tsunderpackages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/tests/long-term-memory-index-keys.regression.tsExpected behavior
Actual behavior
1 / (distance + 1): 0.5 at one hop and 0.33 at two (graph.ts:92).ranking.ts:61).constants.ts:278-298documents it, andtests/long-term-memory-index-keys.regression.ts:356-369pins it.custom, a weight of 0.7 or more makes every one-hop neighbour clear 0.35. The weight is therefore either inert or a switch that admits all neighbours.retrieval.ts:188-189).viaNoteIdis the note that was reached, not the seed it was reached from (graph.ts:95). Neither Debug nor an evaluation can tell which matched memory a graph hit is linked to.What this costs (1.4.15 evaluation; see Additional context):
Steps to reproduce
balancedstyle and threshold, send a chat turn that matches A only, with debug logging on.customand set the graph weight anywhere from 0 to 0.69: B stays out. At 0.7 or more, B and every other one-hop neighbour of the seed notes pass the threshold.Environment
upstream/staging6685887b5)Logs, screenshots, or video
Not applicable. References above are against
6685887b5.Additional context
Evidence:
Proposed approach (prototype first):
expandLtmGraphreturns the seed note and hop distance each hit came from. Debug can then show the memory a graph pick came through, and the evaluation can measure the change.customgraph weight may behave differently.Related: #1258, #1264, #1265.
Template check
@Promansis commented on GitHub (Oct 8, 2026):
Prototype result on 1.4.18 (
6685887b5): not shipping. Balanced weights, threshold 0.35, cap 12, 23 hand-written 4-message windows over two memory sets of a real vault (19 labelled, 4 off-topic), short and padded-long. Seeds were the memories injected without the graph lane; a linked memory scored max(own relevance, seed relevance × decay^hops), and the existing budget and serializer chose the result.Most unrelated additions came through broadly linked world and character memories. Links from timeline memories were under half relevant. No tested setting improved linked recall without lowering precision, so the gate fails. Package code is unchanged; a different graph policy is being investigated.