Recent advancements in Natural Language Processing (NLP) have enabled Large Language Models (LLMs) to generate source code from textual problem descriptions. However, even state-of-the-art LLMs frequently produce syntactically correct which is, however, semantically incorrect. The LLM generated code might have a correct general structure, while treating incorrectly some corner cases. Furthermore, existing test cases might be difficult to use to help the LLM guide the construction of a semantically correct solution. To address this limitation, two recent studies propose the application of Genetic Improvement (GI) techniques, particularly Grammatical Evolution (GE), to automatically enhance the correctness of LLM-generated code. These approaches demonstrate that evolutionary computation can substantially improve the functional validity of code produced by both open-source and proprietary LLMs.

Improving LLM-Generated Code via Genetic Improvement: A Summary of Recent Advances / Pinna, G., Ravalico, D., Rovito, L., Manzoni, L., De Lorenzo, A.. - 4121:(2025), pp. ---. (Ital-IA-TW 2025 Thematic Workshops at Ital-IA 2025 Trieste 23-24 Giugno 2025).

Improving LLM-Generated Code via Genetic Improvement: A Summary of Recent Advances

Giovanni Pinna
Primo
;
Damiano Ravalico
Secondo
;
Luigi Rovito;Luca Manzoni
Penultimo
;
Andrea De Lorenzo
Ultimo
2025-01-01

Abstract

Recent advancements in Natural Language Processing (NLP) have enabled Large Language Models (LLMs) to generate source code from textual problem descriptions. However, even state-of-the-art LLMs frequently produce syntactically correct which is, however, semantically incorrect. The LLM generated code might have a correct general structure, while treating incorrectly some corner cases. Furthermore, existing test cases might be difficult to use to help the LLM guide the construction of a semantically correct solution. To address this limitation, two recent studies propose the application of Genetic Improvement (GI) techniques, particularly Grammatical Evolution (GE), to automatically enhance the correctness of LLM-generated code. These approaches demonstrate that evolutionary computation can substantially improve the functional validity of code produced by both open-source and proprietary LLMs.
File in questo prodotto:
File Dimensione Formato  
Ital-IA_2025_paper_111.pdf

accesso aperto

Tipologia: Documento in Versione Editoriale
Licenza: Creative commons
Dimensione 834.52 kB
Formato Adobe PDF
834.52 kB Adobe PDF Visualizza/Apri
Pubblicazioni consigliate

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11368/3122363
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 0
  • ???jsp.display-item.citation.isi??? ND
social impact