Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Alwin-Sajan/Docify-RAG

Repository files navigation

📄 Docify-RAG: Chat with Your PDFs using RAG + Gemini AI

Docify-RAG is a full-stack AI-powered chatbot that lets you upload any PDF file and ask natural language questions about its contents. It uses Retrieval-Augmented Generation (RAG) with Gemini AI to deliver accurate, contextual answers — like ChatGPT, but focused on your documents.


🚀 Tech Stack

Layer Tech
Frontend React (Vite) + Tailwind CSS
Backend Flask (Python)
Vector DB FAISS
Embeddings Sentence Transformers
LLM Gemini Pro (Google AI)
PDF Parsing PyPDF
Auth .env API key loading

📸 Screenshots

🏠 Home Page

Home Page

📤 File Upload

File Upload

💬 Chat Interface

Chat Interface


📁 Folder Structure


project-root/
├── Docify-RAG/ # React frontend (Vite)
├── Server/ # Flask backend
├── .gitignore
├── package.json # Runs both client and server

⚙️ Setup Instructions

1. Clone the Repo

git clone https://github.com/your-username/docify-rag.git
cd docify-rag

2. Install Client & Server Dependencies

# Install React client
cd Docify-RAG
npm install
# (Optional) Add Tailwind if not already:
# npx tailwindcss init -p
# Go back and create virtual environment for Flask
cd ../Server
python -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windows
pip install -r requirements.txt

3. Set Up Environment Variables

Create a .env file in /Server:

GOOGLE_API_KEY=your_google_api_key_here

▶️ Run the App

At the root of the project:

npm install concurrently --save-dev
npm run dev

This will:

  • Start Flask backend on http://localhost:5000
  • Start React frontend on http://localhost:5173

🧠 How It Works

  1. Upload a PDF.

  2. The backend extracts, chunks, and embeds the text.

  3. When you ask a question:

    • It retrieves top-k relevant chunks using FAISS
    • Then it builds a prompt using Gemini + conversation history
  4. Gemini generates a natural, contextual answer.


✨ Features

  • Natural chat interface
  • Context-aware RAG using FAISS
  • Supports any text-based PDF
  • Realtime answers powered by Gemini
  • Works locally, no external database needed

📦 Future Improvements

  • Streamed responses (typing effect)
  • File management and history
  • Support for image-based PDFs (OCR)
  • Multi-user authentication

📄 License

MIT License.

About

Chat with Your PDFs using Gemini AI + RAG • Upload PDFs, ask questions, and get smart, contextual answers — powered by Retrieval-Augmented Generation (RAG) and Gemini Pro.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

AltStyle によって変換されたページ (->オリジナル) /