conversational-analytics-ask-data-agent

A “conversational-analytics-ask-data-agent” tool allows conversational interaction with a Conversational Analytics source.

About

A conversational-analytics-ask-data-agent tool allows you to ask questions about your data in natural language.

This function takes a user’s question (which can include conversational history for context) and references to a specific BigQuery Data Agent, and sends them to a stateless conversational API.

The API uses a GenAI agent to understand the question, generate and execute SQL queries and Python code, and formulate an answer. This function returns a detailed, sequential log of this entire process, which includes any generated SQL or Python code, the data retrieved, and the final text answer.

Note: This tool requires additional setup in your project. Please refer to the official Conversational Analytics API documentation for instructions.

It’s compatible with the following sources:

  • cloud-gemini-data-analytics

conversational-analytics-ask-data-agent accepts the following parameters:

  • user_query_with_context: The question to ask the agent, potentially including conversation history for context.
  • data_agent_id: The ID of the data agent to ask.

Example

tools:
  ask_data_agent:
    kind: conversational-analytics-ask-data-agent
    source: my-conversational-analytics-source
    location: global
    maxResults: 50
    description: |
      Perform natural language data analysis and get insights by interacting 
      with a specific BigQuery Data Agent. This tool allows for conversational 
      queries and provides detailed responses based on the agent's configured 
      data sources.

Reference

fieldtyperequireddescription
kindstringtrueMust be “conversational-analytics-ask-data-agent”.
sourcestringtrueName of the source for chat.
descriptionstringtrueDescription of the tool that is passed to the LLM.
locationstringfalseThe Google Cloud location (default: “global”).
maxResultsintegerfalseThe maximum number of data rows to return in the tool’s final response (default: 50). This only limits the amount of data included in the final tool return to prevent excessive token consumption, and does not affect the internal analytical process or intermediate steps.