From the course: Building Generative AI Apps to Talk to Your Data
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Querying structured data: Text-to-SQL - Snowflake Tutorial
From the course: Building Generative AI Apps to Talk to Your Data
Querying structured data: Text-to-SQL
- Welcome back. We covered the basics of how Text-to-SQL allows us to ask questions and get accurate answers from our structured data in an earlier video. So let's go into more detail here before we start building our applications in the following modules. So let's start with the basics of Text-to-SQL and build from there. So with Text-to-SQL, we first give our LM a natural language question, such as how much money did we make last year before costs? Now if this was a question that was asked of an analyst that had just started at a company, that person would immediately need to know a bunch of information to answer that question. They need to know about the database and the tables in the database to have a chance of answering the question given to them. But before they even thought about writing their SQL query, they'd also need to know information about the schema. They'd need to know all of the column names in all of the tables and what the tables represent to know where to look in…