Saved in:
Bibliographic Details
Main Authors: Zitouni, Mounira Nihad, Anda, Amal Ahmed, Rajpal, Sahil, Amyot, Daniel, Mylopoulos, John
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2411.15898
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913584816062464
author Zitouni, Mounira Nihad
Anda, Amal Ahmed
Rajpal, Sahil
Amyot, Daniel
Mylopoulos, John
author_facet Zitouni, Mounira Nihad
Anda, Amal Ahmed
Rajpal, Sahil
Amyot, Daniel
Mylopoulos, John
contents Over the past decade, different domain-specific languages (DSLs) were proposed to formally specify requirements stated in legal contracts, mainly for analysis but also for code generation. Symboleo is a promising language in that area. However, writing formal specifications from natural-language contracts is a complex task, especial for legal experts who do not have formal language expertise. This paper reports on an exploratory experiment targeting the automated generation of Symboleo specifications from business contracts in English using Large Language Models (LLMs). Combinations (38) of prompt components are investigated (with/without the grammar, semantics explanations, 0 to 3 examples, and emotional prompts), mainly on GPT-4o but also to a lesser extent on 4 other LLMs. The generated specifications are manually assessed against 16 error types grouped into 3 severity levels. Early results on all LLMs show promising outcomes (even for a little-known DSL) that will likely accelerate the specification of legal contracts. However, several observed issues, especially around grammar/syntax adherence and environment variable identification (49%), suggest many areas where potential improvements should be investigated.
format Preprint
id arxiv_https___arxiv_org_abs_2411_15898
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Towards the LLM-Based Generation of Formal Specifications from Natural-Language Contracts: Early Experiments with Symboleo
Zitouni, Mounira Nihad
Anda, Amal Ahmed
Rajpal, Sahil
Amyot, Daniel
Mylopoulos, John
Software Engineering
68T99
Over the past decade, different domain-specific languages (DSLs) were proposed to formally specify requirements stated in legal contracts, mainly for analysis but also for code generation. Symboleo is a promising language in that area. However, writing formal specifications from natural-language contracts is a complex task, especial for legal experts who do not have formal language expertise. This paper reports on an exploratory experiment targeting the automated generation of Symboleo specifications from business contracts in English using Large Language Models (LLMs). Combinations (38) of prompt components are investigated (with/without the grammar, semantics explanations, 0 to 3 examples, and emotional prompts), mainly on GPT-4o but also to a lesser extent on 4 other LLMs. The generated specifications are manually assessed against 16 error types grouped into 3 severity levels. Early results on all LLMs show promising outcomes (even for a little-known DSL) that will likely accelerate the specification of legal contracts. However, several observed issues, especially around grammar/syntax adherence and environment variable identification (49%), suggest many areas where potential improvements should be investigated.
title Towards the LLM-Based Generation of Formal Specifications from Natural-Language Contracts: Early Experiments with Symboleo
topic Software Engineering
68T99
url https://arxiv.org/abs/2411.15898