Skip to content

feat(recall): search indexed original memory text - #285

Open
jack-arturo wants to merge 10 commits into
feat/original-text-backfillfrom
feat/original-text-search
Open

jack-arturo wants to merge 10 commits into
feat/original-text-backfillfrom
feat/original-text-search

Conversation

@jack-arturo

@jack-arturo jack-arturo commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Summary

Recall queries the dedicated original-text index as an independent candidate source, applies scope and current-state controls, and combines results with the existing ranking pipeline. Bounded overfetch and coverage reranking reduce candidate-order misses, while current-state filtering happens before candidates are capped. Internal index text is excluded from returned memory payloads. Graph relation lookups for original-text candidates are deferred until final selection to avoid per-candidate amplification. Superseded matches retain explicitly attributed topical evidence when replaced with current content, including when multiple matches resolve to the same replacement or a second reranking pass runs.

Stacked on #284 and #283; merge those dependencies first. Existing legacy originals require the backfill's explicit trust assumption before they are indexed.

Isolated diagnostic

On candidate 45a2f1d53c507fb69a4a9d215fe8883754db3539, identifier Recall@5 improved from 10/16 to 16/16; the public LoCoMo evidence slice improved from 58/136 to 62/136. The exhaustive client-side chunk prototype scored 16/16 and 77/136 respectively, using a different candidate and ranking path. All 16 no-answer controls still returned results at a zero score floor; no cross-scope or current-state temporal leaks were observed. This is a diagnostic, not an official benchmark or answer-quality result. Graph expansion was disabled in this experiment and is covered separately by regression tests. The experiment and reviewed aggregate evidence are in verygoodplugins/automem-evals#93.

A separate no-provider LoCoMo-mini diagnostic using the product harness scored baseline and optimized candidate b3beabc at 197/235 each, with 69 judge-dependent questions skipped and no paired verdict changes. It uses local BGE embeddings, disables enrichment and judge/answer embedding scoring, and the native harness augments retrieved context with labeled evidence. A matched full-cohort run is in progress on b3beabc; neither result is a judged leaderboard score. No production data or paid provider calls were used.

Validation

  • Full non-benchmark suite: 960 passed, 13 skipped.
  • Focused recall tests, formatting and lint checks passed.
  • Real FalkorDB, legacy backfill, edit and delete behavior exercised on disposable stacks.
  • Hosted review findings on duplicate replacements and inherited evidence addressed with regressions.

Breaking changes: none intended. The extra full-text channel adds indexing and query work; preliminary shared-host timing suggests additional recall latency, but is not a controlled latency estimate.

Implementation harness: Codex desktop.

@jack-arturo jack-arturo added the babysit:waiting-codex Babysit waiting-codex status label Nov 11, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T01:57:11.009140Z 45a2f1d New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

Copy link
Copy Markdown

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: e3a3e3df2e

ℹ️ 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 automem/api/recall.py Resolved
@jack-arturo jack-arturo added babysit:active Babysit active status and removed babysit:waiting-codex Babysit waiting-codex status labels Nov 11, 2026
@jack-arturo jack-arturo added babysit:waiting-codex Babysit waiting-codex status and removed babysit:active Babysit active status labels Nov 11, 2026

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

Copy link
Copy Markdown

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: b83d349623

ℹ️ 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 automem/api/recall.py
Comment on lines +2133 to +2135
if graph is not None and original_text_search is not None and query_str:
# Run independently of the vector pool: the desired fact may occur
# only in the preserved original and therefore lack vector evidence.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Record the required recall benchmark comparison

This enables an independent candidate source for every text recall query, changing which memories enter the shared ranking pool, but benchmarks/EXPERIMENT_LOG.md contains no baseline/candidate comparison for this change. The commit's isolated diagnostic explicitly is not an official benchmark, so it does not satisfy the repository's required recall/retrieval validation workflow. Run the baseline and candidate LoCoMo-mini evaluations, record both results in the experiment log, and complete the full LoCoMo evaluation before merge so regressions outside the diagnostic slice can be assessed.

AGENTS.md reference: AGENTS.md:L65-L71

Useful? React with 👍 / 👎.

@jack-arturo jack-arturo added babysit:active Babysit active status and removed babysit:waiting-codex Babysit waiting-codex status labels Nov 11, 2026

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

Copy link
Copy Markdown

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: eaa72684f0

ℹ️ 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 automem/api/recall.py Resolved

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

Copy link
Copy Markdown

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: 6ea44702c1

ℹ️ 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".

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

Copy link
Copy Markdown

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: e45f2ed0b8

ℹ️ 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 automem/api/recall.py Resolved

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

Copy link
Copy Markdown

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: 45a2f1d53c

ℹ️ 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 automem/api/recall.py
Comment on lines +2018 to +2019
existing_ids={_result_memory_id(candidate) for candidate in checked},
dedupe_replacements=dedupe_replacements,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve stronger vector evidence for checked replacements

With current-only recall, when a superseded memory matches both vector and original-text search, the original-text channel resolves it first and marks its replacement as checked. If that lexical replacement survives min_score, passing its ID here causes _apply_current_state_filter to discard the replacement derived from the vector hit, even when its score is higher. Consequently, the weaker lexical score wins before _dedupe_results can compare the candidates, and the current memory can lose a result slot to a competitor despite strong vector evidence. Preserve the stronger scored candidate or merge its evidence into the checked replacement while still preventing duplicate output IDs.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Babysit stopped — nonconvergent. The sixth hosted review window found an unresolved state-replacement evidence competition: a checked original-text replacement can suppress a stronger vector-derived replacement. The PR's six-window review ceiling is exhausted, so this thread remains open for a human decision on another remediation budget. The no-provider full LoCoMo comparison continues independently; its results will be reported with the tested commit and scoring limitations.

@jack-arturo jack-arturo added babysit:blocked Babysit blocked status and removed babysit:active Babysit active status labels Nov 11, 2026

Copy link
Copy Markdown
Member Author

The no-provider full LoCoMo diagnostic against b3beabc finished at 1,207/1,542 versus baseline 1a7ba1a at 1,206/1,542, with 444 judge-dependent questions skipped in each arm. The candidate run is degraded, not a clean benchmark: two current-state replacement queries timed out in FalkorDB and were handled as empty replacement maps while /recall returned HTTP 200. One request was tag-only at limit 100; the other was vector-backed at limit 75 with 200 vector matches. The baseline log audit was clean, and the synthetic full corpus contained zero memory-to-memory relations, but the affected question IDs cannot be identified reliably from the redacted request logs. A fresh matched rerun is required before treating the comparison as clean. The diagnostic used local BGE, no judge, and the native harness's labeled-evidence augmentation. Raw receipts and logs are retained locally; no production data or paid providers were used.

Copy link
Copy Markdown
Member Author

Babysit budget reset — fresh remediation budget explicitly granted by the operator.

@jack-arturo jack-arturo added the babysit:active Babysit active status label Nov 11, 2026
@jack-arturo jack-arturo removed the babysit:blocked Babysit blocked status label Nov 11, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

babysit:active Babysit active status

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant