[QnA Maker] Storing all the possible answers of a bot in a database
I am thinking about making a bot to help people adopt a service/product, so basically its main objective would be to act as a customer service bot.
As the service/product is big and the re lots of different topics where users could ask about, it's not possible to hardcode all this behaviour. Each topic could contain smaller subtopics, and the same over and over for each subtopic. So, this data source (that could be thought as a hierarchical tree), needs to be stored somewhere. For example, the topics could be:
_Account ----> Register __________________----> Register multiple accounts ________________________ ----> Company ________________________----> Family or Friends __________________----> Subtopic 2 __________________----> Subtopic 3 ----> Change username, password, etc. __________________ ----> Subtopic 1 __________________----> Subtopic 2 __________________ ----> Subtopic 3 ----> Close account __________________----> Subtopic 1 _________________----> Subtopic 2 __________________ ----> Subtopic 3 Payment ---> Same here Services ---> Same here Contact Us ---> Same here
If the user asks "how do I register multiple accounts for my family?", a query should be executed in this this 'data source', and the path would have been:
Account ----> Register __________________----> Register multiple accounts ________________________ ----> Company ________________________----> Family or Friends __________________----> Subtopic 2 __________________----> Subtopic 3 ----> Change username, password, etc. __________________ ----> Subtopic 1 __________________----> Subtopic 2 __________________ ----> Subtopic 3 ----> Close account __________________----> Subtopic 1 _________________----> Subtopic 2 __________________ ----> Subtopic 3 Payment ---> Same here Services ---> Same here Contact Us ---> Same here
So, basically my question is:
How do I model the data source of a bot? (That data source can't be harcoded in the bot's logic).
The options I have been thinking about are:
- SQL Azure Database.
- DocumentDB Database
- Azure Search, which could be useful to model this and index information.
LUIS would be used to detect the intents and entities from the bot and then some query would be executed to any data source with any of those databases. But what are the pros/cons of each ones in terms of solving this issue?
Did any of you guys solved a problem like this with your bot?
Thanks in advance!
@piffarettig checkout qnamaker.ai
Yes, thanks, I was looking at that and I think it could be a good option to implement the knowledge base I want. I was thinking about detecting whenever a question was done (for instance with Regex), and then delegating the message to a QnAMakerDialog, that handles the question and gives the answer.
However, I was thinking in a case of making hierarchical questions, or questions that are more like a conversation, a flow, not just independent questions-answers. For instance:
- User: 'How do I create an an account?'
- Bot: 'You need to go to the create account section and then fill the form with your data. Follow this link http:'//somepage.com/createaccount'
- User: 'Ok thanks, and what does the id field mean?'
- Bot: 'Id field is your national id, passport or driver's license'
So as you see the second question is linked to the first one. What is the best way to model this?
I am considering using the bot state to store the previous question and then, SOMEHOW (I don't know exactly how yet), mix the first question with the second one and pass it to the QnADialog.
Thanks!
QnA Maker Service is currently on preview rate limiting the api calls to 10 calls/min. Is there any way reducing that limitation and using better tier? I am currently needing more calls per min.
And are the calls limited by IP or per QnA model?
Hi,
Right now we do not have a paid subscription model, however we have introduced a premium subscription tier with increased quotas, to encourage production deployments of the service.
The premium tier is invite only, if you are interested please fill this request form.
I ve already filled that form a couple of weeks ago, but I haven't received any response yet. How long does it take normally? We'll be needing to put this on production quite soon.
Thanks for your answer and concern!
@piffarettig I have forwarded your questions to the QnA Maker service team. They will contact you about QnA Maker plans and pricing.
Thanks!
@piffarettig, I could not find an entry in the form for your request. Can you fill the form again, and specifically mention the MSA you use to login to the portal.
Yes, the MSA is a required field in order to complete the form. I ve filled it again (for the third time), I hope it works now!

@pchoudhari Did you receive the request? Thanks
Got it. You will get a mail once added.
I am also looking for something similar like you mentioned above.
"I was thinking about detecting whenever a question was done (for instance with Regex), and then delegating the message to a QnAMakerDialog, that handles the question and gives the answer.
However, I was thinking in a case of making hierarchical questions, or questions that are more like a conversation, a flow, not just independent questions-answers. For instance:
User: 'How do I create an an account?' Bot: 'You need to go to the create account section and then fill the form with your data. Follow this link http:'//somepage.com/createaccount' User: 'Ok thanks, and what does the id field mean?' Bot: 'Id field is your national id, passport or driver's license'
Which approach is best for this?
@Shilpaar90 I would still recommend qnamaker for this.
Hi, @piffarettig @Shilpaar90 @JasonSowers , I am also looking for something similar to this. My toy bot answers queries about Capital/currency/language/prime minsters/ presidents etc for all countries. E.g. :- User:- What is capital of India? Bot:- Capital of India is New Delhi. User:- What's its currency? Bot:- Currency of India is INR User:- What's its population? Bot:- 1.25 Billion User:- What is currency of UK? Bot:- Currency of UK is GBP? User:- Who is its prime minister? Bot:- .... Now it would be easy for me to do this using LUIS + some code + DB storing all info in a table, but I wanted to use QnA maker to achieve this. How should this be modeled in QnA Maker? One though is to store the country name as part of Answer for e.g :- Q. What is Capital of India ---- Ans. "India: Capital of India is New Delhi." Cut the "India" part of the answer in my MS Bot framework , store it some context , show the remaining answer. Next when user asks "What's its currency" then some how fuse the value in the context "India" with incoming question and send modified question to QnAMaker which will then hopefully fetch the right answer from another pair in my KB :- Q What is currency of India ----- Ans:- Currency of India is INR.
The tough part is how to fuse the value in context to the incoming question in a manner that the resulting question hits the right QnA pair in my KB? Thoughts?
in your context object, you have 3 databags in which you can store context data ConversationData, PrivateConversation, and UserData. You can store the country there and append it to the query or something similar that works for you use case.
@pchoudhari Hello, we are a government agency (Pikes Peak Regional Building Department in Colorado Springs) that has recently implemented the QnAMaker FAQ bot. Our database is growing by the day and we are desperately in need of the ability for more calls and higher limits. I have filled out the form to request this twice, however, we have not yet received a response. I saw you helped another user with this- Can you please let me know the status of our application. We have heavily promoted the service and it is being used quite frequently and we are worried our users will not receive the proper support we set it up for without increased calls and increased overall usage allowance.
Thank You! [email protected] [email protected]