Step 3: Set up and test an AI Workflow
Set up an AI Workflow
After you have chosen an Pre-set App Template, you will see a pre-set AI workflow on the canvas. You can add / delete the blocks, and change the prompts / inputs in each block based on your needs.


There are 7 types of Blocks right now:
Knowledge Base Block: Store and organize all the content and data used for building your AI app’s knowledge base. You can upload your own materials and create a knowledge base, and then link it to an AI app here.
Note: Knowledge Base Block is optional in an AI App, but if you want to add it, it must be linked with a RAG Block.
RAG Block: RAG (Retrieval Augmented Generation) handles the retrieval-augmented generation process, connecting your AI to the knowledge base for informed responses.
Note: RAG Block is optional in an AI App, but if you want to add it, it must be linked with a Knowledge Base Block and an App Prompt block.
Under RAG Block, there are several fields that you can configure:
Query Questions: This is the first response that the AI App will sent to the users at the start of every conversation;
Query Variable Name: serve as a input variable in App Prompt, to capture user's query;
RAG Output Name: serve as a output variable from capturing the context from knowledge base, and send to the App Prompt;
Number of Chunks: Number of chunks of most relevant context to be retrieved from the linked knowledge base. The retrieved context will be put under "RAG Output Name" and pass to App Prompts.
System Prompt Block: System prompt sets the AI’s overall behavior, tone, and guidelines to maintain a consistent response style. For example: "You are a helpful researcher with expertise in finance.".
Note: System Prompt is optional in an AI App, but if you want to add it, it must be linked with a Model Setting Block.
App Prompt Block: App prompt provides specific, contextual instructions for handling user queries within the app environment. For example: "Please analyse user's question and see if it is relevant to finance. If not, ask users to re-send his query politely; If yes, answer users in a concise way. User's question:{{input_variable}}"
Note: App Prompt is mandatory in an AI App, and it must be linked with a Model Setting Block. Please ensure that you include the {{input variables}} from APP Prompt of Input variable prompt.
Model Settings Block: Model Settings configures parameters and settings for the AI model to optimize performance according to your needs. You can choose from a large variety of LLMs, and adjust its parameters.
Note: Model Settings Block is mandatory in an AI App, and it must be linked with a App Prompts Block and Output Variable Block.
Under Model Settings Block, there are several fields that you can configure. Although we suggest that you could use the default setting, you can also modify the parameters. Please refer to Step 4: (Optional) Advanced Model Settingsfor more detailed explanation.
Input Variable Block: Input Variables block defines dynamic inputs that the AI will process, allowing for flexible interactions.
Note: Input Variables Block is optional in an AI App, but if you want to add it, it must be linked with the App Prompt Block.
Under Input Variable Block, there are several fields that you can configure:
Variable Name: serve as a input variable in App Prompt, to capture user's query;
Prompts to users: This is the first response that the AI App will sent to the users at the start of every conversation;
Output Variable Block: Output Variable captures and displays the AI’s responses, and can also be used as an input variable for subsequent steps in the AI app’s "chain-of-calls" process.
Note: Output variable block is mandatory in an AI App, and it must be linked with a Model Settings Block.
Test an AI Workflow
After you have setup the AI workflow, you can click "Test Flow" on the top right corner.

You can test the performance of your AI Apps and see the quality of the answers.
Please note that you need to pay for the model price for each query.
Last updated