What you will be able to do
- Map the output a business requirement needs to a foundation model task type: chat, embeddings, vision or reasoning
- Pick the task-specific AI Function (ai_extract, ai_classify, ai_summarize, ai_analyze_sentiment and others) that matches a requirement, and recognise when to fall back to ai_query
- Choose a packaged Agent Bricks product when a requirement is document question-answering or document field extraction
- Break one business requirement into an ordered chain of model tasks where each output feeds the next
Key concept
Model task — The single kind of transformation a model performs: turning text into labels, fields, a summary, a vector, or a conversational answer. You choose it by looking at the output the business needs, then pick the narrowest function or model that produces exactly that output.
1.Start from the output: the four foundation model task types
A business requirement is stated in business terms, such as "route tickets faster" or "let staff ask questions about manuals", but a model only does one kind of thing. Before you choose a model or a function, work out what the result has to be: a label, a set of fields, a paragraph, a vector, or a conversation. Classical ML scoping asks the same question: what is the prediction target, and what class of problem does that imply? Generative AI applications follow the same discipline.
Databricks groups its hosted foundation models into four task types. General purpose (chat) models are built for natural, multi-turn conversation and produce text answers. Embeddings models produce no text at all. They turn text, images or audio into compact numerical vectors, which you compare, cluster or search. Vision models take images and video as input. Reasoning models are built to break a task down and explain their decisions, and their recommended uses include code generation, content creation and agent orchestration.
| Task type | What it produces or handles | Recommended use cases | Example Databricks-hosted models |
|---|---|---|---|
| General purpose (chat) | Contextual, multi-turn text responses | Virtual assistants, customer support bots, interactive tutoring | databricks-claude-sonnet-5-5, databricks-meta-llama-3-3-70b-instruct |
| Embeddings | Numerical vectors that capture meaning | Semantic search, RAG, topic clustering, sentiment analysis and text analytics | databricks-gte-large-en, databricks-bge-large-en, databricks-qwen3-embedding-0-6b |
| Vision | Interpretation of images and video | Object detection, image classification, image segmentation, document understanding | databricks-gemma-3-12b, databricks-llama-4-maverick |
| Reasoning | Step-by-step analysis and explained decisions | Code generation, content creation and summarization, agent orchestration | databricks-gpt-oss-120b, databricks-claude-opus-5-5 |
People most often go wrong with embeddings. A requirement for semantic search or a retrieval step needs an embeddings model, because the job is to find similar content. A requirement for a written answer needs a chat or reasoning model. When a user wants an answer grounded in documents, the application needs both: embeddings to retrieve the passages, then a generative model to write the reply.
Embeddings. Topic clustering is a listed embeddings use case. You compare vectors to find natural groupings. A chat model writes text one prompt at a time and gives you nothing to cluster on.
Checkpoint 1 of 8· Match them up
Match each business requirement to the foundation model task type that serves it.
Tap a term, then the definition that fits it.
Choose the task type by the output you need. Chat models produce multi-turn text answers. Embeddings models produce vectors for similarity search and no text. Vision models interpret images. Reasoning models break tasks down, explain their decisions and orchestrate agents.
“transform complex data—such as text, images, or audio—into compact numerical vectors called embeddings”Source: docs.databricks.com
2.Task-specific AI Functions: one function per output
Many requirements are batch transformations over data already in tables, and for those Databricks provides task-specific AI Functions. You call them from SQL, notebooks, Lakeflow pipelines and Workflows. Each one is scoped to one task and runs on Databricks-managed, research-backed systems. Databricks recommends them as the starting point because they need no customization: you don't write or tune a prompt.
The output tells extraction and classification apart. Extraction (ai_extract) returns several named values per document, defined by a schema you write, so it suits a requirement like "load start date, renewal term and counterparty into columns". Classification (ai_classify) returns a category chosen from labels you provide, so it suits "tag every email as Billing, Technical Issue, Cancellation or General Inquiry". A summary in the first case would leave someone parsing prose to fill columns. Extraction in the second case would give you order numbers and names, but no routing label.
| The requirement needs… | Function | What the function does |
|---|---|---|
| Named fields in a fixed schema | ai_extract | Extract structured fields from documents or text using a schema you define |
| One label from a known set | ai_classify | Classify input text according to labels you provide |
| A short version of long text | ai_summarize | Generate a summary of text |
| Positive or negative tone | ai_analyze_sentiment | Perform sentiment analysis on input text |
| Text and tables out of PDFs or images | ai_parse_document | Parse text, tables, figure descriptions and layout from unstructured documents |
| Text in another language | ai_translate | Translate text to a specified target language |
| Sensitive entities hidden before downstream use | ai_mask | Mask specified entities in text |
| A semantic similarity score | ai_similarity | Compare two strings and compute a similarity score |
| A free-form answer to a prompt | ai_gen | Answer a user-provided prompt |
Free-form generation is the right task only when the requirement actually asks for new prose, such as a drafted reply or a press release. Choosing generation when a label or a field is wanted leaves every downstream step interpreting open text that a classifier or extractor would have handed over directly. Classification also scales to large label sets: Databricks documents support for up to 500+ predefined categories.
Checkpoint 2 of 8· Check yourself
An insurer wants every incoming claim description tagged with exactly one of its 300 predefined risk categories, so that a downstream job can route claims by that tag. Which task-specific AI Function fits this requirement?
The output needed is one label from a known set, which is classification. ai_classify chooses from labels you provide and supports large label sets. Extraction fills named fields, and ai_gen returns open text that every downstream step would have to interpret.
“Assign predefined categories to documents or text, supporting up to 500+ labels.”Source: docs.databricks.com
Checkpoint 3 of 8· Exam question
A legal operations team wants to pull specific fields (contract start date, renewal term, counterparty name) out of thousands of scanned PDF contracts and load the results into a Delta table with a fixed schema. Which model task should the application be built around?
Correct answer: A — Structured information extraction against a defined schema
- A. Pulling named fields such as dates, terms, and party names into a fixed schema is exactly what structured information extraction (e.g.
ai_extract) is designed for, and it maps directly onto a Delta table with fixed columns. - B. Generation would produce free-form prose summaries, which do not give the fixed, queryable columns (start date, term, counterparty) the team needs for the Delta table.
- C. A chat interface answers ad hoc questions interactively but does not batch-produce structured field values across thousands of documents for a table load.
- D. Classification assigns each document to one of a set of predefined labels, which does not recover the specific field values the team needs to populate table columns.
Checkpoint 4 of 8· Exam question
A media company receives thousands of incoming customer emails per day and needs each one automatically tagged with exactly one label from a fixed set: Billing, Technical Issue, Cancellation, or General Inquiry, so tickets route to the right team. Which model task best matches this requirement?
Correct answer: A — Text classification, assigning each email to a predefined ticket type
- A. Text classification maps each incoming email to one class from a small set of known categories. Its output is a single label, such as Billing or Cancellation, and that label is what routing a ticket to the right team requires.
- B. Summarization shortens an email into a condensed restatement. It outputs free text rather than one of the four named categories, so nothing in its result tells the system which team should own the ticket.
- C. Topic modeling discovers groupings from the data itself, so the clusters it finds need not match Billing, Technical Issue, Cancellation or General Inquiry. It does not assign one of the four defined labels, so it cannot route tickets to the right teams.
- D. Entity recognition pulls out spans such as customer names and order numbers. Those values describe who and what an email mentions, not what kind of request it is, so they cannot decide which of the four teams receives the ticket.
3.When to fall back to ai_query
ai_query is the general-purpose AI Function. You supply the prompt and choose any supported model, so you control the model, the prompt and the parameters. It takes over where the catalogue of task-specific functions ends. Its arguments and error handling are covered in ai_query arguments and error handling. The rule here is about which one to use.
Databricks states the rule plainly: start with a task-specific function when one matches the objective, and use ai_query when it doesn't meet your needs. Three situations push you to ai_query:
- You need tighter control over the prompt, model parameters or output format than a fixed function offers.
- You need to query a custom, fine-tuned or external model.
- You need room to tune further for throughput or quality.
Volume doesn't decide this. Both families plug into Lakeflow pipelines, Workflows and Structured Streaming for large batch inference, and AI Functions manage parallelization, retries and scaling themselves. A team that reaches for ai_query on every row because the dataset is large gives up the no-customization benefit and gains nothing in scale. A team that forces a fine-tuned model's job through ai_classify can't call its model at all. The old Agent Bricks Custom LLM product for custom text tasks is now legacy, and Databricks points those tasks to AI Functions such as ai_query.
Checkpoint 5 of 8· Check yourself
A data engineer has to score sentiment on 80 million product reviews in a nightly Lakeflow pipeline. They plan to use ai_query with a custom prompt "because the dataset is too large for a task-specific function." What is the right call?
Volume doesn't decide between the two families. Task-specific functions and ai_query both plug into production pipelines for large batch inference, so the matching task-specific function is the recommended starting point. ai_query is for when you need prompt or model control or a custom model.
“For large-scale batch inference, you can integrate task-specific AI Functions, or the general-purpose function ai_query into your production workflows”Source: docs.databricks.com
4.Packaged Agent Bricks products for document tasks
Two document requirements come up often enough that Agent Bricks packages them as products. Pick the product by task, the same way you pick a function. The products themselves are covered in Agent Bricks Knowledge Assistant. The question here is which task each one serves.
Document question-answering with citations is the job of Knowledge Assistant. It builds a chatbot that answers questions about your documents and cites its sources, and its documented use cases include answering questions from product documentation, HR policies and support knowledge bases. A requirement like "employees ask natural-language questions about product manuals and get grounded answers that cite the manuals" fits it directly. Current Databricks documentation lists Knowledge Assistant as a legacy offering and directs new low-code document agents to Genie Agents.
Take that manuals requirement and rule out the other three options a candidate might consider. A Multi-Agent Supervisor is for when you need fine-grained control, such as model selection, chunking strategy or orchestrating several sub-agents. One manual corpus needs none of that. Information Extraction returns fields, not answers to questions. A Genie Agent is the better pick when the agent has to be a specialised domain assistant that answers questions across documents and structured tables in one conversation, such as which regions are underperforming and which escalation policies apply. For manuals alone, with no tables involved, that breadth is unnecessary and the packaged question-answering product is the direct fit.
Document field extraction has a no-code route too. The Agent Bricks Information Extraction UI and the ai_extract SQL function are two ways into the same research-developed AI Functions, alongside a REST API. Use the UI to try sample documents, refine the schema and check results visually. Use ai_extract when the work has to run at scale inside a governed Lakeflow pipeline.
| Capability | Agent Bricks UI | SQL function |
|---|---|---|
| Convert PDFs, DOCX, images and PPTs into text, tables and figure descriptions | Document Parsing | ai_parse_document |
| Pull structured fields using a schema you define | Information Extraction | ai_extract |
| Assign predefined categories, up to 500+ labels | Classification | ai_classify |
Checkpoint 6 of 8· Check yourself
Before anything goes to production, an analyst wants to try a field schema on 20 sample invoices, adjust it, and check the extracted values by eye. Later, the same extraction has to run on millions of invoices in a governed Lakeflow pipeline. Which approach fits both stages?
The Information Extraction UI and ai_extract are two ways into the same field-extraction functions. The UI is for testing samples and refining the schema, and ai_extract runs the work at scale in governed Lakeflow pipelines. There is no need to switch to ai_query for volume, and classification returns labels, not fields.
“Use it to test sample documents, refine a schema or labels, and visually validate results before you scale.”Source: docs.databricks.com
Checkpoint 7 of 8· Exam question
A support organization has a large internal knowledge base of product manuals and wants employees to ask natural-language questions and receive grounded answers with citations back to the source manuals. Which Databricks Agent Bricks offering is the most direct fit for this business requirement?
Correct answer: A — Knowledge Assistant, pointed at the manuals in a Unity Catalog volume and exposed as a chat endpoint
- A. Knowledge Assistant is the Agent Bricks offering built for question answering over a document corpus. It can use manuals in a Unity Catalog volume as its source and returns answers that cite the passages they came from. That matches this single knowledge base of manuals with source references.
- B. Multi-Agent Supervisor coordinates several specialized agents and tools. Here there is one knowledge base of manuals, so splitting it across specialist agents adds a routing layer without improving cited answers. Document Q&A is already handled directly by Knowledge Assistant.
- C. Information Extraction turns documents into structured records with predefined fields. Employees would then be querying extracted data, not asking open questions and getting answers with citations back to the original manuals.
- D. Genie translates natural-language questions into SQL over structured tables. Even with the manual text loaded into a table, its output is query results, not answers grounded in retrieved passages. The SQL it shows is not a citation back to the source manuals, so it misses the grounded, cited Q&A requirement.
5.Chaining model tasks to meet one requirement
Most real requirements need more than one model task, and the design job is to order the tasks so each output becomes the next input. Take a retailer that wants to "handle angry reviews quickly". No single function does that. The requirement breaks into four tasks:
ai_analyze_sentimentscores each review, so only negative ones go further.ai_extractpulls the order number and product from those reviews into columns.ai_classifyassigns each one a routing label such as shipping, defect or refund.- A generation step,
ai_genorai_querywith your own prompt, drafts a reply using the extracted fields and the label.
The order matters for cost and for correctness. Filtering on sentiment first means the extraction and generation steps run on a fraction of the rows. Extracting before generating gives the reply prompt exact order numbers to work from, so the model isn't left to find them in raw text.
Document pipelines follow a fixed version of this pattern. ai_parse_document first turns raw files into a structured bronze layer. ai_extract and ai_classify then work directly on the parsed output to add fields and metadata, and ai_prep_search turns parsed documents into chunks ready for retrieval. Running ai_extract on a scanned PDF before parsing it skips the step that produces the text extraction depends on.
Retrieval-augmented generation is also a chain of tasks. The user's request queries a knowledge base such as a vector store, which is the embeddings task. The retrieved text is added to a prompt. A generative model then writes the response. If a requirement mentions both "find relevant passages" and "answer in plain language", it is asking for two tasks in sequence, not one model.
Checkpoint 8 of 8· Put it in order
Staff want to ask questions about a library of scanned PDF manuals and get answers in plain language. Put the model tasks in the order this application runs them.
- 1.Parse the raw PDFs with ai_parse_document into structured text and tables
- 2.Pass that prompt to a generative LLM, which writes the answer
- 3.Combine the retrieved passages with the user's question into a prompt
- 4.Use the user's question to query the vector store of embedded chunks and retrieve the closest passages
- 5.Turn the parsed documents into search-ready chunks with ai_prep_search
Each step produces the input the next one needs. Parsing creates the text that chunking works on. The chunks are what the embeddings retrieval searches. The retrieved passages go into the prompt, and only then does a generative model write the reply. The embeddings step finds content but doesn't write the answer.
“Retrieval: The user's request is used to query an outside knowledge base such as a vector store, keyword search, or SQL database.”Source: docs.databricks.com
Sources
(9)
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.https://docs.databricks.com/aws/en/machine-learning/model-serving/score-foundation-modelsOfficial docs
“Models designed to understand and engage in natural, multi-turn conversations.”
↩︎ Start from the output: the four foundation model task types“Semantic search Retrieval augmented generation (RAG) Topic clustering Sentiment analysis and text analytics”
↩︎ Start from the output: the four foundation model task types“Advanced AI systems designed to simulate human-like logical thinking.”
↩︎ Start from the output: the four foundation model task types“Models designed to process, interpret, and analyze visual data”
↩︎ Start from the output: the four foundation model task types“transform complex data—such as text, images, or audio—into compact numerical vectors called embeddings.”
↩︎ Exam trap 3“transform complex data—such as text, images, or audio—into compact numerical vectors called embeddings”
↩︎ Checkpoint - 2.
“What is the prediction target, and what class of ML problem does that imply”
↩︎ Start from the output: the four foundation model task types - 3.
“Databricks recommends these functions for getting started because they invoke a state-of-the-art research techniques maintained by Databricks and do not require any customization.”
↩︎ Task-specific AI Functions: one function per output“Classify input text according to labels you provide using state-of-the-art research techniques.”
↩︎ Task-specific AI Functions: one function per output“AI Functions automatically manage parallelization, retries, and scaling.”
↩︎ When to fall back to ai_query“Perform sentiment analysis on input text using a state-of-the-art AI model.”
↩︎ Chaining model tasks to meet one requirement“Purpose-built functions optimized for a specific task, such as document parsing, entity extraction, classification, and sentiment analysis.”
↩︎ Key concept“Extract structured fields from documents or text using a schema you define.”
↩︎ Exam trap 1“Extract structured fields from documents or text using a schema you define.”
↩︎ Prediction“For large-scale batch inference, you can integrate task-specific AI Functions, or the general-purpose function ai_query into your production workflows”
↩︎ Checkpoint - 4.
“Assign predefined categories to documents or text, supporting up to 500+ labels.”
↩︎ Task-specific AI Functions: one function per output“Use it to test sample documents, refine a schema or labels, and visually validate results before you scale.”
↩︎ Packaged Agent Bricks products for document tasks“Databricks gives you three ways to run IDP, all built on the same research-developed AI Functions”
↩︎ Packaged Agent Bricks products for document tasks“Apply ai_parse_document to convert raw files into structured representations.”
↩︎ Chaining model tasks to meet one requirement“These functions operate directly on the parsed outputs”
↩︎ Chaining model tasks to meet one requirement - 5.
“Unlike task-specific AI Functions, which are purpose-built and optimized for a single task, ai_query gives you full control over the model, prompt, and parameters.”
↩︎ When to fall back to ai_query“Control the prompt, model parameters, or output format more precisely”
↩︎ When to fall back to ai_query“Databricks recommends starting with a task-specific AI Function when one matches your objective. Use ai_query when a task-specific function doesn't meet your needs.”
↩︎ Exam trap 2“Query a custom, fine-tuned, or external model”
↩︎ Prediction - 6.
“This is a legacy offering. For custom text tasks on your data, use AI Functions, such as ai_query.”
↩︎ When to fall back to ai_query - 7.
“Use Knowledge Assistant to create a chatbot that can answer questions about your documents and provide high-quality responses with citations.”
↩︎ Packaged Agent Bricks products for document tasks“This is a legacy offering. For new low-code agents over your documents and data, use Genie Agents.”
↩︎ Packaged Agent Bricks products for document tasks“Use Knowledge Assistant to create a chatbot that can answer questions about your documents and provide high-quality responses with citations.”
↩︎ Exam trap 4 - 8.
“Build a custom Multi-Agent Supervisor only when you need fine-grained control over agent behavior, such as model selection, chunking strategy, or orchestrating multiple sub-agents.”
↩︎ Packaged Agent Bricks products for document tasks“business users ask questions about their content alongside the agent's structured data in a single conversation”
↩︎ Packaged Agent Bricks products for document tasks - 9.
“Retrieval: The user's request is used to query an outside knowledge base such as a vector store, keyword search, or SQL database.”
↩︎ Chaining model tasks to meet one requirement