I am using llm to fetch data from my postgres db table
This is the output that is being generated , Even though i have mentioned in the prompt to not add backticks while generating sql queries
This is the output that i am getting when gemin is generating sql query
Connecting to the db.. Executing SQL query: sql SELECT * FROM "Proj" WHERE work_type = 'Repair' AND village = 'katraj';
Error occurred: syntax error at or near “" LINE 1:
sql ^
This was the expected output
Enter your question (type ‘exit’ to quit): water supply repair work projects in katraj
Generating SQL query from the prompt and question…
Generated SQL Query: “`sql
SELECT
*
FROM “Proj”
WHERE
work_type = ‘Repair Work’ AND village = ‘katraj’;
Connecting to the database...
Executing SQL query:
SELECT
*
FROM "Proj"
WHERE
work_type = 'Repair Work' AND village = 'katraj';
output : 243
This is the error that i am getting
Enter your question (type 'exit' to quit): water supply repair work projects in katraj
Generating SQL query from the prompt and question...
Generated SQL Query: ```sql
SELECT
*
FROM "Proj"
WHERE
work_type = 'Repair Work' AND village = 'katraj';
Connecting to the database…
Executing SQL query: “`sql
SELECT
*
FROM “Proj”
WHERE
work_type = ‘Repair Work’ AND village = ‘katraj’;
Error occurred: syntax error at or near "```"
LINE 1: ```sql
^
Lad99 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2