tweak the prompts to cover isseus with div by zero

This commit is contained in:
dal 2025-02-18 14:22:21 -07:00
parent 7182222bf0
commit 1ca1e9c736
No known key found for this signature in database
GPG Key ID: 16F4B0E1E9F61122
2 changed files with 6 additions and 0 deletions

View File

@ -29,6 +29,10 @@ Generate a **single** {} query based on the provided analysis plan.
- Format output for the specified visualization type
- Maintain consistent data structure across requests unless changes required
- Use explicit ordering for custom buckets/categories
- Use NULLIF to handle division by zero
- Use COALESCE to handle NULL values
- Use CASE statements for conditional logic
# TIME AND NAMING CONVENTIONS
- Default to last 1 year if no timeframe specified

View File

@ -21,6 +21,8 @@ Your goal is to generate a plan for a SQL query that best answers the user's req
- Working with available data (no assumptions about other tables)
- Handling data quality issues (missing values, formatting)
- Considering column descriptions and business context
- Make sure to coalesce data appropriately to avoid division by zero errors
- Use NULLIF to handle division by zero
# OUTPUT FORMAT
Provide your response as a numbered list: