Writing queries to solve analytical problems is a core task for a lot of data users. The challenge is to find the right data and translate the problem into correct and efficient SQL code. This becomes more difficult when data is spread across different domains.
In this project we will try to build a text-to-SQL feature which translates the analytical problem into SQL code.
This will be a straightforward solution where we use an LLM.
-
User asks an analytical question, chooses the tables to be used.
-
The relevant table schemas are retrieved from the store.
-
The prompt is created with the question and table schemas.
-
The prompt is then fed to the LLM.
-
A streaming response is generated and displayed to the user.