Learning Objectives
By the end of this chapter, you will be able to:
- Design a prompt that elicits a specifically formatted response
- Select model tasks to accomplish a given business requirement
- Select chain components for a desired model input and output
- Translate business use case goals into a description of the desired inputs and outputs for the AI pipeline
- Define and order tools that gather knowledge or take actions for multi-stage reasoning
- Determine how and when to use Agent Bricks (Knowledge Assistant, Multiagent Supervisor, Information Extraction) to solve problems
Executive Summary
- Prompt design is a contract: the prompt defines the input schema (system role, user input, retrieval context, examples) and the output schema (free text, structured JSON, function call, classification label). Every later evaluation metric measures conformance to that contract.
- Model task selection is the first reduction step. Treat each business goal as a directed graph of small tasks (classification, extraction, summarization, generation, routing, tool calling) and assign the smallest model that meets quality and latency targets for each node.
- A chain is the executable form of a design. Components include prompt templates, retrievers, LLM calls, output parsers, memory stores, and tools. The Mosaic AI Agent Framework wraps these components with MLflow tracing, evaluation hooks, and serving primitives so design choices remain inspectable in production.
- Multi-stage reasoning lives or dies on tool ordering. Plan tools as a dependency graph (knowledge tools precede action tools, idempotent tools precede destructive tools, cheap tools precede expensive tools) and bind that graph to the agent through Unity Catalog function definitions or MCP servers.
- Agent Bricks (Knowledge Assistant, Multiagent Supervisor, Information Extraction) collapses the design surface: pick the brick that matches the problem shape, supply the data, and accept the constraint that customization is bounded by the brick's contract. Hand-built Agent Framework solutions remain the answer when the contract does not fit.
Assumptions
- The reader has six months of hands-on Databricks experience and can read PySpark, Python, and SQL without footnotes.
- All Unity Catalog references assume a workspace where Unity Catalog is the default metastore, not Hive Metastore.
- Region availability for Foundation Model APIs and Agent Bricks varies by workspace; this chapter discusses capability rather than rollout status.
- Numeric limits cited are documented in the Databricks resource limits and Mosaic AI references and may be raised by support; treat them as the planning ceiling.
