CodeInsight: A Curated Dataset of Practical Coding Solutions from Stack Overflow

Nathanaël Beau, Benoit Crabbé


Abstract
We introduce a novel dataset tailored for code generation, aimed at aiding developers in common tasks. Our dataset provides examples that include a clarified intent, code snippets associated, and an average of three related unit tests. It encompasses a range of libraries such as Pandas, Numpy, and Regex, along with more than 70 standard libraries in Python code derived from Stack Overflow. Comprising 3,402 crafted examples by Python experts, our dataset is designed for both model finetuning and standalone evaluation. To complete unit tests evaluation, we categorize examples in order to get more fine grained analysis, enhancing the understanding of models’ strengths and weaknesses in specific coding tasks. The examples have been refined to reduce data contamination, a process confirmed by the performance of three leading models: Mistral 7B, CodeLLAMA 13B, and Starcoder 15B. We further investigate data-contamination testing GPT-4 performance on a part of our dataset. The benchmark can be accessed at anonymized address.
Anthology ID:
2024.findings-acl.354
Original:
2024.findings-acl.354v1
Version 2:
2024.findings-acl.354v2
Volume:
Findings of the Association for Computational Linguistics: ACL 2024
Month:
August
Year:
2024
Address:
Bangkok, Thailand
Editors:
Lun-Wei Ku, Andre Martins, Vivek Srikumar
Venue:
Findings
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
5935–5947
Language:
URL:
https://aclanthology.org/2024.findings-acl.354
DOI:
10.18653/v1/2024.findings-acl.354
Bibkey:
Cite (ACL):
Nathanaël Beau and Benoit Crabbé. 2024. CodeInsight: A Curated Dataset of Practical Coding Solutions from Stack Overflow. In Findings of the Association for Computational Linguistics: ACL 2024, pages 5935–5947, Bangkok, Thailand. Association for Computational Linguistics.
Cite (Informal):
CodeInsight: A Curated Dataset of Practical Coding Solutions from Stack Overflow (Beau & Crabbé, Findings 2024)
Copy Citation:
PDF:
https://aclanthology.org/2024.findings-acl.354.pdf