Tutorial 4: Score live traces
Tutorial 4 — Score production traces continuously with Stratix trace evaluations.
What you'll learn
Prerequisites
Step 1: Ingest traces
from layerlens import Stratix
client = Stratix()
client.traces.create(
id=correlation_id,
name="answer-question",
inputs={"prompt": prompt_text},
outputs={"response": response_text},
spans=[
{"name": "retrieval", "kind": "tool", "inputs": {...}, "outputs": {...}},
{"name": "llm", "kind": "llm", "model": "claude-opus-4-7", "inputs": {...}, "outputs": {...}}
],
tags={"env": "production", "feature": "support-bot"}
)Step 2: Build the trace evaluation
Step 3: Watch a few runs
Step 4: Configure thresholds
Step 5: Watch the trend
What's next
Last updated
Was this helpful?