Skip to content

EPIC: Retrieval — user guidance survives re-entry (hint channel, prompt-reveal rescore, capture dedup) #334

Done

Description

@abogartz

Why

The benchmark established the failure fingerprint twice (2026-11-07, results-chain-hint-r3): a user tells the agent "the correct sales tax rate is 8.25%", pass 1 passes, the row is captured — and pass 2, a fresh session on the same repo, fails the same task with the guidance nowhere in its context.

Root causes, both confirmed against the wire bytes:

  1. Lexical ranking cannot surface guidance. The shipped matcher ranks by exact word overlap with Robertson-IF. A task prompt about "the injected bug" / "hidden suite" shares ZERO vocabulary with a row stating "the sales tax rate is 8.25% (0.0825)". No amount of IDF tuning bridges "injected bug" → "tax rate".
  2. The epoch froze at the first request. A block scored against the first prompt rode the whole session: it carried the first topic's rows forever and never picked up rows a later prompt genuinely matched.

The fix (branch retrieval-fix-20261107, commit 6f03e2d, pushed; built on capture-input-shape)

  1. Hint channel. The capture model labels user-stated facts guided:true; promoted rows carry the tag user-guided (single constant in src/core/tags.ts). Injection rides them newest-first, cap 3, budget-bounded, ahead of the lexical picks. Recall and pull stay query-driven.
  2. Prompt-reveal rescore. refreshEpoch re-scores when latestPrompt changes, not only when the store changes. The epoch MOVES only when the rendered bytes move, so the provider prompt cache survives a prompt change that keeps the same rows. New reason prompt_reveal; invalidations now count any byte-moving recompute.
  3. Capture dedup. The capture prompt lists already-stored rows (15 rows / 1400 chars) so the model's 3-row budget goes to new facts instead of gate-collapsed restatements.

Measured (real opencode serve, real plugin, recording proxy, local quantized seat)

  • t3 ×3 + t7 ×1 = 30/30 links; L6h (needle on an injected memory line) and L7 (warm pass-2 passes without the hint) pass 3/3 — first time ever; cold controls fail every time.
  • Warm pass 2.2–3.4× cheaper and 2.1–2.6× faster than the cold control.
  • The local quantized capture model followed the new guided contract correctly on both mutations; captured rows carried tags=auto-capture,user-guided; zero framing rows.

Scope notes

  • Product boundary (user directive 2026-10-20): no embeddings, no models in the retrieval path. This epic stays keyword-first: the hint channel is provenance-based, not semantic.
  • Memory-poisoning research (60–89% retrieval rates for injected memories) is the reason the tag must be reserved to the capture path — tracked as a ticket here.

Part of the capture-shape epic (must land after it).

Tickets

Activity

  1. added
    capture
    retrieval
    severity:high
    on Nov 7, 2026
  2. abogartz commented on Nov 8, 2026

    @abogartz
    OwnerAuthor

    Status 2026-11-08: 4 of 6 tickets closed — #339, #340, #341 landed via #360/#361/#362 with bench evidence, #343 done (the split itself). Remaining: #342 (reserve the user-guided tag — the exposure flagged on #349 while the contradiction surface is default-ON) and #344 (README/status docs). Epic stays open until both land.

  3. added
    enhancement
    tier:full
    on Nov 23, 2026
  4. ocsi-architect commented on Nov 25, 2026

    @ocsi-architect

    Closing: all three legs verified on main a573a3b. User-guided rows ride the hint channel (USER_GUIDED_TAG, src/core/tags.ts:34; guidedCap in src/recall/relevant.ts:67-74); prompt-reveal rescoring is a live epoch reason; dedup surfaces AMBIGUOUS families (#450).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    captureenhancementretrievalseverity:hightier:full

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions