aws-solutions / qnabot-on-aws

AWS QnABot is a multi-channel, multi-language conversational interface (chatbot) that responds to your customer's questions, answers, and feedback. The solution allows you to deploy a fully functional chatbot across multiple channels including chat, voice, SMS and Amazon Alexa.
https://aws.amazon.com/solutions/implementations/aws-qnabot
Apache License 2.0
394 stars 252 forks source link

QnA Bot not logging every interaction in Kibana #754

Closed seano10 closed 1 month ago

seano10 commented 2 months ago

Describe the bug If I try to look at activity through my Connect instance and my QnA bot I find that not all conversations that hit Connect get recorded in the QnA bot stats in Kibana. I may be doing something wrong, but there seems to be no correlation as to which conversations appear in the Kibana log and which do not

To Reproduce Latent behaviour - happens all the time

Expected behavior I would expect to be able to report on the number and nature of conversations in KIbana for QnA Bot and it correspond with the native Connect reporting/loggin

Please complete the following information about the solution:

To get the version of the solution, you can look at the description of the created CloudFormation stack. For example, "(SO0189) QnABot [...] v0.0.1".

Screenshots If applicable, add screenshots to help explain your problem (please DO NOT include sensitive information).

Additional context Add any other context about the problem here.

seano10 commented 2 months ago

For added context, between 11am & 12pm today connect shows 64 contacts, QnA bot in Kibana shows 3. Now admittedly 37 of the contacts resulted in the customer clicking on the chat widget but never asking anything, so I wouldn't expect those to be logged, but what about the other 24??

fhoueto-amz commented 2 months ago

Thanks for reporting this, we will review and revert.

seano10 commented 2 months ago

Just adding some more findings for context. I have figured out (I think) that the only contacts that get logged through to kibana are those where the customer has to answer a follow on question, so:

Customer: Can I bring my dog Bot: Sorry no dogs are allowed on site ---- doesn't appear in kibana

Customer: How much is early check-in Bot: Early check in is £20, would you like to add this to your booking? Customer: No ----DOES appear in kibana

Customer: What is the VIP experience Bot: Our VIP experience offers you the best seats in the house..... Would you like to add it to a booking? Customer: Yes Bot: Ok please hold on while I connect you to an agent ----DOES appear in kibana

seano10 commented 2 months ago

Hi, just wondering if anyone had a chance to look at this yet?

abhirpat commented 2 months ago

@seano10 could you detail how you are setting up questions? If you could please provide sample questions with non-sensitive information you're using so we can try reproducing it on our end? To do this, you could create few sample questions and export them from from Tools menu in the designer > Export.

seano10 commented 2 months ago

@abhirpat give this sample a go. If it works the same for you then if you ask it "are there towels in the room" it won't log in kibana, but if you ask "VIP package" and then reply "yes" when it asks if you want to add to a booking, it will appear in Kibana.

Any questions just shout qna_kibana_logging_issue_subset.json

seano10 commented 2 months ago

@abhirpat after asking the two questions above in the kibana dashboard it just shows the second one:

image

seano10 commented 1 month ago

Also - further information - I have just been doing some further testing and it would appear that all questions log correctly to kibana when I test using the QnA Bot Client:

image

So it appears I am only getting the problem when calling from Connect

michaelin-96 commented 1 month ago

Hey @seano10,

I was able to create a connect instance and test in the connect console on v6.1.0. I've provided some screenshots showing that OS Dashboards is logging the utterances, even without any followup questions.

Screenshot 2024-09-05 at 12 01 28 PM

Screenshot 2024-09-05 at 12 01 58 PM

Can you try to upgrade to a later version (v6.X.X) of QnABot?

seano10 commented 1 month ago

Hi @michaelin-96 thanks for this, I have upgraded my test environment to 6.1.0 but I still have the same problem. I can do some further digging but just wanted to report back that I don't think this has fixed it. Thanks Sean

seano10 commented 1 month ago

@michaelin-96 it is fixed. I decided to clear everything down and do a clean install rather than an update of 6.1.0 over the top, I am glad to say that this works.

Thank you for your help Sean

michaelin-96 commented 1 month ago

@seano10 Glad it worked and thanks for the updates. Closing.