Skill engine: weighted scoring with negative patterns and context guards#12
Skill engine: weighted scoring with negative patterns and context guards#12AnExiledDev merged 2 commits intomainfrom
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe changes introduce a weighted-scoring skill suggestion system that replaces binary matching with continuous confidence scores (0.0–1.0), adds negative pattern disqualification, enforces context guards for low-confidence matches, ranks results by score and priority tier, and caps suggestions to three skills per prompt. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
@.devcontainer/plugins/devs-marketplace/plugins/skill-engine/scripts/skill-suggester.py:
- Around line 190-191: The negative pattern "DockerClient" in the negative list
is mixed-case but the matching logic uses a lowercased input (see the check `if
neg in lowered`), so change the pattern to lowercase ("dockerclient") to ensure
it can match; update the entry in the negative array where "DockerClient"
appears so all entries are lowercase and consistent with the matching performed
by the code that checks `neg in lowered`.
ℹ️ Review info
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.devcontainer/CHANGELOG.md.devcontainer/plugins/devs-marketplace/plugins/skill-engine/README.md.devcontainer/plugins/devs-marketplace/plugins/skill-engine/scripts/skill-suggester.py
.devcontainer/plugins/devs-marketplace/plugins/skill-engine/scripts/skill-suggester.py
Outdated
Show resolved
Hide resolved
…x 3 cap Replace binary keyword matching with confidence-scored suggestions. Phrases carry weights (0.0-1.0), negative patterns suppress false positives, and context guards require confirming words for low-confidence matches. Results ranked by score and capped at 3 per prompt.
- "DockerClient" → "dockerclient" in docker skill's negative list (mixed-case never matched against lowered input) - Add docstring to main() to meet 80% coverage threshold
991a463 to
1a1ef13
Compare
Summary
"build a fastapi app"score 1.0; ambiguous phrases like"start building"score 0.2"pydanticai"suppressesfastapito resolve the pydantic overlap)"health check"only suggestsdockerif"docker","container", or"compose"also appearsFalse positives fixed
True positives preserved
All existing matches for explicit prompts (
"build a fastapi app","write pytest tests","create a dockerfile","spec-build", etc.) continue to work.Test plan
Summary by CodeRabbit
Changed
Documentation