I created 10KB for my 10 different process. Lets say, each KB has QNA pertaining to each processes. Now i need to create a LUIS which would identify the right intent of user and fetch an answer from right KB. Can you please clarify how this works from an architecture perspective and please help me with the steps as well.
There is a guide and sample project available here.
Basically you create a LUIS app and then you use the Dispatch tool to create a local file which scans all of your knowledge bases and extracts your questions to use as something that LUIS calls utterances, these utterances are then used to determine the user's LUIS intent in your case which knowledge base to use. Basically the dispatch app in LUIS acts as a router. One you have created the dispatch file locally then you need to push it up to your LUIS app (dispatch create command).
I would recommend downloading the sample app and running through the whole process to get a basic understanding of how everything fits together. Once you have published your LUIS app you will be able to test it within the LUIS portal by inputting example utterances and inspecting the reply to see the intent that was selected. The documentation for the Dispatch tool is available here, please note that when you update your knowledge bases (by adding new entries or alternative phrasing) after publishing your dispatch app initially you will have to refresh your dispatch model for these new questions/alternative phrase to have an utterance added in LUIS to that map to the correct LUIS intent - otherwise they will return the None intent.
NB. you could hack around the need to update the dispatcher by handling the case when you get a the "None" intent back and iterating through all of your knowledge bases to request an answer for the user's query and just return the answer with the higher score (have a collection that keeps the answer from each knowledge base) but I wouldn't recommend it as you miss out on the benefits of Active learning for LUIS and QnA Maker.
Related
I’m new to Dialogflow CX and after reading its node.js documentation (I’m a jr Dev) I’m still struggling to get the problem below solved.
PROBLEM: I need my chatbot to receive the question “do you have Toyota Corollas (cars!) in black with less than 20,000 miles, 2017 or newer and cheaper than $15,000 for sale?”
CONTEXT: I have a database with all car makes, models, years, versions, mileage, colors and prices available. The problem is that I can’t (and sorry for how silly this looks) even initiate the bot and I know that after initiating it I would need to create a zillion entities through code (can’t do it manually) so the bot would be able to read all car parameters of the user’s question. Then after reading those parameters (entities) the bot should query my database to check availability of those particular Corollas and then give a proper answer.
ASK: I would be very grateful if you could please help me initiate the Dialogflow CX bot, load all car makes, models, years, versions, colors and prices into it AS ENTITIES and then give the answer that the user needs.
I’ve checked the GitHub quickstarts and read the documentation multiple times but am still very confused.
It looks like you have a few different issues with some of the Dialogflow CX basics. Let's try to clear them up.
How do I initiate the Dialogflow CX bot?
It isn't clear what you mean, exactly, from this.
Dialogflow CX, itself, isn't a bot client. Instead, it provides integrations with various ways to communicate with your agent. This may include telephone integrations, web-based chat systems, and an API so you can integrate with other clients such as Slack.
Your Dialogflow CX agent, itself, is setup using Google's Cloud services, and can support one or more of these integrations.
How do I create a zillion entities through code?
It isn't clear why you need to create a zillion of them, nevermind through code itself.
You likely will want to create a custom entity type for the make/model combination. And it should probably have aliases, so that people could say "Ford Explorer" or just "Explorer" and have it resolve to the same type.
If you really wanted to use an API to do this, you could use EntityType.create to do so. That points to the REST documentation, but based on the language you want to use, there may be a library able to handle it.
Some of the other types, however, can be handled with system entity types such as #sys.color or a numeric type. There's no reason for you to create those.
But what happens if someone asks for a combination that isn't valid?
Then you'll need to tell them it isn't valid. Just like if someone was talking to you in person and asked for something that didn't make sense.
How will it check the database for a good response?
You'll need to make this database call as part of a webhook that you create to implement the business logic.
I want to build one bot with two skills which can make appointment for me and make notification for me. It is similar with following two videos:
https://www.youtube.com/watch?v=oU88sHd6ilE&t=2s
https://www.youtube.com/watch?v=4_MvIf_ULgc
do I need two agents? Because I need two gcp projects for this agents (https://cloud.google.com/dialogflow/docs/multi-project) , how to manage them? I don't believe we need two project to finish one chatbot
Short Answer:
You don't need two agents in Dialogflow for the functionalities you require.
Detailed Answer:
The whole point of Dialogflow is to try to identify what is the user's intention and then act on it.
So if you create 1 agent and then create multiple Intents
First one for Making an Appointment
Second one for Making a notification
Then you train the agent with examples for each intents (Using entities etc.)
When the user says something to the bot, Dialogflow will understand what the user means (Detects the corresponding Intent) and then you can do the business logic for each intent
What's important is the way you train the bot, making sure your training phrases do not overlap from one intent to another
So I'm trying to create a chatbot in MS Teams with the Microsoft Bot Framework in order for a handful of end-users to be able to do basic troubleshooting. Does anyone know of a good way to be able for the Bot to be able forward certain questions that do not have responses within the knowledge base? Does anyone have any suggestions on what would be the best way of doing this? I've looked briefly into MS Flow. Thanks!!!
EDIT: So In order to further clarify what I am trying to do I'm adding some more. When someone asks a question to the Q&A Bot in Microsoft Teams. If the bot doesn't have an answer, the question will then be forwarded to a live agent that could answer the question asked in real-time. I'm looking for some type of software or API that could do the forwarding part
#G-Snider you're in danger of having your question shut down if you don't provide more detail--like some code that you've tried, for example.
And I'm afraid I don't very clearly understand your question...however I'll take a stab at helping.
You could always use Dispatch connected to a QnA Maker knowledge base to determine if a user hits an intent that would be answer able to your QnA KB or if it's "None" intent--or if you don't want the LUIS layer.
BF Dispatch Sample: C# / JS
Alternatively, you could forego the Dispatch layer and stick with only QnA and work with confidence scores and thresholds that get returned that's built into the QnA module itself.
QnA Maker Sample: C# / JS
Second step, if your bot determines that the user hit None intent or has no result from your QnA KB directly, then you could implement human hand-off.
Human Hand-Off Sample
I want to make Frequently asked questions and answers bot in dialogflow. I have Q&A files, so I am used knowledge base in dialogflow .i have the 6-7 file i make documents in the knowledge base. but when i ask question bot not sending any response.
Image of knowledge base console
Knowledge Base Document QNA
dialogflow text response screen
In the response section you need to give $Knowledge.Answer[1].
If you can't get answer in your App knowledge connectors won't work with the production SDK for now, you have to use the Beta SDK/API and pass QueryParameters object for the knowledge connector when you use detect_intent function.
check the documentation
If you can't get answer in the portal you need to adjust KNOWLEDGE RESULTS PREFERENCE to be stronger and lower ML CLASSIFICATION THRESHOLD otherwise the default fallback intent gonna always answer. check the pictures below to see how to:
The error might just be because you didn't enable the knowledge base
I am utilising the small talk options within the chatbot that I currently use, however, I have noticed a couple of common questions which seem to be asked which fit into small talk, such as "What is your name?" and "What does you name mean?".
Is there any way in which I can add to the list of small talk questions? If not, how can I add these questions in with their responses? My issue is that I believe that you shall need a new intent for every question that gets asked? Any help would be appreciated.
Using a new intent for every question asked (or at least different versions of the same question with one answer) is the standard Dialogflow design and isn't really a problem.
The small talk functionality is just a big list of questions and answers in separate intents - you can see by looking at the pre built small talk agent through Prebuilt Agents -> Small Talk -> Import.
Therefore I would suggest to simply do it this way.
Initially, small-talk option had this issue which you specified here where users were not able to add more phrases to existing questions or add more questions.
To solve this issue, DialogFlow has introduced Small Talk Pre-built Agent.
There are approx 86 pre-built intents in the small-talk agent.
You can add/modify the phrases in those intents,
You can add/delete intents
You can modify the responses of these intents
To use small-talk agent, go to pre-built agents option in left menu, go to Small Talk agent, then import it.
Hope it helps.
I will suggest to use QnA maker service to achieve the functionality. Basically you have to create a QnA maker service and have to integrate to Bot. It will resolve your query. Please let us know if you need more information .
Regards,
Tharak