mirror of
https://github.com/supabase/supabase.git
synced 2026-10-17 07:09:07 +03:00
Merge branch 'feat/tiger-d1' of https://github.com/supabase/supabase into feat/tiger-d1
This commit is contained in:
commit
6ec9d88f46
1 file changed
+11
-11
@@ -26,45 +26,45 @@ Today we releasing Supabase Assistant v2 in the dashboard - a global assistant w
|
||||
|
||||
## A new, unified approach to AI
|
||||
|
||||
The new Assistant is built off a flexible system of components, tools and API’s we can use to more easily extend what it can do, and to provide context either manually (e.g. an RLS Policy) or automatically based on where you are in the dashboard (e.g. the table you have open).
|
||||
Our new Assistant more extensible, using a flexible system of components, tools, and APIs. You can provide context manually (e.g. an RLS Policy) or automatically based on whichever page you're visiting in the dashboard (e.g. the specific table you're working on).
|
||||
|
||||
The result is a single panel that’s persistent across the entire dashboard. It sits alongside your workspace and can be called upon when needed (`cmd+i`!). It automatically retrieves context (e.g. schema, tables, policies) for your prompt and can be given extra context to work with, such as a policy, function, or any kind of SQL statement.
|
||||
The result is a single panel that's persistent across the entire dashboard. It sits alongside your workspace and can be called upon when needed (`cmd+i`!). It automatically retrieves context for your prompt and can be provded with extra context similar to other AI tools like Cursor and GitHub Copilot.
|
||||
|
||||
## New abilities in Supabase Assistant v2
|
||||
|
||||
Let’s take a look at how the new Assistant can help you in your database journey.
|
||||
Let's take a look at new abilities in this release.
|
||||
|
||||
### Schema design
|
||||
|
||||
First off, if you are creating something new, let the Assistant guide or inspire you with how to structure your database, as well as generate the queries required to set it up.
|
||||
If you are creating something new, the Assistant can guide or inspire you. It will show you how to structure your database and generate all the SQL queries to set it up.
|
||||
|
||||
<Img alt="Design new database schemas" src="/images/blog/launch-week-13/assistant/design.png" />
|
||||
|
||||
### Writing SQL
|
||||
|
||||
Like our previous Assistant, the new Assistant will help you write queries based on your schema.
|
||||
Like our previous Assistant, the new Assistant will help you write queries based on your schema. This version has better contextual understanding and can provide more accurate suggestions.
|
||||
|
||||
### Debug your queries
|
||||
|
||||
Sometimes you or the Assistant will write an invalid query. Like previous versions, you can use the Assistant to attempt to debug what’s wrong, either through the SQL Editor or within the Assistant panel via the query blocks directly.
|
||||
Writing SQL can be tough. You can use the new Assistant to debug database errors directly through the SQL Editor or within the Assistant panel.
|
||||
|
||||
<Img alt="Debug your queries with AI" src="/images/blog/launch-week-13/assistant/debug.png" />
|
||||
|
||||
### Discover data insights
|
||||
|
||||
Since you can now run queries directly within the Assistant, it can be a useful (and fun) way to query your data through natural language. Basic select queries are run automatically, and results are displayed to you within the conversation, either in tabular form or chart form. Chart axis are picked by the Assistant. Importantly, your data is not sent to the underlying LLM model, only information about your schema. This is an incredibly helpful tool for folks who are interested in analyzing the data, but may not feel comfortable writing SQL.
|
||||
The new Assistant can run queries directly. This can be a useful (and fun) way to query your data through natural language. Basic select queries run automatically, and results are displayed within the conversation in tabular form or chart form. The chart axis are picked intuitively by the Assistant. No data is sent to the underlying LLM, only your schema structure. This is a helpful tool for folks who are not comfortable with SQL but are still interested in analyzing data insights.
|
||||
|
||||
<Img alt="Query data with AI" src="/images/blog/launch-week-13/assistant/query.png" />
|
||||
|
||||
### SQL to REST
|
||||
|
||||
Once your database is set up, you’ll most likely want to connect to it, either directly or through one of our client libraries. If you’re using our `supabase-js` library, we’ve added a helpful tool to convert an SQL query to supabase-js client code. Simply ask the Assistant to convert a query, and it will respond with either a complete snippet for you to copy or a combination of function + RPC call. This is powered by the [sql-to-rest](https://github.com/supabase-community/sql-to-rest) library.
|
||||
Once your database is set up, probably want to connect to it directly or with one of our client libraries. If you're using our `supabase-js` library, we've added a helpful tool to convert an SQL query to supabase-js client code. Simply ask the Assistant to convert a query, and it will respond with either a complete snippet for you to copy or a combination of function + RPC call. This is powered by the [sql-to-rest](/docs/guides/api/sql-to-rest) tool.
|
||||
|
||||
<Img alt="Convert SQL to supabase-js code" src="/images/blog/launch-week-13/assistant/js.png" />
|
||||
|
||||
### RLS Policies: Protect your database
|
||||
|
||||
Use the Assistant to suggest, create or modify RLS Policies. To create a new policy, just explain what kind of behavior you want and the Assistant will retrieve knowledge around your database schema and existing policies. To edit an existing policy, click “edit with Assistant” within your policy list and the Assistant will be given the appropriate context and starting prompt for you to modify. Run the generated queries to create or modify your policies.
|
||||
Use the Assistant to suggest, create or modify RLS Policies. Simply explain the desired behavior and the Assistant will generate a new Policy using the context of your database schema and existing policies. To edit an existing policy, click “edit with Assistant” within your Policy list. The Assistant will be provided the appropriate context for you to start prompting.
|
||||
|
||||
<Img
|
||||
alt="Create and edit RLS Policies with AI"
|
||||
@@ -73,7 +73,7 @@ Use the Assistant to suggest, create or modify RLS Policies. To create a new pol
|
||||
|
||||
### Postgres Functions and Triggers
|
||||
|
||||
Suggest, create or update functions and triggers in a similar way to policies. Just describe what you want or select “edit with Assistant” from your function or trigger list.
|
||||
Suggest, create or update functions and triggers in a similar way to policies. Just describe what you want or select “Edit with Assistant” from your Function or Trigger list.
|
||||
|
||||
<Img
|
||||
alt="Create and edit functions and triggers with AI"
|
||||
@@ -86,4 +86,4 @@ This release gives us a foundation to build off and incorporate into other parts
|
||||
|
||||
## How to access
|
||||
|
||||
V2 is currently a feature preview which you can access via your Profile menu → Feature previews → Supabase AI Assistant V2 → Enable. Once you enable it you’ll see the assistant icon in your toolbar, or alternatively hit `cmd + i` anywhere in the dashboard.
|
||||
Supabase Assistant v2 is a feature preview which you can access via your Profile menu → Feature previews → Supabase AI Assistant V2 → Enable. Once you enable it you'll see the assistant icon in your toolbar, or alternatively hit `cmd + i` anywhere in the dashboard.
|
||||
Reference in new issue
Block a user