Benchmarking the Impact of Contextual Information on OpenMP Code Generation by Large Language Models

dc.contributor.author Azhar, Muhammad Adistya
dc.contributor.committeeMember Mitra
dc.contributor.department Computer Science
dc.contributor.majorProfessor Mitra, Simanta
dc.date.accessioned 2025-06-04T16:05:31Z
dc.date.available 2025-06-04T16:05:31Z
dc.date.copyright 2025
dc.date.issued 2025-05
dc.description.abstract The rapid development of tools based on artificial intelligence has been driven by the widespread adoption of large language models (LLMs). These models have opened up new opportunities for automating tasks that were previously considered manual and labor-intensive, enabling end-to-end automation. For example, LLMs have been applied in various industries to power chatbots that assist customers by answering questions about products. A key technique utilized in many of these applications is retrieval augmented generation (RAG). Existing benchmarks for evaluating the performance of LLMs in RAG have typically focused on documents from Wikipedia and news websites. In this study, we extend the concept of RAG to retrieval augmented code generation (RACG), aimed at helping LLMs generate domain-specific OpenMP source code. Code generation in this context is particularly challenging due to the need for precise handling of function signatures, method calls, and other domain-specific constructs. We use contextual information from Stackoverflow posts and GitHub repositories to aid in this task. To assess code generation performance, we evaluated 15 LLMs of varying sizes and computed the CodeBLEU and CodeBERT metric. Our findings show that (1) most LLMs can generate OpenMP code effectively without context, (2) GitHub code snippets provide more useful context for LLMs than Stackoverflow posts, (3) context helps smaller and non-code-focused models improve their ability to generate OpenMP source code, and (4) large input prompts exceeding the context size hurts LLM performance.
dc.identifier.uri https://dr.lib.iastate.edu/handle/20.500.12876/106018
dc.language.iso en_US
dc.rights Attribution 3.0 United States *
dc.rights.holder Muhammad Adistya Azhar
dc.rights.uri http://creativecommons.org/licenses/by/3.0/us/ *
dc.subject.disciplines DegreeDisciplines::Physical Sciences and Mathematics::Computer Sciences::Software Engineering
dc.subject.disciplines DegreeDisciplines::Physical Sciences and Mathematics::Computer Sciences::Artificial Intelligence and Robotics
dc.subject.keywords Large Language Models, Software Engineering, Embedding Models, ML4Code
dc.title Benchmarking the Impact of Contextual Information on OpenMP Code Generation by Large Language Models
dc.type Text
dc.type.genre creativecomponent
dspace.entity.type Publication
thesis.degree.discipline Computer Science
thesis.degree.level Masters
thesis.degree.name Master of Science
File
Original bundle
Now showing 1 - 1 of 1
No Thumbnail Available
Name:
MS-Report-Azhar.pdf
Size:
5.27 MB
Format:
Adobe Portable Document Format
Description: