Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

DialogFlow CX non-generative FAQ agent follow up responses

Here is what I would like to do:

I have a set of route groups containing responses to FAQs

If a person asks a question that matches intent A (which triggers a pre-programmed response through route A) then subsequently asks another question that would also match intent A, in that scenario I would like to trigger an alternative route and offer a different pre-programmed response acknowledging that they are seeking more in-depth information instead of having the bot just repeat what it already said. I don't just want a random alternative response.

Furthermore, I want to avoid locking users into going down a path, so ideally they could ask a question that matches some completely different intent (say intent W) in between and this would still work.

I think I make this work in a pretty reasonable way if any of the following were available to me:

  • there was a session parameter that contained the name of the last matched intent
  • if there was an event called something like "repeated intent match" that was triggered when the same intent was matched twice in a row based on user utterances
  • if I could put condition-based routes ahead of intent-based routes

....but as far as I can tell none of the above are options and that is leading me to a much more complex solution.

Any ideas or suggestions?

1 3 192
3 REPLIES 3

The obvious candidate would be conditional responses, but I'd like to be able to respond with richer responses, not just plain text... perhaps webhook is the only option here?

What you’re describing is a common problem in conversational design, especially when you want to make interactions feel more dynamic and responsive based on repeated user intents. Since the platform you’re working with doesn’t seem to have built-in features like intent history or event triggers for repeated intents, you can still implement a custom solution by managing context within your session logic. Here are a few ideas to achieve this:-

1. Track Intent History in Session Parameters

2. Use a Counter for Repeated Intents

3. Conditional Routing with Context Awareness

4. Leverage Fallback Intent for Custom Logic

5. Advanced: Use Event Triggers

Thanks for the ideas, @sahilnaircool.

I have already considered several of these suggestions, I think.

I am considering an approach in which I maintain a list of matched intents in a "sessionHistory" parameter ($sys.func.APPEND($session.params.sessionHistory,$session.params.lastMatchedIntent))... then I can use $sys.func.CONTAIN($session.params.sessionHistory, "intent name") = TRUE to test whether the current intent has been matched previously.

The problem is the lack of a pre-populated parameter containing the name of the latest matched intent. I need to set the "lastMatchedIntent" parameter manually in the route's parameter presets. To make matters worse, this can't be done until the fulfillment stage -- not when I am checking conditions.

My current workaround is to create two routes for every intent: 1 that passes off to an "initial response" flow when the current intent is not found in the session history and one that hands off to a "followup" flow when the current intent does appear in the session hstory. (Not to mention also building the initial response and the follow up route for each intent).

It feels like there should be a way to handle the condition checking and rerouting part for all intents simultaneously so that I only need to create 2 response routes for each intent - 1 for the initial response and 1 for follow up matches.

I really wish there was a request-scoped parameter like "$request.matchedIntent", similary to $request.user-utterance and $request.last-agent-utterance. Does such a thing exist??

I'm curious about what you are suggesting with ideas 4 and 5 (default fallback and custom event).. can you give any more detail on what these solutions might look like?