What is a Session?
A session groups the turns of a single conversation between a user and your AI product. It contains one or more inference results (input/output pairs) and can be evaluated as a whole using conversational metrics. Sessions are created in two ways:- Automatically — when you call
evaluations.create_single_turn()with aversion_idandtest_id, a session is created behind the scenes. - Manually — when you need to log multi-turn conversations or production data, create a session explicitly with
sessions.create().
SDK Integration
Session Service SDK
Manage sessions using the Python SDK
Session Properties
The custom ID associated with the session.
This is usually a client-side generated ID that identifies the conversation session between a user and a LLM app.
The version associated with the session.
The test case associated with the session. This is typically used for non-production evaluations.
Indicates whether the session is a production session. This is typically used to differentiate production data from test data.
It should be set to
True if there is no associated test case.The context provided to the AI product during the session or ground-truth related context.
Additional custom metadata about the session. This can be used to store any relevant information that doesn’t fit into the other fields.
Any error message associated with the session. This is useful for tracking failed sessions or sessions that encountered issues.