> ## 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.

# Version

> A specific iteration of a product in Galtea

## What is a Version?

A version in Galtea represents a specific iteration of a [product](/concepts/product). Versions allow you to track changes to your product over time and compare different implementations against the same tests.

You can **create**, view and manage your versions on the [Galtea dashboard](https://platform.galtea.ai/) or programmatically using the [Galtea SDK](/sdk/api/version/service).

<video autoPlay muted loop playsInline className="w-full aspect-video rounded-xl" src="https://mintcdn.com/galtea/dyF29XMGyYjp0rSG/videos/version-overview.mp4?fit=max&auto=format&n=dyF29XMGyYjp0rSG&q=85&s=164c0a20f547b8681ea4d7d033753eca" data-path="videos/version-overview.mp4" />

## Comparing Versions

One of the key benefits of tracking versions in Galtea is the ability to compare different implementations of your product. This allows you to:

* Measure improvements between versions
* Identify regressions in newer versions
* Compare different model providers or approaches
* Make data-driven decisions about which version to deploy

<Card title="Run Evaluations" icon="clipboard-check" iconType="solid" href="/concepts/product/version/session/evaluation">
  Learn how to run evaluations for your versions
</Card>

## Version Lineage

A version can have a **parent version**. The parent is the version you started from when you made a new iteration. The new version is called a **version revision**, and it keeps a link back to its parent.

This link lets you trace where each version came from. When you improve a version (for example, you change its system prompt or its model), you create a revision from it instead of starting from scratch. Over time this builds a parent-child chain, so you can follow the full history of how a version evolved.

A version with no parent is a **root version**. Its parent is empty.

<Info>
  Lineage is **provenance only**. The parent link records history. It does not change how the version behaves, how it is evaluated, or how it is compared. A revision is a normal, independent version.
</Info>

On the [Galtea dashboard](https://platform.galtea.ai/), use the **Iterate from version** action when creating a version to pick a parent. The new version's details page then shows an **Evolved from** link back to its parent. The parent must belong to the same [product](/concepts/product).

With the [Galtea SDK](/sdk/api/version/service), pass `parent_version_id` to `versions.create` to set the parent.

```python theme={"system"}
child_version = galtea.versions.create(
    name="Version-docs-child-" + run_identifier,
    product_id=product_id,
    description="Iteration of the previous version",
    parent_version_id=version_id,
)
```

## Endpoint Connections

An Endpoint Connection tells Galtea how to call your AI system's API — the URL, authentication, request format, and how to extract the response.

Three roles are available:

* **Conversation** (required): Handles each interaction turn
* **Initialization** (optional): Runs before the conversation to set up a session
* **Finalization** (optional): Runs after the conversation to release resources

Most products only need a Conversation endpoint.

<Card title="Configure Endpoint Connections" icon="plug" href="/concepts/product/endpoint-connection">
  Full reference for URLs, auth types, Jinja2 input templates, JSONPath output mapping, session state management, and retry configuration.
</Card>

## SDK Integration

The Galtea SDK allows you to create, view, and manage versions programmatically. This is particularly useful for organizations that want to automate their versioning process or integrate it into their CI/CD pipeline.

<CardGroup cols={2}>
  <Card title="Version Service SDK" icon="code-branch" iconType="solid" href="/sdk/api/version/service">
    Manage product versions using the Python SDK
  </Card>

  <Card title="GitHub Actions" icon="code-compare" href="/sdk/integrations/github-actions">
    Learn how to set up GitHub Actions to automatically create new versions and evaluate them
  </Card>
</CardGroup>

## Version Properties

<ResponseField name="Version Name" type="Text" required>
  The name of the version. **Example**: "v1.2.0" or "GPT-4 Implementation"
</ResponseField>

<ResponseField name="Version Description" type="Text">
  A description of the version, typically highlighting what makes it different from other versions. **Example**: "Improved summarization algorithm with better fact retention"
</ResponseField>

<ResponseField name="Parent Version" type="Version">
  The version this one was iterated from. See [Version Lineage](#version-lineage). Empty for a root version.
</ResponseField>

<ResponseField name="Model" type="Model" required>
  The AI [Model](/concepts/model) used by this version. Galtea uses this to track costs, calculate per-evaluation inference spend, and associate the version with the model's pricing and tokenization characteristics.
</ResponseField>

<ResponseField name="System Prompt" type="Text">
  The system prompt used for this version. **Example**: "You are an expert legal document summarizer. Provide concise summaries that capture all key legal points."
</ResponseField>

<ResponseField name="Conversation Endpoint Connection" type="EndpointConnection">
  The primary [Endpoint Connection](/concepts/product/endpoint-connection) used for the main conversational interactions with your AI product. This is the only required endpoint connection.

  **Used for**:

  * Sending user messages
  * Receiving AI responses
  * (Often) creating and maintaining the external session state
</ResponseField>

<ResponseField name="Initialization Endpoint Connection" type="EndpointConnection">
  An optional [Endpoint Connection](/concepts/product/endpoint-connection) executed **before** the conversation begins. Used to initialize a session with your AI product.

  **Used for**:

  * Creating a session on the external API
  * Obtaining a session ID that will be used in subsequent conversation calls
  * Setting up initial context or configuration

  <Note>
    The initialization endpoint **must** return a `session_id` in its response. Configure the `outputMapping` with a `session_id` key pointing to the session identifier in the response. This value is stored in Galtea and made available in subsequent calls via `{{ session_id }}`.
  </Note>
</ResponseField>

<ResponseField name="Finalization Endpoint Connection" type="EndpointConnection">
  An optional [Endpoint Connection](/concepts/product/endpoint-connection) executed **after** the conversation ends (including after errors). Used to clean up resources on your AI product.

  **Used for**:

  * Closing sessions on the external API
  * Releasing resources
  * Triggering post-conversation processing

  <Note>
    The finalization step runs in a `finally` block, meaning it executes even if the conversation encounters an error. Errors in the finalization step are logged but do not fail the overall evaluation.
  </Note>
</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">
    A group of inference results that make up a full conversation.
  </Card>

  <Card title="Endpoint Connection" icon="plug" href="/concepts/product/endpoint-connection">
    Configure how Galtea calls your AI system's API.
  </Card>

  <Card title="Evaluation" icon="clipboard-check" href="/concepts/product/version/session/evaluation">
    Run evaluations to assess the performance of your versions.
  </Card>
</CardGroup>
