DomAgent: 지식 그래프와 사례 기반 추론을 활용한 도메인 특화 코드 생성
DomAgent: Leveraging Knowledge Graphs and Case-Based Reasoning for Domain-Specific Code Generation
대규모 언어 모델(LLM)은 코드 생성 능력에서 뛰어난 성능을 보여주었습니다. 그러나 대부분의 LLM은 공개 도메인 데이터로 학습되기 때문에, 실제 소프트웨어 개발에 직접 적용하면 성공률이 낮아지는 경우가 많습니다. 이는 실제 시나리오가 종종 도메인 특화 지식을 필요로 하기 때문입니다. 특히, 도메인 특화 작업은 일반적으로 고도로 특화된 솔루션을 요구하며, 이러한 솔루션은 일반적인 LLM의 학습 데이터에서 부족하거나 완전히 누락되는 경우가 많습니다. 이러한 문제를 해결하기 위해, 우리는 구조화된 추론과 타겟 검색을 통해 LLM이 도메인에 맞게 코드를 생성할 수 있도록 하는 자율 코딩 에이전트인 DomAgent를 제안합니다. DomAgent의 핵심 구성 요소인 DomRetriever는 인간이 도메인 특화 지식을 학습하는 방식을 모방하는 새로운 검색 모듈입니다. DomRetriever는 상위 레벨의 지식 그래프 추론과 하위 레벨의 사례 기반 추론을 결합하여 반복적인 검색과 구조화된 지식 및 대표적인 사례의 통합을 가능하게 함으로써, 문맥적 관련성을 확보하고 다양한 작업 범위를 지원합니다. DomRetriever는 DomAgent의 일부로 작동하거나, 유연한 도메인 적응을 위해 다른 LLM과 독립적으로 사용할 수 있습니다. 우리는 DomAgent를 데이터 과학 도메인의 공개 벤치마크 데이터셋(DS-1000)에서 평가하고, 실제 트럭 소프트웨어 개발 작업에 적용했습니다. 실험 결과, DomAgent는 도메인 특화 코드 생성 능력을 크게 향상시키며, 소규모 오픈 소스 모델이 복잡하고 실제적인 애플리케이션에서 대규모 독점 LLM과의 성능 격차를 상당 부분 줄일 수 있음을 보여줍니다. 코드 및 관련 자료는 다음 링크에서 확인할 수 있습니다: https://github.com/Wangshuaiia/DomAgent.
Large language models (LLMs) have shown impressive capabilities in code generation. However, because most LLMs are trained on public domain corpora, directly applying them to real-world software development often yields low success rates, as these scenarios frequently require domain-specific knowledge. In particular, domain-specific tasks usually demand highly specialized solutions, which are often underrepresented or entirely absent in the training data of generic LLMs. To address this challenge, we propose DomAgent, an autonomous coding agent that bridges this gap by enabling LLMs to generate domain-adapted code through structured reasoning and targeted retrieval. A core component of DomAgent is DomRetriever, a novel retrieval module that emulates how humans learn domain-specific knowledge, by combining conceptual understanding with experiential examples. It dynamically integrates top-down knowledge-graph reasoning with bottom-up case-based reasoning, enabling iterative retrieval and synthesis of structured knowledge and representative cases to ensure contextual relevance and broad task coverage. DomRetriever can operate as part of DomAgent or independently with any LLM for flexible domain adaptation. We evaluate DomAgent on an open benchmark dataset in the data science domain (DS-1000) and further apply it to real-world truck software development tasks. Experimental results show that DomAgent significantly enhances domain-specific code generation, enabling small open-source models to close much of the performance gap with large proprietary LLMs in complex, real-world applications. The code is available at: https://github.com/Wangshuaiia/DomAgent.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.