CertSafari
    Databricks Certified Generative AI Engineer Associate· Lessons

    Domain 1 · Lesson 2/56

    Selecting model tasks for a business requirement on Databricks

    Select model tasks to accomplish a given business requirement

    16 min read
    2.33% of exam
    9 sources
    Published 22 Oct 2026
    Docs as of 17 Oct 2026

    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.

    Foundation model task types matched to the requirement they serve
    Task typeWhat it produces or handlesRecommended use casesExample Databricks-hosted models
    General purpose (chat)Contextual, multi-turn text responsesVirtual assistants, customer support bots, interactive tutoringdatabricks-claude-sonnet-5-5, databricks-meta-llama-3-3-70b-instruct
    EmbeddingsNumerical vectors that capture meaningSemantic search, RAG, topic clustering, sentiment analysis and text analyticsdatabricks-gte-large-en, databricks-bge-large-en, databricks-qwen3-embedding-0-6b
    VisionInterpretation of images and videoObject detection, image classification, image segmentation, document understandingdatabricks-gemma-3-12b, databricks-llama-4-maverick
    ReasoningStep-by-step analysis and explained decisionsCode generation, content creation and summarization, agent orchestrationdatabricks-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.

    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.

    Sources12

    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.

    Requirement wording mapped to the task-specific AI Function that produces it
    The requirement needs…FunctionWhat the function does
    Named fields in a fixed schemaai_extractExtract structured fields from documents or text using a schema you define
    One label from a known setai_classifyClassify input text according to labels you provide
    A short version of long textai_summarizeGenerate a summary of text
    Positive or negative toneai_analyze_sentimentPerform sentiment analysis on input text
    Text and tables out of PDFs or imagesai_parse_documentParse text, tables, figure descriptions and layout from unstructured documents
    Text in another languageai_translateTranslate text to a specified target language
    Sensitive entities hidden before downstream useai_maskMask specified entities in text
    A semantic similarity scoreai_similarityCompare two strings and compute a similarity score
    A free-form answer to a promptai_genAnswer 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?

    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?

    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?

    Sources34

    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?

    Sources536

    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.

    The same document capability through each interface
    CapabilityAgent Bricks UISQL function
    Convert PDFs, DOCX, images and PPTs into text, tables and figure descriptionsDocument Parsingai_parse_document
    Pull structured fields using a schema you defineInformation Extractionai_extract
    Assign predefined categories, up to 500+ labelsClassificationai_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?

    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?

    Sources784

    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:

    1. ai_analyze_sentiment scores each review, so only negative ones go further.
    2. ai_extract pulls the order number and product from those reviews into columns.
    3. ai_classify assigns each one a routing label such as shipping, defect or refund.
    4. A generation step, ai_gen or ai_query with 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. 1.Parse the raw PDFs with ai_parse_document into structured text and tables
    2. 2.Pass that prompt to a generative LLM, which writes the answer
    3. 3.Combine the retrieved passages with the user's question into a prompt
    4. 4.Use the user's question to query the vector store of embedded chunks and retrieve the closest passages
    5. 5.Turn the parsed documents into search-ready chunks with ai_prep_search

    Sources493

    Sources

    (9)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “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. 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. 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. 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. 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. 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. 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. 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. 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

    Ready to test yourself?

    Practise the 5 questions on this subdomain.

    Spotted a mistake, or was something unclear? Tell us.