Out of the box, AI tools can generate many common business analysis diagrams based on a business scenario provided to the AI tool. However, these are typically static images, and you may need long exchanges with an AI tool to produce the result you desire. A better approach is to have the tool generate diagram code, which can then be imported into a tool and manipulated. Mermaid is a free and powerful graphical tool suitable for this use, and ChatGPT’s custom GPT capacities provide a means of storing instructions on how to create diagrams within a reusable framework. (Please note, the creation of custom GPTs requires a ChatGPT Plus license.) Once created, you can provide different business scenarios to the custom GPT to have it generate diagrams. The diagrams may not be perfect, but since they can be imported into the Mermaid interface, they can be easily edited visually.
The steps to follow to create a custom GPT are:
“This GPT acts as a business analyst skilled in transforming verbal descriptions of business processes into clear, structured business diagrams. It listens attentively to user input, extracts relevant details about entities, workflows, data flows, and decision points, and uses that information to create diagrams such as process flowcharts, swimlane diagrams, and high level data flow diagrams. It explains its logic when needed, asks clarifying questions if details are missing or ambiguous, and aims for clarity and professionalism in all outputs. This GPT may use visual tools, where appropriate to aid communication and provide draft visuals for refinement. The default format for diagrammatic output is Mermaid code.
It takes a professional tone, with concise, clear language and diagrams suited for business use cases like stakeholder meetings, planning sessions, and documentation. If the user is vague, the GPT politely asks for details to ensure accuracy.
Before generating a diagram, the GPT must first read and internalize the sample business-process document "Life Claim Process – AI Generated.docx and then read and internalize the example “Intermediate Format” file. These demonstrate how the initial file, describing a business process, can be restructured into a different form, the "Intermediate Format" file, which serves as a better basis for generating a diagram. When presented with a new business scenario, the GPT must first create an intermediate file for the new process, and must then base creation of any diagrams or use cases on the intermediate file.”
Any lanes generated in Draw.io code will have a height of 140, and all the nodes of the process will fit within their respective lanes.
Any bodies of code generated must come with a "Copy" link.”
You might notice that I reference an intermediate format in the instructions. I found I got better results by having ChatGPT first render the process into tasks, events, and gateways, and then premising the diagrams on this representation of the process. To do this, I provided the custom GPT with two documents in the Knowledge section of the Configuration tab:
To create these example documents for your ChatGPT, provide ChatGPT a business scenario relevant to your industry, and ask ChatGPT to render that scenario in BPMN tasks-events-gateway format, then drag and drop your scenario document and the tasks-events-gateways format document into the “Knowledge section of “Configuration”. (In my case I also had ChatGPT generate the example business process.)
When done, save your results with the “Update” button in the upper right-hand corner of the screen, and then try a different scenario. You might need to repeat the process a few times to get your desired results, in which case you might want to alter the “Instructions” to address those shortcomings.
The results you get are unlikely to be perfect, but the beauty of this approach is that after you’ve dropped the generated code into Mermaid the diagram usually can be easily corrected just by dragging and dropping the diagram elements. To view and edit your diagram in Mermaid:
You may need to converse repeatedly with your custom GPT to resolve any issues that arise, but once you’ve resolved those issues and have updated the instructions accordingly, your custom GPT will be a diagramming engine, and should save you considerable time in the future.
Example of Generated Mermaid Code:
%% Level 0 Data Flow Diagram - Life Insurance Claim Process
flowchart TD
%% External Entities
Beneficiary[/"Beneficiary/Policyholder"/]
Agent[/"Agent/Broker"/]
ThirdParty[/"Third Parties\n(Medical, Investigators)"/]
StateDept[/"State Insurance Dept"/]
%% System
subgraph System["Life Insurance Claim System"]
Process[("Process Life Insurance Claim")]
end
%% Data Stores
D1[(Claim Management\nSystem)]
D2[(Document Repository)]
%% Flows from External Entities
Beneficiary -->|FNOL & Documents| Process
Agent -->|FNOL Submission| Process
ThirdParty -->|Medical Info / Investigation Data| Process
StateDept -->|Appeal or Complaint Info| Process
%% Flows to External Entities
Process -->|Acknowledgment / Requests / Decisions| Beneficiary
Process -->|Updates| Agent
Process -->|Inquiry Responses| StateDept
%% Internal Flows to Data Stores
Process --> D1
Process --> D2
D1 --> Process
D2 --> Process
Example Mermaid Diagram: