Extraneous Text in SQL Query Generation with create_sql_query_chain in Langchain #27533
Unanswered
Abhishek514964
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
-
Checked other resources
Commit to Help
Example Code
Description
Hello,
I am trying to create a question-answer system that interacts with an SQL database by generating SQL queries and executing them using Langchain. However, I am facing an issue when running the following code:
While the query is being generated correctly, the response includes some extraneous strings such as
Question
andSQLQuery
, as shown below:This results in the following error during query execution:
I am expecting the chain to only generate and execute the SQL query, without the additional extraneous text (e.g.,
Question
,SQLQuery
). I followed the example from the Langchain documentation (specifically this article), but I'm still encountering this issue.Could someone help me understand what might be causing this or suggest any steps I might be missing?
Thank you!
System Info
Beta Was this translation helpful? Give feedback.
All reactions