This page describes how to create and use a data store agent.
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.
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.
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.
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.
Create a data store agent
To create a data store agent:
In the Google Cloud console, go to the Search and Conversation page.
Read and agree to the Terms of Service, then click Continue and activate the API.
Click New App, then select Chat.
Provide your company name in the Agent configurations section.
Expand the time zone and language settings section.
Select a time zone.
Select a default language.
Provide an agent name in the Name your agent section.
Attach a data store by doing one of the following:
- Select an existing data store.
Create a new data store:
Choose a data source:
- Public web content crawler
- Cloud Storage
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.
Select your new data store.
Your agent is now created, and you are automatically redirected to the Available data stores page.
If you have created a new data store for a website, you must verify your domain.
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:
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.
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
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:
- Intent match for routes in scope
- FAQ data store content
- Unstructured data store content