Can anyone help with this? This is an eccommerce s...
# 🤝help
f
Can anyone help with this? This is an eccommerce store. People enquire about our products.My bot answers user first question however if the second question uses it instead of the product name, it doesn't remember what it was talked about. How can I make the bot remember what it was talking about without repeating the product name?
q
@future-airport-33386 I was facing the same problem, and find some work around. 1. If you are using the AI task for anwering the user's questions, you can enable the "summary agent" and pass this variable to AI input {{conversation.SummaryAgent.transcript}} this will serve as the history with user. 2. You can use Knowledge base and feed your site as a input and enable the Knowledge base on your node, I think that will also solve your issue.
f
@quaint-address-71690 thank You for your reply I am not using AI task at all. I am using raw input and my knowledge base only since I don't want the bottom answer questions from my products.The bot answers the first questions correctly but the second question about the same product does not remember unless you mention the name of the product again.Dont have a clue how to solve this. I tried {{event.preview}} but the result is the same
q
Oh what you can do is, just on that node, pass the knowledge base answer to AI task and also the history of the conversation using the method I mentioned before, that way it will remember the conversation. for passing the knowledge base answer to AI task use this code {{event.kb.results.map((a) => a.dsFriendlyName + "\n" + a.content).join("\n\n")}} There might be better method.
f
Thank you 🙏
r
Thanks for the guidance here🙂 - i am having similar issues with users who use the bot for info on products so will implement your solution. If I understood correctly, you are saying to add '{{conversation.SummaryAgent.transcript}}' to the AI task input and then '{{event.kb.results.map((a) => a.dsFriendlyName + "\n" + a.content).join("\n\n")}}' to an execute code node (I assume before the AI task?).
HI - am doing similar - we have a kb + webpages which contain product info and are trying to guide the conversation with intents. I would say it works fairly well except the issue that you raised still happens where if a user tries to continue the convesation - e..g they has 'how much is it' - it does not associate the Q with the last one.
f
@quaint-address-71690 thank you. I haven't been able to implemented this option successfully.Can you guide me through it Greatly appreciated 👍
q
Sorry for late reply okay here is the small guide I created, might help everyone. Step 1 (go to agents)

https://cdn.discordapp.com/attachments/1141071833379131482/1142141783782985778/image.png

Step 2 enable summary agent - that will store the whole conversation with user.

https://cdn.discordapp.com/attachments/1141071833379131482/1142142104370434118/image.png

Note - don't forget to click save button!
step 3 - send the whole conversation and KB response as a AI input

https://cdn.discordapp.com/attachments/1141071833379131482/1142143017323606076/image.png

In the "AI instruction" you can tell AI to response user according to the chat and summaries Knowledge base response. You can define it accordingly and try.
Step 4 - store the response in the variable

https://cdn.discordapp.com/attachments/1141071833379131482/1142143757781835908/image.png

Step 5 - print the variable (that will be the response from AI)

https://cdn.discordapp.com/attachments/1141071833379131482/1142144098107674707/image.png

@future-airport-33386 @red-photographer-71993 I hope this helps.
oh don't forget to enable the KB on that node.
f
@quaint-address-71690 thank You so much for taking the time to help me 🙏 I will try it and let you know☺️
r
thanks much for this🙂 . Would you know the reason i get this error when i add the code from step3? summary agent is on.

https://cdn.discordapp.com/attachments/1141071833379131482/1142484829129154650/image.png

q
hmm @red-photographer-71993 but does it works? when you tested it? Cause although I am not doing coding for a while, what I get is, it's not getting the data from KB in that variable (or that this variable doesn't hold any values) But if your testing works fine, there shouldn't be a problem. (you can ignore this error) Another thing might be that your KB is not enabled on that node. let me know. Sorry for late reply.
actually if you wanna test, before sending this response to AI input you can create a text field and put that "KB response" there and see what you get and if it's working or not.
r
ok thanks for this suggestions. Well, it does appear to be working somewhat better now- the strange thing is that if the question is about products specifically, it answers twice now: once from 'answer found in kb' and another from 'AI task completed' (the answers are identical) This only happens for the product intent branch. But it does have issues continuing the conversation for ex if you after the product is displayed you ask 'how much are they?'. In any case, thanks for all the help🙂 greatly appreciated - I will have to work with it a bit to troubleshoot.

https://cdn.discordapp.com/attachments/1141071833379131482/1143039020503412736/image.png

q
that's strange it shouldn't be the case until you are displaying both the asnwer, also do check out the live bot, sometimes there are issues with the texting bot. If it's not remembering the previous conversation, you have to make sure you are using AI task in every response, and feeding the previous conversation. Anyway I hope you figure it out, glad to help 😁
r
thanks for all the help🙂 it did behave the same way published but I will work with it to root cause the issue - cheers
f
@quaint-address-71690 @red-photographer-71993 Hi guys I am also getting double answers.Also I placed a question completely out of my business and an answer was given .I wished it had gone to not found instead.Any suggestions ? thanks
r
I had to revert back to what I had to stop the double answers. So at this point it does not do a great job using past conversations to continue answering (which is why i was following this thread🙂 ) In terms of your second issue, I am using intents to separate out product requests specifically and that seems to work fairly well. I did include ' IMPORTANT: never make up an answer if you cannot find it in the knowledge base' in the AI task instruction. If it can't find the product in the KB it routes to a node where the user can leave their info for contact. Ideally, it would be able to route these requests to node that tells them we do not carry that item, but that has not worked for me so far. I hope that helps -
f
@red-photographer-71993 thank you for your reply I'm wondering if you created an intent for each item.I asked because I have over 60 products and some of them are used together. So in that case each intent will transition to a separate node... In other words at least 60 nodes...Is there a way around it? For the first issue, about the continue conversation, I am using raw input and and {{conversation.SummaryAgent.summary}}. Not ready to claim success just yet, but tested few products and the results were the best I got so far

https://cdn.discordapp.com/attachments/1141071833379131482/1143526270974570517/Screenshot_2023-08-22-13-39-16-795.jpg

r
wow I don't think that 60 nodes for intent is very practical (or scalable especially if you increase your products🙃) . We have over 100 products and exported them as a coma delimited file into the KB so for the most part, users can find individual products. I have one product specific node that handles queries about all products. I guess the trick is being as detailed as possible in your utterances. Thanks for sharing your capture - i need to try some variations and test the results.
f
@red-photographer-71993 I created a very detailed Q&A Kb for each product . for the most part. It is working but I have some products that are used together or are part of another. When I ask for instructions, the bot gets it from the wrong product... I will continue to try to find tune the answers. Let me know your progress 🙏
27 Views