Beyond Retrieval: A Multitask Benchmark and Model for Code Search

Hugging Face Daily Papers Papers

Summary

This paper introduces CoREB, a contamination-limited multitask benchmark for code search that evaluates text-to-code, code-to-text, and code-to-code retrieval with fine-tuned reranking capabilities.

Code search has usually been evaluated as first-stage retrieval, even though production systems rely on broader pipelines with reranking and developer-style queries. Existing benchmarks also suffer from data contamination, label noise, and degenerate binary relevance. In this paper, we introduce CoREB, a contamination-limited, multitask code retrieval and reranking benchmark, together with a fine-tuned code reranker, that goes beyond retrieval to cover the full code search pipeline. CoREB is built from counterfactually rewritten LiveCodeBench problems in five programming languages and delivered as timed releases with graded relevance judgments. We benchmark eleven embedding models and five rerankers across three tasks: text-to-code, code-to-text, and code-to-code. Our experiments reveal that: \circone code-specialised embeddings dominate code-to-code retrieval ({sim}2{times} over general encoders), yet no single model wins all three tasks; \circtwo short keyword queries, the format closest to real developer search, collapse every model to near-zero nDCG@10; \circthree off-the-shelf rerankers are task-asymmetric, with a 12-point swing on code-to-code and no baseline net-positive across all tasks; \circfour our fine-tuned CoREB-Reranker is the first to achieve consistent gains across all three tasks. The data and model are released.
Original Article
View Cached Full Text

Cached at: 05/11/26, 07:21 AM

Paper page - Beyond Retrieval: A Multitask Benchmark and Model for Code Search

Source: https://huggingface.co/papers/2605.04615

Abstract

A new code search benchmark called CoREB is introduced that addresses limitations of existing datasets by providing contamination-limited, multitask evaluation across text-to-code, code-to-text, and code-to-code retrieval tasks with fine-tuned reranking capabilities.

Code searchhas usually been evaluated as first-stageretrieval, even though production systems rely on broader pipelines withrerankingand developer-style queries. Existing benchmarks also suffer from data contamination, label noise, and degenerate binary relevance. In this paper, we introduceCoREB, a contamination-limited, multitask coderetrievalandrerankingbenchmark, together with a fine-tuned code reranker, that goes beyondretrievalto cover the fullcode searchpipeline.CoREBis built from counterfactually rewritten LiveCodeBench problems in five programming languages and delivered as timed releases with graded relevance judgments. We benchmark elevenembedding modelsand fivererankersacross three tasks:text-to-code,code-to-text, and code-to-code. Our experiments reveal that: \circone code-specialised embeddings dominatecode-to-code retrieval({sim}2{times} over general encoders), yet no single model wins all three tasks; \circtwo short keyword queries, the format closest to real developer search, collapse every model to near-zero nDCG@10; \circthree off-the-shelfrerankersare task-asymmetric, with a 12-point swing on code-to-code and no baseline net-positive across all tasks; \circfour our fine-tunedCoREB-Reranker is the first to achieve consistent gains across all three tasks. The data and model are released.

View arXiv pageView PDFProject pageGitHub0Add to collection

Models citing this paper1

#### hq-bench/coreb-code-reranker Text Classification• 4B• Updated4 days ago • 62 • 3

Datasets citing this paper1

#### hq-bench/coreb Viewer• Updatedabout 5 hours ago • 34.2k • 55 • 5

Spaces citing this paper0

No Space linking this paper

Cite arxiv.org/abs/2605.04615 in a Space README.md to link it from this page.

Collections including this paper3

Similar Articles

Agent Retrieval Bench: Evaluating Repository Context Retrieval for Coding Agents

Hugging Face Daily Papers

Introduces Agent Retrieval Bench, a file-level benchmark evaluating how well coding agents retrieve relevant repository files during the context-acquisition stage. The benchmark includes 427 samples across 25 repositories and evaluates various retrieval methods, finding no single family dominates.