This project is a simple Streamlit-based RAG (Retrieval-Augmented Generation) chatbot. You upload PDF files, it embeds text using OpenAI embeddings, stores vectors in FAISS, and answers questions with OpenAI responses.
- Python 3.11 (strongly recommended for binary wheel compatibility on Windows)
- OpenAI API key
- Create and activate virtualenv:
cd "C:\Users\sande\Desktop\VSCode Projects\RAG Chatbot"
py -3.11 -m venv .venv
Set-ExecutionPolicy Bypass -Scope Process -Force
. .\.venv\Scripts\Activate.ps1- Install dependencies:
python -m pip install --upgrade pip setuptools wheel
python -m pip install -r requirements.txt- Run app:
python -m streamlit run app.py --server.port 8501 --server.headless true- In the browser:
- Enter
OPENAI_API_KEYin sidebar - Upload PDF(s)
- Ask questions
- Works best with searchable text PDFs (not pure scanned images). For OCR PDFs, pre-process with OCR first.
- For production, add persistent storage and error handling.