Workflow applications streamline complex tasks by breaking the tasks down into a series of steps. You can create a workflow application in the Model Studio console to integrate large laguage models (LLMs), APIs, and other nodes to effectively reduce coding efforts. This topic describes how to create a workflow application and use the nodes.
Overview
Scenarios
Why use workflow applications?
Workflow is essential in modern software development and business management for simplifying complex tasks into steps, thereby enhancing efficiency. In Model Studio, workflow applications enable clear definition of task execution order, responsibility allocation, and step dependencies, facilitating automation and optimization.
You can use workflow applications in the following scenarios:
Travel planning: Specify parameters such as destination to automatically generate travel plans, including flights, accommodations, and attractions.
Report analysis: Use data processing, analysis, and visualization plug-ins to produce structured and formatted analysis reports for complex datasets.
Customer service: Automatically classify and deal with customer inquiries to enhance the speed and precision of customer service responses.
Content creation: Produce content such as articles and marketing materials based on themes and requirements.
Education and training: Design personalized learning plans that include progress tracking and assessments, facilitating student self-learning.
Medical consultation: Use various analysis tools to generate preliminary diagnoses or examination recommendations based on patient symptoms and help doctors make further decisions.
Supported models
Type | Text generation | Image understanding |
Models |
|
|
For more information about the models, see List of models.
Use case: Telecom fraud detection
This example shows how to create a workflow application to identify whether a text message is related to telecom fraud.
Log on to the Model Studio console. In the left-side navigation pane, choose My Applications.
Click Create Application, choose Workflow Application, and click Create Task-based Workflow.
On the Canvas Configuration page, you can see that the Start node already has two preset parameters. You can modify or delete them based on your requirements.
Drag an LLM node from the left-side pane into the canvas. Connect it to the Start node and configure the parameters.
Configure the Start node: Delete the city and date parameters. The Start node has another built-in default parameter, query.
Configure the LLM node:
Parameter
Example
Mode
Single Mode
Model Configuration
Qwen-Max
Temperature
Use the default value
Maximum Response Length
1024
Prompt
System Prompt: Analyze and determine whether the given information is suspected of fraud. Provide a definite answer on whether there is a suspicion of fraud. Processing requirements: Carefully review the content of the information, focusing on keywords and typical fraud patterns, such as requests for urgent transfers, provision of personal information, and promises of unrealistic benefits. Procedure: 1. Identify key elements in the information, including but not limited to the sender's identity, requests made, promised returns, and any urgency expressions. 2. Compare with known fraud case characteristics to check if there are similar tactics or language patterns in the information. 3. Evaluate the overall reasonableness of the information, considering whether the requests made are in line with conventional logic and processes. 4. If the information contains links or attachments, do not click or download them directly to avoid potential security risks, and remind users of the dangers of such content. Output format: Clearly indicate whether the information exhibits characteristics of fraud and briefly explain the basis for judgment. If there is a suspicion of fraud, provide some suggestions or preventive measures to protect user safety.
User Prompt: Determine whether “${sys.query}” is suspected of fraud.
NoteYou can enter
/
to insert variables. Select query from System Variables.Output
Use the default value
Drag an Intent Classification node from the left-side pane into the canvas. Connect the LLM node to the Intent Classification node and configure the following parameters.
Parameter
Example
Input
Select System Variable query
Model Configuration
Qwen-Plus
Intent Configuration
Add the following categories. The model will match subsequent links based on different intent descriptions.
The information involves fraud
The information does not involve fraud
Other Intents
Use the default value
If no intent is matched, this link is matched.
Intent Mode
Select Single Selection.
Single Selection: The model will select and output the most appropriate intent from the configured intents.
Multiple Selection: The model will select and output all appropriate intents from the configured intents.
Thinking Mode
Select Speed Mode
Speed Mode: The model will reduce the thinking process to improve response speed.
Effect Mode: The model will gradually think and output more accurate answers.
Advanced Configurations
Use the default value
You can provide additional prompts to the model as advanced configurations, where you can input more conditions or examples to make the model's classification more in line with your requirements.
Output
Use the default value
Drag a Text Conversion node from the left-side pane into the canvas. Connect all output ports of the Intent Classification node to the Text Conversion node and configure the following parameters.
Parameter
Example
Output Mode
Select Text Output.
Enter box
Enter
/
to insert the following variables:Connect the Text Conversion node to the End node and configure the following parameters.
Parameter
Example
Output Mode
Select Text Output.
Input
Enter
/
to insertResponse
Use the default value
Click Test in the upper right corner, enter
Your package has been stored at the pickup station for several days. Please come and collect it at your earliest convenience
. Click Execute.After the workflow is executed, the End node displays the Run Result.
Click Test again and enter
You've won $1 million in the lottery. Please check
. Click Execute.Upon completion of the workflow, the output node will produce the Execution Result.
Click Publish in the upper right corner.
Node description
Start/End node
Knowledge Base node
LLM node - Task-based Workflow
LLM node - Dialog Workflow
API node
Intent Classification node
Text Conversion node
Script Conversion node
Conditional Judgment node
Function Compute node
Plug-in node
Publish application
Click Publish in the upper right corner of the canvas application. After you publish the application, it can be accessed by using API or shared with RAM users under the same Alibaba Cloud account on a web page.
Use API
On the Publish Channel tab, click View API to learn how to use API to call the application.
Note: Replace YOUR_API_KEY with your actual API key to initiate the call.
For more information, see Application API reference.
Other calling method (Dialogue workflow application)
For more information, see Application sharing.
View application versions
To publish a new version, click Publish at the upper right corner of the page. Enter the version details (such as 1.0.0) and click OK.
Click the
icon at the top of the page. In the Historical Version panel, you can view or apply different versions of the application by clicking Use This Version or Return to Current Canvas.
Click Export This Version in DSL to export the DSL of a specific historical version.
(Optional) You can view or search for nodes on the current canvas in the toolbar.