You Augment Me: Exploring ChatGPT-based Data Augmentation for Semantic Code Search
Not on the map. Why?
Abstract (arXiv)
Code search plays a crucial role in software development, enabling developers to retrieve and reuse code using natural language queries. While the performance of code search models improves with an increase in high-quality data, obtaining such data can be challenging and expensive. Recently, large language models (LLMs) such as ChatGPT have made remarkable progress in both natural and programming language understanding and generation, offering user-friendly interaction via simple prompts. Inspired by these advancements, we propose a novel approach ChatDANCE, which utilizes high-quality and diverse augmented data generated by a large language model and leverages a filtering mechanism to eliminate low-quality augmentations. Specifically, we first propose a set of ChatGPT prompting rules that are specifically designed for source code and queries. Then, we leverage ChatGPT to rewrite code and queries based on the according prompts and then propose a filtering mechanism which trains a cross-encoder from the backbone model UniXcoder to filter out code and query pairs with low matching scores. Finally, we re-train the backbone model using the obtained high-quality augmented data. Experimental results show that ChatDANCE achieves state-of-the-art performance, improving the best baseline by 13.2% (R@1) and 7% (MRR). Surprisingly, we find that this augment-filter-retrain strategy enables the backbone model (UniXcoder) to self-grow. Moreover, extensive experiments show the effectiveness of each component and ChatDANCE has stable performance under different hyperparameter settings. In addition, we conduct qualitative and quantitative analyses to investigate why ChatDANCE works well and find that it learns a more uniform distribution of representations and effectively aligns the code and query spaces.
Key facts. Cited by 11 papers in the map (data through 7 Oct 2026). First posted on arXiv 10 Aug 2024.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2024: 2; 2025: 2; 2026: 7.
11 papers.
- 2024LLM Hallucinations in Practical Code Generation: Phenomena, Mechanism, and Mitigationcited by 92
- 2024Agents in Software Engineering: Survey, Landscape, and Visioncited by 60
- 2025An Empirical Study of Agent Developer Practices in AI Agent Frameworkscited by 14
- 2026AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completioncited by 7
- 2026CodeScout: Contextual Problem Statement Enhancement for Software Agentscited by 4
- 2026ShortCoder: Knowledge-Augmented Syntax Optimization for Token-Efficient Code Generationcited by 3
- 2026DRAINCODE: Stealthy Energy Consumption Attacks on Retrieval-Augmented Code Generation via Context Poisoningcited by 3
- 2025Zero-Shot Cross-Domain Code Search without Fine-Tuningcited by 2
- 2026PhoenixRepair: Rethinking Repair Strategy Exploration in Software Agentscited by 2
- 2026Adaptive Critical Token-Aware Retrieval for Repository-Level Code Generationcited by 0
- 2026Efficient SWE Agent Benchmarking via Trajectory-Aware Evaluationcited by 0
- 2026Efficient SWE Agent Benchmarking via Trajectory-Aware Evaluation1 Sep 2026
- 2026Adaptive Critical Token-Aware Retrieval for Repository-Level Code Generation1 Sep 2026
- 2026PhoenixRepair: Rethinking Repair Strategy Exploration in Software Agents21 Jul 2026
- 2026CodeScout: Contextual Problem Statement Enhancement for Software Agents5 Mar 2026
- 2026DRAINCODE: Stealthy Energy Consumption Attacks on Retrieval-Augmented Code Generation via Context Poisoning28 Jan 2026
- 2026AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completion27 Jan 2026
- 2026ShortCoder: Knowledge-Augmented Syntax Optimization for Token-Efficient Code Generation14 Jan 2026
- 2025An Empirical Study of Agent Developer Practices in AI Agent Frameworks1 Dec 2025
- 2025Zero-Shot Cross-Domain Code Search without Fine-Tuning10 Apr 2025
- 2024LLM Hallucinations in Practical Code Generation: Phenomena, Mechanism, and Mitigation30 Sep 2024
- 2024Agents in Software Engineering: Survey, Landscape, and Vision13 Sep 2024