CoSQA: 20,000+ Web Queries for Code Search and Question Answering
Not on the map. Why?
Abstract (arXiv)
Finding codes given natural language query isb eneficial to the productivity of software developers. Future progress towards better semantic matching between query and code requires richer supervised training resources. To remedy this, we introduce the CoSQA dataset.It includes 20,604 labels for pairs of natural language queries and codes, each annotated by at least 3 human annotators. We further introduce a contrastive learning method dubbed CoCLR to enhance query-code matching, which works as a data augmenter to bring more artificially generated training instances. We show that evaluated on CodeXGLUE with the same CodeBERT model, training on CoSQA improves the accuracy of code question answering by 5.1%, and incorporating CoCLR brings a further improvement of 10.5%.
Key facts. Cited by 74 papers in the map (data through 7 Oct 2026). Builds on 25 of its 42 references that are in the map. First posted on arXiv 27 May 2021.
Builds on
25 of 42 references.
References · 25
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,049
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
- 2019A Theoretical Analysis of Contrastive Unsupervised Representation Learningcited by 530
- 2017Supervised Learning of Universal Sentence Representations from Natural Language Inference Datacited by 428
- 2017A Survey of Machine Learning for Big Code and Naturalnesscited by 220
- 2016Enhanced LSTM for Natural Language Inferencecited by 199
- 2018Learning to Mine Aligned Code and Natural Language Pairs from Stack Overflowcited by 165
- 2020Contrastive Distillation on Intermediate Representations for Language Model Compressioncited by 57
13 more
- 2017A parallel corpus of Python functions and documentation strings for automated code documentation and code generationcited by 56
- 2019When Deep Learning Met Code Searchcited by 45
- 2015Natural Language Inference by Tree-Based Convolution and Heuristic Matchingcited by 42
- 2018Learning Semantic Textual Similarity from Conversationscited by 41
- 2019Multi-Modal Attention Network Learning for Semantic Source Code Retrievalcited by 40
- 2018StaQC: A Systematically Mined Question-Code Dataset from Stack Overflowcited by 30
- 2019CoaCor: Code Annotation for Code Retrieval with Reinforcement Learningcited by 22
- 2020Opportunities and Challenges in Code Search Toolscited by 22
- 2020A Multi-Perspective Architecture for Semantic Code Searchcited by 20
- 2017Query Expansion Based on Crowd Knowledge for Code Searchcited by 18
- 2020Neural Code Search Revisited: Enhancing Code Snippet Retrieval through Natural Language Intentcited by 16
- 2019Neural Code Search Evaluation Datasetcited by 13
- 2020Adversarial Training for Code Retrieval with Question-Description Relevance Regularizationcited by 1
Built on by
Citing papers per year: 2021: 1; 2022: 13; 2023: 14; 2024: 14; 2025: 22; 2026: 10.
74 papers.
Sort:
By area:
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
- 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 327
- 2023FLASK: Fine-grained Language Model Evaluation based on Alignment Skill Setscited by 198
- 2023At Which Training Stage Does Code Data Help LLMs Reasoning?cited by 82
- 2024CoIR: A Comprehensive Benchmark for Code Information Retrieval Modelscited by 59
- 2024CoRNStack: High-Quality Contrastive Data for Better Code Retrieval and Rerankingcited by 37
- 2025SWE-QA: Can Language Models Answer Repository-level Code Questions?cited by 37
- 2024Code Representation Learning At Scalecited by 26
- 2024NoFunEval: Funny How Code LMs Falter on Requirements Beyond Functional Correctnesscited by 23
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2022CodeRetriever: Unimodal and Bimodal Contrastive Learning for Code Searchcited by 21
- 2022CoCoSoDa: Effective Contrastive Learning for Code Searchcited by 21
38 more
- 2022ContraCLM: Contrastive Learning For Causal Language Modelcited by 18
- 2025SWE-Flow: Synthesizing Software Engineering Data in a Test-Driven Mannercited by 18
- 2024Rewriting the Code: A Simple Method for Large Language Model Augmented Code Searchcited by 17
- 2022CODE-MVP: Learning to Represent Source Code from Multiple Views with Contrastive Pre-Trainingcited by 15
- 2025O1 Embedder: Let Retrievers Think Before Actioncited by 15
- 2025ProBench: Benchmarking Large Language Models in Competitive Programmingcited by 15
- 2023Rethinking Negative Pairs in Code Searchcited by 14
- 2023ChatGPT: A Study on its Utility for Ubiquitous Software Engineering Taskscited by 12
- 2024ProCQA: A Large-scale Community-based Programming Question Answering Dataset for Code Searchcited by 12
- 2022CodeQueries: A Dataset of Semantic Queries over Codecited by 11
- 2024CoSQA+: Pioneering the Multi-Choice Code Search Benchmark with Test-Driven Agentscited by 11
- 2025Software Development Life Cycle Perspective: A Survey of Benchmarks for Code Large Language Models and Agentscited by 11
- 2026F2LLM-v2: Inclusive, Performant, and Efficient Embeddings for a Multilingual Worldcited by 10
- 2024R2C2-Coder: Enhancing and Benchmarking Real-world Repository-level Code Completion Abilities of Code Large Language Modelscited by 9
- 2026SWE-QA-Pro: A Representative Benchmark and Scalable Training Recipe for Repository-Level Code Understandingcited by 9
- 2022Exploring Representation-Level Augmentation for Code Searchcited by 8
- 2023Code Representation Pre-training with Complements from Program Executionscited by 8
- 2022Soft-Labeled Contrastive Pre-training for Function-level Code Representationcited by 7
- 2026CORE-Bench: A Comprehensive Benchmark for Code Retrieval in the Era of Agentic Codingcited by 7
- 2023GenCodeSearchNet: A Benchmark Test Suite for Evaluating Generalization in Programming Language Understandingcited by 6
- 2024Mitigating Data Imbalance for Software Vulnerability Assessment: Does Data Augmentation Help?cited by 6
- 2025CoQuIR: A Comprehensive Benchmark for Code Quality-Aware Information Retrievalcited by 6
- 2025MIRB: Mathematical Information Retrieval Benchmarkcited by 5
- 2021Cascaded Fast and Slow Models for Efficient Semantic Code Searchcited by 4
- 2022A Survey of Deep Learning Models for Structural Code Understandingcited by 4
- 2023Code Search Debiasing:Improve Search Results beyond Overall Ranking Performancecited by 4
- 2025Functional Consistency of LLM Code Embeddings: A Self-Evolving Data Synthesis Framework for Benchmarkingcited by 4
- 2022A Survey on Artificial Intelligence for Source Code: A Dialogue Systems Perspectivecited by 3
- 2022NS3: Neuro-Symbolic Semantic Code Searchcited by 3
- 2022Finding Reusable Machine Learning Components to Build Programming Language Processing Pipelinescited by 3
- 2024Towards Better Code Understanding in Decoder-Only Models with Contrastive Learningcited by 3
- 2024Contextualized Data-Wrangling Code Generation in Computational Notebookscited by 3
- 2024Code LLMs: A Taxonomy-based Surveycited by 3
- 2025Benchmarking AI Models in Software Engineering: A Review, Search Tool, and Unified Approach for Elevating Benchmark Qualitycited by 3
- 2025CoRet: Improved Retriever for Code Editingcited by 3
- 2025On The Role of Pretrained Language Models in General-Purpose Text Embeddings: A Surveycited by 3
- 2025C2LLM Technical Report: A New Frontier in Code Retrieval via Adaptive Cross-Attention Poolingcited by 3
- 2023Laminar: A New Serverless Stream-based Framework with Semantic Code Search and Code Completioncited by 2
50 most cited of 74 All 74 (JSON)
- 2026ExecRetrieval: Measuring the Functional-Correctness Gap in Code-Embedding Retrieval1 Sep 2026
- 2026DeepRepoQA: Code Repository Question Answering with Deep Agent Exploration25 Aug 2026
- 2026Natural Language Code Retrieval for 1C:Enterprise: An Open Benchmark and Efficient Bi-Encoder20 Aug 2026
- 2026Scientific Code Search at Scale: A Multi-Domain Dataset and Benchmark3 Jul 2026
- 2026CORE-Bench: A Comprehensive Benchmark for Code Retrieval in the Era of Agentic Coding10 Jun 2026
- 2026ML-Embed: Inclusive and Efficient Embeddings for a Multilingual World14 May 2026
- 2026Beyond Retrieval: A Multitask Benchmark and Model for Code Search6 May 2026
- 2026CodeMMR: Bridging Natural Language, Code, and Image for Unified Retrieval17 Apr 2026
- 2026F2LLM-v2: Inclusive, Performant, and Efficient Embeddings for a Multilingual World19 Mar 2026
- 2026SWE-QA-Pro: A Representative Benchmark and Scalable Training Recipe for Repository-Level Code Understanding17 Mar 2026
- 2025TabiBERT: A Large-Scale ModernBERT Foundation Model and A Unified Benchmark for Turkish28 Dec 2025
- 2025C2LLM Technical Report: A New Frontier in Code Retrieval via Adaptive Cross-Attention Pooling24 Dec 2025
38 more
- 2025Which Programming Language and Model Work Best With LLM-as-a-Judge For Code Retrieval?30 Sep 2025
- 2025Evaluating the Effectiveness and Scalability of LLM-Based Data Augmentation for Retrieval19 Sep 2025
- 2025SWE-QA: Can Language Models Answer Repository-level Code Questions?18 Sep 2025
- 2025Functional Consistency of LLM Code Embeddings: A Self-Evolving Data Synthesis Framework for Benchmarking27 Aug 2025
- 2025An Empirical Study of Knowledge Distillation for Code Understanding Tasks21 Aug 2025
- 2025On The Role of Pretrained Language Models in General-Purpose Text Embeddings: A Survey28 Jul 2025
- 2025A Comparative Study of Specialized LLMs as Dense Retrievers5 Jul 2025
- 2025SWE-Flow: Synthesizing Software Engineering Data in a Test-Driven Manner10 Jun 2025
- 2025CoQuIR: A Comprehensive Benchmark for Code Quality-Aware Information Retrieval31 May 2025
- 2025CoRet: Improved Retriever for Code Editing30 May 2025
- 2025MIRB: Mathematical Information Retrieval Benchmark21 May 2025
- 2025SDLog: A Deep Learning Framework for Detecting Sensitive Information in Software Logs20 May 2025
- 2025Software Development Life Cycle Perspective: A Survey of Benchmarks for Code Large Language Models and Agents8 May 2025
- 2025Zero-Shot Cross-Domain Code Search without Fine-Tuning10 Apr 2025
- 2025OASIS: Order-Augmented Strategy for Improved Code Search11 Mar 2025
- 2025Benchmarking AI Models in Software Engineering: A Review, Search Tool, and Unified Approach for Elevating Benchmark Quality7 Mar 2025
- 2025LoRACode: LoRA Adapters for Code Embeddings7 Mar 2025
- 2025ProBench: Benchmarking Large Language Models in Competitive Programming28 Feb 2025
- 2025O1 Embedder: Let Retrievers Think Before Action11 Feb 2025
- 2025URECA: The Chain of Two Minimum Set Cover Problems exists behind Adaptation to Shifts in Semantic Code Search11 Feb 2025
- 2024Code LLMs: A Taxonomy-based Survey11 Dec 2024
- 2024CoRNStack: High-Quality Contrastive Data for Better Code Retrieval and Reranking1 Dec 2024
- 2024Contextualized Data-Wrangling Code Generation in Computational Notebooks20 Sep 2024
- 2024Mitigating Data Imbalance for Software Vulnerability Assessment: Does Data Augmentation Help?15 Jul 2024
- 2024CoIR: A Comprehensive Benchmark for Code Information Retrieval Models3 Jul 2024
- 2024Towards Better Code Understanding in Decoder-Only Models with Contrastive Learning18 Jun 2024
- 2024CoSQA+: Pioneering the Multi-Choice Code Search Benchmark with Test-Driven Agents17 Jun 2024
- 2024R2C2-Coder: Enhancing and Benchmarking Real-world Repository-level Code Completion Abilities of Code Large Language Models3 Jun 2024
- 2024ProCQA: A Large-scale Community-based Programming Question Answering Dataset for Code Search25 Mar 2024
- 2024FaultProfIT: Hierarchical Fault Profiling of Incident Tickets in Large-scale Cloud Systems27 Feb 2024
- 2024Code Representation Learning At Scale2 Feb 2024
- 2024NoFunEval: Funny How Code LMs Falter on Requirements Beyond Functional Correctness29 Jan 2024
- 2024Embedding-based search in JetBrains IDEs26 Jan 2024
- 2024Rewriting the Code: A Simple Method for Large Language Model Augmented Code Search9 Jan 2024
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkit30 Dec 2023
- 2023Characterizing and Classifying Developer Forum Posts with their Intentions21 Dec 2023
- 2023Code Search Debiasing:Improve Search Results beyond Overall Ranking Performance25 Nov 2023
- 2023GenCodeSearchNet: A Benchmark Test Suite for Evaluating Generalization in Programming Language Understanding16 Nov 2023
50 newest of 74 All 74 (JSON)
- 2024CoSQA+: Pioneering the Multi-Choice Code Search Benchmark with Test-Driven Agentscited by 11
- 2025Software Development Life Cycle Perspective: A Survey of Benchmarks for Code Large Language Models and Agentscited by 11
- 2026SWE-QA-Pro: A Representative Benchmark and Scalable Training Recipe for Repository-Level Code Understandingcited by 9
- 2026CORE-Bench: A Comprehensive Benchmark for Code Retrieval in the Era of Agentic Codingcited by 7
- 2026DeepRepoQA: Code Repository Question Answering with Deep Agent Explorationcited by 0
- 2026DeepRepoQA: Code Repository Question Answering with Deep Agent Exploration25 Aug 2026
- 2026CORE-Bench: A Comprehensive Benchmark for Code Retrieval in the Era of Agentic Coding10 Jun 2026
- 2026SWE-QA-Pro: A Representative Benchmark and Scalable Training Recipe for Repository-Level Code Understanding17 Mar 2026
- 2025Software Development Life Cycle Perspective: A Survey of Benchmarks for Code Large Language Models and Agents8 May 2025
- 2024CoSQA+: Pioneering the Multi-Choice Code Search Benchmark with Test-Driven Agents17 Jun 2024
- 2023At Which Training Stage Does Code Data Help LLMs Reasoning?cited by 82
- 2025O1 Embedder: Let Retrievers Think Before Actioncited by 15
- 2025ProBench: Benchmarking Large Language Models in Competitive Programmingcited by 15
- 2025ProBench: Benchmarking Large Language Models in Competitive Programming28 Feb 2025
- 2025O1 Embedder: Let Retrievers Think Before Action11 Feb 2025
- 2023At Which Training Stage Does Code Data Help LLMs Reasoning?28 Sep 2023
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
- 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 327
- 2024CoIR: A Comprehensive Benchmark for Code Information Retrieval Modelscited by 59
- 2024CoRNStack: High-Quality Contrastive Data for Better Code Retrieval and Rerankingcited by 37
- 2025SWE-QA: Can Language Models Answer Repository-level Code Questions?cited by 37
- 2024Code Representation Learning At Scalecited by 26
- 2024NoFunEval: Funny How Code LMs Falter on Requirements Beyond Functional Correctnesscited by 23
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2022CodeRetriever: Unimodal and Bimodal Contrastive Learning for Code Searchcited by 21
- 2022CoCoSoDa: Effective Contrastive Learning for Code Searchcited by 21
- 2022ContraCLM: Contrastive Learning For Causal Language Modelcited by 18
- 2025SWE-Flow: Synthesizing Software Engineering Data in a Test-Driven Mannercited by 18
12 most cited of 61 All 61 (JSON)
- 2026Natural Language Code Retrieval for 1C:Enterprise: An Open Benchmark and Efficient Bi-Encoder20 Aug 2026
- 2026Scientific Code Search at Scale: A Multi-Domain Dataset and Benchmark3 Jul 2026
- 2026ML-Embed: Inclusive and Efficient Embeddings for a Multilingual World14 May 2026
- 2026Beyond Retrieval: A Multitask Benchmark and Model for Code Search6 May 2026
- 2026F2LLM-v2: Inclusive, Performant, and Efficient Embeddings for a Multilingual World19 Mar 2026
- 2025TabiBERT: A Large-Scale ModernBERT Foundation Model and A Unified Benchmark for Turkish28 Dec 2025
- 2025C2LLM Technical Report: A New Frontier in Code Retrieval via Adaptive Cross-Attention Pooling24 Dec 2025
- 2025Which Programming Language and Model Work Best With LLM-as-a-Judge For Code Retrieval?30 Sep 2025
- 2025Evaluating the Effectiveness and Scalability of LLM-Based Data Augmentation for Retrieval19 Sep 2025
- 2025SWE-QA: Can Language Models Answer Repository-level Code Questions?18 Sep 2025
- 2025An Empirical Study of Knowledge Distillation for Code Understanding Tasks21 Aug 2025
- 2025On The Role of Pretrained Language Models in General-Purpose Text Embeddings: A Survey28 Jul 2025
12 newest of 61 All 61 (JSON)