Skip to content

List matching papers when a method lookup misses - #38

Merged
NielsRogge merged 1 commit into
mainfrom
claude/method-miss-paper-hits
Oct 27, 2026
Merged

NielsRogge merged 1 commit into
mainfrom
claude/method-miss-paper-hits

Conversation

@NielsRogge

Copy link
Copy Markdown
Collaborator

Problem

Papers With Code methods are general techniques reused across many papers. Chat agents often call get_method for a specific model or system (ViLT, BLIP-2, GSConv), miss, and then spend a second call on search_papers. In production chat from 2026-10-20 to 10-27, 140 of 297 get_method calls missed (47%), and 100 of those turns fell back to a paper lookup afterwards.

huggingface/paperswithcode#752 already tells the chat model that specific models are papers. In an offline probe, model-name method lookups dropped from 100% to 19–38%, but some still slip through. This PR makes those remaining misses useful.

Change

  • Matching papers on a miss. A get_method "Method not found" miss now runs one keyword paper search for the same name and appends the top three hits:
    not_found: Method not found: ViLT; closest results: ViT, CLIP; papers matching it (likely a model or system, not a method): ViLT: Vision-and-Language Transformer Without Convolution… (paper 2102.03334); …
  • Fits the chat error cap. Titles are cut at a word boundary to 60 characters, so the message stays within the ~400 characters the chat client keeps.
  • Fails safe. A failed or empty search keeps the original error unchanged, and other errors are untouched.
  • No extra rate-limit pressure. keyword mode keeps this lookup off the semantic-search rate limit.
  • Docs and version. SKILL.md's get_method line says a miss lists papers and to call get_paper_info with one of their IDs. Releases pwc-mcp 0.2.12.

Validation

  • uv run --group dev pytest -q tests/ in mcp_server: 91 passed. New tests cover:
    • hits appended, with the search run in keyword mode, limit 3;
    • long titles staying within the 400-character budget;
    • a failed search (invalid JSON or 429) keeping the plain error;
    • empty results keeping the plain error.
  • ruff check is clean on the changed files.

Rollout

Production picks this up with an MCP component deploy:

sudo pwc-deploy production <sha> --component mcp --confirm DEPLOY_PRODUCTION

The chat app vendors SKILL.md as PWC_MCP_SKILL.md. Re-vendoring is optional, since the error text itself carries the instruction.

🤖 Generated with Claude Code

Papers With Code methods are general techniques; chat agents often look up
a specific model or system (ViLT, BLIP-2, GSConv) with get_method, miss,
and then spend another call on search_papers. Production chat missed 140
of 297 get_method calls from 2026-10-20 to 10-27, and 100 of those turns
fell back to a paper lookup.

A "Method not found" miss now runs one keyword paper search for the name
and appends the top three hits as "Title (paper ID)", with titles cut at
a word boundary so the whole error stays within the ~400 characters chat
clients keep. A failed or empty search keeps the original error. Keyword
mode stays off the semantic search rate limit.

Release pwc-mcp 0.2.12.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@NielsRogge
NielsRogge merged commit 125ffe0 into main Oct 27, 2026
2 checks passed
@NielsRogge
NielsRogge deleted the claude/method-miss-paper-hits branch October 27, 2026 12:49
@NielsRogge

Copy link
Copy Markdown
Collaborator Author

LIVE on the production MCP component as 125ffe0 (pwc-mcp 0.2.12, 2026-10-27). Verified with real misses: ViLT → paper 4996 (ViLT, arXiv 2102.03334) listed first, which get_paper_info resolves; BLIP-2 → paper 12644. Miss messages are about 340 characters, and 'transformer' still resolves as a method. The public paperswithcode.co/mcp endpoint returns the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant