Recommended: Use Your Own Conversation IDs
If your application already has its own conversation or chat ids, you can keep using them as the handle for a Galtea session, so you never store Galtea’s own session id. First, create the session once withgaltea.sessions.create(custom_id=<your id>, ...). Then log every turn with session_custom_id=<your id> (plus a version_id or product_id anchor): each call finds that session by your custom id and appends to it.
Sessions are created only through the sessions API. If no session matches your
session_custom_id and anchor, the call returns a 400 error. Create the session first with galtea.sessions.create(custom_id=...).Single-Turn Production Monitoring
For simple, single-turn interactions, create a production session and usegaltea.inference_results.create_and_evaluate() to log and evaluate the interaction in a single call.
You can pass Specification IDs so the API resolves their linked metrics automatically (recommended), or list metrics explicitly.
- Using specification IDs
- Using metrics
Multi-Turn Production Monitoring (Conversations)
For multi-turn conversations, use the session-based workflow to log the entire interaction first and then evaluate it. If your application has its own conversation ids, prefer thesession_custom_id flow above: create the session once with a custom_id in step 1, then pass session_custom_id (plus version_id or product_id) instead of session_id in step 2.
1
1. Create a Session
First, create a session at the start of the conversation. For production monitoring, make sure to set
is_production=True.2
2. Log Conversation Turns
Next, log the user-assistant interactions. You can do this individually as each turn happens or in a single batch after the conversation ends.
- Log Turns Individually
- Log Turns in a Batch
This approach is useful for logging interactions in real-time in a live application.
3
3. Evaluate the Session
Once the conversation is complete and all turns are logged, you can run an evaluation on the entire session. Pass Specification IDs so the API resolves their linked metrics automatically (recommended), or list metrics explicitly.
- Using specification IDs
- Using metrics
4
4. Finish the Session
When the user’s conversation ends, finish the session with Finishing matters most when you use a Monitor to score production sessions automatically: a monitor scores only closed sessions. An explicit finish makes the session eligible on the next scan, instead of waiting for the product’s inactivity auto-close window (30 minutes by default). Only call
finish(). This closes the session, so it accepts no more turns.finish() once the conversation is truly over: appending a turn to a closed session follows the product’s closed-session policy, so the turn is either rejected or silently discarded.For more details on evaluating multi-turn conversations, see the Evaluating Conversations guide.
Late Turns on a Closed Session
A production session does not stay open forever. Galtea’s auto-close sweep closes a session once it has been quiet for the product’s auto-close inactivity window (default 30 minutes), and an explicit finish closes it at once. A session that is closed (COMPLETED or FAILED) accepts no new turns.
The product’s auto-close window is the only inactivity window: it closes the session (its
Status changes). A Monitor has no window of its own; it scores a session once the session is closed, whether by an explicit finish or by the auto-close sweep.IGNORE(the default): the log call returns success, but the turn is not stored. The late reply is silently dropped.REJECT: the log call fails with an error. Your code must handle it (for example, start a new session for the reply).
- Raise the inactivity window. Increase Auto Close Inactivity Minutes so sessions stay open longer before the sweep closes them.
- Turn off auto-close for these sessions. Set Auto Close Scope to
NONE(or a scope that excludes production) so the sweep never closes them; they then close only on an explicit finish.
Reading Monitor Results
If you have set up a Monitor on the Galtea dashboard to continuously evaluate a sample of your production sessions, you can pull its results with a single call:days query parameter sets the trailing window to aggregate, bucketed by day. It defaults to 7 and accepts up to 90.
The response is built to give you an honest read of your product’s quality, not just a bare average. Keep these ideas in mind when you interpret it:
- Each metric family gets its own score series. A metric family is a metric and every later revision of it (for example, when you edit its judge prompt), grouped as one line of history. The response returns one series per family bound to the monitor, each with a whole-range
headlinescore and one point per day bucket. - Scores are sampling-weighted. A monitor does not evaluate every session; it evaluates a sample to control cost. Sessions from a period when sampling was lower count for more in the average, so a period with a smaller sample does not silently pull the score toward its own noise.
- A confidence interval tells you how much to trust a score. The confidence interval is the range that most likely contains the true score. Galtea publishes a 95% interval once a bucket has scored at least 30 sessions. Below that floor,
confidenceIntervalisnullandcollectingDataistrue, so you know the score is a preview, not a settled number, until more sessions land. - The worst metric family drives the headline, never an average.
worstMetricis the lowest-scoring family over the whole range, not a blended score across families. Use it to see which quality dimension needs attention first. - Markers flag context changes.
markers.metricRevisionsmarks when a bound metric family was edited, andmarkers.samplingChangesmarks when the sampling rate changed. Both can explain a shift in the score series that isn’t a real quality change. - Spend shows your current billing cycle.
spend.spentCreditsandspend.pendingCreditsare the credits already used and reserved for evaluations still running this cycle;spend.capCreditsis the monthly cap you configured for the monitor (nullif you did not set one). If spend reaches the cap, the monitor’s status becomesCAPPEDand it pauses scoring. Sessions that close while the monitor is capped are skipped for good, like when it is paused: scoring resumes for sessions that close after the next cycle resets the cap, or after you raise it. The monitor never lowers its own sampling rate to fit the budget. - Sessions are listed, not just counted.
sessions.scoredlists the most recently evaluated sessions (capped at 200), each with the turn count it was scored at.sessions.waitinglists production sessions that have not closed yet (capped at 100); a session is scored only once it closes. A session closes when it is explicitly finished, or when the product’s auto-close setting closes it after inactivity.
Next Steps
Evaluating Conversations
Evaluate full multi-turn production conversations.
Tracing Agent Operations
Capture and analyze internal agent operations in production.