https://github.com/laolarou726/text_2_sql_demo
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.
https://github.com/laolarou726/text_2_sql_demo
agent database langchain llm python sqlite text2sql
Last synced: 4 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/laolarou726/text_2_sql_demo
- Owner: laolarou726
- License: mit
- Created: 2025-03-23T02:20:19.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2025-04-08T03:50:48.000Z (10 months ago)
- Last Synced: 2025-04-08T04:28:26.717Z (10 months ago)
- Topics: agent, database, langchain, llm, python, sqlite, text2sql
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RAG DEMO





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.
## Before Start
First, make a copy of `.env.sample` and rename it to `.env`, and change any fields that need to be changed
Then:
1. Download `Chinook Database` from [here](https://database.guide/2-sample-databases-sqlite/).
1. Change the connection string in the `.env` file.
2. Setup the `Ollama` for the document tokenization and interaction
1. See [Setup - OllamaEmbeddings](https://python.langchain.com/docs/integrations/text_embedding/ollama/)
2. See [Ollama](https://ollama.com/)
3. Get your LangSmith API Key from [here](https://smith.langchain.com/hub).
## Start the demo
Run `python main.py` and type anything you want to ask the RAG system
## Screenshots
