mlsanityData to 14 Oct 2026

CoQuIR: A Comprehensive Benchmark for Code Quality-Aware Information Retrieval

arXiv 2506.11066 ↗First posted 31 May 2025cs.SE cs.AIcited by 6

Not on the map. Why?

Abstract (arXiv)

Code retrieval is essential in modern software development, as it boosts code reuse and accelerates debugging. However, current benchmarks primarily emphasize functional relevance while neglecting critical dimensions of software quality. Motivated by this gap, we introduce CoQuIR, the first large-scale, multilingual benchmark specifically designed to evaluate quality-aware code retrieval across four key dimensions: correctness, efficiency, security, and maintainability. CoQuIR provides fine-grained quality annotations for 42,725 queries and 134,907 code snippets in 11 programming languages, and is accompanied by two quality-centric evaluation metrics: Pairwise Preference Accuracy and Margin-based Ranking Score. Using CoQuIR, we benchmark 23 retrieval models, covering both open-source and proprietary systems, and find that even top-performing models frequently fail to distinguish buggy or insecure code from their more robust counterparts. Furthermore, we conduct preliminary investigations into training methods that explicitly encourage retrievers to recognize code quality. Using synthetic datasets, we demonstrate promising improvements in quality-aware metrics across various models, without sacrificing semantic relevance. Downstream code generation experiments further validate the effectiveness of our approach. Overall, our work highlights the importance of integrating quality signals into code retrieval systems, laying the groundwork for more trustworthy and robust software development tools.

Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). Builds on 36 of its 60 references that are in the map. First posted on arXiv 31 May 2025.

Builds on

36 of 60 references.

References · 36

  1. 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
  2. 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,824
  3. 2022Text Embeddings by Weakly-Supervised Contrastive Pre-trainingcited by 1,253
  4. 2021Unsupervised Dense Information Retrieval with Contrastive Learningcited by 1,216
  5. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 885
  6. 2020Approximate Nearest Neighbor Negative Contrastive Learning for Dense Text Retrievalcited by 849
  7. 2023Towards General Text Embeddings with Multi-stage Contrastive Learningcited by 723
  8. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
  9. 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 498
  10. 2021Large Dual Encoders Are Generalizable Retrieverscited by 456
  11. 2022One Embedder, Any Task: Instruction-Finetuned Text Embeddingscited by 333
  12. 2023Improving Text Embeddings with Large Language Modelscited by 303
24 more
  1. 2023Fine-Tuning LLaMA for Multi-Stage Text Retrievalcited by 272
  2. 2021CodeNet: A Large-Scale AI for Code Dataset for Learning a Diversity of Coding Taskscited by 200
  3. 2024BRIGHT: A Realistic and Challenging Benchmark for Reasoning-Intensive Retrievalcited by 158
  4. 2023Large Language Models for Code: Security Hardening and Adversarial Testingcited by 155
  5. 2021CVEfixes: Automated Collection of Vulnerabilities and Their Fixes from Open-Source Softwarecited by 91
  6. 2024CodeRAG-Bench: Can Retrieval Augment Code Generation?cited by 91
  7. 2021CoSQA: 20,000+ Web Queries for Code Search and Question Answeringcited by 75
  8. 2024FollowIR: Evaluating and Teaching Information Retrieval Models to Follow Instructionscited by 69
  9. 2024Instruction Tuning for Secure Code Generationcited by 68
  10. 2023LLMSecEval: A Dataset of Natural Language Prompts for Security Evaluationscited by 62
  11. 2024CoIR: A Comprehensive Benchmark for Code Information Retrieval Modelscited by 60
  12. 2023xCodeEval: A Large Scale Multilingual Multitask Benchmark for Code Understanding, Generation, Translation and Retrievalcited by 47
  13. 2024Promptriever: Instruction-Trained Retrievers Can Be Prompted Like Language Modelscited by 40
  14. 2024CoRNStack: High-Quality Contrastive Data for Better Code Retrieval and Rerankingcited by 37
  15. 2024LLMs Meet Library Evolution: Evaluating Deprecated API Usage in LLM-based Code Completioncited by 32
  16. 2024Code Representation Learning At Scalecited by 26
  17. 2024Large Language Models as Foundations for Next-Gen Dense Retrieval: A Comprehensive Empirical Assessmentcited by 19
  18. 2022Code Search: A Survey of Techniques for Finding Codecited by 18
  19. 2024LLM-R2: A Large Language Model Enhanced Rule-based Rewrite System for Boosting Query Efficiencycited by 16
  20. 2024SecCoder: Towards Generalizable and Robust Secure Code Generationcited by 14
  21. 2024Beyond Relevance: Evaluate and Improve Retrievers on Perspective Awarenesscited by 12
  22. 2024textttMixGR: Enhancing Retriever Generalization for Scientific Domain through Complementary Granularitycited by 9
  23. 2025Exploring the Security Threats of Knowledge Base Poisoning in Retrieval-Augmented Code Generationcited by 9
  24. 2025Enhancing Retrieval Systems with Inference-Time Logical Reasoningcited by 3

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 6.

6 papers.