agentleFS
Google CloudKnown publisherGoogleCloudPlatform/bigquery-data-analytics-plugin/skills/bigquery-ai-ml/SKILL.md

bigquery-ai-ml

Skill52 starsChanged 6 days agoApache-2.0View on GitHub

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.

7 other projects use a version of this, 6 of them edited.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

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.

Function Selection & Reference Directory

FunctionReferenceSQL ShapeRequires CREATE MODEL or CREATE VECTOR INDEX?When to Use & Disambiguation
AI.AGGai_agg.mdAggregateNoMulti-row semantic aggregation with GROUP BY; synthesizes 1 summary string across many rows (unlike per-row AI.GENERATE).
AI.CAUSAL_EFFECTai_causal_effect.mdTVFNoQuantifies counterfactual post-intervention impact on a time series after a specific treatment timestamp.
AI.CLASSIFYai_classify.mdScalarNoSemantic classification of text or multimodal unstructured data into predefined category labels.
AI.DETECT_ANOMALIESai_detect_anomalies.mdTVFNoZero-shot TimesFM detector for isolated time-series point anomalies/outliers (use ML.DETECT_CHANGE_POINTS for sustained regime shifts).
AI.EVALUATEai_evaluate.mdTVFNoZero-shot TimesFM time-series forecast evaluation/backtesting against a historical holdout split.
AI.FORECASTai_forecast.mdTVFNoZero-shot TimesFM time-series forecasting without training a custom model.
AI.GENERATEai_generate.mdScalarNoDefault for per-row LLM text or multimodal structured extraction (output_schema); returns STRUCT. Prefer over AI.GENERATE_TABLE.
AI.GENERATE_EMBEDDINGai_generate_embedding.mdTVFYesBatch generates ARRAY<FLOAT64> vector embeddings for text or visual content using a remote embedding model.
AI.GENERATE_TABLEai_generate_table.mdTVFYesTable-valued structured extraction (FROM clause); only use instead of AI.GENERATE when a remote model + TVF is explicitly needed.
AI.IFai_if.mdScalarNoEvaluates boolean semantic conditions (BOOL) on text or multimodal data for WHERE/CASE/JOIN filtering (do not use AI.GENERATE_TABLE).
AI.KEY_DRIVERSai_key_drivers.mdTVFNoDefault one-step attribution of dimensional segments driving metric changes (interest_label_col TRUE vs. FALSE). Prefer over CONTRIBUTION_ANALYSIS.
AI.PREDICTai_predict.mdTVFNoZero-shot TabFM foundation model for tabular classification or regression without training and managing custom models.
AI.SCOREai_score.mdScalarNoAssigns a continuous FLOAT64 semantic score to text or multimodal data for ranking or sorting (ORDER BY).
AI.SEARCHai_search.mdTVFNoSimplified semantic search using a raw string query on tables with autonomous background embeddings (AI.EMBED generated column).
AI.SIMILARITYai_similarity.mdScalarNoComputes an on-the-fly semantic similarity score (FLOAT64) between two text or multimodal inputs without stored embeddings.
Remote Modelsremote_models.mdCREATE MODELYesCreates a Vertex AI REMOTE WITH CONNECTION DEFAULT model entity for functions that require one (AI.GENERATE_TABLE, AI.GENERATE_EMBEDDING, VECTOR_SEARCH).
CONTRIBUTION_ANALYSISml_contribution_analysis.mdCREATE MODELYesModel-based driver analysis (CREATE MODEL ... OPTIONS(MODEL_TYPE='CONTRIBUTION_ANALYSIS') + ML.GET_INSIGHTS). Use AI.KEY_DRIVERS unless a MODEL entity is required.
ML.CORRELATIONml_correlation.mdTVFNoCalculates statistical correlation coefficients between numeric columns, optionally sliced by dimensions.
ML.DESCRIBE_DATAml_describe_data.mdTVFNoGenerates descriptive statistics (e.g., count, mean, median, min, max, stddev, quantiles, nulls, top values) for columns in a table or subquery.
ML.DETECT_CHANGE_POINTSml_detect_change_points.mdTVFNoDetects structural breaks or sustained regime shifts ([begin_timestamp, end_timestamp] intervals) in a time series.
ML.SEASONALITYml_seasonality.mdTVFNoExtracts recurring periodic/seasonal components from a historical time series.
ML.TRENDml_trend.mdTVFNoExtracts the smoothed long-term trend component from a historical time series.
VECTOR_SEARCHvector_search.mdTVFYesSearches pre-computed ARRAY<FLOAT64> embedding columns between a base table and query table (paired with AI.GENERATE_EMBEDDING, unlike AI.SEARCH).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.