feat(recall): ENGRAPHIS_RECALL_NARROW_ARM opt-in for lower-latency small-k recall - #191
Merged
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(recall): ENGRAPHIS_RECALL_NARROW_ARM opt-in
Rescued from
ship/c5-narrow-arm-opt-in(abf92400) and rebased onto current main (post-#187/#189). 2 files, +221/−18:engraphis/core/recall.py+ newtests/test_recall_narrow_arm_opt_in.py.What it does
When the operator sets
ENGRAPHIS_RECALL_NARROW_ARMto any non-empty, non-zero value, prompt-only recall for small-k callers (k ≤ 20) switches to a narrower first arm:max(candidate_k, min(50, candidate_k * 2))— ~2× less work at k=8 (16 vs 32)max(first_page, min(PROMPT_ONLY_MAX_CANDIDATES, candidate_k * 4))— the second page can't silently undo the savingsThe default wider arm (
candidate_k + min(250, candidate_k * 3)) is untouched for everyone else, and the k ≤ 20 gate exists because the regression that motivated the widening only showed up on small-k callers; larger-k callers need full widening to find approved evidence.Integration notes (conflict resolution vs #187/#189)
The commit conflicted with main's post-#189 arm-cap machinery. The combined block:
arm_candidate_k_cap=/ env) in both narrow and wide paths — first page clamp and escalation-ceiling clampPROMPT_ONLY_MAX_CANDIDATESbound) in the wide pathreasoning_effort-style profile knobs and telemetry untouchedVerification
tests/test_recall_narrow_arm_opt_in.py: 6 passed on this branchruffclean on touched files