RousselTMLEARNING

TP · Arize AI: LLM observability and evaluation from discovery to expertise

Lab: Install Phoenix and trace a first LLM application

What you will learn in this TP
  • Start Phoenix
  • Instrument with OpenInference
  • Read messages, tokens and latency
Mode :

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. 1. Start Phoenix

    Why? Phoenix receives and displays traces; the volume keeps the data.

    Start Phoenix and open http://localhost:6006.
  2. 2. Prepare the environment

    Why? The OpenAI client also talks to Ollama: the labs stay free.

    Choose your model and install the packages.
  3. 3. Write the application

    Why? register() must be called before creating the OpenAI client.

    Write app.py and run it.
  4. 4. Read the traces

    Why? The LLM span holds everything needed to understand an answer.

    In the support-bot project, open the weather question's trace. What does the model answer? How many tokens?
  5. 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

  • ⏱ Estimated time : ≈ 35 min

Sign in to track your progress and take notes. Sign in

⭐ Rate this lesson

5.0 initial rating from the teaching team

Sign in to rate this lesson →

💬 Questions about this lesson

No questions yet: be the first to ask for help or share your configuration.

Ask a question about this lesson →

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), ...

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!