Data agents let you curate the Conversational Analytics experience for your data. With agents, you can provide Conversational Analytics with context and instructions to enable it to answer questions more effectively for specific use cases. Agents empower analysts to map business terms to specific fields, specify the best fields for filtering, and define custom calculations.
This page guides you through the following processes:
Learn how and when Gemini for Google Cloud uses your data.
Before you begin
To create an agent, you must be assigned a Looker role that has the appropriate permissions.
Create and edit data agents
To create a new data agent, follow these steps:
- Navigate to the Conversations page.
- In the Agents tab, select + New agent. Or, in the left panel, select sparkManage agents, and then select + New agent.
On the New agent page, provide the following information about your data agent.
- Agent name: Enter a name for the agent. The name should be unique and descriptive.
- Agent description: Briefly describe what this agent can do and the data that it uses. Users will see this description when they select the agent to start a conversation, so make sure that the description clearly explains the agent's purpose and how it can be helpful.
- Data: Follow these steps to connect to up to five existing Looker Explores:
- In the Data field, click + Select Explores.
- In the Search Explores window, click the Explores that you want to include in the data agent. These Explores will appear in the Selected Explores panel of the window.
- To add the selected Explore to the data agent, click Save.
Instructions: Provide context to help Conversational Analytics understand how to interact with your data and provide accurate and relevant responses. For examples of the types of context that you can provide, see Writing agent instructions.
Optionally, to enable the Code Interpreter for all conversations with your agent, select Enable Advanced Analytics.
Optionally, you can test your agent to refine your instructions and its settings.
To save your new data agent, click Save.
After you save the data agent, you can start a conversation with the agent.
Write agent instructions
When you create a data agent, you can provide the following types of context in the Instructions field:
- Key fields: The most important fields for analysis
- Excluded fields: Fields that the data agent should avoid
- Filtering and grouping: Fields that the agent should use to filter and group data
- Synonyms: Alternative terms for key fields
Here are some sample instructions to adjust and test with your agent:
- Unless stated otherwise, always filter the data on
Order Items Created Year = 2024 - We consider "loyal" customers to be those with
Order Items Count > 5 - If someone says anything about "Location," that means User City
- If the question mentions "Seniors", those are users with
User Age > 65 - If a question is about Revenue, use Total Sales
- When someone says "by product", unless they specifically say "name", group by
product category - "Successful" orders means that Order Items status = "Complete"
- Whenever there is a question of a timeline, or over time, always use
Order Item Created Dateas the field to group by
Test an agent
When you're creating or editing an agent, the agent details page includes the Preview your agent pane. You can test agent settings and instructions by starting a conversation with the agent.
You must click Update for a change to be reflected in the preview. If the save status is Not saved, any updates to settings won't be reflected in the preview.
Edit an existing data agent
To edit an existing data agent, follow these steps:
- On the Conversations page, select sparkManage agents.
- On the Manage agents page, select the data agent that you want to edit.
- Update the details about the agent as needed. You can modify the details that you specified when you created the agent, including the Agent name, Agent description, Data, and Instructions fields. You can also opt to enable the Code Interpreter for your agent.
- To save your changes, click Update.
Delete a data agent
To delete a data agent, follow these steps:
1.On the Conversations page, click sparkManage agents in the left panel. 1. Open the menu for the chosen agent by clicking its More options icon, and then click Delete. 1. In the Delete agent? window, click Move to trash to delete the data agent.
Agents that are moved to the trash will be permanently deleted after 30 days. You can permanently delete a data agent manually, or you can restore a data agent from the trash before it is permanently deleted. If you take no action, the agent will be deleted permanently after 30 days automatically.
Permanently delete a data agent
To permanently delete a data agent, follow these steps:
- Navigate to the Conversations page.
- In the left navigation panel, expand the Trash section.
- To open the menu for the chosen agent, select its icon, and then click Delete Permanently.
- In the Are you sure? window, click Delete forever.
Restore a data agent from the trash
To restore a data agent from the trash, follow these steps:
- Navigate to Conversations page.
- In the left navigation panel, expand the Trash section.
- To open the menu for the chosen agent, select its icon, and then click Restore.
Related resources
Conversational Analytics in Looker overview: The landing page for Conversational Analytics with a list of key features links to all Conversational Analytics documentation.
Create and manage data agents: With data agents, you can customize the AI-powered data querying agent by providing context and instructions that are specific to your data, which helps Conversational Analytics generate more accurate and contextually relevant responses.
Best practices for configuring Conversational Analytics in Looker: Strategies and best practices to help Looker administrators and LookML developers successfully configure, deploy, and optimize Conversational Analytics.
Enable advanced analytics with the Code Interpreter: The Code Interpreter within Conversational Analytics translates your natural language questions into Python code and executes that code. Compared to standard SQL-based queries, the Code Interpreter's use of Python enables more complex analysis and visualizations.