mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-03 11:47:49 +00:00
SQL agent : Improved prompt engineering prevents agent guessing database column names. (#5671)
@vowelparrot: Minor change to the SQL agent: Tells agent to introspect the schema of the most relevant tables, I found this to dramatically decrease the chance that the agent wastes times guessing column names.
This commit is contained in:
parent
8f98592ac9
commit
6e25e65085
@ -17,5 +17,5 @@ If the question does not seem related to the database, just return "I don't know
|
|||||||
SQL_SUFFIX = """Begin!
|
SQL_SUFFIX = """Begin!
|
||||||
|
|
||||||
Question: {input}
|
Question: {input}
|
||||||
Thought: I should look at the tables in the database to see what I can query.
|
Thought: I should look at the tables in the database to see what I can query. Then I should query the schema of the most relevant tables.
|
||||||
{agent_scratchpad}"""
|
{agent_scratchpad}"""
|
||||||
|
Loading…
Reference in New Issue
Block a user