Skip to content
This repository was archived by the owner on Apr 3, 2024. It is now read-only.

Commit 2826ef9

Browse files
authored
improved the sql agent prompt to reflect interaction with sql chains (#12)
Co-authored-by: Francisco Ingham <>
1 parent 233e4e7 commit 2826ef9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

agents/zero-shot-react-sql/agent.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"load_from_llm_and_tools": true,
33
"_type": "zero-shot-react-description",
4-
"prefix": "Answer the question as best you can.\nYou should only use data in the SQL database to answer the query. The answer you return should come directly from the database. If you don't find an answer, say \"There is not enough information in the DB to answer the question.\"\nYour first query can be exploratory, to understand the data in the table. As an example, you can query what the first 5 examples of a column are before querying that column.\nWhen possible, don't query exactly but always use 'LIKE' to make your queries more robust.\nFinally, be mindful of not repeating queries.\nYou have access to the following DB:",
4+
"prefix": "Answer the question as best you can.\n The answer you return should come directly from the database tools. Be very explicit and specific with what you want when you ask the databases for information. Finally, don't use SQL syntax in your request but rather use natural language. If you cannot get an answer from the provided tools, say \"There is not enough information in the DB to answer the question.\"\nYou have access to the following DB:",
55
"suffix": "Begin!\nQuestion: {input}\nThought:{agent_scratchpad}"
6-
}
6+
}

0 commit comments

Comments
 (0)