Introduction to Workflow
1. What is workflow?
Workflow consists of multiple nodes, nodes mainly contain a large language model LLM, code blocks, do judgment logic selector, plug-ins, etc., different nodes need different information in order to work, each node has two sources of information, one is the reference to the information given by the previous node, and the other is the developer's own information, so you need to be based on their own requirements in the canvas will be connected to different nodes (i.e., workflow construction), in order to make the workflow work, and ultimately output the results you want. Therefore, you need to connect different nodes in the canvas according to your own requirements (i.e., workflow construction), in order to let the workflow operate, and ultimately output the results you want.
Recommended reading.Wenxin Intelligent Body Tutorial: (II) Workflow to Create Intelligent BodyThe
2. What does it do?
Workflows allow users to finely control the logic and output of each step, a capability that improves the stability and reproducibility of AI applications. By building workflows, it allows intelligences to process complex tasks with higher quality
3. When do I need to use it?
If you are faced with a task that has many steps and you have strict requirements for the final result, such as requiring the result to be accurate and formatted correctly, it is appropriate to use a workflow to help achieve this.
4. Support typical intelligent body usage scenarios
take | shopping guide | English Speaking Tutor Specialist | graphic organizer |
workflows | User query to determine intent categorization (pre-decision, mid-decision, post-decision) - Different user intents to satisfy user needs using different plug-ins/HTTP tools/knowledge bases - Aggregated information returned | User input speech - Scene-by-scene judgment - English input calls HTTP tool for speech scoring/spoken error correction - TTS output synthesized after model embellishment | Confirm topic based on user input - Output content based on topic - Split verses to generate images using plugin - Define mixed-arrangement method for output --Summary results display |
involved nodes | Big models, selectors, HTTP tools, knowledge bases, etc. | Big models, plugins (search), selectors, HTTP tools | Large models, plug-ins (raw diagrams), knowledge base (optional) |
Operation Guide
1. Recognizing workflow
- Canvas: It is the operation panel of the workflow, and the user's orchestration behaviors are refined on the canvas;
- Node: is the basic unit of workflow, workflow is by a variety of nodes in accordance with the logic of connection and become;
- Wire: is the only tool to connect the nodes, through the combination of nodes and wires to realize the business logic and process design.
2. Operation entrance:
There are two operation entrances in this issue: you can add and edit workflows in My Workflows; you can also add workflow panels in Zero Code Creation Process for workflow operations.
3. Operational process:
[Create Workflow] - [Orchestrate Workflow] - [Test Workflow] - [Publish Workflow] - [Publish Workflow -[Add Workflow with Zero Code Creation Process] -[Add Workflow with Zero Code Creation Process]
1) [Create Workflow]
- A workflow needs its own name, avatar and description
- The workflow name needs to start with an English letter and supports English, underscores and numbers;
- The description of the workflow should be well written Oh, it is needed to be understood by the big model, so it should clearly describe the use of workflow scenarios and capability boundaries.
- After the creation of the page will automatically jump to the workflow editing page, the initial state of the workflow contains [Start Node] and [End Node].
2) [Organize workflow]
- In the canvas, you can drag and drop the nodes you need from the left panel of the canvas into the canvas;
- Connect these nodes with lines in the order of task execution;
- Configure the input or output parameters of each node to achieve a smooth data flow.
3) [Test Workflow]
- You can debug individual nodes or globally debug the choreographed workflow;
- The borders of nodes that run successfully will be green, and in the upper right corner of each node, click theExpand Run ResultsThe output of the node can be viewed
4) [Publish Workflow]
- Only workflows that have been successfully piloted can be published!
- Successfully published workflows can only be invoked!
5) [Add workflow for zero-code creation process]
- Adding a workflow panel to a zero-code creation process for workflow operations
- How can I get an intelligent body to invoke a workflow?
- You can describe in the [Thinking Paths] module of the smart body in what kind of scenarios the workflow is invoked, for example: when the user inputs that they wish to compose poetry, the workflow is invoked {multi_media_poems}
4. Introduction to node usage
1) Start
Starting node of the workflow
Node Style
Node Description
1. The start node is the starting point of the workflow
2. The start node supports configuration of the following data type parameters:
-
- text: identifies the type of text
- String: String type, used to represent text. Example: Name = "Zhang San"
- Number: numeric type, including integers and floating point numbers. Example: Number = 42.3
- Integer: numeric type, represents an integer. Example: Interger = 42
- Boolean: Boolean type, contains true and false values. For example: isAdult = true
- Array: an array of integers, e.g. numbers = [1, 2, 3, 4, 5].
3. agent_user_input is a parameter that is brought into the workflow by default, and is the content that the user inputs into the dialog in this round.
4, a workflow only a start node, so the node does not support copying, deletion and other operations, and does not support single-point debugging
2) Large models
Calling the big model generates responses based on incoming parameters and cue words
Node Style
Node Description
The Big Model node can process text generation tasks using the Big Language Model. Node configuration description:
-
- Model: Select the large model to be used, currently supported models are EB-4.0-8k, EB-3.5-8k, EB-Speed-128k
- Inputs: Configure what to input to the big model
- Hint word: Hint word for large models. Support for referencing parameters in hint words using {{variable name}}
- Output: support for specifying the output format, including JSON, text, Markdown
3) Knowledge base
Based on the input parameter variables, recall the best match in the knowledge base and start learning theWenxin Intelligent Body Tutorial: (4) Processing Documents and Synchronizing to the Knowledge Base".
Node Style
Node Description
Knowledge base nodes can query query query parameters and recall relevant content in the enacted knowledge base.
-
- Input: the node will recall key content based on parameter values;
- Knowledge Base Settings: After selecting a knowledge base, you can perform "Recall Configuration" for the selected knowledge base.
- Output: The output is the content recalled from the knowledge base;
4) Plug-in
Call the plugin based on the input parameters and return the plugin results, if the plugin is streaming output results are not supported in the workflow
Node Style
Node Description
Plugin nodes can select a plugin and then call the capabilities (APIs) under that plugin in the workflow
1, the first step to select the plug-in you want to use, Wenxin Intelligent Body platform provides a rich selection of plug-ins for developers to use, you can also call the plug-ins created by individuals;
2, input: according to your choice of plug-in requirements of the input parameters, configure the appropriate content;
3、Output: the return result of the plug-in
4. Currently does not support plug-ins that call streaming output results;
5) HTTP request
The HTTP module sends an http request to an external service.
Node Style
Node Description
The HTTP module sends an http request to an external service to get a response.
-
- Link:
GET/POST requests are supported and require an API address; - Configuration:
Params are path request parameters, mostly used in GET requests; Body is the request body, used only in POST requests, you can write a custom Json and pass it through the{{}}
to introduce variables;
Headers are request headers used to pass some special information;
Authentication: No authentication required - Configuration:
Support for defining the structure, content of the output
Json import support
- Link:
6) Selector
Determine whether the node entry parameter satisfies the different conditions set, and run the corresponding branch independently
Node Style
Node Description
1. This node is used to design the conditional branching process.
2. When inputting parameters to the node, the node will determine whether it conforms to thein the event thatregion is met, then it is implementedin the event thatcorresponding workflow branch.if notExecute the otherwise corresponding workflow branch.
3, each branch condition supports adding multiple judgment conditions (and / or), while supporting the addition of multiple conditional branches
4, the selector node does not support single-point debugging
7) End
The end node of the workflow, where the results of the workflow run are returned to the intelligence
Node Style
Node Description
1, the end node for the last node of the workflow, used to output the results of the workflow
2, each workflow has only one end node, so the node does not support copying, deletion and other operations, and does not support single-point debugging
3, you can configure the switch to choose whether to specify the output content of the workflow, after the switch is turned on, you can directly reply to the user after the input text content is touched up by the model.
Case Illustration
1. Introductory case: textConclusion
- Workflow capability description: support for refining and summarizing the content of input articles
2、Official workflow case one: urlConclusion
- You can extract the content in the url to summarize it and translate the summary into English.
3、Official workflow case two: get3image
- According to the user query to extract the picture theme and the required style, respectively generate different styles of pictures, support the generation of three styles of pictures
Note: Some intelligences have the concept of "group" and can process group data without branching into a three-branch process, but rather input data groups and output data groups. The processing method of Wenshin Intelligent Body is cumbersome, but it is easier for newcomers to understand.
4. Official workflow case III: weather_city_print
- Draw a picture of the current weather based on the name of the city