https://discord.gg/botpress logo
ai task returns two keys instead of single string
# 🤝help
w
Hello! my ai task is returning two keys (valuetype and dynamicvalue) instead of a single string like other prompts. how can i solve it? https://cdn.discordapp.com/attachments/1379480768845316136/1379480769034195094/image.png?ex=68406514&is=683f1394&hm=e2900e7173642b86978a5e46b96801fca5416351085c560c19de2888f98cdad7&
Task Instructions:
Copy code
### Role and Objective ###
Your task is to analyze a user's message from a sales conversation and determine if it contains at least one "doubt."

### Definition of Doubt vs. Resistance ###
In the context of sales conversations, it is crucial to distinguish between doubts and resistances:

- Doubts: These arise from a lack of information, understanding, or clarity about the product, service, process, or offer. They are typically expressed as neutral inquiries or requests for specific details, facts, or clarification needed to gain a better understanding or move forward. Examples include questions about features, pricing details (what's included, payment methods, frequency), technical specifications, compatibility, steps in a process (setup, registration), support availability, or guarantees. A user expressing they are "not sure" due to insufficient information falls under doubt if they are seeking clarification.

- Resistances: These are objections, barriers, or hesitations that hinder the sales process. They often stem from negative emotions (fear, distrust, worry, anxiety, insecurity, disinterest) or stated limitations (lack of time, budget perceived as too high, lack of authority, skepticism about effectiveness *for them*, inertia, prejudice). Even if phrased as a question, if the underlying sentiment is a barrier, a negative feeling, or a reason *not* to proceed, it is a resistance. A user expressing they are "not sure" because they doubt their own ability, the product's ability to help *them*, or the likelihood of success falls under resistance.

Key Distinction Summary:
- Doubt: "I need more information to understand this better." (Seeking clarification/information)
- Resistance: "Something is preventing me from moving forward (a feeling, a belief, a situation)." (Stating a barrier/objection)

### Instructions ###
1.  Carefully read and analyze the user’s message, paying close attention to the language, tone, and underlying intent.
2.  Identify any parts of the message that express questioning, uncertainty, lack of clarity, or a need for more information.
3.  Determine if the nature of this expression is primarily a neutral request for understanding/information (Doubt) or a statement of a barrier, objection, negative feeling, or limitation (Resistance).
4.  If the message contains at least one element that fits the definition of a Doubt, classify it as `true`.
5.  If the message contains only elements that fit the definition of a Resistance, or is a simple statement of fact, intent, or disinterest without a request for clarification, classify it as 'false'.
 
### Output format ###
If you do not identify a doubt, output "false".
If you identify a doubt, output only a snippet of the message containing it.
AI Task Input
Copy code
### Subject Message ###
Here is the user’s message:

<last_utterance>
{{event.preview}}
</last_utterance>
SOLVED by recreating the ai task with the exact same fields - maybe a botpress problem? @prehistoric-airplane-85682
p
For the input, only {{event.preview}} is needed. Also what variable did you assign to the store result in variables field, a string variable should work.
w
"duvida", it's a string variable
3 Views