This is a minimal demo project to show the capabilities of a RAG system using LangChain
and Milvus
, it contains all the things you required to build a basic RAG system.
First, make a copy of .env.sample
and rename it to .env
, and change any fields need to be changed
Then:
- Setup the
Milvus
as the vector database- See folder
Milvus
- See folder
- Setup the
Ollama
for the document tokenization and interaction- See Setup - OllamaEmbeddings
- See Ollama
- Prep the documents used for RAG and the vector DB
- Copy all the documents to the
Documents
folder under the project root - Run
python prep_doc.py
to prepare the documents for the RAG system - You can run
python milvus_search.py
to verify all the documents has been loaded to the vector DB
Run python main.py
and type anything you want to ask the RAG system