From 2826ef9e8acdf88465e1e5fc8a7bf59e0f9d0a85 Mon Sep 17 00:00:00 2001 From: Francisco Ingham Date: Sun, 29 Jan 2023 03:26:21 -0300 Subject: [PATCH] improved the sql agent prompt to reflect interaction with sql chains (#12) Co-authored-by: Francisco Ingham <> --- agents/zero-shot-react-sql/agent.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agents/zero-shot-react-sql/agent.json b/agents/zero-shot-react-sql/agent.json index 5fda02a..0a207b7 100644 --- a/agents/zero-shot-react-sql/agent.json +++ b/agents/zero-shot-react-sql/agent.json @@ -1,6 +1,6 @@ { "load_from_llm_and_tools": true, "_type": "zero-shot-react-description", - "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:", + "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:", "suffix": "Begin!\nQuestion: {input}\nThought:{agent_scratchpad}" -} \ No newline at end of file +}