feat(prompts): Enhance SQL query generation and error handling instructions

- Update failed SQL fix prompt to emphasize query output format
- Add clarification to dataset selector prompt about selecting multiple datasets
This commit is contained in:
dal 2025-02-05 18:24:34 -07:00
parent 80d3662c3f
commit b872cf63a4
No known key found for this signature in database
GPG Key ID: 16F4B0E1E9F61122
2 changed files with 6 additions and 1 deletions

View File

@ -17,7 +17,9 @@ PLEASE OUTPUT THE SQL QUERY IN THE FOLLOWING FORMAT:
- Keep your response under 50 words
- Do not output the failed SQL query in your response
- Keep this response fairly non-technical
- escape columns, datasets, tables, errors, etc. with backticks.".to_string()
- escape columns, datasets, tables, errors, etc. with backticks.
- You must output the sql query in the format specified above.
".to_string()
}
pub fn failed_to_fix_sql_user_prompt(
@ -49,5 +51,7 @@ pub fn failed_to_fix_sql_user_prompt(
message.push_str(error);
}
message.push_str("\n\nPlease output the SQL query in the format specified above. (```sql ... ```)");
message
}

View File

@ -13,6 +13,7 @@ Your task is to pick all the datasets required to answer the user question/reque
- Feel free to select multiple datasets that can be joined together to provide more complete answers
- If the user requests advanced analysis like predictions, forecasts, correlation, impact analysis, etc., identify all datasets that could be combined for the analysis
- Consider relationships between datasets and how they can be joined to provide comprehensive answers
- Multiple dataset can be selected even while one completely answers the user request.
"#,
datasets
)