Do Intents help with training the whole chat bot?
# 🤝help
s
I've got an issue where if there is a slight difference in how the question is asked, the chatbot doesn't answer the question successfully. For example, "Where is the gym?" provides the correct answer. However, "where is the gym?" with a lower case w on where does not answer the question. I've tried adding both of these questions in the KB but it still doesn't help. I'm sure that whether or not the input is case sensitive shouldn't really be a factor, right? Or is there something I'm doing wrong? On intents, I'm wondering if they still help to solve issues like the above, even if I don't add an intent card into the Node?
Here's an example of what I'm referring to in the picture above
g
Could you show your bot
The cards/nodes
s
Yep sure thing
Is that readable?
This might be easier to read
g
Yes it is
What does your Knowledge Base look like (if it is not personal)
s
Yep I can share it with you?
Dm?
g
You didn't name the field or let it blank, which shows me only the always name for the expression cards
So could you like empty the field like this :
it would allow me to read the code you've used in your always expression cards
s
Ah yep so with those 2 always expression cards I have only ever put in there "true" or "!turn.KnowledgeAgent?.answer?.length" if the query to the KB is unsuccessful
g
Also to make something clear, I do not think your knowledge base document is the problem here, I've tried asking it where is the gym and it answered me that the gym was located on Level 1 at Rydges South Bank
s
Yeah I agree, I'm thinking that it's not to do with the KB
g
What about the follow up questions node ?
I'd like to see each of your cards on that node except the intent
s
Yep follow up question node is the exact same
I'll send screenshot
g
I need the raw input too
s
Ah yes. Sending screenshot now
g
About your knowledge agent, first I hope it is activated lol and second I think if you have it answering manually, you won't get answers from the bot
s
Yep it's activated and manual answering is off
g
I'm gonna send you how I would build this kind of question and answer
s
Amazing, thank you so much!
Yeah I really can't figure out what I've done wrong
g
I found it a pain in the ass to play with the raw input's knowledge base, I prefer to use the query knowledge base card
Do not import this into your current bot, unless you want it to be replaced by my example :
I can't assure you the first set up works, but the node I named "My_Recommended_set_up" should work, even if your knowledge agent is off
But as of the node called Standard 3 you must have the Knowledge Agent : Answer Manually activated
Hope it helps :)
I've pretty much never had problems the way I've set up the "My_Recommended_set_up" node
s
This is awesome, thanks I'm going to test it now
And then I'm assuming I'd follow the same sort of set up for the follow up questions as well?
On initial testing, "My Recommended Set up" is working great!! "Standard 3" is creating the exact same issue I was having before. So to confirm, the difference here is in your recommended set up, you are doing the following: 1. Raw input to ask the question 2. User asks their question 3. Knowledge base is queried and answered is stored in a variable 4. Text message is sent to user containing the variable 5. If it could successfully retrieve the answer and send to user, it transitions to start of node again 6. If it could not successfully retrieve answer, it's an error and transitions to Standard 2 node "error" Is that correct?
g
Yes that is correct for the recommended set up
It's a bit longer but I've almost never gotten any problem with that, which is why I recommend you using that method. You can even modify the answer given using an AI task unlike on the Standard 3 node
I'm still using the knowledge base query the same way I recommended you
s
I just noticed this error. WHen I ask a question that it cannot retrieve from the KB (error), it just provides the previous answer Eg: who is lebron James? Answer: For a list of nearby medical practitioners, pharmacists, hospitals or to arrange a medical professional for an in-hotel visit (charges apply) please connect with the Manager or Duty via the app or dial extension 9.
Is that because there was no @ in the !@workflow.query??
g
AH YEs
You need to make an execute code card with code : workflow.query = undefined (in the same error node, just put it before the text card)
or after
s
Does this look right?
g
no
I'm not sure what's in your raw input, but you should probably put the execute code card after the raw input in the standard 2
s
If I put it in "Standard 2", it looks like it's still not getting there?
g
Your code should only be workflow.query = undefined
yes
Btw what's in your raw input ?
s
Ah it just says - Sorry can't answer. ask something else
I can remove it
g
AH!
My bad
Okay so after the Query knowledge base card, you have the text card with @workflow.query
remove it
s
Okay I've done that
g
Then create a new node with the text card @workflow.query
When done, link the always transition to that card
s
Doing this now 🙂
Thank you so much for your help, I appreciate this so much
Ah it didn't work
g
s
Seems to be an issue where if it doesn't find the answer in the KB, it isn't successfully going to the standard 2 (error node)
g
Works for me
I'm gonna send you the bot
s
How's this look?
Looks like it's working?
g
Yes it is
A little tip I'm gonna give you before going to bed
Since it might be hard seeing what is the source of the error sometimes (knowledge base bugging, bot bugging, bad set up) You should know that you can directly ask question for your knowledge base
Go in the ask a question section
and ask your question
s
Thank you!
g
Now if you can't get an answer, it is probably because there isn't any information concerning this in the document
s
Yep I was doing that before and it was giving me the answer but then it wouldn't work in the emulator haha
g
Also I think you sent me 2 documents earlier, I only used one of the KB
s
Sorry, just one final question! This is honestly so helpful, thank you again
What's the purpose of the execute code card?
g
Yes, you're welcome
s
Tried this flow here and it still seemed to work??
g
To avoid this from happening :
Basically, I just reset the answer from the knowledge base to make sure it doesn't mislead the bot on the first node (recommended set up) to think that workflow.query is set (if there are no answers from the KB)
Because if you get an answer from the KB, then @workflow.query will change, but if you have no answer like Who is Lebron James, I think it just leaves the variable like it is
Which in this case was "Yes, there is a pool ..." And since the variable has an answer, it would have gotten to the Standard 4 node, mentionning this message a second time
If I can make it clear : You clear the result in variable because if there is no answer from the Query Knowledge Base card, it will keep the same answer you previously had. Hence, getting through the same path and ending up with the same message.
I have some difficulties explaining things lol
s
Got it, yep that makes sense
Amazing, thanks again so much. I'm going to work on integrating this into the real chatbot and see how it goes!
f
Amazing work again @glamorous-guitar-39983 !
Just to clarify @salmon-chef-40227 You can't improve the responses from the KB with intents. They are made for transitioning.
s
Yep thanks @fresh-fireman-491 that’s good to know too 🙂 I was thinking they might help with training the overall NLU but looks like that’s not the case. Just for transitions
2 Views