About bigquery-ai-ml
A reference skill for BigQuery users covering AI and machine learning in SQL queries, including built-in AI functions and Vertex AI remote models. Topics include generation, forecasting, anomaly detection, and semantic search.
Key features
- 01Use AI functions in SQL
- 02Classify and generate text
- 03Forecast time series and detect anomalies
- 04Generate embeddings and run semantic search
- 05Use Vertex AI remote models
Use cases
- 01Generate or classify text in queries
- 02Forecast time series and detect anomalies
- 03Analyze data drivers and semantic similarity
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ google/ skills --skill bigquery-ai-mlAfter installing, type/bigquery-ai-mlin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
references/ai_agg.mdai_causal_effect.mdai_classify.mdai_detect_anomalies.mdai_evaluate.mdai_forecast.mdai_generate_embedding.mdai_generate_table.mdai_generate.mdai_if.mdai_key_drivers.mdai_score.mdai_search.mdai_similarity.mdattribution.mdml_contribution_analysis.mdml_correlation.mdml_detect_change_points.mdml_seasonality.mdml_trend.mdremote_models.mdvector_search.mdDetails
From the project READMEBigQuery AI & ML
BigQuery integrates with Vertex AI to provide powerful machine learning and
generative AI capabilities directly within SQL queries using built-in functions
like AI.FORECAST, AI.KEY_DRIVERS, AI.DETECT_ANOMALIES, and AI.GENERATE.
Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read Usage Attribution. For commands executed
directly in the terminal (never in generated scripts, Terraform, or user code),
prefix gcloud with
CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:bigquery-ai-ml)"
and append agent-skills/1.0 (skill:bigquery-ai-ml) to User-Agent headers.
Reference Directory
-
Functions Reference:
- AI.AGG: ai_agg.md - Multi-row semantic aggregation and summarization.
- AI.CAUSAL_EFFECT: ai_causal_effect.md - Quantifies the impact of an intervention on a time series.
- AI.CLASSIFY: ai_classify.md - Classify text.
- AI.DETECT_ANOMALIES: ai_detect_anomalies.md - Detect anomalies.
- AI.EVALUATE: ai_evaluate.md - Evaluate models.
- AI.FORECAST: ai_forecast.md - Time-series forecasting.
- AI.GENERATE: ai_generate.md - Generate text using LLMs.
- AI.GENERATE_EMBEDDING: ai_generate_embedding.md - Generate embeddings.
- AI.GENERATE_TABLE: ai_generate_table.md - Table-valued AI generation.
- AI.IF: ai_if.md - Evaluate semantic conditions.
- AI.KEY_DRIVERS: ai_key_drivers.md - Identifies key drivers, this is a TVF.
- AI.SCORE: ai_score.md - Score data.
- AI.SEARCH: ai_search.md - Semantic search.
- AI.SIMILARITY: ai_similarity.md - Semantic similarity.
- Remote Models: remote_models.md - Working with remote models (Vertex AI).
- CONTRIBUTION_ANALYSIS:
ml_contribution_analysis.md
- Finds contributing factors, key drivers of change. Requires creating a MODEL entity.
- ML.CORRELATION: ml_correlation.md - Calculates correlation between columns, optionally sliced by dimensions.
- ML.DETECT_CHANGE_POINTS: ml_detect_change_points.md - Detects structural breaks or sustained shifts in a time series.
- ML.SEASONALITY: ml_seasonality.md - Extracts seasonal components from a time series.
- ML.TREND: ml_trend.md - Extracts the long-term trend component from a time series.
- VECTOR_SEARCH: vector_search.md - Vector search best practices.
Related Skills
- BigQuery Basics Skill: SKILL.md file for core BigQuery concepts, resource management, CLI, and client libraries.