# AI Assist

Source: https://help.zira.us/docs/data-sources/create-and-edit/ai-assist
Summary: Use AI Assist inside the data-source editor to draft the title, description, fields, options, and validation rules for a custom schema.
Updated: 2026-04-26

Use **AI Assist** when you want a faster starting point for a custom data source.

Instead of building the structure one field at a time, you can describe what you want and let AI draft the first version directly in the editor.

## Open AI Assist

1. Open a channel.
2. Click the **Data Sources** tab.
3. Click **Add Data Source**.
4. Select **Custom**.
5. In the editor, click **AI Assist**.

AI Assist opens beside the editor so you can keep the field list and preview in view while you work.

## What AI Assist can draft

You can ask AI Assist to draft:

- the title
- the description
- the main field structure
- sections and labels
- required fields
- dropdown options
- calculated fields
- validation limits

## Ask for the right level of detail

AI Assist works best when your request explains:

- what the data source is for
- which values users should enter
- which fields are required
- which values should be calculated
- whether any limits or checks should be enforced

Good requests usually describe the workflow, not just the page.

## Review the draft

After AI Assist responds, it shows a compact draft card. Click the draft card to expand it when you want to review:

- the suggested title
- the description
- each suggested field
- validation details
- options for list fields
- any expression that was suggested

Use **Apply draft** when you want to copy the draft into the editor. On a new data source, AI Assist can apply the first draft automatically so you can start editing right away.

## Understand metric matching

When possible, Zira tries to match suggested fields to existing metrics with the same name.

If a relevant metric does not already exist:

- the field can still be added
- the metric stays empty
- you can create or select the right metric manually in the editor

This helps AI Assist stay helpful without forcing the wrong metric onto a field.

## Choose how to apply the draft

Before you apply the result, choose whether to:

- replace the current fields
- or append the new fields to what you already have

Use **Replace current fields** when you want a fresh start. Turn it off when you want AI to extend a draft you already began.

When you edit an existing data source, Zira asks you to confirm before replacing existing fields. This helps prevent accidental removal.

## Refine after applying

After applying the draft:

- adjust field names if needed
- review metrics
- update any dropdown options
- fine-tune validation
- test expressions carefully before saving

AI Assist applies changes to the editor first. Review the result, then click **Save** when it is ready. Use **Discard changes** if you want to return to the last saved version.
