PathOCL: Path-Based Prompt Augmentation for OCL Generation with GPT-4

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Abukhalaf, Seif, Hamdaqa, Mohammad, Khomh, Foutse
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866929376980893696
author Abukhalaf, Seif
Hamdaqa, Mohammad
Khomh, Foutse
author_facet Abukhalaf, Seif
Hamdaqa, Mohammad
Khomh, Foutse
contents The rapid progress of AI-powered programming assistants, such as GitHub Copilot, has facilitated the development of software applications. These assistants rely on large language models (LLMs), which are foundation models (FMs) that support a wide range of tasks related to understanding and generating language. LLMs have demonstrated their ability to express UML model specifications using formal languages like the Object Constraint Language (OCL). However, the context size of the prompt is limited by the number of tokens an LLM can process. This limitation becomes significant as the size of UML class models increases. In this study, we introduce PathOCL, a novel path-based prompt augmentation technique designed to facilitate OCL generation. PathOCL addresses the limitations of LLMs, specifically their token processing limit and the challenges posed by large UML class models. PathOCL is based on the concept of chunking, which selectively augments the prompts with a subset of UML classes relevant to the English specification. Our findings demonstrate that PathOCL, compared to augmenting the complete UML class model (UML-Augmentation), generates a higher number of valid and correct OCL constraints using the GPT-4 model. Moreover, the average prompt size crafted using PathOCL significantly decreases when scaling the size of the UML class models.
format Preprint
id arxiv_https___arxiv_org_abs_2405_12450
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle PathOCL: Path-Based Prompt Augmentation for OCL Generation with GPT-4
Abukhalaf, Seif
Hamdaqa, Mohammad
Khomh, Foutse
Software Engineering
Artificial Intelligence
The rapid progress of AI-powered programming assistants, such as GitHub Copilot, has facilitated the development of software applications. These assistants rely on large language models (LLMs), which are foundation models (FMs) that support a wide range of tasks related to understanding and generating language. LLMs have demonstrated their ability to express UML model specifications using formal languages like the Object Constraint Language (OCL). However, the context size of the prompt is limited by the number of tokens an LLM can process. This limitation becomes significant as the size of UML class models increases. In this study, we introduce PathOCL, a novel path-based prompt augmentation technique designed to facilitate OCL generation. PathOCL addresses the limitations of LLMs, specifically their token processing limit and the challenges posed by large UML class models. PathOCL is based on the concept of chunking, which selectively augments the prompts with a subset of UML classes relevant to the English specification. Our findings demonstrate that PathOCL, compared to augmenting the complete UML class model (UML-Augmentation), generates a higher number of valid and correct OCL constraints using the GPT-4 model. Moreover, the average prompt size crafted using PathOCL significantly decreases when scaling the size of the UML class models.
title PathOCL: Path-Based Prompt Augmentation for OCL Generation with GPT-4
topic Software Engineering
Artificial Intelligence
url https://arxiv.org/abs/2405.12450