A lightweight Retrieval-Augmented Generation (RAG) system built with Python (FastAPI) + React.js.
It allows users to upload documents (PDF, DOCX, CSV), store embeddings in a vector database, and ask natural-language questions over their own data.
- Upload documents (PDF, DOCX, CSV)
- Generate embeddings and store them in ChromaDB
- Query documents using local LLM (Ollama + TinyLlama)
- Support for multiple documents via unique
doc_id - REST APIs powered by FastAPI
- Uses LangChain for loaders, splitters, retrievers, and chains
- Fully offline-capable once models are installed
- Ask natural-language questions over uploaded documents
- Real-time answers powered by the RAG backend
- Minimal and clean UI
- Fully decoupled (API-driven)
- Responsive design (desktop-first)
- Language: Python, TypeScript
- Framework: FastAPI, React
- RAG Framework: LangChain
- Vector Database: ChromaDB
- LLM Runtime: Ollama
- LLM Model: TinyLlama
- Embedding Model: nomic-embed-text
- Styling: TailwindCSS
- UI Components: shadcn/ui
backend/
│
├── app.py
│
├── routes/
│ └── routes.py
│
├── controllers/
│ ├── csv_controller.py
│ ├── doc_controller.py
│ ├── pdf_controller.py
│ └── process_query.py
│
├── lib/
│ ├── state.py
│ └── validateFile.py
frontend/
│
├── src/
│ ├── components/
| | ├── HeaderLogo.tsx
│ │ ├── Nav.tsx
│ │ └── ui/
| | ├── button.tsx
│ │ └── input.tsx
│ │
│ ├── pages/
| | ├── Docs.tsx
| | ├── Explore.tsx
│ │ ├── Home.tsx
│ │ ├── Index.tsx
| | ├── NotFound.tsx
│ │ └── Rag.tsx
│ │
│ ├── utils/
│ │ └── Steps.ts
│ │
│ ├── App.tsx
│ ├── App.css
│ ├── index.css
│ └── main.tsx
│
├── index.html
├── tailwind.config.ts
├── vite.config.ts
└── package.json
git clone https://github.com/08abhinav/RAGify.git
cd backendpython -m venv venv
source venv/Scripts/activatepip install -r requirements.txtuvicorn app:app --reload- Server: http://localhost:8000
- Swagger UI: http://localhost:8000/docs
This project uses TinyLLaMA via Ollama for local LLM inference. Before running the backend, make sure you:
- Install Ollama locally (Download from: https://ollama.com)
- Pull the TinyLLaMA model
-
ollama pull tinyllama
- Run the model (Ollama runs on port 11434 by default)
ollama run tinyllama
cd frontendnpm inpm run dev- Local URL: http://localhost:5173