databricks-ai-runtime
Databricks AI Runtime, the `databricks air` CLI commands for submitting and managing GPU training workloads on Databricks…
Use Databricks built-in AI Functions (ai_classify, ai_decide, ai_extract, ai_summarize, ai_mask, ai_translate, ai_fix_grammar, ai_gen, ai_analyze_sentiment, ai_similarity, ai_parse_document, ai_prep_search, ai_query, ai_forecast) to add AI capabilities directly to SQL and
Claude Code
$ npx -y skills add databricks/databricks-agent-skills --skill databricks-ai-functions --agent claude-code
Codex
$ npx skills add databricks/databricks-agent-skills --skill databricks-ai-functions -a codex -y
Cursor
$ npx skills add databricks/databricks-agent-skills --skill databricks-ai-functions -a cursor -y
Gemini CLI
$ npx skills add databricks/databricks-agent-skills --skill databricks-ai-functions -a gemini-cli -y
GitHub Copilot
$ npx skills add databricks/databricks-agent-skills --skill databricks-ai-functions -a github-copilot -y
OpenCode
$ npx skills add databricks/databricks-agent-skills --skill databricks-ai-functions -a opencode -y
Windsurf
$ npx skills add databricks/databricks-agent-skills --skill databricks-ai-functions -a windsurf -y
name: databricks-ai-functions description: "Use Databricks built-in AI Functions (ai_classify, ai_decide, ai_extract, ai_summarize, ai_mask, ai_translate, ai_fix_grammar, ai_gen, ai_analyze_sentiment, ai_similarity, ai_parse_document, ai_prep_search, ai_query, ai_forecast) to add AI capabilities directly to SQL and PySpark pipelines without managing model endpoints. Also covers document parsing and building custom RAG pipelines (parse → prep_search → index → query)." compatibility: Requires databricks CLI (>= v1.0.0) metadata: version: "0.3.0" parent: databricks-core
> **Official Docs:** https://docs.databricks.com/large-language-models/ai-functions > Individual function reference: https://docs.databricks.com/sql/language-manual/sql-ref-functions-builtin
Databricks AI Functions are built-in SQL and PySpark functions that call Foundation Model APIs directly from your data pipelines — no model endpoint setup, no API keys, no boilerplate. They operate on table columns as naturally as `UPPER()` or `LENGTH()`, and are optimized for batch inference at scale.
**Always prefer a task-specific function over `ai_query`.** Reach for `ai_query` only when no task function fits (custom/external endpoints, multimodal, or JSON beyond `ai_extract`'s limits). Every function below shares a baseline: **DBR 15.1+** (notebooks) / **15.4 ML LTS** (batch), **not on SQL Warehouse Classic**, and region must support AI Functions — the Prereqs column lists only what's *additional*.
**Cost & speed — each call is an LLM inference (slow and billed per token).** Run a function **once** per row and persist the result to a Delta table; never re-invoke it on every downstream query. In demos, **avoid generating tables with millions of rows** — sample the input when needed so the demo runs quickly. Materialize once, then query the cheap Delta output.
The **Function** column links to the in-repo deep reference (full options, schemas, examples); **Docs** links to the official page.
| Function | Task | Input | Output | Extra prereqs | Docs | |---|---|---|---|---|---| | [`ai_analyze_sentiment`](references/1-task-functions.md#ai_analyze_sentiment) | Sentiment scoring | `content STRING` | `STRING` — `positive`/`negative`/`neutral`/`mixed`, or `NULL` | — | [↗](https://docs.databricks.com/sql/language-manual/functions/ai_analyze_sentiment) | | [`ai_classify`](references/1-task-functions.md#ai_classify) | Fixed-label routing | `content STRING\|VARIANT`, `labels` (2–500), `[options MAP]` | v2.1 `VARIANT` — `{response:[{value:label}], error_message, metadata}` | — | [↗](https://docs.databricks.com/sql/language-manual/functions/ai_classify) | | [`ai_decide`](references/1-task-functions.md#ai_decide) | Evaluate questions (boolean / choice / score) over text or structured data | `state STRING\|VARIANT`, `questions STRING` (JSON), `[options MAP]` | `VARIANT` — `{response:{answers}, metadata, error_message}` | Beta; admin-gated via Previews | [↗](https://docs.databricks.com/sql/language-manual/functions/ai_decide) | | [`ai_extract`](references/1-task-functions.md#ai_extract) | Entity / field extraction | `content STRING\|VARIANT`, `schema STRING` (JSON), `[options MAP]` | v2.1 `VARIANT` — `{response:{field:{value:…}}, error_message, metadata}` | ≤256 fields, ≤12 nesting levels | [↗](https://docs.databricks.com/sql/language-manual/functions/ai_extract) | | [`ai_fix_grammar`](references/1-task-functions.md#ai_fix_grammar) | Grammar correction | `content STRING` | `STRING` (corrected) | — | [↗](https://docs.databricks.com/sql/language-manual/functions/ai_fix_grammar) | | [`ai_gen`](references/1-task-functions.md#ai_gen) | Free-form generation | `prompt STRING` | `STRING` | — | [↗](https://docs.databricks.com/sql/language-manual/functions/ai_gen) | | [`ai_mask`](references/1-task-functions.md#ai_mask) | PII redaction | `content STRING`, `labels ARRAY<STRING>` | `STRING` (entities → `[MASKED]`) | — | [↗](https://docs.databricks.com/sql/language-manual/functions/ai_mask) | | [`ai_similarity`](references/1-task-functions.md#ai_similarity) | Semantic similarity | `expr1 STRING`, `expr2 STRING` | `FLOAT` (0.0–1.0) | — | [↗](https://docs.databricks.com/sql/language-manual/functions/ai_similarity) | | [`ai_summarize`](references/1-task-functions.md#ai_summarize) | Summarization | `content STRING`, `[max_words INT]` (0 = uncapped) | `STRING` | Public Preview; English-tuned | [↗](https://docs.databricks.com/sql/language-manual/functions/ai_summarize) | | [`ai_translate`](references/1-task-functions.md#ai_translate) | Translation | `content STRING`, `to_lang STRING` | `STRING` | Langs: en, fr, de, hi, it, pt, es, th | [↗](https://docs.databricks.com/sql/language-manual/functions/ai_translate) | | [`ai_parse_document`](references/1-task-functions.md#ai_parse_document) | Parse PDF / Office / images | `content BINARY`, `[Map('version','2.0', …)]` | `VARIANT` — pages, elements, error_status | **DBR 17.3+**; ≤500 pages / 100 MB | [↗](https://docs.databricks.com/sql/language-manual/functions/ai_parse_document) | | [`ai_prep_search`](references/1-task-functions.md#ai_prep_search) | RAG chunking from parsed docs or text | `parsed VARIANT\|STRING`, `[options MAP]` | `VARIANT` — `{document:{contents, pages, source_uri}, error_status}` | **DBR 18.2+** (serverless env v3+) | [↗](https://docs.databricks.com/sql/language-manual/functions/ai_prep_search) | | [`ai_query`](references/2-ai-query.md) | Hosted model service or custom serving endpoint, multimodal, complex JSON (**last resort**) | `endpoint STRING`, `request STRING\|STRUCT`, `[returnType]`, `[failOnError BOOL]`, `[modelParameters STRUCT]`, `[responseFormat STRING]`, `[files]` | Parsed response; with `failOnError => false` a `STRUCT{response, errorMessage}` | **Pro/Serverless** warehouse; `EXECUTE` on model service or `CAN QUERY` on serving endpoint | [↗](https://docs.databricks.com/sql/language-manual/functions/ai_query) | | [`ai_forecast`](references/3-
Build on Databricks with AI coding agents such as Claude Code, Cursor, Codex, GitHub Copilot, and many others. This repository provides the skills and agent plugins for Databricks AI Tools.
Databricks AI Runtime, the `databricks air` CLI commands for submitting and managing GPU training workloads on Databricks…
Create Databricks AI/BI dashboards. Must use when creating, updating, or deploying Lakeview dashboards as Databricks Dashboard…
Design the UX of custom-code Databricks Apps (AppKit/React) data screens — KPI/overview pages, reports, charts, tables, and…
Python backend for Databricks Apps — FastAPI (default), Flask, Dash, Streamlit, Gradio, Reflex. **Default for a new Databricks…
Build apps on Databricks Apps platform. Use when asked to create data apps, analytics tools, or custom interactive…
Databricks CLI operations and the parent/entry-point skill for Databricks CLI use: authentication, profile selection, and…
Use this skill to extract structured Markdown/JSON from PDFs and document images—tables with cell-level precision, formulas as…
Estimates intracellular metabolic fluxes from steady-state carbon-13 isotope-tracing measurements using validated atom maps,…