Skip to main content
skill CX Codex

databricks-ai-functions — Claude Code skill: AI functions in SQL

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add databricks/databricks-agent-skills --skill databricks-ai-functions -a claude-code
Open on GitHub

What databricks-ai-functions 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.

What it helps with

  • 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 for the agent

  • 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

How to install databricks-ai-functions

1Skills CLI (Vercel)

npx skills add databricks/databricks-agent-skills --skill databricks-ai-functions -a claude-code

2Manually: put the files in place

~/.claude/skills/databricks-ai-functions/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/databricks-ai-functions/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about databricks-ai-functions

How do I install databricks-ai-functions in Claude?

Run npx skills add databricks/databricks-agent-skills --skill databricks-ai-functions -a claude-code. The skill lands in ~/.claude/skills/databricks-ai-functions/SKILL.md.

What does databricks-ai-functions do?

It gives your agent a reference for Databricks built-in AI functions plus call templates for SQL and PySpark. It also covers document parsing and building a RAG pipeline.

Which Databricks Runtime versions are required?

Baseline is DBR 15.1+ for notebooks or 15.4 ML LTS for batch, in a region that supports AI Functions. ai_parse_document needs 17.3+ and ai_prep_search needs 18.2+.

Similar skills

All skills for Data and databases →

From the same set7

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor