AI Personal Learning
and practical guidance

Wenxin Intelligent Body Tutorial: (II) Workflow to Create Intelligent Body

The workflow creation mode supports developers to quickly build intelligences by orchestrating workflows. You can drag and drop and combine models, cues, codes, and other modules to realize accurate and complex business processes.
Click here to watch the video courseWorkflow Development Intelligence in ActionThe

 

establish

After logging in to the platform, click on "Create Intelligence" from the left side and create it immediately with the workflow creation button in the upper right corner.


Wenxin Intelligent Body Tutorial: (II) Workflow to Create Intelligent Body

Fill in the name and profile in the panel and upload an avatar image to complete the creation.

Wenxin Intelligent Body Tutorial: (II) Workflow to Create Intelligent Body-1

 

 

Process Building

Creating an intelligent body workflow using visual orchestration is as simple as dragging sidebar kits onto the canvas and linking them together to create pathways. The Vince Intelligent Bodies platform offers a range of development kits to choose from, including chains, models, cue words, and more.

Wenxin Intelligent Body Tutorial: (II) Workflow to Create Intelligent Body-1

 

 

development kit

 

1. Kit Description

Kits are building blocks for visualizing orchestration processes. They consist of inputs, outputs, and parameters that define their functionality, providing a convenient and straightforward way to build intelligences.

Kit Type:

  • Chain:Used to orchestrate the main process, the intelligences will follow the order of the chain and then output the results after execution; The platform provides a variety of types such as large model chains and branch chains for expressing the business logic of intelligences.
  • Plain kits: All kits except chains are plain kits that can be connected to the corresponding chains.The connection will take effect as the base property of the chainThe

Kit Operation:

During process creation, you will notice connection points (blue circle ○ or purple diamond ◇) that connect to one or both sides of the kit. These connection points represent the availability of connections to other kits, and you can view connection details by hovering over them. The purple diamonds represent chain-to-chain connection points, with inputs on the left and outputs on the right; the blue circles represent chain-to-other-kit, or other-kit-to-other-kit connection points, with inputs on the left and outputs on the right.

Example Description:

If you select a large model chain kit, you will see blue ○ and purple ◇ connection points. They indicate that the chain suite accepts model and cue word suites as inputs, and the red asterisk * indicates that that type of input must be connected; it also accepts connections to other chains via the purple ◇ connection.

Wenxin Intelligent Body Tutorial: (II) Workflow to Create Intelligent Body-1

The kit status icon is in the upper right corner of the kit card. After the necessary connections have been established, tests initiated and validation passed, the status of each validated suite should be green; the status of a suite that has encountered an error when validation fails should be red, and hovering the mouse over the failed status will display the detected error.

 

2. Kit List

Before going through each kit in detail, let's clarify some concepts to facilitate a better understanding of the specific functions of the kits~

  • Passing in dialog history: common configuration item that controls whether or not historical dialog history should be passed into the model as a context;
  • Output keywords: common configuration items, the output of the current chain, you can pass the {variable_name} The format for expressing variables that you want to pass into the next chain;
  • Default variable:{_input_}Representing user input, this variable can be validated for all kits within the canvas.
Kit ClassificationKit NameKit IntroductionParameter description
ChainsLarge Model Chain (LLMChain)Large Model Chaining (LLMChain) can transform multiple inputs into model hints, supporting further formatting of outputs1) Input connection points: models, cue words
ChainsLarge Model Chain (LLMChain)2) Output connection point: none
ChainsLarge Model Chain (LLMChain)3) Configuration items.
ChainsLarge Model Chain (LLMChain)Pass in dialog history: switch that controls whether or not to pass in the history of the dialog into the model as a context
ChainsLarge Model Chain (LLMChain)Output keywords: non-required, set the output result description of the chain
ChainsLarge Model Chain (LLMChain)4) Chain connection points: there are chain input/output connection points that can be connected to any other chain.
ChainsRouterChainThe main function of the RouterChain is to dynamically select the next chain to be invoked, which can be routed to different subchains based on the input content1) Input connection points: models, cue words
ChainsRouterChain2) Output connection point: none
ChainsRouterChain3) Configuration items:
ChainsRouterChainPass in dialog history: switch that controls whether or not to pass in the history of the dialog into the model as a context
ChainsRouterChainOutput keywords: non-required, set the output result description of the chain
ChainsRouterChain4) Chain connection points:
ChainsRouterChainChain input connection point: can be connected to any other chain
ChainsRouterChainChain Output Connection Points: Intents need to be configured, each intent corresponds to a chain output connection point
ChainsRouterChain
ChainsRouterChainCommon Intent: required, support to add more than one. Used to express different intent correspondences and triage to other sub-chains based on the intent;
ChainsRouterChainDefault Intent: Required, when the common intent is not hit, it will be executed as default intent
ChainsRetrievalChainRetrievalChain calls on knowledge base documents and queries based on model capabilities1) Input connection points: model, cue word, knowledge base
ChainsRetrievalChain2) Output connection point: none
ChainsRetrievalChain3) Configuration items:
ChainsRetrievalChainPass in dialog history: switch that controls whether or not to pass in the history of the dialog into the model as a context
ChainsRetrievalChain4) Chain connection points: there are chain input/output connection points that can be connected to any other chain
ChainsToolChainToolChain to invoke tools for querying1) Input connection point: tool
ChainsToolChain2) Output connection point: none
ChainsToolChain3) Configuration items:
ChainsToolChainOutput keywords: non-required, set the output result description of the chain
ChainsToolChain4) Chain connection points: there are chain input/output connection points that can be connected to any other chain
ChainsAskChainAskChain is used to specify the intent and invoke the Ask component to guide the user to ask additional questions.1) Input connection points: question bubbles
ChainsAskChain2) Output connection point: none
ChainsAskChain3) Configuration items:
ChainsAskChainMandatory Intent: mandatory, sets the intent that the model should execute after the user completes the supplementary question following the guidance; mandatory intents must be within the list of branching chain intents they connect to ensure that the content of the user's reply can be returned to the main process;
ChainsAskChain4) Chain connection points:
ChainsAskChainThe input connection point must be a branching chain;
ChainsAskChainNo output connection point;
PromptsPromptTemplatePromptTemplate is used to create prompts and define the output format, which is provided to the model as a directive1) Input connection point: none
PromptsPromptTemplate2) Output connection points: chains (support for large model chains, branching chains, retrieval chains)
PromptsPromptTemplate3) Configuration items:
PromptsPromptTemplateTemplate: required, you can create prompt templates and define variables to control the instruction model. Variables can be used to define instructions, questions, contexts, inputs, or examples for the model, and can be created using any selected name in curly braces, such as `{variable_name}`. They act as placeholders for sections of text that can be easily modified. (In an interactive flow, the default variable `{_input_}` can be used to act as the user's chat input).
PromptsPromptTemplateOutput format: You can specify the output format of the answer by writing content using the json editor
ModelsLiterary Heart Model (ERNIE)Wenxin Yiyin (ERNIE) is a knowledge-enhanced large language model released by Baidu1) Input connection point: none
ModelsLiterary Heart Model (ERNIE)2) Output connection points: chains (support for large model chains, branching chains, retrieval chains)
ModelsLiterary Heart Model (ERNIE)3) Configuration items:
ModelsLiterary Heart Model (ERNIE)Model name: the model to be used for the current process, currently ERNIE-bot, ERNIE-bot-turbo, ERNIE-bot 4 are available:
ModelsLiterary Heart Model (ERNIE)Temperature: i.e. Temperature, the higher the value, the more random the output content is; conversely, the lower the value, the more focused and deterministic the output content is
ModelsLiterary Heart Model (ERNIE)Diversity: i.e., Top-P, the higher the value, the more specialized the output content; conversely, the lower the value, the more regular the output content
KnowledgeBaseData sets (VectorStore)VectorStore for calling data files that you have uploaded and finished processing as a source of model queries1) Input connection point: none
KnowledgeBaseData sets (VectorStore)2) Output connection point: search chain
KnowledgeBaseData sets (VectorStore)3) Configuration items:
KnowledgeBaseData sets (VectorStore)Dataset Selection: You can select the dataset that has been uploaded and processed successfully here, or click "New" to jump to the dataset management module to add new dataset. Note that only successfully processed datasets will be displayed in the list for selection.
ToolsHTTP request tool (RequestTool)HTTP RequestTool for initiating requests and returning results1) Input connection point: none
ToolsHTTP request tool (RequestTool)2) Output connection point: tool chain
ToolsHTTP request tool (RequestTool)3) Configuration items:
ToolsHTTP request tool (RequestTool)Request Link: Required, URL of the request
ToolsHTTP request tool (RequestTool)Request Methods: Currently the platform supports GET and POST methods, more to come!
ToolsHTTP request tool (RequestTool)Headers: can be entered as key-values
ToolsHTTP request tool (RequestTool)Query: can be entered as a key-value.
ToolsHTTP request tool (RequestTool)Body: can be entered via the json editor
ToolsBaidu Search Tool (BaiduSearchTool)Baidu SearchTool (BaiduSearchTool), used to query Baidu search results, return results title, link, summary and other content1) Input connection point: none
ToolsBaidu Search Tool (BaiduSearchTool)2) Output connection point: tool chain
ToolsBaidu Search Tool (BaiduSearchTool)3) Configuration items:
ToolsBaidu Search Tool (BaiduSearchTool)Search term: Required, enter the keywords you need to request a Baidu search
Bubble Interactive Component (MessageUI)Question Bubble (AskUI)AskUI provides a series of GUI components to guide users to ask questions in a more intuitive way1) Input connection point: none
Bubble Interactive Component (MessageUI)Question Bubble (AskUI)2) Output connection point: question chain
Bubble Interactive Component (MessageUI)Question Bubble (AskUI)3) Configuration items:
Bubble Interactive Component (MessageUI)Question Bubble (AskUI)Component Selection: Required, used to select the UI components to be used, currently only provides "Selector", more components are being improved, stay tuned!
Bubble Interactive Component (MessageUI)Question Bubble (AskUI)Component Configuration: Required, the configuration content is associated with the component type, now introduces the selector configuration as follows:
Bubble Interactive Component (MessageUI)Question Bubble (AskUI)
Bubble Interactive Component (MessageUI)Question Bubble (AskUI)Title: Issues requiring additional user input
Bubble Interactive Component (MessageUI)Question Bubble (AskUI)Options: add up to 6 options, currently only single selection is supported
Bubble Interactive Component (MessageUI)Question Bubble (AskUI)Output Variable: Required, sets the name of the variable for the output result of the Question Bubble component, which can be used to be referenced downstream or in the prompt template, default value is "value".
Bubble Interactive Component (MessageUI)Question Bubble (AskUI)Cue Templates: You can create cue templates and define variables to control the instruction model. Variables can be used to define instructions, questions, contexts, inputs or examples for the model and can be created using any selected name in curly braces. (For example, the `{variable_name}` format can be used as a variable, and the default variable `{_input_}` can be used to act as the user's chat input.)

 

3. Workflow example

The following workflow examples are provided for your reference to better understand how each suite connects and functions.

introductory scene

1) Use model chains to build joke generators from models and cue words

default variable{_input_}For getting user input, you can use the prompt word in the{_input_}to define how the model outputs specified content based on user input.

Wenxin Intelligent Body Tutorial: (II) Workflow to Create Intelligent Body-1

2) Build mysql knowledge query assistant using retrieval chains with outbound datasets and modeling capabilities

Wenxin Intelligent Body Tutorial: (II) Workflow to Create Intelligent Body-1

 

advanced scene

1) Building a weather query assistant using large model chains and tool chains

Data transfer between multiple chains is realized through output keywords: downstream chains can access the output of upstream chains through the output keywords of upstream chains;
Note: The output keyword can only be passed in two adjacent chains

Wenxin Intelligent Body Tutorial: (II) Workflow to Create Intelligent Body-1

2) Use multiple model chains to make a joke generator that can output a specified format

  • Specify the format in which the content of the joke will be output using the Output Format function in the prompt template;

Wenxin Intelligent Body Tutorial: (II) Workflow to Create Intelligent Body-1

  • A downstream chain referencing an upstream multivariable can be obtained using the outputKey combination. syntax to get the

Wenxin Intelligent Body Tutorial: (II) Workflow to Create Intelligent Body-1

3) Use branching chains and question chains to build comprehensive assistants that can output content based on different user intents

  • The branching chain can be configured with multiple intents, and when the user inputs a hit intent, the corresponding branch will be executed; a default intent will be executed when a non-existent intent is recognized;
  • Question chains can be connected to selector bubble styles, and when the user completes the interaction, the forced intent associated with the branch chain is executed directly.

Wenxin Intelligent Body Tutorial: (II) Workflow to Create Intelligent Body-1

 

 

Process Testing

The test flow is to verify that the kit is fully configured and the pathway is built correctly. After the test is successful, you can send a chat message in the preview screen and run the smartbody to verify the effect.

Wenxin Intelligent Body Tutorial: (II) Workflow to Create Intelligent Body-1

Adding or deleting components in the canvas, modifying the connection relationship of components, component parameters, you need to re-click the test, when the error message is displayed, it means that there is a build error in the current canvas, you can modify it according to the message and the "Development Kit" document, and you need to re-test to verify whether the error is repaired or not after modification.

Wenxin Intelligent Body Tutorial: (II) Workflow to Create Intelligent Body-1

Test problems in the canvas are all saved in the bug report, and fixed bugs are automatically deleted.

 

 

previews

The chat interface provides a friendly experience of interacting with intelligences, which can simulate the actual scenarios of users' conversations with intelligences and obtain real feedback.

Preview is not supported until the test is successful. If there is an error report for the current test, or if the test has not been validated, preview is not available.

Note: Each successful test can be previewed for 8 hours, after which you will need to re-click on the test to initiate the preview.

Wenxin Intelligent Body Tutorial: (II) Workflow to Create Intelligent Body-1

AI Easy Learning

The layman's guide to getting started with AI

Help you learn how to utilize AI tools at a low cost and from a zero base.AI, like office software, is an essential skill for everyone. Mastering AI will give you an edge in your job search and half the effort in your future work and studies.

View Details>
May not be reproduced without permission:Chief AI Sharing Circle " Wenxin Intelligent Body Tutorial: (II) Workflow to Create Intelligent Body

Chief AI Sharing Circle

Chief AI Sharing Circle specializes in AI learning, providing comprehensive AI learning content, AI tools and hands-on guidance. Our goal is to help users master AI technology and explore the unlimited potential of AI together through high-quality content and practical experience sharing. Whether you are an AI beginner or a senior expert, this is the ideal place for you to gain knowledge, improve your skills and realize innovation.

Contact Us
en_USEnglish