Embeddings vs. Grep: Rethinking the Dense Advantage in Code Search
Adding LLM-generated identifiers to queries let BM25 match dense retrieval in every Python test pool.
The researchers built Repo-Premium to rank files across six programming languages, with a preregistered test pool spanning 91 repositories. They trace dense retrieval’s advantage to evaluation choices that favor it and queries missing rare identifiers from the code. Their generate-then-grep approach also worked on pull requests opened after the LLM’s release. None of the methods tested could predict which retriever would win for an individual query.
HF Daily Papers' note
The researchers built Repo-Premium to rank files across six programming languages, with a preregistered test pool spanning 91 repositories. They trace dense retrieval’s advantage to evaluation choices that favor it and queries missing rare identifiers from the code. Their generate-then-grep approach also worked on pull requests opened after the LLM’s release. None of the methods tested could predict which retriever would win for an individual query.
HF Daily Papers' note
score 5