See our data API guide for function and argument level information.
After logging data to Arize, if you want to retrieve that data to use in code for evaluation, you can visit the LLM Tracing tab to see your traces and use the export button to get your export code.
# this will be prefilled by the export command.
# Note: This uses a different API Key than the one above.
ARIZE_API_KEY = ''
# import statements required for getting your spans
import os
os.environ['ARIZE_API_KEY'] = ARIZE_API_KEY
from datetime import datetime
from arize.exporter import ArizeExportClient
from arize.utils.types import Environments
# Exporting your dataset into a dataframe
client = ArizeExportClient()
primary_df = client.export_model_to_df(
space_id='', # this will be prefilled by export
model_id='', # this will be prefilled by export
environment=Environments.TRACING,
start_time=datetime.fromisoformat(''), # this will be prefilled by export
end_time=datetime.fromisoformat(''), # this will be prefilled by export
)