[HTML payload içeriği buraya]
29.1 C
Jakarta
Tuesday, May 12, 2026

Asserting Mosaic AI Agent Framework and Agent Analysis


Databricks introduced the general public preview of Mosaic AI  Agent Framework & Agent Analysis alongside our Generative AI Cookbook on the Knowledge + AI Summit 2024. 

These instruments are designed to assist builders construct and deploy high-quality Agentic and Retrieval Augmented Technology (RAG) purposes inside the Databricks Knowledge Intelligence Platform.  

Challenges with constructing high-quality Generative AI purposes 

Whereas constructing a proof of idea to your GenAI software is comparatively easy, delivering a high-quality software has confirmed to be difficult for numerous clients. To fulfill the usual of high quality required for customer-facing purposes, AI output have to be correct, protected, and ruled. To succeed in this stage of high quality, builders wrestle to 

  • Select the appropriate metrics to judge the standard of the appliance
  • Effectively gather human suggestions to measure the standard of the appliance
  • Establish the foundation trigger of high quality issues
  • Quickly iterate to enhance the standard of the appliance earlier than deploying to manufacturing

Introducing Mosaic AI Agent Framework and Agent Analysis

Constructed-in collaboration with the Mosaic Analysis staff, Agent Framework and Agent Analysis present a number of capabilities which were particularly constructed to deal with these challenges:

Rapidly get human suggestions – Agent Analysis permits you to outline what high-quality solutions appear to be to your GenAI software by letting you invite subject material specialists throughout your group to evaluate your software and supply suggestions on the standard of responses even when they don’t seem to be Databricks customers. 

Simple analysis of your GenAI software – Agent Analysis supplies a collection of metrics, developed in collaboration with Mosaic Analysis, to measure your software’s high quality.  It robotically logs responses and suggestions by people to an analysis desk and allows you to rapidly analyze the outcomes to establish potential high quality points. Our system-provided AI judges grade these responses on widespread standards comparable to accuracy, hallucination, harmfulness, and helpfulness, figuring out the foundation causes of any high quality points.  These judges are calibrated utilizing suggestions out of your subject material specialists, however can even measure high quality with none human labels.  

You may then experiment and tune numerous configurations of your software utilizing Agent Framework to deal with these high quality points, measuring every change’s affect in your app’s high quality.  Upon getting hit your high quality threshold, you need to use Agent Evaluations’ price and latency metrics to find out the optimum trade-off between high quality/price/latency.

Quick, Finish-to-Finish Growth Workflow – Agent Framework is built-in with MLflow and permits builders to make use of the usual MLflow APIs like log_model and mlflow.consider to log a GenAI software and consider its high quality. As soon as happy with the standard, builders can use MLflow to deploy these purposes to manufacturing and get suggestions from customers to additional enhance the standard.  Agent Framework and Agent Analysis combine with MLflow and the Knowledge Intelligence platform to supply a totally paved path to construct and deploy GenAI purposes. 

App Lifecycle Administration – Agent Framework supplies a simplified SDK for managing the lifecycle of agentic purposes from managing permissions to deployment with Mosaic AI Mannequin Serving. 

That will help you get began constructing high-quality purposes utilizing Agent Framework and Agent Analysis, Generative AI Cookbook is a definitive how-to information that demonstrates each step to take your app from POC to manufacturing, whereas explaining crucial configuration choices & approaches that may enhance software high quality.

Constructing a high-quality RAG agent

To grasp these new capabilities, let’s stroll via an instance of constructing a high-quality agentic software utilizing Agent Framework and bettering its high quality utilizing Agent Analysis. You may have a look at the whole code for this instance and extra superior examples within the Generative AI Cookbook right here.

On this instance, we’re going to construct and deploy a easy RAG software that retrieves related chunks from a pre-created vector index and summarizes them as a response to a question. You may construct the RAG software utilizing any framework, together with native Python code, however on this instance, we’re utilizing Langchain.

# ##################################
# Hook up with the Vector Search Index
# ##################################

vs_client = VectorSearchClient()
vs_index = vs_client.get_index(
    endpoint_name="vector_search_endpoint",
    index_name="vector_index_name",
)

# ##################################
# Set the Vector Search index right into a LangChain retriever
# ##################################

vector_search_as_retriever = DatabricksVectorSearch(
    vs_index,
    text_column='chunk_text',
    columns=['chunk_id', 'chunk_text', 'document_uri'],
).as_retriever()

# ##################################
# RAG Chain
# ##################################

immediate = PromptTemplate(
  template = "Reply the query...",
  input_variables = ["question", "context"],
)

chain = (
     vector_search_as_retriever,
    
    | immediate
    | ChatDatabricks(endpoint='dbrx_endpoint')
    | StrOutputParser()
)

The very first thing we need to do is leverage MLflow to allow traces and deploy the appliance. This may be achieved by including three easy traces within the software code (above) that enable Agent Framework to supply traces and a simple solution to observe and debug the appliance.

## Allow MLflow Tracing
mlflow.langchain.autolog()

## Inform MLflow in regards to the schema of the retriever in order that 
# 1. Assessment App can correctly show retrieved chunks
# 2. Agent Analysis can measure the retriever
############

mlflow.fashions.set_retriever_schema(
    primary_key='chunk_id'),
    text_column='chunk_text',
    doc_uri='document_uri'),  # Assessment App makes use of `doc_uri` to show 
    chunks from the identical doc in a single view
)

## Inform MLflow logging the place to search out your chain.
mlflow.fashions.set_model(mannequin=chain)

tracing

MLflow Tracing supplies observability into your software throughout growth and manufacturing

The following step is to register the GenAI software in Unity Catalog and deploy it as a proof of idea to get suggestions from stakeholders utilizing Agent Analysis’s evaluate software.

# Use Unity Catalog to log the chain
mlflow.set_registry_uri('databricks-uc')
UC_MODEL_NAME='databricks-rag-app'

# Register the chain to UC
uc_registered_model_info = mlflow.register_model(model_uri=model_uri,
 title=UC_MODEL_NAME)

# Use Agent Framework to deploy a mannequin registed in UC to the Agent 
Analysis evaluate software & create an agent serving endpoint

deployment_info = brokers.deploy(model_name=UC_MODEL_NAME, 
model_version=uc_model.model)

# Assign permissions to the Assessment App any consumer in your SSO
brokers.set_permissions(model_name=UC_MODEL_NAME, 
customers=["[email protected]"], 
permission_level=brokers.PermissionLevel.CAN_QUERY)

You may share the browser hyperlink with stakeholders and begin getting suggestions instantly! The suggestions is saved as delta tables in your Unity Catalog and can be utilized to construct an analysis dataset.

review-app

Use the evaluate software to gather stakeholder suggestions in your POC

Corning is a supplies science firm – our glass and ceramics applied sciences are utilized in many industrial and scientific purposes, so understanding and performing on our knowledge is important. We constructed an AI analysis assistant utilizing Databricks Mosaic AI Agent Framework to index lots of of 1000’s of paperwork together with US patent workplace knowledge. Having our LLM-powered assistant reply to questions with excessive accuracy was extraordinarily vital to us – that manner, our researchers might discover and additional the duties they have been engaged on. To implement this, we used Databricks Mosaic AI Agent Framework to construct a Hello Hey Generative AI resolution augmented with the U.S. patent workplace knowledge. By leveraging the Databricks Knowledge Intelligence Platform, we considerably improved retrieval velocity, response high quality, and accuracy. 

— Denis Kamotsky, Principal Software program Engineer, Corning

When you begin receiving the suggestions to create your analysis dataset, you need to use Agent Analysis and the in-built AI judges to evaluate every response towards a set of high quality standards utilizing pre-built metrics:

  • Reply correctness – is the app’s response correct?
  • Groundness – is the app’s response grounded within the retrieved knowledge or is the app hallucinating?
  • Retrieval relevance – is the retrieved knowledge related to the consumer’s query?
  • Reply relevance – is the app’s response on-topic to the consumer’s query?
  • Security – does the app’s response comprise any dangerous content material?
# Run mlflow.evluate to get AI judges to judge the dataset.
eval_results = mlflow.consider( 
        knowledge=eval_df, # Analysis set 
        mannequin=poc_app.model_uri, # from the POC step above  
        model_type="databricks-agent", # Use Agent Analysis
    )

The aggregated metrics and analysis of every query within the analysis set are logged to MLflow.   Every LLM-powered judgment is backed by a written rationale for why. The outcomes of this analysis can be utilized to establish the foundation causes of high quality points.  Check with the Cookbook sections Consider the POC’s high quality and Establish the foundation explanation for high quality points for an in depth walkthrough.

aggregate metrics

View the mixture metrics from Agent Analysis inside MLflow

As a number one world producer, Lippert leverages knowledge and AI to construct highly-engineered merchandise, personalized options and the very best experiences. Mosaic AI Agent Framework has been a game-changer for us as a result of it allowed us to judge the outcomes of our GenAI purposes and display the accuracy of our outputs whereas sustaining full management over our knowledge sources. Because of the Databricks Knowledge Intelligence Platform, I am assured in deploying to manufacturing. 

— Kenan Colson, VP Knowledge & AI, Lippert

You may as well examine every particular person file in your analysis dataset to higher perceive what is occurring or use MLflow hint to establish potential high quality points.

individual record

Examine every particular person file in your analysis set to know what is occurring

Upon getting iterated on the standard and happy with the standard, you possibly can deploy the appliance in your manufacturing workspace with minimal effort for the reason that software is already registered in Unity Catalog. 

# Deploy the appliance in manufacturing.
# Observe how this command is similar because the earlier deployment - all 
brokers deployed with Agent Framework robotically create a 
production-ready, scalable API

deployment_info = brokers.deploy(model_name=UC_MODEL_NAME, 
model_version=MODEL_VERSION_NUMBER)

Mosaic AI Agent Framework has allowed us to quickly experiment with augmented LLMs, protected within the data any personal knowledge stays inside our management. The seamless integration with MLflow and Mannequin Serving ensures our ML Engineering staff can scale from POC to manufacturing with minimal complexity. 

— Ben Halsall, Analytics Director, Burberry

These capabilities are tightly built-in with Unity Catalog to supply governance, MLflow to supply lineage and metadata administration, and LLM Guardrails to supply security.

Ford Direct is on the vanguard of the digital transformation of the automotive business. We’re the info hub for Ford and Lincoln dealerships, and we would have liked to create a unified chatbot to assist our sellers assess their efficiency, stock, tendencies, and buyer engagement metrics. Databricks Mosaic AI Agent Framework allowed us to combine our proprietary knowledge and documentation into our Generative AI resolution that makes use of RAG. The combination of Mosaic AI with Databricks Delta Tables and Unity Catalog made it seamless to our vector indexes real-time as our supply knowledge is up to date, without having to the touch our deployed mannequin. 

— Tom Thomas, VP of Analytics, FordDirect 

Pricing

  • Agent Analysis – priced per Choose Request
  • Mosaic AI Mannequin Serving – serve brokers; priced based mostly on Mosaic AI Mannequin Serving charges

For added particulars confer with our pricing web site.

Subsequent Steps

Agent Framework and Agent Analysis are the most effective methods to construct production-quality Agentic and Retrieval Augmented Technology Purposes.  We’re excited to have extra clients attempt it and provides us your suggestions. To get began, see the next sources:

That will help you weave these capabilities into your software, the Generative AI Cookbook supplies pattern code that demonstrates find out how to observe an evaluation-driven growth workflow utilizing Agent Framework and Agent Analysis to take your app from POC to manufacturing.  Additional, the Cookbook outlines essentially the most related configuration choices & approaches that may enhance software high quality.

Strive Agent Framework & Agent Analysis in the present day by operating our demo pocket book or by following the Cookbook to construct an app together with your knowledge.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles