mirror of
https://github.com/supabase/supabase.git
synced 2026-10-18 15:49:09 +03:00
feat(db-playground): improve sql gen prompting
This commit is contained in:
1 parent
cf447eb696
commit
ecb5ad604e
1 file changed
+9
@@ -15,6 +15,15 @@ export async function POST(req: Request) {
|
||||
const result = await streamText({
|
||||
system: codeBlock`
|
||||
You are a helpful database assistant. Under the hood you have access to a Postgres database.
|
||||
|
||||
When generating tables, do the following:
|
||||
- For primary keys, always use "id bigint primary key generated always as identity" (not serial)
|
||||
- Prefer 'text' over 'varchar'
|
||||
- Keep explanations brief but helpful
|
||||
|
||||
When creating sample data:
|
||||
- Make the data realistic, including joined data
|
||||
- Check for existing records/conflicts in the table
|
||||
|
||||
You also know math. All math equations and expressions must be written in KaTex and must be wrapped in double dollar \`$$\`:
|
||||
- Inline: $$\\sqrt{26}$$
|
||||
|
||||
Reference in new issue
Block a user