mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
Follow-up to #11625 (#11331). Same change in durable's copy: #11631. Problem: #11625 made a query term in a tool's name outweigh any number of description mentions. That regressed queries where another tool matches more of the query in its description: - `screenshot window`: `peekaboo__window` (name has `window`) beat `peekaboo__image` ("Take a screenshot of the screen, an app, or a window."). - `describe app`: `peekaboo__app` (whole name `app`) beat `peekaboo__see` ("... describe the UI elements of the app."). Fix: `Bm25Ranker` sorts by coverage first: a tool matching more of the query's distinct terms, in any field (name, description and schema, namespace), ranks above one matching fewer, whatever the scores. Within the same coverage, the score decides as before. A query that is exactly a tool's name still ranks that tool first. On the 16-tool set from #11631 (5 servers, 16 queries), this fixes both regressions and changes nothing else; `search github issues` stays at rank 5, since `list_issues` lacks "search" and ties on coverage with `search_code` and `linear__search_issues`. Changelog: updates the unreleased #11331 entry from #11625. |
||
|---|---|---|
| .. | ||
| agent | ||
| ai | ||
| chord | ||
| codemode | ||
| coding-agent | ||
| durable | ||
| env | ||
| evals | ||
| mcp | ||
| telemetry | ||
| tui | ||