To achieve high-quality chart generation, it is recommended to optimize both input description and environment configuration dimensions:
Enter description tips:
- Adopt the clear sentence pattern of "subject-predicate-object", e.g. "The user clicks on the login button, the system verifies the account password, and then jumps to the homepage after the success".
- Add a clear status statement to key nodes, e.g. "If authentication fails (3 attempts), the system locks the account and sends an email notification".
- Complex processes are described in steps, with each line corresponding to a major action
- Avoid fuzzy pronouns and replace "it", etc., with the name of a specific object
System configuration optimization:
- Upgrade AI model: Replace default gpt-3.5-turbo with gpt-4-turbo for more accurate logic analysis
- Adding a customized prompt word: Setting AI_SYSTEM_PROMPT in the environment variable Supplemental Domain Knowledge
- Adjustment of temperature parameters: for technical charts it is recommended to set temperature=0.3 to reduce randomness.
Actual case comparison:
Basic input: "User login system"
Optimize input: "Visitor enters email and password on login page, front-end performs format validation and submits it to API gateway, authentication service passes validation and returns JWT token, front-end stores Token to LocalStorage and jumps to console page"
The timing diagram generated by the latter will contain complete details of the authentication process.
This answer comes from the articleSmart Mermaid: AI tool to quickly generate flowcharts and timing diagrams with textThe