RowDex
Documentation

AI assistant

Use the RowDex AI assistant to draft read-only SQL from plain English, based on your real schema. Use the free shared model or connect your own OpenAI, OpenRouter or Anthropic key.

4 min readUpdated

On this page

Describe what you want in plain English. The assistant reads your schema, drafts a query that uses your real tables and columns, and waits for you. It never runs anything on its own.

Screenshot placeholder

The AI assistant panel beside the editor showing a question, a generated read-only SELECT query and Insert, Run and Copy buttons.

public/docs/ai-assistant-panel.png
Ask a question, review the draft, then insert or run it.

Use it#

  1. Connect to a database

    The assistant needs a connection so it can read your schema. Without one you can still use Chat mode for general SQL questions.

  2. Open the assistant

    Press , or open the command palette and choose Show AI assistant.

  3. Ask

    Type a request such as top 10 customers by revenue last month, or ask a question such as what is the difference between INNER JOIN and LEFT JOIN?

  4. Review the draft

    Read the SQL. Use Insert to put it in a new editor tab without running it, Run to execute it on the active connection, or Copy to take it elsewhere.

Auto, Chat and SQL modes#

ModeBehavior
AutoDecides for you: data requests produce SQL, questions produce an explanation.
SQLAlways writes a query.
ChatAlways answers in words, without writing a query unless asked.

You can also steer it with a prefix: start with sql: to force a query, or chat: or explain to ask a question.

Read-only by design#

  • The assistant only generates read-only queries. If a request would change data, it declines and suggests rephrasing as a reporting question or asking in Chat mode.
  • Generated SQL is checked before it can run. Anything that is not read-only is blocked, and a draft that fails the check is repaired or refused.
  • Nothing executes until you click Run.

Control what it sees#

By default the assistant is given your schema, meaning table and column names, so its queries reference columns that really exist. For a large database, use the Tables scope to limit the context to one or more tables. It is faster, cheaper and more accurate.

Teach it your vocabulary#

Open Schema notes in the assistant and write what the schema cannot tell it: what a status code means, which table is the source of truth for revenue, how two tables join. The notes are saved per connection on your computer and are treated as authoritative business context, though they can never add a column that does not exist.

Choose a provider#

Open Preferences with and go to the AI tab.

OptionHow it works
Free shared modelWorks with no setup. Requests go through RowDex servers to a shared model. It can be busy at times; retry in a few seconds.
Your own providerRequests go directly from the app to the endpoint you configure, using your own API key. Better accuracy, and your data does not pass through RowDex.

For your own provider, pick a preset to fill in the endpoint and a default model, then enter your API key. Presets are provided for OpenAI, OpenRouter and Anthropic. You can change the Base URL and Model to use any compatible service.

Screenshot placeholder

The AI tab in Preferences with the Free shared model and Your own provider options, and fields for base URL, model and API key.

public/docs/ai-preferences.png
Choose the free shared model or your own provider.

More ways AI helps#

  • Explain plans: summarize a query plan in plain language. See Explain plans.
  • Clear conversation starts fresh when you change topic. Follow-up questions such as now only last week use the last few messages as context.
Is the AI assistant available on the free plan?
Yes. AI query assist is included in Basic. See Plans and limits for the full list.
Why does it say the model is busy?
The free shared model is used by many people. Hit Retry in a few seconds, or switch to your own API key in Preferences, AI for a dedicated connection.
Can it modify my data?
No. It only produces read-only queries and never runs one without your click. Use the SQL editor for writes.

Was this page helpful?