mlsanityData to 13 Oct 2026

Exploring different approaches to customize language models for domain-specific text-to-code generation

arXiv 2603.16526 ↗First posted 17 Mar 2026cs.AIcited by 0

Not on the map. Why?

Abstract (arXiv)

Large language models (LLMs) have demonstrated strong capabilities in generating executable code from natural language descriptions. However, general-purpose models often struggle in specialized programming contexts where domain-specific libraries, APIs, or conventions must be used. Customizing smaller open-source models offers a cost-effective alternative to relying on large proprietary systems. In this work, we investigate how smaller language models can be adapted for domain-specific code generation using synthetic datasets. We construct datasets of programming exercises across three domains within the Python ecosystem: general Python programming, Scikit-learn machine learning workflows, and OpenCV-based computer vision tasks. Using these datasets, we evaluate three customization strategies: few-shot prompting, retrieval-augmented generation (RAG), and parameter-efficient fine-tuning using Low-Rank Adaptation (LoRA). Performance is evaluated using both benchmark-based metrics and similarity-based metrics that measure alignment with domain-specific code. Our results show that prompting-based approaches such as few-shot learning and RAG can improve domain relevance in a cost-effective manner, although their impact on benchmark accuracy is limited. In contrast, LoRA-based fine-tuning consistently achieves higher accuracy and stronger domain alignment across most tasks. These findings highlight practical trade-offs between flexibility, computational cost, and performance when adapting smaller language models for specialized programming tasks.

Key facts. No citing papers in the map yet (data through 13 Oct 2026). Builds on 16 of its 22 references that are in the map. First posted on arXiv 17 Mar 2026.

Builds on

16 of 22 references.

References · 16

  1. 2017Attention Is All You Needcited by 60,106
  2. 2020Language Models are Few-Shot Learnerscited by 32,320
  3. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,231
  4. 2015Distilling the Knowledge in a Neural Networkcited by 10,180
  5. 2021Evaluating Large Language Models Trained on Codecited by 8,205
  6. 2020Scaling Laws for Neural Language Modelscited by 6,494
  7. 2023Retrieval-Augmented Generation for Large Language Models: A Surveycited by 2,196
  8. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,173
  9. 2023StarCoder: may the source be with you!cited by 797
  10. 2024Parameter-Efficient Fine-Tuning for Large Models: A Comprehensive Surveycited by 652
  11. 2023Textbooks Are All You Needcited by 566
  12. 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructionscited by 533
4 more
  1. 2024Large Language Models: A Surveycited by 520
  2. 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 475
  3. 2023TinyStories: How Small Can Language Models Be and Still Speak Coherent English?cited by 436
  4. 2022The Stack: 3 TB of permissively licensed source codecited by 359

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2026SLM Finetuning for Natural Language to Domain Specific Code Generation in Production
  2. 2023On the Effectiveness of Large Language Models in Domain-Specific Code Generation
  3. 2024Low-Cost Language Models: Survey and Performance Evaluation on Python Code Generation
  4. 2024Improving the Ability of Pre-trained Language Model by Imparting Large Language Model's Experience ↗
  5. 2023Exploring Parameter-Efficient Fine-Tuning Techniques for Code Generation with Large Language Models
  6. 2024A Comparative Study of DSL Code Generation: Fine-Tuning vs. Optimized Retrieval Augmentation
  7. 2024Enhancing Code Translation in Language Models with Few-Shot Learning via Retrieval-Augmented Generation
  8. 2024AICoderEval: Improving AI Domain Code Generation of Large Language Models