I am trying to build a Dialogflow agent for something like StackOverflow, where it takes care of the user asking a complete question. I want to store the answer (and feed it back to the user). For example:
User: "I get an error."
CX: "Which error?"
"Java.lang.NullPointerException"
"Okay, what have you tried so far to solve this problem?"
"I googled it but found no results..."
"On what line of code do you get the error?"
"if (running) {counter ++}"
"Okay, so to summarize:
- You got the error Java.lang.NullPointerException
- You tried: I googled it but found no results...
- You got the problem on the line of code: what line of code do you get the error?
Is that correct?"
With no 'Fallback Intent'-hack available in CX; how would I go about building a bot with open ended questions?
Here is the following response to your comment How to build a Dialogflow CX agent with open questions?
To work with open ended (meaning: open answers that cannot be categorized into intents / parameters) questions, and store answers, you can use the same approach provided in my previous response, and utilize the “sys.any” entity and parameters.
To do this:
When you create an intent for the utterances, annotate the utterances to the “sys.any” entity. Here is a sample for your reference:
You can change the name of your parameter-id to distinguish the parameters that you will use in each page.
Add those parameters on each page. Here is the sample for your reference:
Continue applying Step 1 & 2 to your other intents and pages for the collection and storage of answers to your open-ended questions.
When you have reached your final page, you can reference your parameters in the responses through this format:
$session.params.parameter-name
. Here is the sample for your reference:You can check out reference session parameters for more information.
When this is completed, this is how your use case similarly looks like: