I'm using GCP's Dialogflow as an SMS chatbot and users often text keywords over exact sentences/questions. This causes the intent the bot responds with to be close to what the user wants but not always the exact response because of overlapping keywords in the training phrases.
Dialogflow returns an intent that is equal to or above the ML Classification Threshold with the most confident intent, but I'd like to the pool of intents that could relate to a question so that if a user responds
"That's not what I'm looking for"
the followup intent says
"Would any of the following help you instead? [insert pool of related intents here]."
If anyone has a way to do this with the Dialogflow API or through fulfillment, let me know. Otherwise any ideas/concepts of creating this myself are welcome!
To do this, you can use fulfillment to store the intent ID in a parameter of the context for the initial intent that Dialogflow returns. This way when the user responds:
"That's not what I'm looking for"
You can match the intent, and retrieve the name/ID of the previous intent from the context. Through fulfillment you can then use the ID of the previous intent to access a list of related intents (e.g. a dictionary) that you have preset in the fulfillment logic.
Related
I'm trying to figure out how to associate a specific user with a Twilio number, so that when a call/text comes to that number it only goes to that user's Frontline app/account.
I'm writing the callbacks in Node.js, and I guess that I'm a bit confused to as to how to identify the target number (as the quickstart I'm using is more focused on the customerNumber and relationship with a specific worker).
Thank you.
I believe you should set up Custom Routing for this and, instead of using the customer number (the MessageBinding.Address from the webhook parameters) to do the routing as in the quick start, you can use the number the customer sent the message to, which I think is the MessageBinding.ProxyAddress.
Check out all the parameters that are sent to the onConversationRoute webhook URL. You might also want to test and just log out all the available parameters in order to match to the target number.
The best and the only option I see the Call Forwarding for that purpose and using Twilio's inbuilt TwiML Bins.
Complete info:
https://support.twilio.com/hc/en-us/articles/223179908-Setting-Up-Call-Forwarding
I work in a large enterprise where multiple teams are developing Lex bots (on separate accounts). Each bot supports a different domain or application,. In some cases, it would be nice for a single user interface to ask a question without needing to know which bot to ask. Is there a way to federate bots, or to forward un-recognized intentions to 'backup' bots?
I feel like what I really want to do is treat each bot as a skill is treated in Alexa, except I'm in the position (through entitlements) to know which 'skills' would be appropriate for a given user.
The answer here is that you would need to develop a custom application that delivers a user's input to each of your company's array of bots.
You'd need to look at the NLU Confidence score from each Bot's response to decide which response is the most accurate to return to the user. Would also be worthwhile keeping some state in your app to remember which Bot the user is currently interacting with and defaulting to that Bot for successive user inputs. Should you reach a point where the confidence score is low, it might present a signal to you to test the user's input across the other Bots.
What you'll need to be aware of here is that your costs will increase with each additional Bot that you add. So, assuming you have 5 area-specific Bots, one inbound message from your user could result in 5 Lex calls. As you start moving into significant volumes of interactions, this could start proving to be an obstacle.
An alternative would be to use a custom fallback intent to invoke a Lambda function that calls your Bot orchestration function. Assuming that you're able to find the correct Bot to handle the user's query, you'd need to remember that so succesive messages now get routed to that Bot.
I want to build a smart search agent which would use Watson conversation to process the request and give response but will use my own database say SQL server to search the desired output.
In Short Instead of writing intents and dialogues manually or importing from a csv file, I want to write my won code in .net in such a way that all the request and responses are influenced by my own data stored in my database. I only intent to use watson's processing and interpreting capability. But the processing must happen on my data.
E.g If the user searches for a word say "Dog", the Watson conversation service must search in my database and give relevant answers to the user based on the search.
Take a look at the solution architecture in the Watson Conversation documentation. Your database would be one of the depicted backend systems. Your application would be, as you mentioned, written in .NET and would use WCS to process the user input. It would return a response with all the associated metadata. Instead of having complete answers configured in a dialog, you would use something I have described as "replaced markers" in my collection of examples. Those markers are kind of hints to your application of which database query or which action to perform.
Note that WCS requires some intents and entities to work on. If you want to rely just on the detected intents and entities, you could work with one or two generic dialog nodes. As another technique you could use data from your database to generate intents and entities as an initial setup. In my "Mutating EgoBot" I use the Watson Conversation API to add intents and entities on the fly.
I believe you should use the standard trick:
instead of defining resposnses in the node of your diaglog, define an action on the output object of the node and let your applicatation take care of providing response (see https://console.bluemix.net/docs/services/conversation/develop-app.html#building-a-client-application)
So I got a task to prepare a simple analysis on how useful, from sociometrical point of view, are Slack API methods (https://api.slack.com/methods).
Yesterday I didn't even know that such thing as sociometry exists, and i still dont know how to evaluate any API using its methodology. Does anyone here ever got a similar task, or have any idea how to approach such analysis? What literature will be useful? I don't mean this analysis to be particularly long, but as for now I don't even know where to start.
Frankly, I am not an expert on sociometry , but here is how I would approach it:
I would assume the goal is to create a sociogramm depicting the relationships between all users on a Slack team using the API methods. So the question is how useful the API methods are to achieve that goal.
Slack does not have a "friends list", like Facebook, so you have to come up with your own approach on how to identify relationships on Slack. Slack is a messaging system, so it makes sense to define it based on who is communicating with whom.
Lets define users to have a relationships if they are
direct messaging each other (including groups)
talking to each other in a channel (using the #user
mention)
or just being part of the same channel and talking in the channel
Now to assess the effectiveness of the API methods. The basic approach would be to retrieve the messages of a public channel with channels.history (or im.history for direct messages, groups.history for for private channel and mpim.history for direct messaging channels with multiple participants) for a given time period. In addition you can retrieve the members of a channel with channels.info (or their pendants for the other channel types). Then you would parse all retrieved messages and the member list of a channel to identify the relationship and calculate the sociagram.
However, Slack will only allow users to access channels, that they are members of. That includes access through the API and that includes users with the role admin and owner.
So its not possible to see all direct messages, groups chats and private channel of a Slack team through the API and we would therefore need to limit the approach to public channels and some private channel. Depending on where most of the conversation is happening on a specific Slack team and which private channels our slack user is a member of this could significantly limit the ability to calculate a complete sociogram.
In summary you can use the API methods to calculate a sociogram for your Slack team based on which users users are communicating with each other. But that analysis will not be 100% complete, since its not possible to access all private communication on a Slack team though the API. The calculated sociogram might still be useful though, if the Slack user doing the calculation has access to all relevant private channels.
I want to have a flow where I text a user, and that user can text back to trigger an event. I could have multiple outstanding messages to a user at any one time - is there anyway on receiving a text message I can figure out which message it is in reply to, without including an id number in the text message body?
Twilio evangelist here.
So, just to be clear about the problem, it sounds like you have multiple steps in your workflow that might happen in parallel, or at least before the user can response, rather than in a specific linear message/response workflow. Your app might send out 5 messages, and you want to match up each of 5 replies to a specific message.
If thats the case, then unfortunately there really isn't a direct way built into Twilio to let you match up a message reply without including some kind of ID or command in the response message.
Hope that helps.