Analyzing Model Performance

Analyze data at the right resolution.

Analyze model performance in Gantry to:

  1. Easily filter and dig in to interesting results. Add these results to a dataset so they don't get missed by future test coverage.
  2. Find underperforming areas of your model by viewing default metrics like latency and spend (for completion apps), as well as derived metrics (called Projections in Gantry) like completion length, sentiment, toxicity, fluidity, language, and coverage.
  3. Visually compare two slices of data. Easily collaborate with colleagues by sending your chart configurations to them.
Comparing configuration versions 1 and 2

Comparing configuration versions 1 and 2

There are two ways to analyze the data in Gantry:

  1. Via workspaces which provide flexible ways of understanding your data with different, sharable views perfect for collaborating with teammates.

  1. Via the Python SDK which provides data in a pandas.DataFrame-like interface. This is best used for more complex analysis in a notebook environment.


Queries allow you to derive insights from your data by diving deeper into specific parameters. This can be something like the time range, a tag, a specific feedback value, or any other type of data you have in Gantry.

In workspaces, this shows up as filters in the top left corner. Once filters are chosen, they're applied to all the charts and the data panel.

In the SDK, queries can be written as follows:

import datetime
import gantry
from gantry.query.time_window import RelativeTimeWindow

# Get your application
app = gantry.get_application(GANTRY_APP_NAME)

# Create a window for the last 30 minutes of data.
time_window = RelativeTimeWindow(window_length = datetime.timedelta(minutes=30))
query = app.query(

# Fetch the data specified by this query

Queries that are saved in the SDK are viewable in workspaces as part of the dropdown on the left.

app.save_query("last-30-mins", query)

Queries can also be saved and updated directly from the UI using the Save as new query and Save buttons respectively.

What’s Next

Some workflows are specialized to workspaces or the SDK. Explore those further: