> ## Documentation Index
> Fetch the complete documentation index at: https://docs.galtea.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Inference Result

> A single turn in a conversation between a user and an AI system

## What is an Inference Result?

An inference result is a single turn in a conversation — one user input paired with one AI output. It belongs to a [session](/concepts/product/version/session) and can optionally include metadata like latency, token usage, cost, and retrieval context (for RAG evaluations).

You can create inference results from the [Galtea dashboard](https://platform.galtea.ai/) (using [Endpoint Connections](/concepts/product/endpoint-connection)) or programmatically using the [Galtea SDK](/sdk/api/inference-result/service).

## SDK Integration

<Card title="Inference Result Service SDK" icon="arrow-right-from-bracket" iconType="solid" href="/sdk/api/inference-result/service">
  Manage inference results using the Python SDK
</Card>

## Inference Result Properties

<ResponseField name="Session" type="Session" required>
  The session to which the inference result belongs.
</ResponseField>

<ResponseField name="Input" type="string | object" optional>
  The input text or prompt for the inference result. For most runs this is a plain string. For phone (voice) runs, when the simulated user's audio was captured, this is a content-parts envelope `{"user_message": "<transcript>", "content": [{"type": "audio", "uri": "...", "transcript": "..."}]}` — the `user_message` field is the canonical scored scalar. Access the envelope via the SDK's `.input_data` field and the spoken transcript via `.input`.
</ResponseField>

<ResponseField name="Output" type="string | object" optional>
  The generated output or response for the inference result. For most runs this is a plain string. For phone (voice) runs, when the agent's audio was captured, this is a content-parts envelope `{"assistant_message": "<transcript>", "content": [{"type": "audio", "uri": "...", "transcript": "..."}]}` — the `assistant_message` field is the canonical scored scalar. Access the envelope via the SDK's `.actual_output_data` field and the scored transcript via `.actual_output`.
</ResponseField>

<Note>
  Retrieval context is not a stored field on the inference result. It is derived from the inference
  result's [`RETRIEVER` trace spans](/concepts/product/version/session/trace#retrieval-context-in-retriever-traces).
  You can still supply `retrieval_context` when logging (on create, update, or an agent response); Galtea
  records it as a `RETRIEVER` trace.

  If your agent already emits traces, we recommend sending `RETRIEVER` spans directly instead. This keeps
  one source of truth and lets you capture several retrieval steps per turn, which a single
  `retrieval_context` value cannot.
</Note>

<ResponseField name="Latency" type="float" optional>
  The latency in milliseconds for the model's response.
</ResponseField>

<ResponseField name="Usage Info" type="dict" optional>
  Token usage information for the inference result.
</ResponseField>

<ResponseField name="Cost Info" type="dict" optional>
  Cost information for the inference result.
</ResponseField>

<ResponseField name="Trace ID" type="string" optional>
  The W3C trace ID for the root span created during [Direct Inference](/concepts/product/endpoint-connection). This is the same trace ID propagated to your endpoint via the `traceparent` header, enabling correlation with your OTEL-instrumented service. Only present when the inference was generated via Direct Inference with W3C trace context propagation enabled.
</ResponseField>

## Related

<CardGroup cols={3}>
  <Card title="Concepts overview" icon="diagram-project" iconType="solid" href="/concepts/overview">
    How Galtea's concepts connect — diagram + per-entity quick reference.
  </Card>

  <Card title="Session" icon="comments" href="/concepts/product/version/session">
    The conversation that groups inference results together.
  </Card>

  <Card title="Evaluation" icon="clipboard-check" href="/concepts/product/version/session/evaluation">
    Score inference results using metrics.
  </Card>

  <Card title="Trace" icon="sitemap" href="/concepts/product/version/session/trace">
    Capture internal operations linked to inference results.
  </Card>
</CardGroup>
