This post was originally published on this site

Deploying the Gemini Enterprise app across an organization marks a transformative leap forward in workforce productivity, providing employees with an amazing, high-performance suite of agentic AI tools, search-grounded assistants, and specialized solutions like NotebookLM. As adoption grows to a large scale, it can introduce a critical administrative scale challenge: how to audit, govern, and extract insights from a massive volume of telemetry without getting bogged down in manual overhead. To help administrators succeed, Google Cloud provides comprehensive, out-of-the-box analytics via pre-computed dashboards to track day-to-day adoption, user engagement, and active user metrics. While this provides a product-centric lens to look at Gemini Enterprise app’s usage, to understand the impact of agentic AI, administrators might need a more nuanced, organization-centric perspective tailored to their own internal context. This is where using Google BigQuery becomes a crucial tool in the administrator’s arsenal to run deep-dive forensics across their organization to analyze and govern the adoption of agentic AI.

Why Gemini Enterprise app + BigQuery is a game-changer

Augmenting the Gemini Enterprise app with BigQuery through log sinks allows a lean administrative team to analyze and govern a large-scale deployment. Specifically, it empowers IT, Data, and Security teams to:

  • Profile nuanced adoption and behaviors: Segment usage patterns by department to see which teams are building custom agents, track NotebookLM utilization, and calculate agent-to-employee ratios.

  • Quantify organizational value: Combine conversational logs with HR or line-of-business datasets to calculate actual employee hours saved, trace value creation, and build executive Looker dashboards.

  • Execute precision compliance audits: Audit grounding queries across Google Drive folders and enterprise directories to prevent data leaks and protect corporate IP.

  • Investigate safety alerts instantly: Query historical logs when security filters flag a prompt, identifying the exact text that triggered a Model Armor block to resolve compliance alerts.

To support these use cases, the telemetry is partitioned into five distinct log tables in BigQuery, capturing unique data fields:

BigQuery Destination Table

Telemetry Captured

Gen AI User Messages

`discoveryengine_googleapis_com_g
en_ai_user_message`

Verbatim prompt inputs typed by users

Gen AI Choices

`discoveryengine_googleapis_com_g
en_ai_choice`

Verbatim model responses, finish reasons, and LLM reasoning steps

User Activity Telemetry

`discoveryengine_googleapis_com_g
emini_enterprise_user_activity`

Corporate identity (IAM emails) and grounding file access paths

Cloud Audit Activity

`cloudaudit_googleapis_com_activity`

Control plane configuration changes and administrative user logs

Cloud Audit Data Access

`cloudaudit_googleapis_com_data_ac
cess`

High-volume data plane interactions and search queries

Aggregate OOB Metrics

(Batch Export Table)

Pre-aggregated seats claimed, seat purchases, and engagement metrics from the past 30 days. To be pulled asynchronously via custom daily batch runs of the analytics:exportMetrics API to build high-level adoption and cost dashboards.

Ingestion pipeline and architecture

To implement scale-ready observability, administrators establish an automated telemetry pipeline. Moving your Gemini Enterprise data to BigQuery does not require complex custom software development; instead, it leverages a continuous Cloud Logging Log Router Sink for conversational logs and an asynchronous batch export API for high-level aggregate seat metrics.

The diagram below illustrates the ingestion pipeline and how telemetry is mapped to BigQuery:

1

Here is your blueprint for connecting Gemini Enterprise to BigQuery to build the ultimate analytics and governance foundation for your organization.

Routing pipelines: Continuous logging and audit sinks

To capture your telemetry, establish log sinks within Cloud Logging to intercept and route runtime events to BigQuery:

  • The streaming pipeline (detailed logs): Streams row-by-row conversational data (user prompts, model choices, and grounding events). Ensure prompt and response logging is enabled in your Gemini Enterprise Admin Console (see Set Up Usage & Audit Logs).

    • Inclusion Filter (replace [PROJECT_ID] with your Google Cloud Project ID):

code_block
<ListValue: [StructValue([('code', 'logName="projects/[PROJECT_ID]/logs/discoveryengine.googleapis.com%2Fgemini_enterprise_user_activity" ORrnlogName="projects/[PROJECT_ID]/logs/discoveryengine.googleapis.com%2Fgen_ai.user.message" ORrnlogName="projects/[PROJECT_ID]/logs/discoveryengine.googleapis.com%2Fgen_ai.choice"'), ('language', ''), ('caption', )])]>
  • The governance pipeline (audit logs): Captures administrative actions (Admin Activity) and data plane operations (Data Access, such as grounding data connector lookups).

    • Inclusion Filter (replace [PROJECT_ID] with your Google Cloud Project ID):

code_block
<ListValue: [StructValue([('code', 'logName:"projects/[PROJECT_ID]/logs/cloudaudit.googleapis.com" AND rnprotoPayload.serviceName="discoveryengine.googleapis.com"'), ('language', ''), ('caption', )])]>
    • Admin Activity Logs: Always enabled by default; tracks resource changes (e.g., custom agent creation, updates, deletions).

    • Data Access Logs: Off by default; must be enabled in GCP IAM settings for the Discovery Engine API to log user-level data read/write interactions during chats.

Unlock advanced intelligence in BigQuery

Transform raw telemetry into insights

BigQuery provides AI-powered analysis tools that make understanding and navigating telemetry effortless. By leveraging Gemini in BigQuery, administrators can translate raw log streams into visual insights and clear documentation without manual guesswork.

No-Code Conversational Analytics (BigQuery CA)
Querying nested JSON schemas is made simple with Conversational Analytics in BigQuery (BQ CA). BQ CA acts as an intelligent agent within BigQuery Studio, automatically generating and executing SQL grounded in your schema, business metadata, and verified queries/UDFs to ensure metrics consistency. It also surfaces its “thinking process” alongside the generated code to build administrative trust. 

For example, as shown in the screenshot below, asking “Compare the usage of notebooklm, deep research and custom agents using oob_metrics?” generates the correct SQL, runs the query and outputs the result in seconds:

2

As shown in the screenshot below, BQ CA goes beyond traditional querying and standard SQL generation by allowing users to execute sophisticated AI and machine learning tasks directly within the console. Administrators can leverage these native capabilities to run advanced analysis, such as classification of user prompt sentiment or forecasting future adoption trends, streamlining the governance process.

3

Auto-generated schema documentation and insights

Understanding telemetry fields like useriamprincipal, finish_reason, or groundedContent is crucial for extracting the right insights. BigQuery simplifies this through automated schema documentation and AI-powered context:

  • Automated profiling and metadata: By pairing Knowledge Catalog Data Profiling with Gemini, you can evaluate unique value counts, null rates, and data distributions in raw tables. With a single click, Data Insights generates descriptive metadata for both tables and individual nested columns.

  • Unified data insights: Gemini leverages this rich context to surface insights across your entire data estate. It automatically recommends queries to find anomalies or safety failures within a single table (like gen_ai_user_message). At the dataset level (Preview), it generates an interactive relationship graph to map cross-table join paths and suggests queries that combine data—like user activity and model outputs—to calculate task complexity.

  • Seamless agent integration and glossaries: Table and data insights integrate directly into the BigQuery Conversational Analytics (BQ CA) agent UI, giving agents immediate access to enriched metadata and few-shot examples. To ensure agents accurately interpret domain-specific prompts, BQ CA also supports business glossaries. You can define custom terms directly for your agents or import existing glossaries from Knowledge Catalog to establish a standardized vocabulary.

Administrators can then leverage the profiling, enriched metadata and insights to navigate logged fields, understand the telemetry structure, and catalog data for compliance audits. As shown in the screenshots below, the output of Gemini-powered auto generation of schemas, descriptions and linkages makes it easy to make sense of the complex relationships and telemetry data output by agentic interactions on the Gemini Enterprise app.

4

5

Visualizing with Data Studio dashboards

For executive stakeholders, raw log tables can be transformed into interactive, high-impact business intelligence dashboards. By connecting Data Studio directly to BigQuery, you can build dashboards that monitor:

  • User adoption and seat ROI: Segment usage trends by department, highlighting the ratio of custom agents built relative to employee headcount.

  • Data grounding traffic: Map which enterprise connectors—such as SharePoint, Google Drive, or Gmail—experience the highest utilization.

  • Content safety and violations: Track Model Armor sanitization blocks and sentiment feedback loops over time to maintain safety standards.

  • Share BQ Conversational Analytics agent: Share the BQ CA agents you built via Data Studio to give business users the ability to ask more questions of the data.

Empower your organization with the Gemini Enterprise app and your administrators with BigQuery

  1. Deploy the Gemini Enterprise App: Bring the best of Google AI to every employee.

  2. Enable Prompt & Response Logging: Turn on prompt and response logging in the Admin Console to begin recording user activity telemetry.

  3. Configure Log Router Sinks: Establish sinks to stream telemetry into BigQuery.

  4. Track Metrics & Export Analytics: Access pre-computed, out-of-the-box dashboards on the console and export historical aggregate statistics.

  5. Extract Table-Level & Dataset-Level Insights: Explore unfamiliar log tables and discover relationship join paths automatically.

  6. Query with Conversational Analytics: Build data reasoning agents and leverage natural language querying inside BigQuery Studio.

  7. Visualize with Data Studio: Connect Data Studio to BigQuery to build executive-level dashboards & give access to BQCA agents to business users.

  8. Consult a Google Cloud Customer Engineer for the most cost-effective and secure configuration for the analytics setup described above.

The authors would like to acknowledge and thank the Google Forge team, especially Vicky Falconer, Dharini Chandrashekhar and Adhaar Gupta, for contributing to the core work that led to this article.