paper-with-me

Papers

A Comparative Study of DSL Code Generation: Fine-Tuning vs. Optimized Retrieval Augmentation

2024-07-03 · Nastaran Bassamzadeh, Chhaya Methani

Natural Language to Code Generation has made significant progress in recent years with the advent of Large Language Models(LLMs). While generation for general-purpose languages like C, C++, and Python has improved significantly, LLMs struggle with custom function names in Domain Specific Languages or DSLs. This leads to higher hallucination rates and syntax errors, specially for DSLs having a high number of custom function names. Additionally, constant updates to function names add to the challenge as LLMs need to stay up-to-date. In this paper, we present optimizations for using Retrieval Augmented Generation (or RAG) with LLMs for DSL generation along with an ablation study comparing these strategies. We generated a train as well as test dataset with a DSL to represent automation tasks across roughly 700 APIs in public domain. We used the training dataset to fine-tune a Codex model for this DSL. Our results showed that the fine-tuned model scored the best on code similarity metric. With our RAG optimizations, we achieved parity for similarity metric. The compilation rate, however, showed that both the models still got the syntax wrong many times, with RAG-based method being 2 pts better. Conversely, hallucination rate for RAG model lagged by 1 pt for API names and by 2 pts for API parameter keys. We conclude that an optimized RAG model can match the quality of fine-tuned models and offer advantages for new, unseen APIs.

📄 PDF Abstract BibTeX arXiv:2407.02742

Code (0)

등록된 구현이 없습니다.

Tasks

Code GenerationHallucinationRAGRetrievalRetrieval-augmented Generation

Methods 이 논문이 사용한 방법론

Refunds@Expedia|||How do I get a full refund from Expedia? “How do I get a full refund from Expedia? How do I get a full refund from Expedia? – Call ☎️ +1-(888) 829 (0881) or +1-805-330-4056 or +1-805-330-4056 for Quick Help &…
Attention 설명 없음
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Weight Decay 설명 없음
Multi-Head Attention 설명 없음
Residual Connection 설명 없음
WordPiece 설명 없음
Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…

Similar Papers 제목 키워드 기반

Simplify-This: A Comparative Analysis of Prompt-Based and Fine-Tuned LLMs

2026-01-09 · Eilam Cohen, Itamar Bul, Danielle Inbar, Omri Loewenbach arxiv

Large language models (LLMs) enable strong text generation, and in general there is a practical tradeoff between fine-tuning and prompt engineering. We introduce Simplify-This, a comparative study evaluating both paradig…

Text SimplificationSemantic SimilarityPrompt EngineeringText Generation

From Prompting to Preference Optimization: A Comparative Study of LLM-based Automated Essay Scoring

2026-03-06 · Minh Hoang Nguyen, Vu Hoang Pham, Xuan Thanh Huynh, Phuc Hong Mai 외 arxiv

Large language models (LLMs) have recently reshaped Automated Essay Scoring (AES), yet prior studies typically examine individual techniques in isolation, limiting understanding of their relative merits for English as a …

Automated Essay Scoring

Finetuning LLMs for Comparative Assessment Tasks

2024-09-24 · Vatsal Raina, Adian Liusie, Mark Gales

Automated assessment in natural language generation is a challenging task. Instruction-tuned large language models (LLMs) have shown promise in reference-free evaluation, particularly through comparative assessment. Howe…

Text Generation

Enhancing High-Quality Code Generation in Large Language Models with Comparative Prefix-Tuning

2025-03-12 · Yuan Jiang, Yujian Zhang, Liang Lu, Christoph Treude 외

Large Language Models (LLMs) have been widely adopted in commercial code completion engines, significantly enhancing coding efficiency and productivity. However, LLMs may generate code with quality issues that violate co…

Code CompletionCode Generation

Fine-Tuning Large Language Models and Evaluating Retrieval Methods for Improved Question Answering on Building Codes

2025-05-07 · Mohammad Aqib, Mohd Hamza, Qipei Mei, Ying Hei Chui

Building codes are regulations that establish standards for the design, construction, and safety of buildings to ensure structural integrity, fire protection, and accessibility. They are often extensive, complex, and sub…

Language ModelingLanguage ModellingNavigateQuestion Answering+3