# databricks-ai-functions

A skill that teaches your agent to call Databricks built-in AI functions from SQL and PySpark. Useful when a pipeline needs a model without endpoint setup.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 306 installs · ★ 368
- Author: databricks
- License: LicenseRef-Unknown · policy=link-only · description only; the file stays with the author
- Source: https://github.com/databricks/databricks-agent-skills/tree/HEAD/skills/databricks-ai-functions/SKILL.md
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/skills/databricks-ai-functions

## What it does

The skill documents Databricks built-in functions: classification, field extraction, summarization, PII masking, translation, grammar fixing, generation, sentiment analysis, semantic similarity, document parsing, search prep, arbitrary endpoint queries and time series forecasting. Your agent gets a reference per function — input types, output shape, extra prerequisites.

It also ships task patterns and call templates. Classification and extraction return VARIANT, so you read fields with the `:` operator, for example `:response[0]::STRING`. In PySpark the same calls go inside `expr(...)`. A separate section walks through a RAG pipeline: parse a document, chunk it, index, then query.

Baseline requirements are shared: DBR 15.1+ in notebooks or 15.4 ML LTS for batch, not SQL Warehouse Classic, and a region that supports AI Functions. Document parsing needs DBR 17.3+, search prep needs 18.2+. `ai_query` and `ai_forecast` add their own: a Pro or Serverless warehouse and `CAN QUERY` on the endpoint. Every call is a model inference billed per token and it is slow, so materialize the result into a Delta table once and query that cheap output afterwards. That part matters — re-invoking the function on every downstream query is how token bills get out of hand.

## Requirements
- Works with: Databricks

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add databricks/databricks-agent-skills --skill databricks-ai-functions -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/databricks-ai-functions/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/databricks-ai-functions/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add databricks/databricks-agent-skills --skill databricks-ai-functions -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/databricks-ai-functions/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add databricks/databricks-agent-skills --skill databricks-ai-functions -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/databricks-ai-functions/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install databricks/databricks-agent-skills databricks-ai-functions
```

2. **Manually: put the files in place**
- File: `.github/skills/databricks-ai-functions/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add databricks/databricks-agent-skills --skill databricks-ai-functions -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/databricks/databricks-agent-skills --path skills/databricks-ai-functions
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/databricks-ai-functions/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add databricks/databricks-agent-skills --skill databricks-ai-functions -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/databricks/databricks-agent-skills/tree/HEAD/skills/databricks-ai-functions/SKILL.md

## When to use it
- route support tickets into fixed labels without a separate service
- pull structured fields out of text inside a SQL query
- redact personal data before an export
- build a RAG pipeline from PDFs: parse, chunk, index, query
- forecast a time series from an observations table

## Example prompts
- Write a SQL query using ai_classify on the content column with labels technical, billing, other
- How do I read the response field from the VARIANT that ai_extract returns?
- Build a pipeline: ai_parse_document, then ai_prep_search, then index and query

## Similar
- [neon-ai-gateway](https://affpapa.org/en/nevibecode/skills/neon-ai-gateway.md) — skill · 27700 installs
- [sql-queries](https://affpapa.org/en/nevibecode/skills/sql-queries.md) — skill · 4500 installs
- [migrating-dbt-project-across-platforms](https://affpapa.org/en/nevibecode/skills/migrating-dbt-project-across-platforms.md) — skill · 526 installs
- [neo4j-graphrag-skill](https://affpapa.org/en/nevibecode/skills/neo4j-graphrag-skill.md) — skill · 1100 installs
- [rag-engineer](https://affpapa.org/en/nevibecode/skills/sickn33-rag-engineer.md) — skill · 1000 installs
- [senior-ml-engineer](https://affpapa.org/en/nevibecode/skills/senior-ml-engineer.md) — skill · 915 installs

From the same set: [databricks/databricks-agent-skills](https://affpapa.org/en/nevibecode/by/databricks/databricks-agent-skills.md) — 12 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
