Index of every page on this site: llms.txt
All skills
google avatar

/bigquery-ai-ml

@5fb62c2
by googlegoogle/skills24k stars
2,026
Run it yourself

Leverages BigQuery's built-in machine learning and GenAI capabilities for advanced data analytics. Use when you need to write SQL queries that perform time-series forecasting, predict values, detect outliers or anomalies, find key drivers, perform semantic search or vector search, classify text, calculate similarity, summarize content, translate language, evaluate models, filter by semantic conditions, measure the causal effect of an intervention, compute correlations between columns, generate descriptive statistics and table distribution profiles, detect change points or structural breaks, extract trend or seasonality components, or leverage generative AI capabilities in BigQuery. Do not use for general BigQuery dataset, table, or job management requests.

Use this Skill: https://skilld.dev/gh/google/skills/bigquery-ai-ml

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈196 tokens for metadata: the name and description. ≈2k when used: this file. ≈28k more on demand in 24 files.

Description uses 9.8% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈783 characters, or 9.8%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

BigQuery 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.

Function Selection & Reference Directory

Function Reference SQL Shape Requires CREATE MODEL or CREATE VECTOR INDEX? When to Use & Disambiguation
AI.AGG ai_agg.md Aggregate No Multi-row semantic aggregation with GROUP BY; synthesizes one summary string across many rows (unlike per-row AI.GENERATE).
AI.CAUSAL_EFFECT ai_causal_effect.md TVF No Quantifies counterfactual post-intervention impact on a time series after a specific treatment timestamp.
AI.CLASSIFY ai_classify.md Scalar No Semantic classification of text or multimodal unstructured data into predefined category labels.
AI.DETECT_ANOMALIES ai_detect_anomalies.md TVF No Zero-shot TimesFM detector for isolated time-series point anomalies/outliers (use ML.DETECT_CHANGE_POINTS for sustained shifts).
AI.EVALUATE ai_evaluate.md TVF No Zero-shot TimesFM time-series forecast evaluation/backtesting against a historical holdout split.
AI.FORECAST ai_forecast.md TVF No Zero-shot TimesFM time-series forecasting without training a custom model.
AI.GENERATE ai_generate.md Scalar No Default for per-row LLM text or multimodal structured extraction (output_schema); returns STRUCT. Prefer over AI.GENERATE_TABLE.
AI.GENERATE_EMBEDDING ai_generate_embedding.md TVF Yes Batch generates ARRAY<FLOAT64> vector embeddings for text or visual content using a remote embedding model.
AI.GENERATE_TABLE ai_generate_table.md TVF Yes Table-valued structured extraction (FROM clause); only use instead of AI.GENERATE when a remote model + TVF is explicitly needed.
AI.IF ai_if.md Scalar No Evaluates boolean semantic conditions (BOOL) on text or multimodal data for WHERE/CASE/JOIN filtering (do not use AI.GENERATE_TABLE).
AI.KEY_DRIVERS ai_key_drivers.md TVF No Default one-step attribution of dimensional segments driving metric changes (interest_label_col TRUE vs. FALSE). Prefer over CONTRIBUTION_ANALYSIS.
AI.PREDICT ai_predict.md TVF No Zero-shot TabFM foundation model for tabular classification or regression without training and managing custom models.
AI.SCORE ai_score.md Scalar No Assigns a continuous FLOAT64 semantic score to text or multimodal data for ranking or sorting (ORDER BY).
AI.SEARCH ai_search.md TVF No Simplified semantic search using a raw string query on tables with autonomous background embeddings (AI.EMBED generated column).
AI.SIMILARITY ai_similarity.md Scalar No Computes an on-the-fly semantic similarity score (FLOAT64) between two text or multimodal inputs without stored embeddings.
Remote Models remote_models.md CREATE MODEL Yes Creates a Vertex AI REMOTE WITH CONNECTION DEFAULT model entity for functions that require one (AI.GENERATE_TABLE, AI.GENERATE_EMBEDDING, VECTOR_SEARCH).
CONTRIBUTION_ANALYSIS ml_contribution_analysis.md CREATE MODEL Yes Model-based driver analysis (CREATE MODEL ... OPTIONS(MODEL_TYPE='CONTRIBUTION_ANALYSIS') + ML.GET_INSIGHTS). Use AI.KEY_DRIVERS unless a MODEL entity is required.
ML.CORRELATION ml_correlation.md TVF No Calculates statistical correlation coefficients between numeric columns, optionally sliced by dimensions.
ML.DESCRIBE_DATA ml_describe_data.md TVF No Generates descriptive statistics (e.g., count, mean, median, min, max, stddev, quantiles, nulls, top values) for columns in a table or subquery.
ML.DETECT_CHANGE_POINTS ml_detect_change_points.md TVF No Detects structural breaks or sustained shifts ([begin_timestamp, end_timestamp] intervals) in a time series.
ML.SEASONALITY ml_seasonality.md TVF No Extracts recurring periodic/seasonal components from a historical time series.
ML.TREND ml_trend.md TVF No Extracts the smoothed long-term trend component from a historical time series.
VECTOR_SEARCH vector_search.md TVF Yes Searches pre-computed ARRAY<FLOAT64> embedding columns between a base table and query table (paired with AI.GENERATE_EMBEDDING, unlike AI.SEARCH).

Related Skills

  • BigQuery Basics Skill: SKILL.md file for core BigQuery concepts, resource management, CLI, and client libraries.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning13d3 checks · Risk SAFE
  • Gen Agent Trust Hub13d

    This skill provides instructions for utilizing BigQuery AI and ML functions for data analysis. Published by a trusted vendor, it follows standard cloud service integration practices. Primary security considerations include the potential for indirect prompt injection during data processing and the use of telemetry tags for vendor attribution.

  • Socket13d

    No alerts

  • Snyk13d

    Risk: MEDIUM · 1 issue

Signed by skilld at 5fb62c2. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 2 weeks ago
Other metadata
metadata
{
  "version": "1.1.2",
  "category": "AiAndMachineLearning",
  "publisher": "google"
}

README badge

README badge for google/skills/bigquery-ai-ml