Within this study, we propose and evaluate an approach to structure and improve context provided in RAG-based solutions for code generation. The approach is based on combination of semantically relevant API and code selection and filtering for better context representation in following LLM prompt. The experimental evaluation performed with CodeGen-350M-mono and several popular benchmarks such as RepoCoder, CoderEval, CoIR show good overall performance (even in comparison to bigger LLMs). Also, the experimental evaluation shows improvement with narrower and more focused context representation (project-scope API instead of popular public API).

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Improving Project-Level Code Generation Using Combined Relevant Context

  • Dmitriy Fedrushkov,
  • Denis Tereshchenko,
  • Sergey Kovalchuk,
  • Artem Aliev

摘要

Within this study, we propose and evaluate an approach to structure and improve context provided in RAG-based solutions for code generation. The approach is based on combination of semantically relevant API and code selection and filtering for better context representation in following LLM prompt. The experimental evaluation performed with CodeGen-350M-mono and several popular benchmarks such as RepoCoder, CoderEval, CoIR show good overall performance (even in comparison to bigger LLMs). Also, the experimental evaluation shows improvement with narrower and more focused context representation (project-scope API instead of popular public API).