Create a structured knowledge base
1
Start a new knowledge base
Open the More group in the left navigation, click Knowledge base, then click Create Knowledge Base and choose Structured Data.
2
Name it
Enter a Name (up to 60 characters), and optionally a Description and Tags. Click Create.
3
Choose a data source
Under Spreadsheet, choose CSV or Excel. Under Database Connection, choose your database, such as postgres, mysql, snowflake, bigquery, sql_server, clickhouse, or actian. Click Next.
4
Add your data
For a spreadsheet, click Upload Files and add your files. Each file shows its status, and Processed means it’s ready. For a database, enter your connection details. Click Next.

Database connection details
After a successful connection, IdeaBoxAI imports the database schema automatically.
Explore the Canvas
Once your data is in, the knowledge base opens on the Canvas tab, which shows your tables and how they connect.
- Tables sidebar: Lists every table in the knowledge base. Search to find one.
- Table cards: Each table shows its columns and data types.
- Relationships: Each table lists its joins to other tables. Click + to add one, or Select to choose existing ones.
- Enhance with AI: Improve your schema’s metadata with AI, such as descriptions and meanings for tables and columns.
- Zoom: Use the controls in the lower-left corner to zoom in, zoom out, or fit the view.
- Check relationships against your source database’s constraints.
- Avoid circular or ambiguous joins.
- Describe tables and columns clearly so Persona AI can reason about your data.
Use your knowledge base in chat
There are two ways to make a knowledge base available to Persona AI:- In a chat: Select the knowledge base from the chat input before you ask your question. It appears as a tag above your message.
- In a project: Add it to a project’s Knowledge Bases section, and every chat in the project can use it. See Projects. Then ask your question in plain language, such as “From the sales pipeline data, I need a list of the accounts, their owner, region, and fiscal quarter with the quota.” Persona AI writes and runs the SQL for you.
Query with the SQL Editor
The SQL Editor is a query workbench inside the knowledge base. To open it, select the Editor tab. The header shows the knowledge base, its source type, and a read-only badge, because every query runs as a read-only statement.
- Run: Run your query, or press Cmd+Enter (Ctrl+Enter on Windows). Queries run read-only and paged, with a row limit and a timeout.
- Suggest SQL: Describe what you want in plain language and get a draft query built from the knowledge base’s schema.
- Validate: Check your query with static checks and an optional AI review.
- Format: Tidy up a query’s formatting.
- History: Recall queries you’ve run earlier.
- New query: Clear the editor and start a new query.
- Review the output: See your data on the Results tab, any messages on the Messages tab, and warnings about your query on the Validation tab. The footer shows rows returned, elapsed time, and the source.
- Copy or export: Click Copy or CSV above the results to take them out of the Editor.
- Save: Give the query a Name, an Example question in the words a user would actually ask, or both, then click Save so it can be reused. Use the Enabled toggle to turn a saved query on or off.
- Browse the schema: Open the sidebar to see every table and column. Click one to insert it into your query, correctly qualified for the connected engine.
Table names are qualified the way your connected engine resolves them. Snowflake, for example, has no default database or schema, so a query written as ORDERS won’t resolve, while SNOWFLAKE_SAMPLE_DATA.TPCH_SF1.ORDERS will. The Editor, autocomplete, and Suggest SQL, qualify names automatically.
Saved queries
Once a query is saved, Persona AI can find and run that exact query instead of writing a new one. Your saved queries are listed on the Queries tab of the sidebar. Search them by name, or click Manage queries to manage them all. Click a saved query to open it in the Editor.
- Source: A badge shows where the query came from, such as From editor.
- Versions: See earlier versions of the query.
- Update: Save your changes to the query.
- An exact match on the query’s name.
- An exact match on the question it was saved with.
- A close match in meaning, so a rephrased question still finds it. If nothing matches, Persona AI says so and generates a fresh query.
A saved query isn’t a cache. It re-runs against live data every time, so results stay current.
Review and correct SQL in chat
When Persona AI answers a question from your data, it shows the complete SQL it wrote and ran. Expand Execute Query in the response to see it.Confirm the result to save the query
Persona AI only saves a query when you confirm the result. Check the answer, then tell Persona AI it’s correct in the same chat, for example, “The result looks correct.” Persona AI then saves the query to the knowledge base it ran against, so it can reuse that exact SQL for similar questions.
Correct the query
If the query isn’t quite right, correct it before you confirm:1
Edit the query
Click Edit on the Execute Query step. The SQL opens in an editor.
2
Correct the SQL
Make your changes. You can also explain the change in Why does this need correcting? This is optional.
3
Validate it
Click Validate to check that the corrected SQL runs.
4
Save the correction
Click Save correction, or Cancel to discard your changes.
