Digital Repository

Retrieval-Augmented Large Code Generation and Evaluation using Large Language Models

Show simple item record

dc.contributor.advisor Kumar, Sudhir
dc.contributor.author DESHPANDE, BHUSHAN
dc.date.accessioned 2025-05-19T04:31:56Z
dc.date.available 2025-05-19T04:31:56Z
dc.date.issued 2025-05
dc.identifier.citation 112 en_US
dc.identifier.uri http://dr.iiserpune.ac.in:8080/xmlui/handle/123456789/9958
dc.description.abstract Large Language Models (LLMs) have been shown to capture the syntax, semantics, and structure of programming languages, enabling the generation of accurate code for similar test cases through Few Shot Learning (FSL) and prompt engineering. Although LLMs perform exceptionally well with small context-length inputs, they struggle to produce accurate results with large context-length inputs and out-of-distribution-dataset, thereby limiting their applicability for large-scale code generation tasks. Our work focuses on large code generation based on the custom dataset using LLMs. This research explored a number of small-sized, open-source, state-of-the-art LLMs and various configurations of LLMs, with temperature and other hyper-parameter settings. With pre-trained LLMs, code generation accuracy was less than 20% without tuning any hyper-parameters. By implementing Retrieval-Augmented Generation (RAG) to retrieve contextually relevant examples, the initial accuracy of the generated code was improved, reaching 65% to 70% correctness based on expert evaluations. A framework for reviewing the generated code called ‘LLM Judge’, was developed to identify correctness, issues, and places of improvement. By iteratively generating and refining code based on feedback from the ‘LLM Judge’, the accuracy of the generated code improved to 75%–80% at the end of the second iteration. These results highlight the potential of LLM to automate the test code generation. This work reduces the time required to write custom code to automate test cases from, on average, two days to a few hours, thereby simplifying the development process for engineers. en_US
dc.language.iso en en_US
dc.subject Retrieval Augmented Generation (RAG) en_US
dc.subject Code Generation en_US
dc.subject Code Evaluation en_US
dc.subject Large Language Models (LLMs) en_US
dc.title Retrieval-Augmented Large Code Generation and Evaluation using Large Language Models en_US
dc.type Thesis en_US
dc.description.embargo No Embargo en_US
dc.type.degree BS-MS en_US
dc.contributor.department Dept. of Data Science en_US
dc.contributor.registration 20201224 en_US


Files in this item

This item appears in the following Collection(s)

  • MS THESES [1969]
    Thesis submitted to IISER Pune in partial fulfilment of the requirements for the BS-MS Dual Degree Programme/MSc. Programme/MS-Exit Programme

Show simple item record

Search Repository


Advanced Search

Browse

My Account