1
votes

I have V2 dialogflow client with fulfillment via a webhook using the DialogflowV2 Java library.

I'm hoping that I can fix this problem entirely in the portal however.

I have a default fallback intent and I'm using negative example training phrases. But I want any single word to match to another intent. Is there a way to indicate in the negative examples phrases the length of the phrase that should trigger it?

I'm basing my understanding of negative examples from here: https://dialogflow.com/docs/intents

2

2 Answers

1
votes

There is no way to match an intent (be it fallback or otherwise) based on the number of words in a user's query.

0
votes

Ok you can't do that with open / fallback intents without code, but in the inline editor you can just make your intentHandler (that catches both one-word and multi-word replies) do different things by checking for word length of the request query.

For example, just create a different output context for either one word or multi-word matches from either the if or the else statement and you're good to go for branching out the convo.