A RAG-based QA agent for the paper Retrieval-Augmented Generation for Large Language Models: A Survey.
Create a .env file from this template. Fill in your own OpenAI API Key.
WCS_URL=https://tobys-sandbox-oo0vfo50.weaviate.network
WCS_API_KEY=HaDolSevqI9HxhvwMnl9DssgKMObfc0eXfC7
OPENAI_API_KEY=sk-proj-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Use query_qa_rag_agent.ipynb.
retrievers.pyandvector_dbs.pyhave some duplicate code- Weaviate client management needs to be refactored to use the weaviate context manager [1]
preprocessors.py- formats tables weird
- doesn't handle images
- doesn't format subheadings correctly
vector_dbs.py: vectorization strategy is declared here, and I think it makes more sense for it to be declared inindexer.pyindexers.py: calling syntax doesn't make it clear what side effects the constructor hasdspy-rag-pipeline.ipynb:- teleprompter parameters are unoptimized
- both a global and contextualized language model are used, and this is harder to read. Change to contextualized LMs only
[1] https://weaviate.io/developers/weaviate/client-libraries/python#connection-termination
