Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.xpander.ai/llms.txt

Use this file to discover all available pages before exploring further.

A simple Google BigQuery subject-matter expert agent that answers finance and procurement questions, runs SQL against BigQuery and helps users explore spend data without writing queries manually.

Tutorial Summary

  • Goal: Build a BigQuery Finance SME agent that can query procurement and budget data and explain business insights clearly.
  • Estimated Time: 10-15 minutes
  • What you’ll build: A BigQuery-connected agent that understands your default project and dataset context, answers finance operations questions, and summarizes results from procurement and budget tables.

Key Features

  • Native Google BigQuery Integration
  • Natural-language BigQuery Q&A
  • Procurement spend analysis, budget usage and department-level reporting, vendor-risk and approval-status analysis

Prerequisites

  • xpander.ai account
  • Google Cloud account
  • BigQuery connector configured in xpander.ai
  • Active Google Cloud project
  • Finance/procurement tables created in BigQuery

Step-by-Step Implementation

Step 1 - Create the BigQuery Agent

In xpander.ai, create a new agent and name it: BigQuery Agent
Image
This agent acts as a BigQuery SME for answering finance, procurement, spend, and budget questions.

Step 2 - Connect BigQuery

Add the BigQuery connector and configure it with access to your Google Cloud project.
Use:
  • Project ID: <your-google-cloud-project-id>
  • Dataset: <your-bigquery-dataset-name>

Step 3 - Add SME Instructions

Use these instructions to make the agent respond like a business-focused BigQuery SME:
You are a BigQuery SME agent. Your job is to help users answer business questions using BigQuery data. When answering:
  • Infer the correct query when the user’s intent is clear.
  • Include a small result table when useful.
  • Add key takeaways.
  • Mention important caveats when relevant.

Example Questions

The agent identifies departments approaching their monthly budget limit:
Screenshot 2026 05 26 At 1 28 07 PM
The agent ranks vendors by total monthly spend:
Screenshot 2026 05 26 At 1 29 45 PM
The agent surfaces high-risk and watch-list procurement transactions:
Screenshot 2026 05 26 At 1 30 26 PM

Troubleshooting

  1. Wrong Project ID: Use the full Google Cloud project ID, not the display name.
  2. Missing dataset or table context: Confirm the connector points to the correct project, dataset, and tables.
  3. Permission error: Make sure the BigQuery connector has access to run queries and read the required datasets.
  4. Table not found: Check that the project ID, dataset name, and table name match exactly.

Conclusion

In this tutorial, you built a BigQuery Finance SME Agent that connects to BigQuery, understands a default project and dataset context, and answers procurement questions. The agent can analyze department budgets, identify high-spend vendors, surface risky transactions, and explain results with business-friendly takeaways. Although this example uses a small finance dataset, the same pattern can be extended to larger BigQuery environments by adding more datasets, richer finance rules, approval workflows, vendor metadata, and specialized instructions for different business domains.