Leveraging LLMs for Multi-File DSL Code Generation: An Industrial Case Study
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) perform strongly on general-purpose code generation, yet their applicability to enterprise domain-specific languages (DSLs) remains underexplored, especially for repository-scale change generation spanning multiple files and folder structures from a single natural-language (NL) instruction. We report an industrial case study at BMW that adapts code-oriented LLMs to generate and modify project-root DSL artifacts for an Xtext-based DSL that drives downstream Java/TypeScript code generation. We develop an end-to-end pipeline for dataset construction, multi-file task representation, model adaptation, and evaluation. We encode DSL folder hierarchies as structured, path-preserving JSON, allowing single-response generation at repository scale and learning cross-file dependencies. We evaluate two instruction-tuned code LLMs (Qwen2.5-Coder and DeepSeek-Coder, 7B) under three configurations: baseline prompting, one-shot in-context learning, and parameter-efficient fine-tuning (QLoRA). Beyond standard similarity metrics, we introduce task-specific measures that assess edit correctness and repository structural fidelity. Fine-tuning yields the most significant gains across models and metrics, achieving high exact-match accuracy, substantial edit similarity, and structural fidelity of 1.00 on our held-out set for multi-file outputs. At the same time, one-shot in-context learning provides smaller but consistent improvements over baseline prompting. We further validate practical utility via an expert developer survey and an execution-based check using the existing code generator.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 28 of its 46 references that are in the map. First posted on arXiv 27 Apr 2026.
Builds on
28 of 46 references.
References · 28
- 2017Attention Is All You Needcited by 60,361
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
- 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,418
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
- 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,392
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
- 2022LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scalecited by 906
- 2022Few-Shot Parameter-Efficient Fine-Tuning is Better and Cheaper than In-Context Learningcited by 896
- 2016Training Deep Nets with Sublinear Memory Costcited by 848
16 more
- 2022A Survey on In-context Learningcited by 721
- 2021Prompt Programming for Large Language Models: Beyond the Few-Shot Paradigmcited by 606
- 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 479
- 2024A Systematic Survey of Prompt Engineering in Large Language Models: Techniques and Applicationscited by 431
- 2016Language to Logical Form with Neural Attentioncited by 158
- 2023Few-shot Fine-tuning vs. In-context Learning: A Fair Comparison and Evaluationcited by 136
- 2017Abstract Syntax Networks for Code Generation and Semantic Parsingcited by 92
- 2023A Practical Survey on Zero-shot Prompt Design for In-context Learningcited by 49
- 2023On the Effectiveness of Large Language Models in Domain-Specific Code Generationcited by 44
- 2024A Survey on Evaluating Large Language Models in Code Generation Taskscited by 44
- 2024Benchmarks and Metrics for Evaluations of Code Generation: A Critical Reviewcited by 20
- 2024A Comparative Study of DSL Code Generation: Fine-Tuning vs. Optimized Retrieval Augmentationcited by 10
- 2021Layered gradient accumulation and modular pipeline parallelism: fast and efficient training of large language modelscited by 6
- 2025PLoRA: Efficient Concurrent LoRA Training for Large Language Modelscited by 6
- 2024Guiding Large Language Models to Generate Computer-Parsable Contentcited by 4
- 2025Development and Evolution of Xtext-based DSLs on GitHub: An Empirical Investigationcited by 3
Built on by
Not cited yet.