Bot asking same question multiple times.
# šŸ¤help
b
Hey guys I'm using botpress to create a bot. Sometimes I encounter a problem where the bot stalls and asks the same question twice or thrice. Any idea on where the problem might be??? It's strange because it works perfectly fine in botpress but when i create a link it acts up
d
i have the same problem, since saturday,
sometimes, when the user select an option, or type something, when it should go to another node, it return to the last node, and then repeat the message. @acceptable-gold-88171 can you help about it?
b
Yeah it keeps going back to previous prompt sometimes. And sometimes, it works perfectly fine. I dont think there is anything wrong with my workflow
d
i get this result on whatsapp only. on the webchat it works perfectly. on the emulator too. isn't it due to bad timing between whatsapp calling the webhook and the moment botpress receives the request to be processed? when analyzing that is what it appears to be. now can we fix it? @acceptable-kangaroo-64719 any insight about it please?
here is the error i can find in the log. it indicates that the option which i really selected was not recognized by botpress, and this is why it sent me a previous option. i cant understand why it randomly detects options and input and at some times it no longer detect it and then resend previous options, which is very annoying for the user. unfortunately i am seeing this problem in whatsapp for 3 days now, and now in webchat as well. please help us solve it, please
a
Are you clicking "Publish" from the studio before you test? You can also try resetting your WhatsApp access token.
d
Hi Gordy. I test in the emulator before i click Publish. then when published i test on the web and then on whatsapp
These are two screen capture showing what i am talking about. you can see i restart a conversation whick was bloqued when i chose the option code. and then the second time when i cliqued code, the bot was stuck on it , no reaction
c
Same is happening to me. I think the AI connection might be down. In my case the workflow is bugged when it has to run an AI task
d
it is weird. please can you help about that @acceptable-kangaroo-64719 ? for the permanent token generated on facebook developer platform, i have already reset it last sunday (two days ago), thinking it would solve it, but nothing changed.
a
When the AI task fails, I think it leaves the output untouched, which causes the bot to answer twice. I logged an issue for the engineers, and they are looking into it
d
ok, thanks, i wiil be listening
as insight to help solve it easily. this are my logs from botpress: Dialog [9a23e41b-f41f-46c1-9101-042021f50acd] Waiting for user input DM Executing hook conversation_turn_ended of agent "SummaryAgent" Hooks Generating summary for conversation 3 new transcript lines... DM Executing hook conversation_turn_started of agent "SummaryAgent" Hooks user has typed this DM [Capture] Capture is a raw listen, so we are skipping the cognitive extraction DM [Capture] Field validation successful! Extracted: "CODE". Input: CODE DM [Capture] Prompt success Dialog [9a23e41b-f41f-46c1-9101-042021f50acd] End of workflow DM Executing hook conversation_turn_ended of agent "SummaryAgent" Hooks Generating summary for conversation 1 new transcript lines... Hooks Summary successfully generated.
At that step, when i click the option CODE, it no longer responds
The bot is stuck here, when i select CODE
a
@acceptable-gold-88171 do you think it has something to do with the fact that it's a message reply (includes the last message) and not a normal plain text reply when they hit the button?
d
here is the log indicating the extraction failed. i wish it can be helpfull. DM Executing hook conversation_turn_action of agent "SummaryAgent" Dialog [9a23e41b-f41f-46c1-9101-042021f50acd] Waiting for user input Hooks Summary successfully generated DM Executing hook conversation_turn_ended of agent "SummaryAgent" Hooks Generating summary for conversation 3 new transcript lines... DM Executing hook conversation_turn_started of agent "SummaryAgent" Hooks user has typed this DM [Capture] All properties of the extracted object are null, which means the user probably didn't answer the question. { choice: null } DM [Capture] Field extraction failed. Input: CODE DM [Capture] Extraction failed (2/2 attempts) DM [Capture] Prompt failed. Maximum number of retries reached. DM [Capture] Prompt failed Dialog [9a23e41b-f41f-46c1-9101-042021f50acd] End of workflow DM Executing hook conversation_turn_ended of agent "SummaryAgent" Hooks Generating summary for conversation 1 new transcript lines... Hooks Summary successfully generated Hooks Summary successfully generated
r
@damp-forest-63651 could you add the following hook to help us troubleshoot it, then copy/paste the logs again? Both on emulator & whatsapp so we can spot the difference between the two platforms in the logs:
w
I am facing the same issue . I am testing on the emulator , its working fine. When testing on a pre-configured link, it asks same questions muliple times . I raised an issue here : https://discord.com/channels/1108396290624213082/1130892909600841878/1130892909600841878
d
ok, sure
can i send it to you privately?
r
sure
d
log in emulator
logs sent
b
Hi, exactly the same thing is happening to me
Also I don't know why it repeats the thing that the user said
Have any of you encountered any solution?
I need to give the chatbot to a client but I'm scared to deploy it if that's happening regularly
r
@bland-eye-91538 can you share your AI Task and workflow here? (i'm assuming this message comes from an AI Task?)
I faced this issue too a few minutes ago and turns out it was my AI Task that was wrong
b
@rich-battery-69172 thanks for replying! Sure, here you can see what I have. Maybe it's my fault. https://www.loom.com/share/fbd53c2de2cf4714af6ede6665797d1a
s
He also started repeating to me what the user says and so far there has been no problem.
b
it seems like a problem a lot of us are experiencing, let's see if they can solve it, or if we are doing something wrong...
d
hi guys, does the repeat issue happens only on integration different from web chat? just to understand the issue and see if it is the same.
b
In my case it happens on both
s
I wrote this to him in AI Task Instructions and it's solved: Don't repeat after the user what he says, but find answers in the knowledge base and answer his question, which you save in @aiResponse
c
i have same problem now when it cant answer the question then it repeat it self
i tried your solution and it seems working ā¤ļø
b
Where exactly do you write this stuff? Would you be so kind as to send me a screenshot of that
I'm still having issues where even after publishing, the bot tends to askk the same question multiple times sometimes
b
I've been trying to solve it for the last 3 hours, and I found thatĀ if the prompt is more thanĀ 1276 characters it repeats the question the user sends, if it's fewer characters it doesn't. My prompt is 2786 characters, and it all the time repeats the question. I tested this "theory" like 20 times and it seems to be like this
c
Hmm question prompt or the answer ?
or the tempelete ?
Hmm i tried with different scenarios and it failedā€¦..
Whats the best AI instruction to avoid repeating
s
The problem was solved, but then it started to get angry again. I left it there and created a new variable with a different name and everything works fine for me so far.
b
Oh okay
I dont have an AI task in my bot at all and it still acts up
Asking questions multiple times
c
Have u find the solution? I tired to follow this instruction

https://youtu.be/wyHUrtiESVQā–¾

this would be nice if we could over win the problem with repeating
r
Hey all, sorry for the late reply. Many users get this problem and I found out (at least for the 2-3 scenarios) that it is in the way we the prompt to GPT is formulated. We should avoid phrasings like "reply with...", it struggles with it. Instead, it's better to say "Extract the ..." Also, the INPUT field should have a wrapper around it, like:
Copy code
The question is "@aiQuestion".
Extract the answer given the content provided above and nothing else.
It also helps to put a description to the variable, something like
"the best possible answer to the question based on the knowledge provided, in under 3 sentences"
we will bring a tentative fix tomorrow to try to address the systematic repeat
d
same for me, the flow in which the repeats, does not contains any ai task.
w
I also dont have any ai task. Its simple user info capture card
b
@rich-battery-69172 Okay, I think the problem in my prompt is in this part, but I have no idea how to formulate it in a different way so that the chatbot ONLY responds with information that can find inside the prompt. This is the part of the prompt:"Anything that client asks and the answer can't be extracted from this prompt you should always send them exactly this same message: "I just sent a request to a human and it will get back to you shortly. Do you have any other questions?"."
@rich-battery-69172 how would you formulate it? We are hoping that this gets fixed soon
r
@bland-eye-91538 would you mind sharing yoiur entire AI Task with me in DM? like a screenshot of the AI Task, the Debugger when it repeats and the Emulator
52 Views