Blockchain and Artificial Intelligence (AI) have revolutionized the technology landscape, evolving predominantly along parallel trajectories. This research investigates the feasibility of integrating these two domains, specifically examining the potential of the latest advancements in Large Language Models (LLMs) to assist non-experts in the development of production-ready Solidity smart contracts. Utilizing a lease agreement as a case study, we employ GPT-4 to translate the document into smart contract code. To ensure consistency, we design several distinct prompts with analogous objectives, each employed multiple times. Our evaluation methodology encompasses both automated analysis and expert manual review. The findings indicate a clear limitation: the current iteration of GPT-4 is incapable of generating production-ready smart contracts, primarily due to undetected coding flaws and discrepancies between the prompts and the generated code. This study underscores the challenges and limitations inherent in leveraging LLMs for the autonomous generation of complex, real-world applicable smart contracts.
Automatic Smart Contract Generation Through LLMs: When The Stochastic Parrot Fails / Fadi, Barbara; Napoli, Emanuele Antonio; Gatteschi, Valentina; Schifanella, Claudio. - ELETTRONICO. - 3791:(2024). (Intervento presentato al convegno DLT 2024: 6th Distributed Ledger Technologies Workshop tenutosi a Turin (ITA) nel May, 14-15 2024).
Automatic Smart Contract Generation Through LLMs: When The Stochastic Parrot Fails
Napoli, Emanuele Antonio;Gatteschi, Valentina;
2024
Abstract
Blockchain and Artificial Intelligence (AI) have revolutionized the technology landscape, evolving predominantly along parallel trajectories. This research investigates the feasibility of integrating these two domains, specifically examining the potential of the latest advancements in Large Language Models (LLMs) to assist non-experts in the development of production-ready Solidity smart contracts. Utilizing a lease agreement as a case study, we employ GPT-4 to translate the document into smart contract code. To ensure consistency, we design several distinct prompts with analogous objectives, each employed multiple times. Our evaluation methodology encompasses both automated analysis and expert manual review. The findings indicate a clear limitation: the current iteration of GPT-4 is incapable of generating production-ready smart contracts, primarily due to undetected coding flaws and discrepancies between the prompts and the generated code. This study underscores the challenges and limitations inherent in leveraging LLMs for the autonomous generation of complex, real-world applicable smart contracts.File | Dimensione | Formato | |
---|---|---|---|
paper5.pdf
accesso aperto
Tipologia:
2a Post-print versione editoriale / Version of Record
Licenza:
Creative commons
Dimensione
1.23 MB
Formato
Adobe PDF
|
1.23 MB | Adobe PDF | Visualizza/Apri |
Pubblicazioni consigliate
I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.
https://hdl.handle.net/11583/2990918