用大模型提升代码问答质量,发现语法修正能显著改进结果
Leveraging Large Language Models in Code Question Answering: Baselines and Issues
- 用统一的代码问答数据集微调大模型
- 语法修正后的训练数据使指标提升,最高达12.7%
- 适合想改进代码问答系统的研究人员
代码问答为软件工程师和项目管理者提供关于软件功能的有用信息。本文研究使用大语言模型进行Python代码问答的方法。通过在统一的问答数据集上微调大模型实现代码问答系统,并测试了三种不同预处理方式的数据集:未修正语法、已修正语法、以及加入生成摘要的增强数据集。对模型输出进行人工错误分析,报告了BLEU-4、BERTScore F1、BLEURT和Exact Match等指标。实验结果显示当前公开真实数据集质量较差,但训练数据的语法修正显著提升了测试指标(最高提升12.7%)。这些发现对改进代码问答系统具有重要参考价值。训练与评估代码已开源于https://github.com/IU-AES-AI4Code/CodeQuestionAnswering。
原文摘要 · Abstract (English)
Question answering over source code provides software engineers and project managers with helpful information about the implemented features of a software product. This paper presents a work devoted to using large language models for question answering over source code in Python. The proposed method for implementing a source code question answering system involves fine-tuning a large language model on a unified dataset of questions and answers for Python code. To achieve the highest quality answers, we tested various models trained on datasets preprocessed in different ways: a dataset without grammar correction, a dataset with grammar correction, and a dataset augmented with the generated summaries. The model answers were also analyzed for errors manually. We report BLEU-4, BERTScore F1, BLEURT, and Exact Match metric values, along with the conclusions from the manual error analysis. The obtained experimental results highlight the current problems of the research area, such as poor quality of the public genuine question-answering datasets. In addition, the findings include the positive effect of the grammar correction of the training data on the testing metric values. The addressed findings and issues could be important for other researchers who attempt to improve the quality of source code question answering solutions. The training and evaluation code is publicly available at https://github.com/IU-AES-AI4Code/CodeQuestionAnswering.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。