Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2025 11:31 AM
Hello @Nawneet,
Ensure that the input format for the agent evaluation matches the expected schema. Here is an example to structure your input data correctly:
import mlflow
import pandas as pd
examples = {
"request": [
{"messages": [{"role": "user", "content": "What is the stoppage duration for January month 2024?"}]},
],
"expected_response": [
"Stoppage duration for January month 2024 is 12 hours.",
],
}
result = mlflow.evaluate(
data=pd.DataFrame(examples),
# If you have an MLFlow model, you can specify the model URI here
model_type="databricks-agent", # Enable Mosaic AI Agent Evaluation
)
# Review the results
display(result.tables['eval_results'])