Skip to content
NewA calmer, faster ZeroHour

Repo-Premium traces code-search dense gains to unfair baselines

Original title: Embeddings vs. Grep: Rethinking the Dense Advantage in Code Search

Hugging Face daily papersby Siqiao Xue, Ziyin Zhang, Zihan Liao ()1 min read
AI summary · x-ai/grok-4.7Summaries by Vani AI

LLM-written identifiers let BM25 match dense retrieval in every Python pool, including later pull requests.

The paper argues that code-search benchmarks overstate dense encoders versus BM25 because they use curated queries, older code, and a handicapped lexical baseline, while coding agents often rely on grep. The authors introduce Repo-Premium, which ranks files in real repositories across Python, JavaScript, TypeScript, Go, Rust and Java, with pull requests from 2022 to 2026 and a preregistered pool of 91 repositories. They attribute the dense edge to evaluation choices and queries missing rare identifiers, and recommend a fair lexical baseline, fusion with BM25, and adding the code’s words to queries.

Key facts
  • Generate-then-grep helps BM25 more than dense retrieval.
  • No method they tried predicts which retriever wins on a given query.
  • The test pool covers 91 repositories and six languages.
  • Chunking files for BM25 and counting edited tests as relevant favored dense retrieval.
Explain this AI news with Vani AIWhat was announced, what is new and why it matters, in a new chat

From the original article

1 min read at huggingface.co

Code-search benchmarks show dense encoders well ahead of BM25, yet coding agents do well with grep. What does this dense advantage measure? Existing benchmarks cannot tell: they use curated queries, old code and a handicapped BM25.

Hugging Face daily papers

By Siqiao Xue, Ziyin Zhang, Zihan Liao · huggingface.co

Read the full article at Hugging Face daily papers

A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.