Skip to main content

Observation

Timed evaluation span or generation record with model usage, inputs, outputs, and scores. A generation observation originates the profile and configuration attribution promoted to its trace; callers can read those links directly on either record.

Usage profiles​

UsageFields and validation
In responsesView fields

In responses​

API JSON uses JSON field names (camelCase).

FieldTypePresenceMeaning
observationIdstringOptionalIdentifier of the evaluation observation.
traceIdstringOptionalIdentifier of the evaluation trace.
parentObservationIdstringOptionalIdentifier of the parent observation within the trace.
typestring (OBSERVATION_TYPE_SPAN, OBSERVATION_TYPE_GENERATION, OBSERVATION_TYPE_EVENT, OBSERVATION_TYPE_TOOL, OBSERVATION_TYPE_RETRIEVER, OBSERVATION_TYPE_AGENT, OBSERVATION_TYPE_CHAIN, OBSERVATION_TYPE_EMBEDDING, OBSERVATION_TYPE_EVALUATOR, OBSERVATION_TYPE_GUARDRAIL) or integer (int32)OptionalObservation kind reported by the evaluation provider.
namestringOptionalOperation name recorded for the evaluation observation.
levelstring (OBSERVATION_LEVEL_DEBUG, OBSERVATION_LEVEL_DEFAULT, OBSERVATION_LEVEL_WARNING, OBSERVATION_LEVEL_ERROR) or integer (int32)OptionalObservation log level reported by the evaluation provider.
statusMessagestringOptionalDiagnostic text explaining the reported state.
startTimestring (date-time)OptionalBeginning of the time interval represented by this operation.
endTimestring (date-time)OptionalEnd of the time interval represented by this operation.
completionStartTimestring (date-time)OptionalTime to first token, generations only.
latencySecondsnumber (double) or string (NaN, Infinity, -Infinity)OptionalElapsed observation latency, in seconds.
inputJsonstringOptionalEvaluation input serialized as JSON.
outputJsonstringOptionalEvaluation output serialized as JSON.
metadataJsonstringOptionalAdditional attributes serialized as a JSON object.
modelstringOptionalModel identifier recorded for the evaluated generation.
modelParametersJsonstringOptionalModel parameters recorded as a serialized JSON object.
inputTokensstring (int64)OptionalInput-token usage reported for the evaluated generation. Pattern: ^-?\d+$.
outputTokensstring (int64)OptionalOutput-token usage reported for the evaluated generation. Pattern: ^-?\d+$.
totalTokensstring (int64)OptionalTotal token usage reported for the evaluated generation or aggregate. Pattern: ^-?\d+$.
inputCostnumber (double) or string (NaN, Infinity, -Infinity)OptionalCost attributed to model input by the evaluation provider.
outputCostnumber (double) or string (NaN, Infinity, -Infinity)OptionalCost attributed to model output by the evaluation provider.
totalCostnumber (double) or string (NaN, Infinity, -Infinity)OptionalTotal cost reported for the evaluated generation or aggregate.
environmentstringOptionalEnvironment label attached to the evaluation record.
versionstringOptionalVersion of the resource represented by this message.
promptNamestringOptionalName of the versioned prompt associated with the generation.
promptVersioninteger (int32)OptionalVersion of the prompt associated with the generation. Minimum: -2147483648. Maximum: 2147483647.
scoresArray of ScoreOptionalEvaluation scores returned for the selected objects or query.
commentCountinteger (int32)OptionalNumber of comments reported on the evaluation object. Minimum: -2147483648. Maximum: 2147483647.
conversationIdstringOptionalIdentifier of the conversation associated with this evaluation observation, when recorded.
sourceUserMessageIdstringOptionalIdentifier of the user message that opened the evaluated generation turn.
profileIdstringOptionalIdentifier of the agent profile associated with the generation.
configHashstringOptionalFingerprint of the profile ID, model and resolved prompt hash used to group evaluation results. Other settings are excluded; this is not an immutable profile revision.

Values of type​

Semantic category of a trace observation, including categories accepted from upstream even when the platform does not emit them.

ValueNo.FormMeaning
OBSERVATION_TYPE_SPAN1CanonicalA timed unit of work represented as a span.
OBSERVATION_TYPE_GENERATION2CanonicalA model-generation operation and its recorded inputs, outputs and usage.
OBSERVATION_TYPE_EVENT3CanonicalA point-in-time event rather than a timed operation.
OBSERVATION_TYPE_TOOL4CanonicalExecution of a tool call.
OBSERVATION_TYPE_RETRIEVER5CanonicalRetrieval of supporting documents or other context.
OBSERVATION_TYPE_AGENT6CanonicalAn agent-level operation reported in the trace.
OBSERVATION_TYPE_CHAIN7CanonicalA sequence or chain of related processing steps.
OBSERVATION_TYPE_EMBEDDING8CanonicalComputation of vector embeddings.
OBSERVATION_TYPE_EVALUATOR9CanonicalAn evaluator operation that assesses another result.
OBSERVATION_TYPE_GUARDRAIL10CanonicalA guardrail check on inputs, outputs or processing.

Values of level​

Diagnostic severity attached to an evaluation observation.

ValueNo.FormMeaning
OBSERVATION_LEVEL_DEBUG1CanonicalDetailed diagnostic information intended for debugging.
OBSERVATION_LEVEL_DEFAULT2CanonicalOrdinary observation information without an elevated warning or error level.
OBSERVATION_LEVEL_WARNING3CanonicalA condition reported at warning severity.
OBSERVATION_LEVEL_ERROR4CanonicalA condition reported at error severity.

Where used​

ReferenceRelationship
Get a tracePOST /api/v1/evals/get-trace
List observationsPOST /api/v1/evals/list-observations
TraceDetailNested in model

Download the public reference contract.

Document: DOC-API-MODEL-observation.