Open AI APIs with Llama Index and Milvus Vector DB for RAG testing
Welcome to my ridiculously simple web scraping -> Retrieval Augmented Generation (RAG) example. This example walks through:
- Scraping a website with Apify webcrawler (requires a free account)
- Generating embeddings with OpenAI APIs (requires an OpenAI account)
- Loading embeddings into a Milvus vector store (Dockerfile included)
- Spinning up a Gradio chat to ask questions of your LLM with context plugged in
Getting it going is fairly easy. I used pipenv
but use whatever environment you'd like.
- cd milvus
- sudo docker compose up -d
- cd ..
- pipenv install
- cp .env.sample .env
- Fill in your OpenAI token and Apify token
- Open spider.py and fill in the URL you want to crawl
- python spider.py
- python query.py
Once Milvus is installed you can open localhost:8000 to log into Attu to view your setup, collections, and browse the vector store.
Enjoy!