docs: rank the page titled with the query first in MCP search - #1787
Conversation
Deploying quickadd with
|
| Latest commit: |
4f10af6
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://6e593125.quickadd.pages.dev |
| Branch Preview URL: | https://docs-mcp-title-ranking.quickadd.pages.dev |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthrough
ChangesTitle Scoring
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~3 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The localized title-ranking change is ready to merge with no established blocking risk. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. A rabbit checks the title line Comment |
Summary
search_quickadd_docsranked QuickAddAPI above Suggester System for "suggester" (12 vs 11 points). The API reference mentions suggesters in its headings, description and body, which added up to more than Suggester System's title match. The same pattern affected "suggester system", "scripts with user settings" and "open quickadd from your desktop".A page whose title contains every query term now gets a +10 bonus. It's the page being asked for, even when a broader page mentions the terms more often.
Changes
functions/mcp.ts: one bonus line inscorePage. Weights are otherwise unchanged.Testing / validation
Ran the real
onRequesthandler under Node against a build of master. I compared this fix against simpler and broader alternatives on three query sets:tsc --strictis clean.Checklist
docs:does not trigger a release.Note
Add title-match bonus to
scorePagein MCP searchPages whose titles contain every query term now get an additional 10 points in search scoring. The bonus is added after the existing title, heading, description, and body-text scoring in mcp.ts. Risk: this changes relative ranking of search results when multiple pages match the query.
Macroscope summarized 4f10af6.
Summary by CodeRabbit