databricks-ai-functions
Use Databricks built-in AI Functions (ai_classify, ai_extract, ai_summarize, ai_mask, ai_translate, ai_fix_grammar, ai_gen, ai_analyze_sentiment…
Skill by ThomazRossito
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/thomazrossito-databricks-ai-functions-202410
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, backend, ml
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/databricks-ai-functions
What's inside
- Skill name
databricks-ai-functions- Description
- Use Databricks built-in AI Functions (ai_classify, ai_extract, ai_summarize, ai_mask, ai_translate, ai_fix_grammar, ai_gen, ai_analyze_sentiment, ai_similarity, ai_parse_document, 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 → chunk → index → query).
- License
- MIT
- Instructions
- 192 lines in SKILL.md · view on GitHub
Files (5)
- 1-task-functions.md
- 2-ai-query.md
- 3-ai-forecast.md
- 4-document-processing-pipeline.md
- SKILL.md
SKILL.md (first lines)
# Databricks AI Functions
> **Official Docs:** https://docs.databricks.com/aws/en/large-language-models/ai-functions
> Individual function reference: https://docs.databricks.com/aws/en/sql/language-manual/functions/
## Overview
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.
There are three categories:
| Category | Functions | Use when |
|---|---|---|
| **Task-specific** | `ai_analyze_sentiment`, `ai_classify`, `ai_extract`, `ai_fix_grammar`, `ai_gen`, `ai_mask`, `ai_similarity`, `ai_summarize`, `ai_translate`, `ai_parse_document` | The task is well-defined — prefer these always |
| **General-purpose** | `ai_query` | Complex nested JSON, custom endpoints, multimodal — **last resort only** |
| **Table-valued** | `ai_forecast` | Time series forecasting |
**Function selection rule — always prefer a task-specific function over `ai_query`:**
| Task | Use this | Fall back to `ai_query` when... |
|---|---|---|
| Sentiment scoring | `ai_analyze_sentiment` | Never |
| Fixed-label routing | `ai_classify` (2–500 labels; add descriptions for accuracy) | Never |
| Entity / field extraction | `ai_extract` | Never |
| Summarization | `ai_summarize` | Never — use `max_words=0` for uncapped |
| Grammar correction | `ai_fix_grammar` | Never |
| Translation | `ai_translate` | Target language not in the supported list |
| PII redaction | `ai_mask` | Never |
| Free-form generation | `ai_gen` | Need structured JSON output |
| Semantic similarity | `ai_similarity` | Never |
| PDF / document parsing | `ai_parse_document` | Need image-level reasoning |
| Complex JSON / reasoning | — | **This is the intended use case for `ai_query`** |
## Prerequisites
- Databricks SQL warehouse (**not Classic**) or cluster with DBR **15.1+**
- DBR **15.4 ML LTS** recommended for batch workloads
- DBR **17.1+** required for `ai_parse_document`
- `ai_forecast` requires a **Pro or Serverless** SQL warehouse
- Workspace in a supported AWS/Azure region for batch AI inference
- Models run under Apache 2.0 or LLAMA 3.3 Community License — customers are responsible for compliance
## Quick Start
Classify, extract, and score sentiment from a text column in a single query:
```sql
SELECT
ticket_id,
ticket_text,
ai_classify(ticket_text, ARRAY('urgent', 'not urgent', 'spam')) AS priority,
ai_extract(ticket_text, ARRAY('product', 'error_code', 'date')) AS entities,
ai_analyze_sentiment(ticket_text) AS sentiment
FROM support_tickets;
```
```python
from pyspark.sql.functions import expr
df = spark.table("support_tickets")
df = (
df.withColumn("priority", expr("ai_classify(ticket_text, array('urgent', 'not urgent', 'spam'))"))
.withColumn("entities", expr("ai_extract(ticket_text, array('product', 'error_code', 'date'))"))
.withColumn("sentiment", expr("ai_analyze_sentiment(ticket_text)"))
)
# Access nested STRUCT fields from ai_extract
df.select("ticket_id", "priority", "sentiment",
"entities.product", "entities.error_code", "entities.date").display()
```
## Common Patterns
### Pattern 1: Text Analysis Pipeline
Chain multiple task-specific functions to enrich a text column in one pass:
```sql
SELECT
id,
content,
ai_analyze_sentiment(content) AS sentiment,
ai_summarize(content, 30) AS summary,
ai_classify(content,
ARRAY('technical', 'billing', 'other')) AS category,
ai_fix_grammar(content) AS content_clean
FROM raw_feedback;
```
### Pattern 2: PII Redaction Before Storage
```python
from pyspark.sql.functions import expr
df_clean = (
spark.table("raw_messages")
.withColumn(
"message_safe",
expr("ai_mask(message, array('person', 'email', 'phone', 'address'))")
)
)
df_clean.write.format("delta").mode("append").saveAsTable("catalog.schema.messages_safe")
```
### Pattern 3: Document Ingestion from a Unity Catalog Volume
Parse PDFs/Office docs, then enrich with task-specific functions:
```python
from pyspark.sql.functions import expr
df = (
spark.read.format("binaryFile")
.load("/Volumes/catalog/schema/landing/documents/")
.withColumn("parsed", expr("ai_parse_document(content)"))
.selectExpr("path",
"parsed:pages[*].elements[*].content AS text_blocks",
"parsed:error AS parse_error")
.filter("parse_error IS NULL")
.withColumn("summary", expr("ai_summarize(text_blocks, 50)"))From ThomazRossito/data-agents, MIT.
More from ThomazRossito/data-agents
- 0.544score
databricks-spark-declarative-pipelines
ThomazRossito
Creates, configures, and updates Databricks Lakeflow Spark Declarative Pipelines (SDP/LDP) using serverless compute.
SkillCFreshness: C★ 32Claude Code +9 - 0.544score
databricks-execution-compute
ThomazRossito
Execute code and manage compute on Databricks.
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-jobs
ThomazRossito
Use this skill proactively for ANY Databricks Jobs task - creating, listing, running, updating, or deleting jobs.
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-lakebase-provisioned
ThomazRossito
Patterns and best practices for Lakebase Provisioned (Databricks managed PostgreSQL) for OLTP workloads.
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-vector-search
ThomazRossito
Patterns for Databricks Vector Search: create endpoints and indexes, query with filters, manage embeddings.
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-genie
ThomazRossito
Create and query Databricks Genie Spaces for natural language SQL exploration.
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-app-python
ThomazRossito
Builds Python-based Databricks applications using Dash, Streamlit, Gradio, Flask, FastAPI, or Reflex.
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-bundles
ThomazRossito
Create and configure Declarative Automation Bundles (formerly Asset Bundles) with best practices for multi-environment deployments (CICD).
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-lakebase-autoscale
ThomazRossito
Patterns and best practices for Lakebase Autoscaling (next-gen managed PostgreSQL).
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-lakeflow-connect
ThomazRossito
Patterns and best practices for LakeFlow Connect — Databricks native managed ingestion for streaming data from SaaS applications and databases into Unity…
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-agent-bricks
ThomazRossito
Create and manage Databricks Agent Bricks: Knowledge Assistants (KA) for document Q&A, Genie Spaces for SQL exploration, and Supervisor Agents (MAS) for…
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-model-serving
ThomazRossito
Deploy and query Databricks Model Serving endpoints.
SkillCFreshness: C★ 32Claude Code +9
Signals
- Stars
- 32
- Forks
- 18
- Open issues
- 0
- Last commit (this folder)
- May 5, 2026 (5 months ago)
- Last release
- Apr 18, 2026 (6 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/ThomazRossito/data-agents
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from ThomazRossito
- 0.544score
databricks-spark-declarative-pipelines
ThomazRossito
Creates, configures, and updates Databricks Lakeflow Spark Declarative Pipelines (SDP/LDP) using serverless compute.
SkillCFreshness: C★ 32Claude Code +9 - 0.544score
databricks-execution-compute
ThomazRossito
Execute code and manage compute on Databricks.
SkillCFreshness: C★ 32Claude Code +9 - 0.543score
azure-devops-engineer
ThomazRossito
Playbook operacional do Azure DevOps (Repos, Pipelines, Boards, Artifacts, Test Plans) via MCP oficial microsoft/azure-devops-mcp.
SkillBFreshness: B★ 4Claude Code +9 - 0.539score
databricks-app-python
ThomazRossito
Builds Python-based Databricks applications using Dash, Streamlit, Gradio, Flask, FastAPI, or Reflex.
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-bundles
ThomazRossito
Create and configure Declarative Automation Bundles (formerly Asset Bundles) with best practices for multi-environment deployments (CICD).
SkillCFreshness: C★ 32Claude Code +9 - 0.539score
databricks-vector-search
ThomazRossito
Patterns for Databricks Vector Search: create endpoints and indexes, query with filters, manage embeddings.
SkillCFreshness: C★ 32Claude Code +9
Cite this page
databricks-ai-functions skill. Agent Mart. https://agentmart.dev/skills/thomazrossito-databricks-ai-functions-202410 (last updated 2026-10-24)