laitimes

AIGC empowers the development of UML diagrams for exploration

author:Flash Gene
"The development of AIGC is in full swing, and how to use large models for efficient production in development work is also one of the hot topics discussed. In this article, let's explore what kind of sparks will be generated by UML mapping for AIGC-enabled development."

Drawing is undoubtedly one of the necessary abilities of developers, and a good drawing can quickly show the design and business logic of the system and code with the business test, making the requirements review more efficient. In this article, we'll explore how to use a large model to do demand mapping.

01

Preparation

1. Examples of requirements

"In the chess and card hall management system, customers book seats through the Internet, and they need to check the seat information. If there are no seats available or satisfactory, choose to process the waiting queue. When the customer arrives at the chess and card hall, the front desk attendant arranges the seat, which needs to check the seat information. When the customer wants to leave the chess and card hall, the front desk attendant needs to handle the checkout, which supports two ways: cash checkout and bank card checkout through the UnionPay POS system. ”

2. Use tools

1. ChatGPT3.5: A generative pre-trained transformation model, which is used in this article to do text generation

2. PlantUML: A tool that can programmically draw UML model diagrams, because the use of models does not have the ability to graph, this paper will generate code conversion graphs through this tool

3. Achieve your goals

Translate the requirements content into a UML model diagram by talking to the big model

02

Feeding training

1. Text generation

Prompt: [Here is the content in the requirement example] To analyze the above requirements, please give a use case diagram and give it in UML form

  • Generate results
AIGC empowers the development of UML diagrams for exploration
  • PlantUML转化后视图
AIGC empowers the development of UML diagrams for exploration
  • The logical relationship is unreasonable, and it does not meet expectations, and continue to optimize the prompt words

Prompt: If you are a product manager, analyze the following requirement description: [Requirement Content] Give a UML use case diagram and return it as PlantUML code

Due to space limitations, the results of the large model generation are directly converted into graphical display

AIGC empowers the development of UML diagrams for exploration

3. Multiple trainings

Prompt 1: To reserve a seat, you need to check the seat information, and if there is no free or satisfactory seat, choose to process the waiting queue.

Prompt 2: Waiters also need to check seat information

Prompt 3: Reservation and seat checking are inclusions

....

03

As expected

1. Prompt words that meet expectations

[Appeal Requirements Description] Analyze the above requirements using UML

Second, the expected results are generated

  • Use case diagram
AIGC empowers the development of UML diagrams for exploration
  • Activity diagram
AIGC empowers the development of UML diagrams for exploration
  • Timing diagrams
AIGC empowers the development of UML diagrams for exploration

04

end

For this exploration, the following points are summarized:

  1. Lower threshold: Natural language can be converted into UML model language, which lowers the threshold for us to draw, and we can quickly draw without being familiar with PlantUML syntax and UML models.
  2. Efficiency improvement: This mapping takes a total of 3 minutes, and the more detailed the prompt words, the less human editing will be.
  3. Logical clarity: Natural language has the ability to express itself more accurately, while personal expression can be biased in relation to personal habits.
  4. Disadvantages: The prompt words need to be accurate and need to be fed repeatedly.

Author: Chen Chao

Source-WeChat public account: Yum technical team

Source: https://mp.weixin.qq.com/s/UYajh5AF3Hc_lDkl-C4NwA

Read on