Create and use a data store agent

This page describes how to create and use a data store agent.

Project setup

Create a project

To use services provided by Google Cloud, you must create a project. A project organizes all your Google Cloud resources. A project consists of a set of collaborators, enabled APIs (and other resources), monitoring tools, billing information, and authentication and access controls. You can create one project, or you can create multiple projects and use them to organize your Google Cloud resources in a resource hierarchy. When creating a project, take note of the project ID. You will need this ID to make API calls. For more information on projects, see the Resource Manager documentation.

In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

Go to project selector

Access control

If you are the project owner, you have all the permissions needed to create a data store agent. If you are not the project owner, you must have the following roles:

  • Dialogflow Admin
  • Discovery Engine Admin

For more information, see the Dialogflow access control guide.

Enable billing

A billing account is used to define who pays for a given set of resources, and it can be linked to one or more projects. Project usage is charged to the linked billing account. In most cases, you configure billing when you create a project. For more information, see the Billing documentation.

Make sure that billing is enabled for your Google Cloud project.

Enable the API

You must enable the Dialogflow API for your project. For more information on enabling APIs, see the Service Usage documentation.

Enable the Dialogflow API.

Enable the API

Create a data store agent

To create a data store agent:

  1. In the Google Cloud console, go to the Search and Conversation page.

    Search and Conversation

  2. Read and agree to the Terms of Service, then click Continue and activate the API.

  3. Click New App, then select Chat.

  4. Provide your company name in the Agent configurations section.

  5. Expand the time zone and language settings section.

  6. Select a time zone.

  7. Select a default language.

  8. Provide an agent name in the Name your agent section.

  9. The global location is automatically defaulted for you, but you can also select us-central1 or europe-west1.

  10. Click Continue.

  11. Attach a data store by doing one of the following:

    • Select an existing data store.
    • Create a new data store:

      1. Choose a data source:

        • Public web content crawler
        • BigQuery
        • Cloud Storage
        • API
      2. Provide information for the data store you selected. Your data store location will match to the corresponding agent location. Your app's data will be stored at-rest in the data store location. Then click Create.

      3. Select your new data store.

  12. Click Create.

  13. Your agent is now created, and you are automatically redirected to the Available data stores page.

  14. If you have created a new data store for a website, you must verify your domain.

  15. To edit your data store association with the agent, enhance your agent with Dialogflow CX flows, or deploy your agent, click Preview in the left panel. This opens your agent in the Dialogflow Console.

Test your agent

You can use the Dialogflow CX simulator to test your agent.

Improve the agent's generative responses

If you find some responses during testing do not meet your expectations, try the following.

You can overwrite an answer by adding an FAQ entry for a specific question.

Further customizations are available for your agent in the Dialogflow Console. To navigate to the console, click the name of your agent in the list of agents available in the console. Then, open the Dialogflow Agent Settings page and navigate to the ML tab, and then the Generative AI sub-tab. The following customizations are available:

Grounding confidence

For each response generated from the content of your connected data stores, we evaluate a confidence level, which gauges the confidence that all information in the response is supported by information in the data stores. You can customize which types of responses to allow by selecting the lowest confidence level you are comfortable with. If a response comes back with a strictly lower confidence than that level, it will not be shown.

There are 5 confidence levels to choose from: very low, low, medium, high, and very high.

Data store prompt

You have the option to add additional information about the agent that can improve the quality of answers generated from data store content and make them feel more like your brand:

  • Agent name - what the agent should call itself. If you leave it unset, the default value AI Assistant will be used.
  • Agent identity - what the agent persona will be. If you leave it unset, the default value AI Assistant will be used.
  • Company name should be set to the name of your company. This should have already been set as part of the agent creation flow, but is adjustable as needed. It is recommended to set this field correctly (and especially not leave it empty), lest quality of generated answers suffer.
  • Company description stands for a short description of what the company does or offers.
  • Agent scope - where the agent is meant to be used. If you leave it unset, the default value on the company website will be used.

Once you've filled out this section partially or fully, you can inspect on the right side, under Your prompt, the short paragraph that was derived from these settings and that will be used as part of answer generation.

Banned phrases

You have the option to define specific phrases which should not be allowed. If the generated response (or for that matter, the content going into the prompt used to generate the response, for example the last user utterance) contains any of the banned phrases verbatim, then that response will not be shown.

Deploy your agent

There are many ways to deploy your agent:

  • The simplest option is to use a Dialogflow CX integration, which provides a user interface for your agent. Each integration provides instructions for deployment.

  • The Dialogflow Messenger integration is a particularly good option for Vertex AI Conversations. It has built-in options for generative features.

  • You can create your own user interface and use the Dialogflow CX API for interactions. Your user interface implementation is in control of deployment.

Track your agent's performance

You can monitor your agents conversation history and you can use the analytics tool for agent statistics.

Next steps

Dialogflow CX provides many powerful features that can handle conversation scenarios well beyond what a basic Vertex AI Conversation provides. See Dialogflow CX basics for an overview of features.

For example, you can choose to enhance your agent's capabilities by adding intent routes to your agent.

Dialogflow evaluates end-user input in the following order of preference:

  1. Intent match for routes in scope
  2. FAQ data store content
  3. Unstructured data store content