mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2287] [Issue]: Memory recall dropped its 0.25 relevance floor, admitting any positive-cosine match #1122
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#1122
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 @Romuromylus on GitHub (Jun 5, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2287
Originally assigned to: @Xelvanis on GitHub.
Summary
The refactor admits any weakly-positive memory match (cosine > 0, further loosened by an additive lexical bonus) into recall. Main required similarity >= 0.25 and injected no memories block when nothing cleared the floor.
Expected behavior
Memory recall should enforce a minimum relevance floor (main uses 0.25) so that when only weak matches exist, no low-relevance fragments are injected and no context budget is spent.
Actual behavior
The refactor filters only
similarity > 0, so faint matches (a weak positive cosine or a single shared lexical token bucket) are admitted and up to 8 fragments are injected, spending budget on low-relevance noise. The top-8 slice and the recall token budget bound the blast radius.Steps to reproduce
Impact area
Regression notes
Worked on main. Main defines
SIMILARITY_THRESHOLD = 0.25and filters>= SIMILARITY_THRESHOLD(packages/server/src/services/memory-recall.ts:19,259); an empty result skips the memories block (generate.routes.ts:5052). The refactor computescosineSimilarity(...) + Math.min(0.2, lexicalScore * 0.025)and filters only> 0(src/engine/generation/prompt-assembly.ts:1867,1870). Grepping src, src-tauri, and crates for the floor (0.25, SIMILARITY_THRESHOLD, threshold) found only unrelated values;packRecalledMemoriesenforces only a token budget (prompt-assembly.ts:1738). Minor because top-8 plus the recall token budget bound it.Environment
5ddb9840(compared against main @b4ab97f)Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: