Skip to main content
QUICK REVIEW

[论文解读] KOCO-BENCH: Can Large Language Models Leverage Domain Knowledge in Software Development?

Xue Jiang, Jiaru Qian|arXiv (Cornell University)|Jan 19, 2026
Topic Modeling被引用 0
一句话总结

KoCo-Bench 是一个以知识语料库驱动的基准,用于评估大模型在领域软件开发中获取并应用领域知识的能力,揭示现有领域专业化方法收益有限。

ABSTRACT

Large language models (LLMs) excel at general programming but struggle with domain-specific software development, necessitating domain specialization methods for LLMs to learn and utilize domain knowledge and data. However, existing domain-specific code benchmarks cannot evaluate the effectiveness of domain specialization methods, which focus on assessing what knowledge LLMs possess rather than how they acquire and apply new knowledge, lacking explicit knowledge corpora for developing domain specialization methods. To this end, we present KOCO-BENCH, a novel benchmark designed for evaluating domain specialization methods in real-world software development. KOCO-BENCH contains 6 emerging domains with 11 software frameworks and 25 projects, featuring curated knowledge corpora alongside multi-granularity evaluation tasks including domain code generation (from function-level to project-level with rigorous test suites) and domain knowledge understanding (via multiple-choice Q&A). Unlike previous benchmarks that only provide test sets for direct evaluation, KOCO-BENCH requires acquiring and applying diverse domain knowledge (APIs, rules, constraints, etc.) from knowledge corpora to solve evaluation tasks. Our evaluations reveal that KOCO-BENCH poses significant challenges to state-of-the-art LLMs. Even with domain specialization methods (e.g., SFT, RAG, kNN-LM) applied, improvements remain marginal. Best-performing coding agent, Claude Code, achieves only 34.2%, highlighting the urgent need for more effective domain specialization methods. We release KOCO-BENCH, evaluation code, and baselines to advance further research at https://github.com/jiangxxxue/KOCO-bench.

研究动机与目标

  • 说明需要超越现有代码基准的领域特定评估,聚焦领域知识的获取与使用。
  • 提供一个附带语料的基准,覆盖多种软件框架和领域,以测试领域代码生成与知识理解。
  • 使在现实、长上下文的软件项目中评估学习式、检索式与代理化方法成为可能。
  • 提供严格、基于测试用例的评估,以在多粒度要求下衡量正确性与知识理解。

提出的方法

  • 以来自框架文档、源代码和用例的知识语料构建 KoCo-Bench,覆盖6个领域和11个框架。
  • 创建两类任务:领域代码生成(从函数级到项目级,附单元/集成测试)和领域知识理解(多项选择问答)。
  • 构建多层次的需求描述(项目、模块、核心函数)以及全面的测试套件以验证生成代码。
  • 使用带注解的人工监督流程,限制代理辅助以确保数据质量并防止污染。
  • 在 KoCo-Bench 上评估最先进的大模型、领域专业化方法(SFT、LoRA、RAG、kNN-LM)以及基于代理的系统。
  • 对语料规模效应、持续学习和错误模式进行分析。

实验结果

研究问题

  • RQ1大模型是否能够从经过精心筛选的语料库中获取并应用外部领域知识,以完成领域特定代码生成?
  • RQ2现有领域专业化方法在领域代码生成与领域知识理解方面的性能提升在多大程度上具有意义?
  • RQ3代理型编码方法是否在领域特定软件开发中优于纯检索或微调等方法?
  • RQ4领域知识语料规模及跨域持续学习如何影响领域知识的保留与迁移?
  • RQ5在生成领域特定代码和使用领域API时,最常见的错误类型有哪些?

主要发现

  • 即使是最先进的大模型,在领域代码生成方面也表现不佳,在 KoCo-Bench 上仅获得个位数的 Pass@1 分数。
  • 领域专业化方法的改进有限且在不同领域的效果存在差异。
  • 基于代理的编码方法(如 Claude Code)在测试方法中表现最佳,但仍无法满足实际需求。
  • 基于学习的专业化在语料规模增加时收益可能递减,且在持续学习下可能遗忘已学的领域知识。
  • 最常见的错误涉及无效的领域 API 调用和数据约束违规,凸显领域 API 知识与数据流推理方面的差距。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。