This is a minimal demo project to show the capabilities of a Text2SQL system using LangChain, it contains all the things you required to build a basic RAG system. Using Chinook as the sample database.
First, make a copy of .env.sample and rename it to .env, and change any fields that need to be changed
Then:
- Download
Chinook Databasefrom here.- Change the connection string in the
.envfile.
- Change the connection string in the
- Setup the
Ollamafor the document tokenization and interaction- See Setup - OllamaEmbeddings
- See Ollama
- Get your LangSmith API Key from here.
Run python main.py and type anything you want to ask the RAG system
