fix(skills): prevent low-confidence skill injection (#2512, #2513, #2501)#2517
Merged
fix(skills): prevent low-confidence skill injection (#2512, #2513, #2501)#2517
Conversation
) Add min_injection_score config field (default 0.20) to filter out skills that score below threshold before injection. This closes the structural gap where any top-N skill was injected regardless of absolute score. Also raise disambiguation_threshold default from 0.05 to 0.20 to prevent LLM disambiguation on clearly non-matching candidates. Fix SKILL.md descriptions to eliminate specific false positives: - process-management: replace "memory" with "RAM" to avoid matching user queries containing the word "memory" (#2513) - os-automation: replace catch-all phrase with explicit negative scope sentence to prevent triggering on generic shell commands (#2501) - rust-agent-handoff: remove noisy Keywords line, tighten description to exclude generic update/memory prompts (#2512) Fix pre-existing clippy::float_cmp violations in admission.rs tests.
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.
Summary
min_injection_scoreconfig field (default 0.20) — skills scoring below threshold are no longer injected, closing the structural gap where top-N skills were injected regardless of absolute score (bug(skills): rust-agent-handoff skill injected at low confidence (0.14) hijacks general memory/update tasks #2512)disambiguation_thresholddefault from 0.05 to 0.20process-managementSKILL.md: replace "memory" → "RAM" to prevent BM25 false match on user queries containing the word "memory" (feat(skills): skill disambiguation false positive — process-management injected for memory-update queries #2513)os-automationSKILL.md: replace catch-all phrase, add explicit negative scope sentence to prevent over-triggering on generic shell commands (bug(skills): os-automation skill over-triggers for generic shell commands, suppresses native bash tool usage #2501)rust-agent-handoffSKILL.md: remove noisyKeywords:line, tighten description to exclude generic update/memory prompts (bug(skills): rust-agent-handoff skill injected at low confidence (0.14) hijacks general memory/update tasks #2512)clippy::float_cmpviolations inzeph-memory/src/admission.rsTest plan
cargo +nightly fmt --check— passedcargo clippy --all-targets --features full --workspace -- -D warnings— passedcargo nextest run --workspace --features full --lib --bins— 7564 passed, 22 skippedCloses #2512, #2513, #2501