Nexus RAG is a minimalist, high-performance Retrieval Augmented Generation (RAG) platform. It allows you to upload PDF documents and interrogate them using semantic search and cutting-edge LLMs.
-
Setup Environment:
- Clone the repository.
- Create a virtual environment:
python -m venv .venv - Activate it:
.venv\Scripts\activate(Windows) orsource .venv/bin/activate(Mac/Linux) - Install dependencies:
pip install -r requirements.txt
-
Configure API:
- Create a
.envfile based on.env.example. - Add your
GROQ_API_KEY.
- Create a
-
Run Application:
python run.py
Open
http://localhost:5000in your browser.
.
├── app/ # Main application package
│ ├── api/ # API blueprints and routes
│ │ └── routes.py
│ ├── core/ # Core business logic (RAG pipeline)
│ │ └── rag_engine.py
│ ├── static/ # Frontend assets (CSS, JS)
│ ├── templates/ # HTML templates
│ └── __init__.py # App factory
├── uploads/ # Temporary directory for processed PDFs
├── run.py # Entry point
├── .env # Configuration
└── requirements.txt # Dependencies
- Backend: Flask, LangChain, FAISS
- Embeddings: Sentence-Transformers (
all-MiniLM-L6-v2) - LLM: Llama 3 (via Groq)
- Frontend: Vanilla JS, CSS (Quantum Dark Theme)
- New Web Service: Connect your GitHub repo to Render.
- Environment Variables:
GROQ_API_KEY: Your key from Groq Console.GROQ_MODEL:llama-3.1-8b-instant(optional).PYTHON_VERSION:3.11.0(recommended).
- Build Command:
pip install -r requirements.txt - Start Command:
gunicorn run:app
- New Project: Import your GitHub repo into Vercel.
- Framework Preset: Choose "Other" (it will auto-detect
vercel.json). - Environment Variables:
GROQ_API_KEY: Your key.VERCEL:1(required for temp directory switching).
- Deploy: Vercel will build the serverless function and serve your app.
If you want the fastest UI response, host the Frontend as a static site and the Backend on Render.
- Frontend: Upload the
frontend/folder to Vercel or Netlify. - Configuration: In
frontend/js/app.js, updateAPI_BASE_URLto your Render URL. - Backend: Keep the main repository running on Render.
MIT