Benchmark and improve tool-search ranking with indexed BM25

Offen
#2,996 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
45/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
go

Rechercherichtung

Beginne damit, die bestehende tool-search-Implementierung des Servers zu lokalisieren und den Prototyp-Benchmark sowie dessen Unit-Tests zur Indexierung von Toolnamen, -beschreibungen, Parameternamen und Parameterbeschreibungen zu prüfen. Kläre den bevorzugten Umfang mit den Maintainer, dann miss die ausgewählte Ranking-Strategie anhand des Benchmarks mit 49 Abfragen und 115 Tools und berichte über Retrieval-Qualität und Latenz ohne Regressionen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

enhancement request ai review
Describe the feature or problem you’d like to solve

The GitHub MCP Server already exposes tool discovery/search functionality, but
there is no repeatable benchmark for measuring how reliably natural-language
queries retrieve the intended MCP tool.

As the tool inventory grows, a benchmark would make ranking changes measurable
and help prevent retrieval regressions.

This is separate from host-side deferred tool loading discussed in #1680. The
proposal only concerns ranking inside the server's existing tool-search
implementation.

Proposed solution

Add a hand-labelled benchmark covering natural-language intents across the
server's major toolsets, then compare the current heuristic with an indexed
BM25 implementation.

A prototype benchmark contains 49 queries over 115 unique tools and produced:

Strategy Recall@1 Recall@3 MRR@10 Query latency
Current heuristic 71.4% 81.6% 0.792 ~2.25 ms
Indexed BM25 71.4% 87.8% 0.802 ~34 µs
Hybrid RRF 73.5% 87.8% 0.823 ~2.38 ms

Indexed BM25 improved Recall@3 by 6.1 percentage points and was approximately
66x faster per query. The hybrid produced the strongest ranking quality.

Before submitting a PR, I would appreciate maintainer guidance on the preferred
scope:

  1. Benchmark harness only
  2. Benchmark plus indexed BM25
  3. Benchmark plus a hybrid ranking experiment
Example prompts or workflows
  • "Find open issues assigned to me across repositories"
  • "Read the files, reviews, and diff for a pull request"
  • "Download logs for a failed workflow job"
  • "Find exposed secrets detected in a repository"
  • "Add an issue to a GitHub project"
Additional context

The benchmark uses the complete current tool inventory and validates that every
labelled relevant tool exists. The prototype includes unit tests for indexing
tool names, descriptions, parameter names, and parameter descriptions.

Vorherrschende Sprache
Go
Sterne
33.1k
Forks
5k
Ø Merge
2 T. 15 Std.
Gemergte PRs (30 T.)
27

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus github/github-mcp-server

Alle Issues in github/github-mcp-server

Ähnliche Issues

Weitere Issues zu Go

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.