fix(memory-v2): rank rerank pool by user+assistant signal only#30102
Merged
Conversation
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.
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.
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 whentop_kis tight — a regression vs. the old per-channel selection path.Fix: rank the pool by
c_user*simU + c_assistant*simAalone (a newrerankPoolScorefield). The final A_o computation is unchanged.