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

# AI assistant

> Tamery's schema-aware AI assistant writes, explains, fixes, and optimizes SQL, and powers natural-language filters and data seeding.

The AI assistant has full context of your connected database — tables, column types, relationships — so it writes accurate SQL without you pasting schema into every message. It's available in the chat panel and powers inline editor and table-browser features.

<Note>
  The assistant only runs read-only queries through its database tool. It never runs `INSERT`,
  `UPDATE`, `DELETE`, or `DROP` on its own — data changes go through the table browser or SQL
  editor.
</Note>

## Chat

Open the chat panel from the connection toolbar. Ask in plain English:

* *"Which tables store customer order data?"*
* *"Explain this query and whether it can be optimized."*
* *"Find users who signed up in the last 7 days but haven't ordered."*

It keeps conversation context within a session, so follow-ups like *"now only EU users"* work.

## Models

The assistant runs on a frontier model automatically — nothing to pick or configure. If the primary model is overloaded, Tamery falls back to another top model to stay responsive.

<CardGroup cols={3}>
  <Card title="Claude" icon="robot" href="/account/plans">
    Anthropic's Claude (Opus) is the default.
  </Card>

  <Card title="GPT" icon="robot" href="/account/plans">
    OpenAI's GPT is an automatic fallback.
  </Card>

  <Card title="Gemini" icon="robot" href="/account/plans">
    Google's Gemini is also a fallback.
  </Card>
</CardGroup>

The assistant is a subscription feature. See [Plans](/account/plans).

## What it can do

<CardGroup cols={2}>
  <Card title="Write SQL from English" icon="pen-nib" href="/features/sql-editor">
    Describe the data; get a complete query using your real schema.
  </Card>

  <Card title="Explain queries" icon="magnifying-glass" href="/features/sql-editor">
    Paste SQL and ask for a step-by-step explanation.
  </Card>

  <Card title="Fix errors" icon="circle-exclamation" href="/features/sql-editor">
    Share an error (or use the inline Fix button) for a corrected query.
  </Card>

  <Card title="Optimize / refactor" icon="sliders" href="/features/sql-editor">
    Add a JOIN, introduce a CTE, rewrite a subquery as a window function.
  </Card>

  <Card title="Query your database" icon="database" href="/features/sql-editor">
    Runs SELECTs to check counts or sample data when answering.
  </Card>

  <Card title="Filters from English" icon="filter" href="/features/table-browser">
    Describe the rows you want; get structured filter conditions.
  </Card>
</CardGroup>

## Enhance prompt

Click **Enhance** before sending to rewrite a vague message into a clearer one, with schema context added. You review the result before it's sent.

## Natural-language filters

<Steps>
  <Step title="Open the filter panel">In the table browser, click **Filter**.</Step>

  <Step title="Describe the filter">
    Click **Ask AI** and type, e.g. *"orders in the last 30 days over \$500 that haven't shipped"*.
  </Step>

  <Step title="Review and apply">The AI builds structured conditions. Adjust, then **Apply**.</Step>
</Steps>

<Note>
  Free accounts get a limited number of AI filter uses per month. Paid plans are unlimited. See
  [Plans](/account/plans).
</Note>

## AI data seeding

Open a table, click **Seed**, set a row count. Tamery picks generators from column names and types — names, emails, timestamps, and foreign keys referencing existing rows. Rows are previewed before insertion.

## Plans

| Feature                  | Free    | Subscription |
| ------------------------ | ------- | ------------ |
| AI chat                  | —       | ✓            |
| Inline SQL generation    | —       | ✓            |
| Fix SQL                  | —       | ✓            |
| Modify SQL               | —       | ✓            |
| Enhance prompt           | —       | ✓            |
| Natural-language filters | Limited | Unlimited    |
| Data seeding             | Limited | Unlimited    |

See [Plans](/account/plans).
