comalex3
comalex3

Reputation: 2606

How to get all matching intents

Is there a way to get all matching intents, not only one result with the biggest score, for example right now I get "result": { "source": "agent", "resolvedQuery": "my test", "action": "", "actionIncomplete": false, "parameters": {}, "contexts": [], "metadata": { "intentId": "", "webhookUsed": "false", "webhookForSlotFillingUsed": "false", "intentName": "intentName" }, "fulfillment": { "speech": "test", "messages": [ { "type": 0, "speech": "test" } ] }, "score": 0.9200000166893005 }, I want to return all intents when the score is not high to allow users to choose their intent.

Upvotes: 0

Views: 150

Answers (1)

Daniel Situnayake
Daniel Situnayake

Reputation: 2904

It isn't possible to return all matching intents.

Given the use case described in the comments, you can just set your fallback intent to return a set of suggestions to the user. The fallback intent is triggered when none of the intents have a sufficiently high score to match.

Upvotes: 1

Related Questions