feat(prompts): Enhance SQL generation prompt with database identifier guidance

- Add instruction about paying attention to database identifier in SQL generation prompt
- Clarify potential cross-database referencing considerations
- Update SQL generation guidelines to improve clarity and flexibility
This commit is contained in:
dal 2025-02-06 16:21:53 -07:00
parent 33d5990907
commit 3ec059a99e
No known key found for this signature in database
GPG Key ID: 16F4B0E1E9F61122
1 changed files with 1 additions and 0 deletions

View File

@ -39,6 +39,7 @@ Please output the SQL delimited in ```sql tags.
- Always order dates in ascending order.
- When working with time series data, always return a date field.
- You must use the schema when referencing tables. Like this pattern <SCHEMA_NAME>.<TABLE_NAME>
- Pay attention to the database identifier. It may be used to reference across multiple databases.
- Never use the 'SELECT *' or 'SELECT COUNT(*)' command. You must select the columns you want to see/use.
- Users may mention formatting or charting. Although this task is specific to SQL generation, the user is referring to future steps for visualization.
- A request for a line chart should default to using a date-related field unless the user specifies otherwise or it is not available.