Skip to content

fix(memory-v2): rank rerank pool by user+assistant signal only#30102

Merged
siddseethepalli merged 1 commit into
mainfrom
swarm/43fc/task-221
May 9, 2026
Merged

fix(memory-v2): rank rerank pool by user+assistant signal only#30102
siddseethepalli merged 1 commit into
mainfrom
swarm/43fc/task-221

Conversation

@siddseethepalli
Copy link
Copy Markdown
Contributor

@siddseethepalli siddseethepalli commented May 9, 2026

Addresses Codex P1 on #29622.

The unified rerank pool was ranked by preRerank = priorContribution + c_user*simU + c_assistant*simA + c_now*simN, but rerank only operates on user and assistant text. Prior- and NOW-heavy slugs could therefore consume the rerank budget without benefiting from cross-encoder gains, pushing genuinely user/assistant-relevant slugs out of the pool when top_k is tight — a regression vs. the old per-channel selection path.

Fix: rank the pool by c_user*simU + c_assistant*simA alone (a new rerankPoolScore field). The final A_o computation is unchanged.


Open in Devin Review

Codex P1 on #29622: ranking the unified rerank pool by full pre-rerank A_o
let priorContribution and c_now*simN consume the rerank budget despite
being ineligible for cross-encoder gains, starving genuinely user- or
assistant-relevant slugs out of the pool when top_k is tight.
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 0 potential issues.

View 1 additional finding in Devin Review.

Open in Devin Review

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.

1 participant