Skip to content

feat(extension): hybrid search + surface document chunks in auto-recall - #1422

Open
HaoChiBao wants to merge 2 commits into
supermemoryai:mainfrom
HaoChiBao:feat/extension-hybrid-recall
Open

feat(extension): hybrid search + surface document chunks in auto-recall#1422
HaoChiBao wants to merge 2 commits into
supermemoryai:mainfrom
HaoChiBao:feat/extension-hybrid-recall

Conversation

@HaoChiBao

Copy link
Copy Markdown

Summary

Auto-recall in the browser extension was leaving useful document context on the floor.

  1. /v4/search was called without searchMode, so it used the API default ("memories").
  2. Hits were formatted as `${result.memory}` only. Hybrid/document hits that only set chunk became the literal string undefined in the Included Memories prompt.

This PR:

  • Requests searchMode: "hybrid" (same recommendation as the public docs / VoltAgent path in @supermemory/tools)
  • Formats each hit as memory || chunk, skips empties, and renumbers contiguously
  • Adds an offline A/B eval harness + proof doc so the gap and the fix stay regression-tested

Does not change server ranking. It only improves what the extension injects when the API already returns chunks.

Why this is not already upstream

Checked against current main and open extension PRs:

Proof

cd apps/browser-extension
bun run eval:hybrid-recall
# or
bun test utils/hybrid-recall.eval.test.ts utils/search-request.test.ts

Latest offline A/B on 4 gold fixtures:

Metric Legacy (memory only) Next (hybrid + memory || chunk)
undefined prompt lines 6 0
Chunk-only texts recovered 0/4 4/4
All expected texts recovered 6/10 10/10

Example (chunk-only-page):

Legacy Next
1. undefined Incident runbook…
2. undefined Rollback: redeploy…

Full write-up: apps/browser-extension/docs/hybrid-recall-eval.md

Test plan

Auto-recall called /v4/search with the memories-only default and formatted
hits as result.memory, so document chunk results became prompt lines with
the literal string undefined. Request searchMode hybrid and format with
memory || chunk. Includes an offline A/B eval harness and proof doc.
@graphite-app graphite-app Bot added the extension related to Supermemory Chrome Extension label Aug 6, 2026
Comment thread apps/browser-extension/utils/search-request.ts Outdated
Graphite review: memory || chunk treated "   " as truthy and dropped a
valid chunk. Trim both fields before choosing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extension related to Supermemory Chrome Extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant