Generative AI as a Code Generator with User-Defined Templates

Hello Team,
I have a question regarding Java code generation using Generative AI.
We manage a Maven multi-module project with over 20 modules dedicated to integrating External Vendors. Each module handles specific, predefined use cases involving external API calls. All ISV modules share a similar coding pattern but differ in the APIs they interact with and the particular steps they execute. These modules are defined with Camunda BPMN files to manage workflows.

Objective: Develop a GenAI tool that automates the generation of these Maven modules based on customer requirements delivered via Excel or text files. This automation should eliminate repetitive manual coding and ensure consistency across modules.

Has anyone done this before in Java or any other language?
Using Generative AI as a Code Generator with User-Defined Templates in Software Development

Code generation using Generative Artificial Intelligence (GenAI) is a growing field, and there are examples of its use in various programming languages. However, the automatic generation of specific Maven modules based on customer requirements delivered through Excel or text files, as you describe, is a rather specific use case. In general terms, GenAI can be useful for automating repetitive coding tasks and ensuring consistency across modules. Large Language Models (LLMs), such as GPT-4, can generate code suggestions that are syntactically correct and contextually relevant based on developer input. This could be useful for generating parts of the code for your Maven modules. There are examples of the integration of GenAI into Camunda BPMN workflows. These examples show how GenAI can support human workflows, which could be relevant to your use case. That being said, while GenAI has the potential to assist in these types of tasks, the implementation of a complete and effective solution for your specific use case would be a significant project that would likely require considerable expertise in GenAI, Java, and Maven project management. Although I am not aware of a project exactly like the one you describe, the technology needed to build such a system is emerging and evolving rapidly.

1 Like

Some languages like C#/.NET have something called dynamic loading where you can load in dynamic applications. Think of it like a drill with the drill bits being the dynamic app modules. You could theoretically have a user ask for a specific functionality of the app, which the AI would then attempt to create given a list of predefined types and templates. That code could then be generated and dynamically loaded. meaning the AI could create features on the fly and dynamically load them without having to restart the application. As far as I know, this hasn’t been done yet, but it is not impossible by any means.