databricks-logo

mosaic-ai-agent-demo

(Python)
Loading...

Create, evaluate, and deploy an AI agent

This notebook walks you through building, evaluating, and deploying an AI agent that combines retrieval and tool usage. You'll work with a pre-chunked subset of Databricks documentation as your dataset.

Supporting documentation

For a comprehensive understanding of this notebook's contents, including the rationale behind the code and the challenges it addresses, see the accompanying Databricks documentation page. (AWS | Azure)

Install Dependencies

Create an agent and tools

Connect to an LLM

Load Dataset

Create Keyword Extraction Unity Catalog Tool

Inspect and test the tool

Create a client-side keyword search retriever

Define create agent factory function

Test the agent

Wrapping it in a ChatAgent

Test ChatAgent

Using Model Config

Write file for models from code

15

    16

    17

    18

    19

    20

    21

    ;