Multiple Intents in DialogFlow CX - dialogflow-cx

I want to have the user respond with a longish response, like talk about their education and family background. In this, I would like to identify multiple intents and then go back to the user with multiple questions (one by one) as a follow-on to the intents detected. Can I do this in DialogFlow CX and how?

Note that your desired use case is currently not feasible in Dialogflow CX. By default, Dialogflow matches a user query to only one intent route. Intents are matched based on the confidence value in the detectIntent Response’s queryResult.match field.
Moreover, the maximum detect intent text input length is 256 characters. If you are using an integration, the integration platform may have a smaller limit. However, you can use the sys.long-utterance built-in event to handle user queries that exceed the 256-character limit. Note that the long user query will still only get matched to only one intent route.
If you want to ask the user multiple questions, you can design your agent to have a conversation flow that asks the user one question at a time. You can utilize State Handlers to control the conversation flow. You may refer to the Voice agent design documentation for best practices for designing your agent.

You could do several intents with no response that has several follow up intents with your questions, u are going to need to change the number of context to match the amount of intents that you are going to use.

Related

DialogFlow CX - Ignore existence of an intent during some sessions

I want to provide users the ability to access a whole bunch of route groups / routes / intents from an "is there anything else?" kind of prompt. But, I want to limit access to some of them based the value of an event handler or parameter (eg client-membership-class=xyz) because some intents are irrelevant to some membership classes, thus I want to prevent them from accessing them.
It isn't practical to limit access by making a flow or page per client-membership-class because there are more "client-membership-classes" than there are routes / intents I need to limit access to.
On that basis you may think I've got the cart before the horse but I don't for 2 reasons:
the intent fulfilment is client-membership-class specific, populated via webhook.
the [routes / intents I need to limit access to] represent a very small portion of the overall agent, thus it would be much more work to make (and maintain) one agent per client-membership-class.
Attempted solutions:
Conditions on routes only prevent fulfilment and can't prevent invocation.
I'm struggling to find almost anything on using intent "labels". I suspect a label can not be used in a scenario to disable an intent (?).
I'm open to a complex solution if it can be achieved via webhook during a session.
Any ideas would be much appreciated !

MS Teams: how should we tell if an activity event comes from a bot?

we have a chat bot that seems to be receiving messages from another bot. we'd like to ignore these messages, as responding to them leads to an infinite loop of ping pong between the two bots.
we were hoping to rely on activity.from.role as documented here, but it seems like that field is never set.
activity.from.id looks something like 28:app:00000000-dfae-4fe1-a068-80fe8fc61f2b_62b732f7-fc71-40bc-b27d-35efcb000000, and we are thinking that the only way to identify the account as a bot is by detecting the :app: in these IDs. this is sub-optimal, as this ID format is not part of the official API and could change at any time.
that said, how should we detect if an activity event is coming from a bot?
If you've to deal with potential bots from outside your organisation, a simple way could be to keep a dictionary of few last text exchanges indexed by userId or UserName in the Activity object. Then, at each POST received by your bot, check if the received text match fully one of the precedent message entries in this dictionary. If it is the case, then mark the related userId/UserName as a candidate for the bot role but continue to check further text exchanges in case a non bot user just said hi twice.
If the few following further exchanges doesn't meet anymore the full match requirement, unmark the userId/UserName as a potential bot. If there is marked UserId/UserName as candidate for bot role, apply the bot role to them if there's no more further exchanges past the full match entry or after a delay of your choice. For the latter, it might be useful to provoke a last text exchange after the delay to decide.
For the Watson/Eliza kind of bots, i recommended to check the speed of the exchanges, as far as i know, no human being can exchange more than twenty messages per second.

Microsoft Graph API Mail: updating whole conversations? (mark as read or delete)

I am developing using the Microsoft Mail Graph API I'd like to provide conversation actions.
For example, if a conversation has several unread messages, marking as read the last one doesn't mark the whole conversation as read (like I'd want).
I didn't see any conversation-level API to mark as read / mark as unread or delete whole conversations.
What would be the best way to achieve conversation updates?
Thanks!
I'm afraid there are not APIs specific to email conversations. In order to process a batch of emails within a conversation, you'll need to update each message individually.
You can determine which messages belong in the conversation using the conversationId. Keep in mind however that a "conversation" is a somewhat loosely defined entity. Exchange generally gets good results but it isn't foolproof by a long shot (for example, a conversation with 10 participants, forward it to an 11th and you often end up with two threads in a single "conversation").
I would suggest using JSON batching for something like this. Batching allows you to bundle multiple Graph commands into a single call. Using batching you could update up to 20 messages at a time.

Bot framework - Use LUIS in Scorables

I've read that to handle messages globally, I have to use Scorables and set a score based on the user's input. I am wondering if I can use LUIS to parse the user input and set a score based on LUIS intent score.
Is there any way that I can use LUIS inside my Scorable class?
Or do i have to manually call LUIS and get the response and process myself?
Yes, you can call LUIS yourself, pass the message to it and see what it returns.
You will receive a list of intents with a score back and you typically take the one with the highest score.
LUIS is just an API with one endpoint so you can call it from wherever really, it's actually very easy. Have a look here for more details : https://github.com/Microsoft/Cognitive-LUIS-Windows
The response from LUIS will give you the intent and the parameters it identified assuming you had any. It's probably a good idea to set a threshold, if the score you get back is not high enough then that means you need to train LUIS more but that's another story. My own threshold is set at 88 anything below that, I don't really like.
If you do it like this you basically eliminate any need to do any processing yourself and you use LUIS for what it's mean to be used, which is understanding the user's query. You can do something with the result after that.

Access and scheduling of FHIR Questionnaire resource

I am trying to understand how to use the FHIR Questionnaire resource, and have a specific question regarding this.
My project is specifically regarding how a citizen in our country could be responding to Questionnaires via a web app, which are then submitted to the FHIR server as QuestionnaireAnswers, to be read/analyzed by a health professional.
A FHIR-based system could have lots of Questionnaires (Qs), groups of Qs or even specific Qs would be targeted towards certain users or groups of users. The display of the questionnare to the citizen could also be based on a Care-plan of a sort, for example certain Questionnaires needing filling-in in the weeks after surgery. The Questionnaires could also be regular ones that need to be filled in every day or week permanently, to support data collection on the state of a chronic disease.
What I'm wondering is if FHIR has a resource which fits into organizing the 'logistics' of displaying the right form to the right person. I can see CarePlan, which seems to partly fit. Or is this something that would typically be handled out-of-FHIR-scope by specific server implementations?
So, to summarize:
Which resource or mechanism would a health professional use to set up that a patient should answer certain Questionnaires, either regularly or as part of for example a follow-up after a surgery. So this would include setting up the schedule for the form(s) to be filled in, and possibly configure what would happen if the form wasn't filled in as required.
Which resource (possibly the same) or mechanism would be used for the patient's web app to retrieve the relevant Questionnaire(s) at a given point in time?
At the moment, the best resource for saying "please capture data of type X on schedule Y" would be DiagnosticOrder, though the description probably doesn't make that clear. (If you'd be willing to click the "Propose a change" link and submit a change request for us to clarify, that'd be great.) If you wanted to order multiple questionnaires, then CarePlan would be a way to group that.
The process of taking a complex schedule (or set of schedules) and turning that into a simple list of "do this now" requests that might be more suitable for a mobile application to deal with is scheduled for DSTU 2.1. Until then, you have a few options for the mobile app:
- have it look at the CarePlan and complex DiagnosticOrder schedule and figure things out itself
- have a server generate a List of mini 1-time DiagnosticOrders and/or Orders identifying the specific "answer" times
- roll your own mechanism using the Other/Basic resource
Depending on your timelines, you might want to stay tuned to discussions by the Patient Care and Orders and Observations work groups as they start dealing with the issues around workflow management starting next month in Atlanta.

Resources