> For the complete documentation index, see [llms.txt](https://docs.soda.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.soda.io/soda-ai/contract-copilot.md).

# Contract Copilot

{% hint style="success" %}
**Do this with Soda AI.** Describe the change you want in plain English and Soda AI will update your contract from schema and metadata. You approve the diff.

Read more about [Soda AI](/soda-ai.md)'s capabilities.
{% 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 checks
* Understand how a contract was changed

{% if !(visitor.claims.plan === 'enterprise' || visitor.claims.plan === 'enterpriseUserBased' || visitor.claims.plan === 'datasetStandard') %}

<figure><img src="/files/yPFgGRjEqYxmXQc78PnB" alt=""><figcaption></figcaption></figure>
{% endif %}

{% if visitor.claims.plan === 'enterprise' || visitor.claims.plan === 'enterpriseUserBased' || visitor.claims.plan === 'datasetStandard' %}

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

{% hint style="warning" %}
This feature requires the **Manage contract** permission on the dataset. Learn more about permissions here: [Dataset Attributes & Responsibilities](/dataset-attributes-and-responsibilities.md)
{% endhint %}

{% stepper %}
{% step %}
**You provide a natural-language request** (e.g. “Add freshness checks”)
{% endstep %}

{% step %}
Soda retrieves relevant **dataset metadata**, such as:

* Column names and types
* Available check attributes
* Data source type
  {% endstep %}

{% step %}
This metadata, together with the request, is sent to the model
{% endstep %}

{% step %}
**The model proposes contract updates** directly on the existing contract
{% endstep %}

{% step %}
The user reviews and applies the changes
{% endstep %}
{% endstepper %}

<figure><img src="/files/yPFgGRjEqYxmXQc78PnB" alt=""><figcaption></figcaption></figure>

{% 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="/files/e5RKly8ePK5s7eC4HFnt" 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="/files/Ggt3ZsIAPz0MuqjPQEMb" 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](/soda-ai.md#sodas-ai-security-and-privacy-measures).

{% hint style="info" %}
Contract Copilot can generate contracts that include [`column_expression`](broken://pages/cCsset8WuU1Ds6xFe7RD) 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 %}
{% endif %}

<br>

***

{% if (visitor.claims.plan === 'datasetStandard')%}
{% hint style="success" %}
You are **logged in to Soda** and seeing the **Dataset Standard license** documentation. Learn more about [Documentation access & licensing](/reference/documentation-access-and-licensing.md).
{% endhint %}
{% endif %}

{% if (visitor.claims.plan === 'enterprise')%}
{% hint style="success" %}
You are **logged in to Soda** and seeing the **Team license** documentation. Learn more about [Documentation access & licensing](/reference/documentation-access-and-licensing.md).
{% endhint %}
{% endif %}

{% if (visitor.claims.plan === 'enterpriseUserBased')%}
{% hint style="success" %}
You are **logged in to Soda** and seeing the **Enterprise license** documentation. Learn more about [Documentation access & licensing](/reference/documentation-access-and-licensing.md).
{% endhint %}
{% endif %}

{% if !(visitor.claims.plan === 'enterprise' || visitor.claims.plan === 'enterpriseUserBased' || visitor.claims.plan === 'datasetStandard')%}
{% hint style="info" %}
You are **not logged in to Soda** and are viewing the default public documentation. Learn more about [Documentation access & licensing](/reference/documentation-access-and-licensing.md).

If you do have a Soda license, make sure to **log in to Soda Cloud in this same browser**.
{% endhint %}
{% endif %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.soda.io/soda-ai/contract-copilot.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
