- Role Adherence: Measures how well the AI stays within its defined role.
- Knowledge Retention: Assesses the model’s ability to remember and use information from previous turns.
- Conversation Completeness: Evaluates whether the conversation has reached a natural and informative conclusion.
- Conversation Relevancy: Assesses whether each turn in the conversation is relevant to the ongoing topic.
The Session-Based Workflow
Every evaluation follows the same two steps: first get the conversation into a Session, then evaluate that session.1
2
Evaluate the session
Once the turns are logged, evaluate the whole conversation at once with
evaluations.create(). See step 2.1. Capture the conversation in a session
How turns get into a session depends on where the conversation comes from. Pick the use case that matches yours. Each one ends with a loggedsession you evaluate in step 2.
- Test-based evaluation
- Past conversations (offline ingestion)
- Monitoring (production)
Use this when you have test cases. Galtea’s Conversation Simulator drives a synthetic user against your own agent, so you provide an agent function. It requires Then fetch a test case, create a session, and run the simulator with your agent:
test_case_id.First, define an agent function that connects Galtea to your product:- Simple
- Chat History
- Structured
The quickest way to get started. Your function receives just the latest user message as a string.
All three signatures work with
evaluations.run(), inference_results.generate(), and simulator.simulate(). Both sync and async functions are supported. The SDK auto-detects which signature you’re using from the type hint on the first parameter.For the full list of fields available on AgentInput (including structured input access via message metadata), see the AgentInput reference.See the full simulation workflow in Simulating Conversations.
2. Evaluate the session
Whichever use case you picked, you now have asession with all its turns logged. Evaluate the whole conversation at once, either by passing Specification IDs so the API resolves their linked metrics automatically (recommended), or by listing metrics explicitly.
- Using specification IDs
- Using metrics
For test-based evaluation, run this evaluation inside your loop so every simulated session is evaluated.
Custom Metrics with Full Conversation Access
When you useCustomScoreEvaluationMetric, your measure() method always receives an inference_results parameter containing InferenceResult objects. For session evaluations this includes all turns; for single inference result evaluations it contains one item. This enables conversation-level scoring (e.g., consistency checks, cross-turn analysis).
Each
InferenceResult object provides actual_input, actual_output, latency, index, and other fields. Retrieval context is not a field on the object; it is derived from the turn’s RETRIEVER trace spans. See the custom metrics tutorial for more on custom metrics.Learn More
Session
A full conversation between a user and an AI system.
Inference Result
A single turn in a conversation between a user and the AI.
Evaluation
The assessment of an evaluation using a specific metric’s criteria
Conversation Simulator
Test your conversational AI with simulated multi-turn conversations