Chat with your Database

Sequel allows you to directly talk to your database in Natural Language (English). Define your query as clearly as possible to let Sequel understand what you are looking for, and Sequel will return the results back to you. Sequel will refrain from responding to any information which is not relevant to your database, non exsiting data in the chat, or destructive instructions.

ai chat with sequel

Asking queries

You can simply ask Sequel about anything related to the data stored in your database. If you have multiple similar schemas or tables, you can specifically mention Sequel to look into specific tables / schemas to fetch the information. Sequel will convert your query into SQL and run it against your database.

By default Sequel will auto-run the SQL queries, so refrain from asking very destructive operations to be done (like dropping tables or modifying the database).

Sequel will try it's best to come up with SQL based on the schema of your database, and show you the result and the SQL query in the table. You can always click on the show in tab button on top-right corner of the result viewer to open the SQL query in the editor to make any changes or edit the query.

Here are some example queries you can try out with Sequel (assuming the data exists in your database)

  1. Total signups in the last 24 hours
  2. Total Orders in last month
  3. My top 5 users

Limits in chat query responses

By default, Sequel will try to limit the responses queries via the chat to 100 rows, you can open the query in a new tab to edit and extend the limit any time.

Visualising your data

One of the powerful features of Sequel is it's ability to display charts and visualisations based on your data. You can simply ask Sequel to visualise the data in any of the supported formats to get a chart rendered for you. below are the supported charts with Sequel right now, we will be adding support for more soon.

  1. Bar chart
  2. Pie chart
  3. Line chart

Here are some example queries you can use to display a chart

  1. Show me a pie chart of most sold items in my inventory
  2. Show me a graph of user growth in last 30 days
  3. Show me a bar chart of my most selling products based on their orders

Preventing AI from querying specific schema

You can prevent AI from generating SQL query accessing certain schema by deselecting schemas from project settings. Click on the settings icon from the left side bar inside your database, and then deselect the schemas you don't want AI to generate SQL query on.

This is just a soft restriction to prevent passing the schema context to AI. Reducing the unwanted schema being sent to AI can improve the accuracy and speed of AI responses and query generation.

Custom Instructions

You can pass custom instructions to Sequel to help refine the answers and SQL query generation. You can head over to custom instructions under project settings inside your connected database and provide instructions to Sequel.

Here are a few things you can provide as instructions:

  • Information regarding your database and type of data being stored. eg: "The database contains, data related to ecommerce store called Sequel Fashion."
  • Your company KPIs, metrics and other information on how to calculate them. eg: "To calculate the total revenue, use the order_value column inside orders table, and apply the discount"
  • Relationships of the tables which are not explicitly available in the databse. eg: "To calculate the available stock, you can match the product_id from products table with product_id in inventory table"

Signup to Sequel now to try out AI to SQL, and Natural Language to chat with your database.