Conversational analytics in AlloyDB for PostgreSQL lets you chat with agents about your database data using natural language. To get answers about your data, you:
- Create data agents for a set of knowledge sources, such as tables and views, that you select.
- [Optional] Create context and instructions for an agent to configure the data agent to effectively answer questions for specific use cases.
Before customizing an agent, we recommend that you first work with the context and instructions that the agent creates.
Conversational analytics provides the following types of context:
- Guided – you create this context in the Google Cloud console. This option is well suited for users who don't want to write code directly.
- Advanced – you create this context in the Gemini CLI or in your IDE. We recommend this approach for users who want more control of agent quality. This context resuses the context for the QueryData method.
After you create data agents, you can then have conversations with them to ask questions about AlloyDB for PostgreSQL data by using natural language.
Conversational analytics is powered by Gemini for Google Cloud.
Learn how and when Gemini for Google Cloud uses your data.
As an early-stage technology, Gemini for Google Cloud products can generate output that seems plausible but is factually incorrect. We recommend that you validate all output from Gemini for Google Cloud products before you use it. For more information, see Gemini for Google Cloud and responsible AI.
Data agents
Data agents consist of one or more knowledge sources, and a set of instructions specific to a use case for processing that database data. When you create a data agent, you can configure it using the following options:
- Use knowledge sources such as tables and views with a data agent.
- Provide custom table and field metadata to describe the database data in the most appropriate way for the given use case.
- Provide instructions for interpreting and querying the data, such as
defining the following:
- Synonyms and business terms for field names
- Most important fields and defaults for filtering and grouping
- Using either guided or advanced context generation, provide structured contexts that the data agent can use to shape an agent's response structure and to learn the business logic that your organization uses.
Manage data agents
You can create, manage, and work with the following types of data agents in the Agent tab in the Google Cloud console:
- A predefined sample agent for each Google Cloud project.
- A list of your drafted, created, and published agents.
- A list of agents that other people create and share with you.
For more information, see Create data agents.
Other services in the project that support data agents, such as the Conversational Analytics API, can access data agents that you create in AlloyDB for PostgreSQL . You can also access an agent created in the Google Cloud console by calling it using the Conversational Analytics API.
Conversations
Conversations are persisted chats with a data agent or database data source. You can ask data agents multi-part questions that use common terms like "sales" or "most popular," without having to specify table field names or define conditions to filter the database data.
The chat response returned to you provides the following features:
- The answer to your question as text, code, or charts (where appropriate)
- The agent's reasoning behind the results.
- Metadata about the conversation, such as the agent and database data sources used.
When you create a direct conversation with a database data source, the Conversational Analytics API interprets your question without the context and processing instructions that a data agent offers. Because of this, direct conversation results can be less accurate. Use data agents for cases that require greater accuracy.
You can create and manage conversations in AlloyDB for PostgreSQL using the Google Cloud console. For more information, see Analyze data with conversations.
Security
You can manage access to conversational analytics in AlloyDB for PostgreSQL using Conversational Analytics API IAM roles and permissions. For information about the roles needed for specific operations, see the data agent required roles and the conversation required roles.
Locations
When you use conversational analytics to create an agent, the control plane—which plans, manages the workflow, and calls tools (orchestration)—uses only a global endpoint. The data plane—which fetches, retrieves, and processes the actual database records and vector documents—uses a regional endpoint.
Pricing
You are charged at AlloyDB compute pricing for queries that run when you create data agents and have conversations with data agents or database data sources. There is no additional charge for creating and using data agents and conversations during the Preview period.
Dynamic shared quota
Dynamic Shared Quota (DSQ) in Vertex AI manages capacity for the Gemini model. Unlike conventional quotas, DSQ lets you access a large shared pool of resources without a fixed per-project limit for model throughput.
Performance, such as latency, can vary depending on the overall system load.
During times of high demand across the shared pool, you might occasionally
experience temporary 429 Resource Exhausted errors. These errors indicate that
the shared pool capacity is momentarily constrained, but not that you have
reached a specific quota limit on your project. To check on the capacity, retry
the request after a short delay.
What's next
- Learn more about the Conversational Analytics API.
- Create data agents.
- Analyze data with conversations.