Skip to content

memory/v2: unify rerank pool by A_o and apply boost additively#29622

Merged
siddseethepalli merged 2 commits into
mainfrom
do/memory-v2-unified-rerank-pool
May 5, 2026
Merged

memory/v2: unify rerank pool by A_o and apply boost additively#29622
siddseethepalli merged 2 commits into
mainfrom
do/memory-v2-unified-rerank-pool

Conversation

@siddseethepalli
Copy link
Copy Markdown
Contributor

@siddseethepalli siddseethepalli commented May 5, 2026

Summary

  • Replace per-channel top-K-by-fused-sim with a unified top-K-by-pre-rerank-A_o, so a slug strong in both channels can't double-boost itself past single-channel hits.
  • Apply the cross-encoder boost additively to A_o weighted by c_user / c_assistant (instead of folding it into sim_u / sim_a, then multiplying by the coefficients).
  • simBatch becomes a pure dense+sparse fuser; computeOwnActivation owns the rerank step end-to-end. The macOS inspector renders rerank Δ_u / Δ_a as standalone additive A_o rows.
  • Drive-by: remove stale skills references from the concept-frequency test that break tsc on main after the recent skills-into-concept-pool unification.

Original prompt

it


Open in Devin Review

Vellum Assistant and others added 2 commits May 5, 2026 07:53
…ost additively

Cross-encoder rerank now selects its top-K from the unified pre-rerank-A_o
pool instead of running per-channel on top-K-by-fused-sim. Boost is added to
A_o weighted by c_user / c_assistant rather than folded into sim_u / sim_a,
so a slug strong in both channels can no longer crowd out single-channel
hits via a doubled per-channel boost.

simBatch loses its useRerank/rerankBoost options and becomes pure
dense+sparse fusion. computeOwnActivation owns the rerank step end-to-end:
it computes pre-rerank A_o per candidate, picks top-K, runs the
cross-encoder once per channel against that unified set, and adds
c_user·α·r_norm_u + c_assistant·α·r_norm_a to the final A_o. The macOS
inspector now renders rerank Δ_u / Δ_a as standalone additive A_o rows.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ost additively

Cross-encoder rerank now selects its top-K from the unified pre-rerank-A_o
pool instead of running per-channel on top-K-by-fused-sim. Boost is added to
A_o weighted by c_user / c_assistant rather than folded into sim_u / sim_a,
so a slug strong in both channels can no longer crowd out single-channel
hits via a doubled per-channel boost.

simBatch loses its useRerank/rerankBoost options and becomes pure
dense+sparse fusion. computeOwnActivation owns the rerank step end-to-end:
it computes pre-rerank A_o per candidate, picks top-K, runs the
cross-encoder once per channel against that unified set, and adds
c_user·α·r_norm_u + c_assistant·α·r_norm_a to the final A_o. The macOS
inspector now renders rerank Δ_u / Δ_a as standalone additive A_o rows.

Also drops stale `skills` references from the concept-frequency test —
unblock the type-check that breaks on main after #29619 unified skills
into the concept pool.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@siddseethepalli siddseethepalli merged commit f8303e1 into main May 5, 2026
@siddseethepalli siddseethepalli deleted the do/memory-v2-unified-rerank-pool branch May 5, 2026 07:54
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ff79d861ef

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread assistant/src/memory/v2/activation.ts
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: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

siddseethepalli added a commit that referenced this pull request May 9, 2026
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.

Co-authored-by: Vellum Assistant <assistant@vellum.ai>
@siddseethepalli
Copy link
Copy Markdown
Contributor Author

Codex P1 addressed in follow-up #30102 — rerank pool is now ranked by c_user*simU + c_assistant*simA only, so prior- and NOW-heavy slugs no longer consume the rerank budget.

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