RaisDBRaisDB
AI

AI Assistant

The chat panel — ask questions about your schema and data, with full conversation memory.

Open the panel

Cmd/Ctrl + I toggles the AI panel. On macOS that's ⌘ I.

Context

RaiseDB gives the assistant context in this order:

  1. If the panel is pinned to a table, load that table's full schema
  2. Otherwise, look for @table mentions in your prompt
  3. Otherwise, load the first N tables in the current database (columns, types, indexes, FKs, comments)

@mention a table

Type @orders in your prompt to pin that table's schema. Multiple mentions allowed (@users @orders). Prefixed form @schema.table works too. Valid mentions are case-insensitive and deduped; invalid ones fall back to the database overview.

The textarea doesn't have an autocomplete for @ — just type the table name. The mention is parsed server-side before being sent to the model.

What you can ask

  • "How many users signed up last week?"
  • "Show me the schema of orders and suggest indexes"
  • "Explain what this query does" (paste SQL)

Slash commands

Type / in the panel to see available commands. Current set:

  • /explain — explain a selected query
  • /optimize — run the AI optimizer (see SQL Optimizer)
  • /safety — local safety check only, no AI call

Conversation memory

Persistent threads

Conversations are stored in ai_conversations + ai_messages. The full transcript (with tool records) is replayed on each new message, optionally summarized when it grows near the model's context window (~80% triggers an automatic summary; min 512 tokens).

Resume

Pick any thread from the AI history panel. The model, connection, database, schema, and table pins come back with it.

Split view

Chats can live in the sidebar or be pinned alongside the editor (split view). The conversation remembers which.

Memory

Long-term recall (free for all)

The assistant recalls facts from prior sessions via FTS5 search — top 8 hits.

Auto-extract (Pro)

Free plan reads existing memories but doesn't auto-extract new facts from chat. Pro plans auto-extract and persist after each session.

Manual storage

You can also pin a fact directly. Free: up to 50; Pro: unlimited.

Running generated SQL

Click Run under any SQL block, or Copy to editor to tweak first.

On this page