Skip to content
08abhinavPublic

About

Multi-Source RAG App Upload PDFs, DOCX, CSV files and get AI-powered answers directly from your data. Built with Retrieval-Augmented Generation (RAG), this app enables seamless question-answering across multiple data sources with high accuracy.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

105 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

RAGify

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.


Backend Features

  • 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

Frontend Features

  • 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)

Tech Stack

  • 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

Project Structure (Backend and Frontend)

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

Setup Instructions (Backend Only)

Clone the Repository

git clone https://github.com/08abhinav/RAGify.git 
cd backend

Create and Activate Virtual Environment

python -m venv venv
source venv/Scripts/activate

Install Python dependencies

pip install -r requirements.txt

Run backend

uvicorn app:app --reload

Access the API

Important Note (LLM Setup)

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

Setup Instructions (Frontend Only)

cd frontend

Install React dependencies

npm i

Run frontend

npm run dev

Access the Frontend

About

Multi-Source RAG App Upload PDFs, DOCX, CSV files and get AI-powered answers directly from your data. Built with Retrieval-Augmented Generation (RAG), this app enables seamless question-answering across multiple data sources with high accuracy.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages