What you will learn in this TP
- Start Phoenix
- Instrument with OpenInference
- Read messages, tokens and latency
All steps and instructions are shown. Recommended for this lab: guided
Introduction #
Context. The product team is launching a support assistant. Before going live, you want to see exactly what the model receives and answers.
Prerequisites: Docker, Python 3.10+, Ollama or an OpenAI key · Estimated time: 35 min
Your first LLM traces.Hands-on #
Guided steps, with their solution.
1. Start Phoenix
Why? Phoenix receives and displays traces; the volume keeps the data.
Start Phoenix and openhttp://localhost:6006.2. Prepare the environment
Why? The OpenAI client also talks to Ollama: the labs stay free.
Choose your model and install the packages.3. Write the application
Why? register() must be called before creating the OpenAI client.
Writeapp.pyand run it.4. Read the traces
Why? The LLM span holds everything needed to understand an answer.
In thesupport-botproject, open the weather question's trace. What does the model answer? How many tokens?5. Measure
Why? Latency and tokens drive cost and user experience.
Sort traces by latency then by tokens. Which question costs the most?
Validate your work
Check that each goal above is reached and that you get the result described in the introduction.
Difficulty level : ●●○○○ (2/5)
My progress
Sign in to track your progress and take notes. Sign in
💬 Questions about this lesson
No questions yet: be the first to ask for help or share your configuration.
Recommended Articles
Installing Phoenix and tracing your first LLM application
Install Arize Phoenix (pip, Docker), send your first OpenInference traces from an OpenAI applicat...
OpenInference: the OpenTelemetry conventions for tracing AI applications
Detailed guide to OpenInference: OpenTelemetry semantic conventions and instrumentations for LLMs...
Tracing a RAG and an agent with OpenInference and Phoenix
Instrument a RAG application and an agent: RETRIEVER, RERANKER, TOOL and AGENT spans, conversatio...
Evaluating an LLM application with Phoenix: LLM judges, code and annotations
Set up evaluations: code evaluators, LLM judge (create_classifier, evaluate_dataframe), ready-mad...
Arize AI: observability and evaluation of LLM applications and agents
Understand Arize AI: Phoenix (open source) and Arize AX (platform), OpenInference traces, LLM-as-...
Datasets, experiments and prompts with Phoenix
Improve an LLM application methodically: build datasets from traces, run experiments, compare pro...
Arize in production: self-hosted Phoenix, Arize AX, security, costs and monitoring
Going to production: Phoenix with PostgreSQL and authentication, an OpenTelemetry Collector in fr...
Arize and OpenInference best practices
Checklist for observability and evaluation of LLM applications: OpenInference instrumentation, co...
Kibana: role, installation and first steps
What Kibana is in the Elastic suite, how to install it with Elasticsearch (start-local, Docker), ...