Can anyone know how to get table structure and pass it to LLM model for generating SQL queries.
I want to pass table structure (not entire table) to LLM model and generate sql queries
Can anyone know how to get table structure and pass it to LLM model for generating SQL queries.
I want to pass table structure (not entire table) to LLM model and generate sql queries
Sure,
I’d recommend taking a look at the SQLCoder project: GitHub - defog-ai/sqlcoder: SoTA LLM for converting natural language questions to SQL queries. They fine-tune open-source LLMs for natural language → SQL and are able to outperform closed-source models such as GPT-4.
Thank you for responding,
Currently i’m working on this but i have a doubt here, Everytime we need to pass the table structure and relationship to model. Inseated of passing structure everytime can we automate this process for all the tables