Manage the App

How to define your inference set(s), launch a session, open the UI in your notebook or browser, and close your session when you're done

Define Your Inferences

For a conceptual overview of inferences, including an explanation of when to use a single inference vs. primary and reference inferences, see Phoenix Basics.

To define inferences, you must load your data into a pandas dataframe and create a matching schema. If you have a dataframe prim_df and a matching prim_schema, you can define inferences named "primary" with

prim_ds = px.Inferences(prim_df, prim_schema, "primary")

If you additionally have a dataframe ref_df and a matching ref_schema, you can define a inference set named "reference" with

ref_ds = px.Inferences(ref_df, ref_schema, "reference")

See Corpus Data if you have corpus data for an Information Retrieval use case.

Launch the App

Use phoenix.launch_app to start your Phoenix session in the background. You can launch Phoenix with zero, one, or two inference sets.

Open the UI

You can view and interact with the Phoenix UI either directly in your notebook or in a separate browser tab or window.

In a notebook cell, run


Copy and paste the output URL into a new browser tab or window.

Browser-based sessions are supported in both local Jupyter environments and Colab.

Close the App

When you're done using Phoenix, gracefully shut down your running background session with


Last updated