Exploring Midjourney AI for Generating Software Architecture Diagrams: A Journey of Discovery
Zaidul Alam
Enterprise Architect, CSIRO | Co-Founder , WISECAR PTY LTD | HEA Associate Fellow | MBA Candidate - UQ Business School | Alumni Carnegie Mellon University
Generative AI has been making waves across various domains, enhancing the creative process and increasing productivity for artists, designers, and idea makers. As an enthusiast in the software architecture space, I set out on a quest to find a generative AI tool capable of drawing architectural diagrams, specifically focusing on the popular Midjourney AI tool. This article presents three different attempts to generate a well-known software architecture consisting of front-end, microservices, and database components using Midjourney AI. While the results were not even close to what I expected, I discovered the limitations and potential of this exciting tool along the way.
Attempt 1: Text Input for Architecture Generation just mentioning the context:
My first approach was to provide a high-level text description of the desired software architecture, including front-end, microservices, and database components. Midjourney AI generated an architecture diagram that was intriguing, but the arrangement of components and connections did not accurately represent the desired architecture. The labels were meaningless, and I could not figure out why. This attempt highlighted the tool's limitations in translating textual descriptions into accurate visual representations.
Prompt: A software architecture, the front end has multiple widgets that surface some user information; each widget is connected with one or multiple backend Microservices using an API gateway. Each microservice is connected to a NoSQL database. Consider five widgets in total. 2d, drawing of software architecture.
Outcomes:
Attempt 2: Adding more context and trying to draw a Basic Architecture
In the second attempt, I provided Midjourney AI with some more context but keeping that same prompt structure and tried to dix the labeling of the software architecture, focusing on the main components. The generated diagram was closer to a software architecture than the first attempt but lacked the intricacies and the labeling again despite my attempt to specify them.
Prompt: A software architecture, front end has multiple widgets that surface some user information, each widget is connected with one or multiple backend Micro services using API gateway. Each micro service is connected with a NoSQL database. Consider 5 widgets total. All legends are marked in English. Name the widgets as 1, 2, 4 and 5. 2d drawing of software architecture.
Outcomes:
Attempt 3: Incorporating Real-world Examples
In my final attempt, I combined textual descriptions, and went back to the basic way to promt to give Midjourney AI the most comprehensive set of inputs possible. Describing each of the components what it is and how to connect them. The generated diagram was the closest to the target architecture, but still not perfect. Still missing the accurate labeling. Some components were misplaced, and certain connections were missing or incorrect. This attempt highlighted the current limitations of Midjourney AI in generating a complete and accurate software architecture diagram.
Prompt: Draws a webpage first, the web page has five widgets, label each of them as 1, 2, 3, 4 and 5. Connect each widget with another box each, label them as micro service, add one icon of API gateway on each of these micro service boxes. Connect each micro service with a NoSQL database icon and label them as database. Draw this as a software architecture diagram, 2d, consider all icons are AWS icons.
Outcomes:
While Midjourney AI did not generate a perfect software architecture diagram, the journey of discovery revealed valuable insights into the tool's capabilities and limitations. As generative AI technology continues to advance, it's essential to understand that AI tools can significantly augment human creativity and productivity, but they are not yet a complete substitute for human expertise.
As AI tools like Midjourney continue to evolve, there is great potential for their application in the software architecture domain. For now, combining AI-generated diagrams with human expertise is the best approach to create comprehensive and accurate software architecture diagrams. Embrace the power of AI while understanding its limitations, and let's continue exploring the exciting possibilities that generative AI tools can offer in the world of software architecture.
Global AI & Business Transformation Leader | Generative AI | 17+ Years in B2B Innovation & Commercial Optimization
9 个月Thank you for your help with this. I appreciate the information provided. I have this doubt: Am I correct in assuming that these outputs are in image format? Have you explored the possibility, or are you aware if it's feasible, for these outputs to be editable? In other words, can they function as templates for interaction and customization? I believe it would be an intriguing step to take before anticipating that the AI produces a flawless diagram that requires no further editing
B2B SaaS & Enterprise Software Engineering Leader
1 年I want to solve this same problem and experimented a bit with ChatGPT outputting mxGraph XML, which DrawIO / diagrams.net can import. I was able to get it to output some very basic diagrams but it seemed like for anything visually appealing I would need to add quite a bit of additional prompting, and I have come back to that yet. Keep us posted with any other solutions you find!
#business | #export | #import
1 年Probably you assumed that AI doesn't know about micro services and basic software components and architecture.. Try focus on the architecture like for e.g. I want to develop a three tier architecture having front end which takes user credential and validate it through serverless function mid tier(backend) for authentication and returning user details from the database as a response. I have been using ChatGPT for my many ideas design, approach, defining MVPs and it's perfectly returning details. It gives wrong details only when the functions constructs have changed since 2021 till when data is fed to Chat GPT free version.
Head of Software Engineering & Architecture | SAFe Certified Architect, AI, Cloud, Integration and Automation Strategist | Technology Evangelist
1 年You may have tried this already, you can ask chat gpt to spit out a mermaid diagram by explaining a solution ??