DomAgent: Leveraging Knowledge Graphs and Case-Based Reasoning for Domain-Specific Code Generation
Paper in proceeding, 2026

Large language models (LLMs) perform well on general code generation but often struggle with domain-specific software tasks due to limited specialized knowledge in their training data. We propose DomAgent, an autonomous coding agent that enables domain-adapted code generation through structured reasoning and targeted retrieval. Its core module, DomRetriever, combines knowledge-graph reasoning with case-based reasoning to iteratively retrieve and synthesize relevant domain knowledge and examples. Experiments on the DS-1000 benchmark and real-world Volvo truck software development tasks show that DomAgent significantly improves domain-specific code generation, allowing small open-source models to approach the performance of large proprietary LLMs. The code is publicly available at: https://github.com/Wangshuaiia/DomAgent.

Knowledge Graph

LLMs

Domain-Specific Code Generation

Author

Shuai Wang

Chalmers, Space, Earth and Environment, Energy Technology

Dhasarathy Parthasarathy

Volvo Group

Robert Feldt

Chalmers, Computer Science and Engineering (Chalmers), Software Engineering (Chalmers)

University of Gothenburg

Yinan Yu

University of Gothenburg

Chalmers, Computer Science and Engineering (Chalmers), Functional Programming

Aamas 2026 Proceedings of the 25th International Conference on Autonomous Agents and Multiagent Systems

3655-3657
9798400723179 (ISBN)

25th International Conference on Autonomous Agents and Multiagent Systems, AAMAS 2026
Paphos, Cyprus,

Subject Categories (SSIF 2025)

Software Engineering

Computer Sciences

Artificial Intelligence

DOI

10.65109/HSTL5347

More information

Latest update

9/23/2026