13.04

Sessions, users, scores, and evals

skillmaxingPython with AISessions, users, scores, and evals
Visual lesson

Sessions, users, scores, and evals

Included with Pro · 4:33
Lessons · 1,017 words

A trace answers "what happened in this request". Two more questions need more than a trace. "What is this customer costing us, and what did this conversation look like end to end" needs traces grouped by user and by session. "Which answers were bad" needs a number attached to each trace after the fact, from a person, a rule, or another model. Langfuse calls the first two attributes and the third a score, and both are a few lines of code on Relay.

Wrap the work of a request in propagate_attributes and every observation created inside the block, including nested spans and drop-in generations, carries the user, the session, and any metadata you add. For Relay the user is the customer's id and the session is the conversation id, so a multi-turn chat shows up as one session with one trace per turn.

Pro

Continue reading

Pro unlocks every video lesson, the full notes and runnable code across the Python with AI course, from the language itself to agents, MCP, Langfuse and deployment.

Unlock full access to
Python with AIAI researchComplete system design
30% off with LAUNCH30ends in 7h 40m
Buy now
View all plans ·Already Pro? Sign in
124 online