eventUpdated: 11/26/2024
How to use AI Agent?
In this article you will learn how to use the “AI Agent” block.
The AI Agent creates generative bots, using predefined templates and designing flows in a simple way. In this way, it facilitates the creation of more efficient experiences for users. With the AI Agent, it is not necessary to create a text block for each interaction, but the AI Agent will interact with the user through text until it meets its objective.
Within the AI Agent block is the space to write the instruction (prompt) for Generative Artificial Intelligence.
We share some tips to ensure that the prompt is appropriate to meet the objective.
- Explain to the bot its ultimate goal. For example: “Take the user’s order.”
- List the steps to achieve that goal.
- Provide plenty of detail when explaining.
- Avoid contradictions or ambiguities.
- Provide examples of correct or incorrect answers.
- Test your bot and make corrections to achieve the desired result.
How to add variables, actions, content bases and code actions?
To add these elements, you just need to insert the “$” symbol in the instruction block, as shown in the image below.
The AI agent can interact with the following elements:
- Variables: the agent can access user information stored in variables and use them to accomplish its objective. Also, the agent can capture data from user messages and save it in variables if requested in the instructions.
- Actions: the agent has a list of actions that it can use to accomplish its objective. In the future, more actions will be added to further enhance the agent.
- Content databases: the agent can consult content databases to accomplish its objective, searching for information or validating data in them. To learn more about content databases, you can read more in this article.
- Code actions: the agent can invoke code actions as part of its objectives. At the moment, it cannot recognize the parameters and returns of the same, but it will be able to do so in a future update.