I have been using Botpress for a few months and have discovered new ways of doing things.
Here, I simply share an idea to capture user intent and redirect them within the flows.
I see four ways to guide the user, each with its benefits:
1- Using cards, such as the Single Choice
2- Using Intents
3- Using AI Transition
(New One for me)
4- Collaboration between AI Tasks and Expressions
I've tried a new approach that I'm sharing here. By using an AI Task, you create a complete, detailed prompt that is more elaborate than in an AI Transition. The AI is then tasked with categorizing the inputs. For each category, a result variable is defined, etc. This becomes a clear task for the AI.
Example:
--------
Prompt: Analyze User Input for Information Needs
Objective: Your task is to analyze user input to determine the type of information the user is seeking. Categorize the inquiry based on outlined categories.
Categories and Inquiry Types:
Category 1: Information about a House Model
- Price Inquiry: User asks for the cost of a house model.
- Inclusions: User seeks information about what is included with a house model.
- Personalization Options: ...
Category 2: ...
Category 3: ...
Action Steps:
- Identify the Category: Determine the category based on the user's input.
- Save Data:
-- If it's about a House Model, save as ModelInfo.
-- If it's about Searching for a Model, save as ModelSearch.
...
--------
We use expressions to validate the variable and direct the user to a specific flow.
For example:
workflow.userInputCategorie === 'ModelInfo'
workflow.userInputCategorie === 'ModelSearch'
etc.
If no results, we default to redirecting to a card that handles the exception.
This method has allowed me to improve initial understanding to better guide the user to the correct flow, reducing errors in manual text entry.
Other methods, such as intents and AI Tasks, can work very well in different contexts; I am merely offering a new approach here.
https://cdn.discordapp.com/attachments/1255654182510395473/1255654182883557468/Screenshot_2024-06-26_at_6.41.10_PM.png?ex=667dea96&is=667c9916&hm=fb45463bde439dabdce3126414d88f50ce665f628a12bc40cf9b8f92ee66d834&