AI Overviews

AI Overviews = Dialogflow Agent?

Joshua Squires shared one of the most interesting AI Overview leaks and for some reason it was mostly ignored by the SEO industry. I’d like to draw your attention to it today because it provides two key details framing AI Overviews as an implementation of Google’s Dialogflow agentic framework which is backed up with an immense amount of documentation and technical detail.

The two key items of interest here are:

  • Intent
  • Priority
https://www.linkedin.com/posts/joshsquiresrva_anyone-seen-this-weird-intent-label-activity-7363218262500806656-j4Ad

I know these are pretty general concepts, but my intuition immediately drew me towards Dialogflow implementation.

What follow is taken directly from the implementation reference available here: https://cloud.google.com/dialogflow/es/docs/

Intent Settings

When building an agent, it is most common to use the Dialogflow ES console (visit documentationopen console). The instructions below focus on using the console. To access intent data:

  1. Go to the Dialogflow ES console.
  2. Select an agent.
  3. Select Intents in the left sidebar menu.
  4. Select an intent.

If you are building an agent using the API instead of the console, see the Intents reference. The API field names are similar to the console field names.

Priority

You can set a priority for each intent, which affects how it is matched.

To set an intent’s priority:

  1. Click the colored dot to the left of the intent name.
  2. Select the priority from the drop-down menu.
Screenshot of changing the intent priority.

In most cases, using the Normal priority is the best option. If there is a potential matching conflict between two intents, it is best to improve the training phrases to address the conflict. If you cannot remove the conflict with training phrases, you can use priorities to provide preference to one of the intents.

If the priority is Ignore, the intent is ignored in runtime detect intent requests.

When using the API, priorities are provided as integers. The larger the number, the greater the priority. If the priority is unset or equal to 0, the value is converted to 500,000. The following table shows the relationship between integer priorities and the console’s named priorities:

Console priority nameInteger priority set by consoleInteger priority (p) range that maps to named priority
Ignore-1p < 0
Low250,0000 < p ≤ 250,000
Normal500,000p = 0 or 250,000 < p ≤ 500,000
High750,000500,000 < p ≤ 750,000
Highest1,000,000p > 750,000

Matching algorithms

Dialogflow uses two algorithms to match intents: rule-based grammar matching and ML matching. Dialogflow simultaneously attempts both algorithms and chooses the best result.

The following table lists the pros and cons of these algorithms:

AlgorithmProsCons
Rule-based grammar matchingAccurate with a small or large number of training phrase examples.Models are updated quickly.Does not support the automated expansion entity option.
ML matchingAccurate with a large number of training phrase examples.Matching is fast.Inaccurate with a small number of training phrase examples.Models are updated slowly.Less accurate than grammar matching for agents with training phrases in template mode.

Intent detection confidence

When searching for a matching intent, Dialogflow scores potential matches with an intent detection confidence, also known as the confidence score. These values range from 0.0 (completely uncertain) to 1.0 (completely certain). Without taking the other factors described in this document into account, once intents are scored, there are three possible outcomes:

  • If the highest scoring intent has a confidence score greater than or equal to the ML Classification Threshold setting, it is returned as a match.
  • If no intents meet the threshold, a fallback intent is matched.
  • If no intents meet the threshold and no fallback intent is defined, no intent is matched.

Intent priority

You can set priorities for intents. When two or more intents match the same end-user expression with similar confidence scores, priority is used to select the best match. Otherwise, the confidence score for intent matching is more important than priority.

Knowledge connectors

Knowledge connectors complement defined intents. They parse knowledge documents (for example, FAQs) to find information related to end-user expressions.

If a defined intent and a knowledge document are both potential matches, the match confidence of each and the knowledge results preference are used to determine which match is the selected match.

Context

While contexts are active, Dialogflow is more likely to match intents that are configured with input contexts that correspond to the currently active contexts.

Sample from the discovery REST:

    "GoogleCloudDialogflowV2beta1ListIntentsResponse": {
      "id": "GoogleCloudDialogflowV2beta1ListIntentsResponse",
      "description": "The response message for Intents.ListIntents.",
      "type": "object",
      "properties": {
        "intents": {
          "description": "The list of agent intents. There will be a maximum number of items returned based on the page_size field in the request.",
          "type": "array",
          "items": {
            "$ref": "GoogleCloudDialogflowV2beta1Intent"
          }
        },
        "nextPageToken": {
          "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.",
          "type": "string"
        }
      }
    },
    "GoogleCloudDialogflowV2beta1Intent": {
      "id": "GoogleCloudDialogflowV2beta1Intent",
      "description": "An intent categorizes an end-user's intention for one conversation turn. For each agent, you define many intents, where your combined intents can handle a complete conversation. When an end-user writes or says something, referred to as an end-user expression or end-user input, Dialogflow matches the end-user input to the best intent in your agent. Matching an intent is also known as intent classification. For more information, see the [intent guide](https://cloud.google.com/dialogflow/docs/intents-overview).",
      "type": "object",
      "properties": {
        "name": {
          "description": "Optional. The unique identifier of this intent. Required for Intents.UpdateIntent and Intents.BatchUpdateIntents methods. Supported formats: - `projects//agent/intents/` - `projects//locations//agent/intents/`",
          "type": "string"
        },
        "displayName": {
          "description": "Required. The name of this intent.",
          "type": "string"
        },
        "webhookState": {
          "description": "Optional. Indicates whether webhooks are enabled for the intent.",
          "type": "string",
          "enumDescriptions": [
            "Webhook is disabled in the agent and in the intent.",
            "Webhook is enabled in the agent and in the intent.",
            "Webhook is enabled in the agent and in the intent. Also, each slot filling prompt is forwarded to the webhook."
          ],
          "enum": [
            "WEBHOOK_STATE_UNSPECIFIED",
            "WEBHOOK_STATE_ENABLED",
            "WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING"
          ]
        },
        "priority": {
          "description": "Optional. The priority of this intent. Higher numbers represent higher priorities. - If the supplied value is unspecified or 0, the service translates the value to 500,000, which corresponds to the `Normal` priority in the console. - If the supplied value is negative, the intent is ignored in runtime detect intent requests.",
          "type": "integer",
          "format": "int32"
        },
        "isFallback": {
          "description": "Optional. Indicates whether this is a fallback intent.",
          "type": "boolean"
        },
        "mlEnabled": {
          "description": "Optional. Indicates whether Machine Learning is enabled for the intent. Note: If `ml_enabled` setting is set to false, then this intent is not taken into account during inference in `ML ONLY` match mode. Also, auto-markup in the UI is turned off. DEPRECATED! Please use `ml_disabled` field instead. NOTE: If both `ml_enabled` and `ml_disabled` are either not set or false, then the default value is determined as follows: - Before April 15th, 2018 the default is: ml_enabled = false / ml_disabled = true. - After April 15th, 2018 the default is: ml_enabled = true / ml_disabled = false.",
          "deprecated": true,
          "type": "boolean"
        },
        "mlDisabled": {
          "description": "Optional. Indicates whether Machine Learning is disabled for the intent. Note: If `ml_disabled` setting is set to true, then this intent is not taken into account during inference in `ML ONLY` match mode. Also, auto-markup in the UI is turned off.",
          "type": "boolean"
        },
        "liveAgentHandoff": {
          "description": "Optional. Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false.",
          "type": "boolean"
        },
        "endInteraction": {
          "description": "Optional. Indicates that this intent ends an interaction. Some integrations (e.g., Actions on Google or Dialogflow phone gateway) use this information to close interaction with an end user. Default is false.",
          "type": "boolean"
        },
        "inputContextNames": {
          "description": "Optional. The list of context names required for this intent to be triggered. Formats: - `projects//agent/sessions/-/contexts/` - `projects//locations//agent/sessions/-/contexts/`",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "events": {
          "description": "Optional. The collection of event names that trigger the intent. If the collection of input contexts is not empty, all of the contexts must be present in the active user session for an event to trigger this intent. Event names are limited to 150 characters.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "trainingPhrases": {
          "description": "Optional. The collection of examples that the agent is trained on.",
          "type": "array",
          "items": {
            "$ref": "GoogleCloudDialogflowV2beta1IntentTrainingPhrase"
          }
        },
        "action": {
          "description": "Optional. The name of the action associated with the intent. Note: The action name must not contain whitespaces.",
          "type": "string"
        },
        "outputContexts": {
          "description": "Optional. The collection of contexts that are activated when the intent is matched. Context messages in this collection should not set the parameters field. Setting the `lifespan_count` to 0 will reset the context when the intent is matched. Format: `projects//agent/sessions/-/contexts/`.",
          "type": "array",
          "items": {
            "$ref": "GoogleCloudDialogflowV2beta1Context"
          }
        },
        "resetContexts": {
          "description": "Optional. Indicates whether to delete all contexts in the current session when this intent is matched.",
          "type": "boolean"
        },
        "parameters": {
          "description": "Optional. The collection of parameters associated with the intent.",
          "type": "array",
          "items": {
            "$ref": "GoogleCloudDialogflowV2beta1IntentParameter"
          }
        }

Here’s the complete discovery document:
https://dialogflow.googleapis.com/$discovery/rest?version=v2beta1


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *