# Contract Copilot

{% hint style="warning" %}
This feature requires the **Manage contract** permission on the dataset. Learn more about permissions here: [dataset-attributes-and-responsibilities](https://docs.soda.io/dataset-attributes-and-responsibilities "mention")
{% endhint %}

**Contract Copilot** is an AI assistant that helps teams **understand**, **edit and evolve existing data contracts** using natural language. It acts as an intelligent guide throughout the contract lifecycle, making it easier to define expectations, detect gaps, and keep contracts aligned with real-world data behavior, **without ever accessing or processing your raw data**.

It allows users to:

* Add, modify, or remove checks
* Update contracts faster without manually writing SodaCL
* Understand how a contract was changed

#### <i class="fa-camcorder">:camcorder:</i> Watch Contract Copilot in action

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FA2PmHkO5cBgeRPdiPPOG%2Fuploads%2FN7xN0mrOVhgz7vPew2p5%2FGrabaci%C3%B3n%20de%20pantalla%202025-12-15%20174046.mp4?alt=media&token=4dec17b6-abfb-46bf-83e9-f98a2fecdb1b>" %}

Contract Copilot is designed to support both:

* **Business and analytics users**, who need assistance drafting data contracts and establishing data expectations, and
* **Data engineers and platform teams**, who need precise, maintainable, and scalable contracts.

## How does Contract Copilot work?

1. **You provide a natural-language request** (e.g. “Add freshness checks”)
2. Soda retrieves relevant **dataset metadata**, such as:
   * Column names and types
   * Available check attributes
   * Data source type
3. This metadata, together with the request, is sent to the model
4. **The model proposes contract updates** directly on the existing contract
5. The user reviews and applies the changes

{% hint style="info" %}

#### Traceability

Contract Copilot allows you to see what changed directly in the Soda Cloud UI. Requests and outputs can be logged for review and troubleshooting, allowing for cross-team traceability and transparency.
{% endhint %}

***

## Enable/Disable Contract Copilot

Soda Contract Copilot can be configured from the **Organization Settings**.

{% stepper %}
{% step %}
Click on the **profile icon** on the top right corner → Navigate to **Organization Settings.**

<figure><img src="https://1123167021-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FA2PmHkO5cBgeRPdiPPOG%2Fuploads%2FkZCGJNF6NAp7BrbqXPZe%2Fimage.png?alt=media&#x26;token=96c20ef1-6bed-4284-9660-e2f7cbfac5c7" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Under the **Organization** tab **> Soda AI:** Check/Uncheck the "Enable Contract Copilot powered by OpenAI" checkbox to enable/disable the feature.

<figure><img src="https://1123167021-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FA2PmHkO5cBgeRPdiPPOG%2Fuploads%2FNrFNQqrfSN7xVvwbpIRt%2Fimage.png?alt=media&#x26;token=d4f37cdb-223e-4982-9cbe-abe1091e90cb" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Click **Save** on the top right corner.
{% endstep %}
{% endstepper %}

***

## Privacy & security

{% columns %}
{% column %} <i class="fa-square-check">:square-check:</i> Contract Copilot uses AI/ML techniques to **help you write data contracts**, analyzing:

* Dataset schemas
* Non-identifiable column-level metadata
* Statistical summaries
* Existing contract definitions and checks
  {% endcolumn %}

{% column %} <i class="fa-xmark">:xmark:</i> Contract Copilot **does not** analyze or inspect:

* Raw table data
* Individual records
* Row-level values
* PII or sensitive fields
  {% endcolumn %}
  {% endcolumns %}

### Confidentiality & access control

* Metadata is retrieved from Soda Cloud on a **need-to-know basis**
* Only users with **permission to edit or propose contract changes** can access Contract Copilot
* All users must authenticate

> Learn more about [Soda's AI security & privacy measures](https://docs.soda.io/reference/soda-ai#sodas-ai-security-and-privacy-measures).

{% hint style="info" %}
Contract Copilot can generate contracts that include [`column_expression`](https://docs.soda.io/data-testing/broken-reference) when detecting:

* Nested fields
* Type mismatches
* Casting requirements
  {% endhint %}

## Limitations

* Copilot does not guarantee correctness of checks
* Users remain responsible for validating contract logic
* Copilot does not operate outside the context of an existing contract

{% hint style="success" %}
Soda Contract Copilot focuses on **assisting decision-making**, not replacing human ownership of contracts. The output is a set of **suggestions, explanations, or guidance** that you can review and apply.
{% endhint %}

<br>

***

{% if visitor.claims.plan === 'free' %}
{% hint style="success" %}
You are **logged in to Soda** and seeing the **Free license** documentation. Learn more about [documentation-access-and-licensing](https://docs.soda.io/reference/documentation-access-and-licensing "mention").
{% endhint %}
{% endif %}

{% if visitor.claims.plan === 'teams' %}
{% hint style="success" %}
You are **logged in to Soda** and seeing the **Team license** documentation. Learn more about [documentation-access-and-licensing](https://docs.soda.io/reference/documentation-access-and-licensing "mention").
{% endhint %}
{% endif %}

{% if visitor.claims.plan === 'enterprise' || visitor.claims.plan === 'enterpriseUserBased' %}
{% hint style="success" %}
You are **logged in to Soda** and seeing the **Enterprise license** documentation. Learn more about [documentation-access-and-licensing](https://docs.soda.io/reference/documentation-access-and-licensing "mention").
{% endhint %}
{% endif %}

{% if !(visitor.claims.plan === 'free' || visitor.claims.plan === 'teams' || visitor.claims.plan === 'enterprise' || visitor.claims.plan === 'enterpriseUserBased') %}
{% hint style="info" %}
You are **not logged in to Soda** and are viewing the default public documentation. Learn more about [documentation-access-and-licensing](https://docs.soda.io/reference/documentation-access-and-licensing "mention").
{% endhint %}
{% endif %}
