“AI tools work very well with structural inputs & outputs”

Why? Link to heading

When working in the Software industry, you have to deal with the diagrams frequently (flow chart, sequence diagram, component diagram …). No matter how senior you are, maintaining the diagrams takes time. The traditional way is to use the tools like LucidChart to drag & drop the components in place, put the labels for them and link them together. It’s convenient and … takes time (the modern world is always in hurry :)) ).

The breakthroughs of AI in 2023-2024 provides us “unlimited” tools to do things faster in the digital world. And of course, generating the diagrams should be faster and easier. Let’s see how ChatGPT handles that task for us.

I send this request to ChatGPT: “Please generate a component diagram for an application containing a public UI, a backend and a database” . The text response looks very well, it also adds more details to the architecture and after 2-3 minutes, the diagram is generated:

It looks over complicated :D . And guess what, you cannot edit it and you have to ask ChatGPT to do it for you. Guess what, it will never be as you expected if the diagram is generated in this way

And of course, the solution comes Link to heading

At the time this article is written, the softwares like LucidChart already introduce AI into their app to support generating the diagrams easier. However, I don’t want to use different tools and want to utilize the most from existing tools first. That’s why I was looking for a way to get ChatGPT create the diagrams as well as edit them if needed for me. The answer is PlantUML (https://plantuml.com/)

Now, what does ChatGPT provides me now with the same instruction:

@startuml

skinparam component {
    BorderColor black
    BackgroundColor LightSkyBlue
}

package "Application" {
    [Public UI] as UI
    [Backend] as Backend
    [Database] as DB
}

UI -- Backend
Backend -- DB

@enduml

Cuz it’s just texts, the response is very fast (less than 1 second). We can paste the above content to a UML viewer tool like Pladitor (https://plantumleditor.com/webedit/) and it looks nice:

Because the definition of the diagram is just structured texts, we can easily instruct ChatGPT to modify it without breaking current design and we can even do it ourselves. Quite easy!

Remember that “AI tools work very well with structural inputs & outputs



Keep calm and good things will come!
Subscribe to our newsletter  •  About the author