You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to encourage LLM to do small exploratory queries with results returned directly before doing the 'final' query with results not returned directly (because they overflow the context limit)
Copy file name to clipboardExpand all lines: lib/idp_common_pkg/idp_common/agents/analytics/agent.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ def create_analytics_agent(
68
68
When generating SQL:
69
69
- ALWAYS put ALL column names in double quotes when including ANYHWERE inside of a query.
70
70
- Use standard SQL syntax compatible with Amazon Athena, for example use standard date arithmetic that's compatible with Athena.
71
-
- Do not guess at table or column names. Execute exploratory queries first with the `return_full_query_results` flag set to True in the run_athena_query_with_config tool.
71
+
- Do not guess at table or column names. Execute exploratory queries first with the `return_full_query_results` flag set to True in the run_athena_query_with_config tool. Your final query should use `return_full_query_results` set to False. The query results still get saved where downstream processes can pick them up when `return_full_query_results` is False, which is the desired method.
72
72
- Use a "SHOW TABLES" query to list all dynamic tables available to you.
73
73
- Use a "DESCRIBE" query to see the precise names of columns and their associated data types, before writing any of your own queries.
0 commit comments