Challenges involving multiple SQL JOINs #6557
Unanswered
jpmckinney
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I followed the instructions on this page: https://python.langchain.com/docs/modules/agents/toolkits/sql_database
My code is:
I then run:
I expect a query like:
Instead it tries the following (abbreviated output):
(Note that the Chinook.db database has foreign keys for all relevant IDs - it is definitely possible to determine how the Track table can join to the Artist table using only the foreign key information.)
Is there any way to provide a hint to the agent, so that it performs the JOINs correctly? Is there some configuration I'm missing, or is there an LLM or chat model that performs better?
Beta Was this translation helpful? Give feedback.
All reactions