TokenCap Revamps File Ranking With Rare-Word Weighting and Exact Identifier Matching
TokenCap's task packer begins by scoring every file in a repository's graph, and only the highest-ranked files compete for the token budget, so ranking accuracy is critical. The project rewrote its scoring, which previously summed fixed bonuses for keyword matches, clusters, risk, recent changes, and impact, plus a BM25 score. A toy five-file test showed the old method could rank an unrelated authentication file highly for a task about drafts in shortcodes, while the new method surfaced the relevant registry and renderer files. The revised system weights rare query terms via inverse document frequency, checks terms across file names, declared symbols, directories, and full text, and applies stemming and synonym matching. It also looks up exact identifiers and explicit file paths, which carry the strongest signals. The author notes that a toy example does not prove performance on real repositories.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in