bigquery-ai-ml

Run machine learning and generative AI tasks within BigQuery SQL queries.

Updated Jun 26, 2026
One-click install
npx skills add https://github.com/wangx7/skills-collection --skill bigquery-ai-ml-wangx7
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bigquery-ai-ml
Source: https://github.com/wangx7/skills-collection/tree/main/google-skills/skills/cloud/bigquery-ai-ml
Command: npx skills add https://github.com/wangx7/skills-collection --skill bigquery-ai-ml-wangx7

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Data analysts and engineers often need to run machine learning and generative AI tasks on data stored in BigQuery, but building and maintaining separate ML pipelines or custom models is time-consuming and requires specialized expertise. This Skill eliminates that friction by enabling AI/ML workflows directly within standard BigQuery SQL queries.

Core Features & Use Cases

  • Time-Series Forecasting: Use the pre-trained TimesFM model via AI.FORECAST to predict future values without custom model training, ideal for sales forecasting, demand planning, and capacity forecasting.
  • Anomaly Detection: Leverage AI.DETECT_ANOMALIES to automatically identify outliers and deviations in time-series operational data, such as unexpected spikes in server traffic or drops in transaction volume.
  • Generative AI in SQL: Use AI.GENERATE with Gemini models to perform text summarization, content extraction, and structured data extraction directly on data stored in BigQuery, no need to export data to separate tools.
  • Use Case Example: A retail data analyst can forecast next month's product demand, detect anomalous sales patterns, and generate summaries of customer review text all within a single BigQuery workflow.

Quick Start

Use the bigquery-ai-ml skill to write a BigQuery SQL query that forecasts the next 30 days of daily sales for each product category using the AI.FORECAST function.

Frequently Asked Questions about bigquery-ai-ml

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run machine learning forecasting directly in BigQuery SQL?

You can run machine learning forecasting directly in BigQuery SQL by using the AI.FORECAST function with the pre-trained TimesFM model, enabling you to predict future values without building separate ML pipelines or training custom models.

Can I detect anomalies in time-series data using standard SQL queries?

You can detect anomalies in time-series data using standard SQL queries by applying the AI.DETECT_ANOMALIES function in BigQuery, which automatically identifies outliers and deviations in operational data based on configurable probability thresholds.

What is the best way to generate text summaries from BigQuery data without exporting it?

The best way to generate text summaries from BigQuery data without exporting is using the AI.GENERATE function with Gemini models, performing content extraction and text summarization directly within your SQL queries on stored data.

Do I need custom model training to use generative AI functions in BigQuery?

You do not need custom model training to use generative AI functions in BigQuery, as the built-in AI capabilities leverage pre-trained models like TimesFM and Gemini natively through SQL without requiring separate ML infrastructure.

Does BigQuery AI/ML support configurable parameters for forecast horizons and output schemas?

BigQuery AI/ML supports configurable parameters for forecast horizons, anomaly probability thresholds, and structured output schemas, allowing you to tailor time-series forecasting and generative AI tasks directly within your SQL queries.

When should I use built-in BigQuery AI functions instead of a separate ML pipeline?

You should use built-in BigQuery AI functions instead of a separate ML pipeline when you need to apply time-series forecasting, anomaly detection, or text generation directly to stored data, eliminating the need to export data or maintain specialized infrastructure.