Skip to content

feat(hooks): instructional recall banners for visible memory#526

Merged
plind-junior merged 1 commit into
testfrom
feat/recall-banner-grounding
Jul 18, 2026
Merged

feat(hooks): instructional recall banners for visible memory#526
plind-junior merged 1 commit into
testfrom
feat/recall-banner-grounding

Conversation

@plind-junior

Copy link
Copy Markdown
Member

the per-prompt recall hook injected raw kb context with no instruction ("consider it before answering"), so the model absorbed the knowledge invisibly — a user watching the reply cannot tell working recall from a dead install. that gap is the single most-reported "vouch isn't working" symptom: hooks fire, context flows, and nothing on screen ever says so.

this makes recall visible and verifiable on every turn:

  • relevant items found → the banner instructs the model to open its reply with "From vouch memory:" and ground the answer in the cited items, citing each id in brackets. the opener is the user-facing proof recall ran.
  • nothing relevant → the hook now injects an explicit "found nothing relevant — open with 'Nothing in vouch on this.'" banner instead of injecting nothing, so an empty kb reads as an empty kb rather than a broken install.
  • opt-in confidence short-circuit (retrieval.short_circuit.{enabled, min_confidence}, default off): a high-confidence non-action lookup may collapse to a verbatim vouched answer with the item ids. retrieval scores squash to 0-1 via 1 - exp(-score/5); a prompt whose first word is an imperative "do work" verb (fix/build/deploy/…) never short-circuits, however confident the match — the action gate, not the score, is what keeps this safe.

sixteen tests cover the three banners, the action gate, the opt-in default, the threshold, and defensive config parsing; the old no-hits-injects-nothing test now pins the explicit banner. the readme documents the visible behaviour ("what you'll see") and drops the stale "one-time approval" workaround note that the install-mcp auto-registration (#523) superseded.

make check green: pytest (full suite minus embeddings), mypy 99 files clean, ruff clean.

the per-prompt hook injected raw context ("consider it before
answering") with no instruction, so the model absorbed kb knowledge
invisibly and the user could not tell recall from silence — the single
most-reported "vouch isn't working" symptom. three changes:

- with relevant approved items, the banner now instructs the model to
  open its reply with "From vouch memory:" and ground in the cited
  items, citing each id. recall becomes visible on every turn.
- with no relevant items, the hook injects an explicit "found nothing
  relevant — open with 'Nothing in vouch on this.'" banner instead of
  nothing, so an empty kb reads as an empty kb, not a broken install.
- opt-in confidence short-circuit (retrieval.short_circuit.{enabled,
  min_confidence}, default off): a high-confidence non-action lookup
  may collapse to a verbatim vouched answer. scores squash to 0-1 via
  1-exp(-score/5); a prompt whose first word is an imperative "do work"
  verb never short-circuits, however confident the match — the action
  gate, not the score, keeps it safe.

tests cover the three banners, the action gate, the opt-in default,
the threshold, and defensive config parsing; the no-hits test now pins
the explicit banner. readme documents the visible behaviour and drops
the stale "one-time approval" workaround note superseded by the
install-mcp auto-registration.
@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@plind-junior, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 10 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 909342ec-eab1-48f9-b06d-652f423009ed

📥 Commits

Reviewing files that changed from the base of the PR and between 86a90f7 and cc66a4b.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • README.md
  • src/vouch/hooks.py
  • tests/test_hooks.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/recall-banner-grounding

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added docs documentation, specs, examples, and repo guidance tests tests and fixtures size: M 200-499 changed non-doc lines ci: passing ci is green labels Jul 18, 2026
@plind-junior
plind-junior merged commit 756ff19 into test Jul 18, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci: passing ci is green docs documentation, specs, examples, and repo guidance size: M 200-499 changed non-doc lines tests tests and fixtures

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant