Skip to content

Commit

Permalink
Dh-5003/updating prompts to always retrieve instructions (#249)
Browse files Browse the repository at this point in the history
  • Loading branch information
MohammadrezaPourreza authored and DishenWang2023 committed May 7, 2024
1 parent 4857b82 commit 289f119
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dataherald/utils/agent_prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
tip1) For complex questions that has many relevant columns and tables request for more examples of Question/SQL pairs.
tip2) The maximum number of Question/SQL pairs you can request is {max_examples}.
tip3) If the SQL query resulted in errors, rewrite the SQL query and try again.
tip4) If you are still unsure about which columns and tables to use, ask for more Question/SQL pairs.
tip4) Always call the get_admin_instructions tool before generating the SQL query, it will give you rules to follow when writing the SQL query.
tip5) The Question/SQL pairs are labelled as correct pairs, so you can use them to learn how to construct the SQL query.
""" # noqa: E501

Expand All @@ -39,6 +39,7 @@
#
Some tips to always keep in mind:
tip1) If the SQL query resulted in errors, rewrite the SQL query and try again.
tip2) Always call the get_admin_instructions tool before generating the SQL query, it will give you rules to follow when writing the SQL query.
""" # noqa: E501

PLAN_WITH_FEWSHOT_EXAMPLES = """1) Use the fewshot_examples_retriever tool to retrieve a first set of possibly relevant tables and columns and the SQL syntax to use.
Expand Down

0 comments on commit 289f119

Please sign in to comment.