An AI-powered Retrieval-Augmented Generation (RAG) application that allows users to upload PDF documents and ask questions based on their contents. The application retrieves relevant document chunks using vector embeddings and generates accurate responses using Large Language Models.
- Upload one or multiple PDF documents
- Automatic document chunking and embedding
- Vector database for semantic retrieval
- AI-powered question answering using Groq LLM
- Multiple AI provider support (Groq, Gemini, OpenAI, Anthropic)
- Modern React frontend
- Beautiful chat interface
- Markdown rendering with syntax highlighting
- Chat history
- Export chat as PDF
- Dark UI
- Responsive design
- Local storage for conversations
- Document source retrieval
- React
- Vite
- Tailwind CSS
- Axios
- Framer Motion
- React Markdown
- Hero Icons
- React Hot Toast
- Flask
- Flask-CORS
- LangChain
- LangChain Groq
- ChromaDB
- Sentence Transformers
- PyPDF Loader
ET2/
│
├── backend/
│ ├── app.py
│ ├── requirements.txt
│ ├── uploads/
│ ├── vectorstore/
│ ├── src/
│ │
│ ├── ingest.py
│ ├── rag_chain.py
│ ├── retriever.py
│ └── ...
│
├── frontend/
│ ├── src/
│ ├── public/
│ ├── package.json
│ └── vite.config.js
│
└── README.md
User
│
▼
React Frontend
│
▼
Flask REST API
│
┌───────┴────────┐
▼ ▼
PDF Upload Chat Request
│ │
▼ ▼
Chunk Documents Retrieve Context
│ │
▼ ▼
Vector Store ---> Groq LLM
│
▼
AI Response
│
▼
React UI
git clone https://https://github.com/vedddev/Industary_brain.git
Create virtual environment
python -m venv brainActivate environment
Windows
brain\Scripts\activateLinux/Mac
source brain/bin/activateInstall dependencies
pip install -r requirements.txtCreate .env
GROQ_API_KEY=your_api_keyRun backend
python app.pyBackend runs on
https://industary-brain.onrender.com
Navigate to frontend
cd frontendInstall dependencies
npm installRun
npm run devFrontend runs on
https://industary-brain.vercel.app/
GET /
Response
{
"message":"Industrial Knowledge Intelligence API"
}POST /upload
Form Data
files
Response
{
"status":"success",
"documents":2,
"chunks":164
}POST /chat
Body
{
"question":"Explain tensile strength",
"provider":"groq",
"api_key":"YOUR_API_KEY"
}Response
{
"question":"Explain tensile strength",
"answer":"...",
"sources":[]
}GET /health
Response
{
"status":"healthy"
}- Upload PDF documents.
- Backend extracts text.
- Documents are split into chunks.
- Chunks are converted into embeddings.
- Embeddings are stored in Chroma Vector Database.
- User asks a question.
- Relevant chunks are retrieved.
- Retrieved context is sent to the LLM.
- AI generates an answer.
- Response is displayed in the chat interface.
The application is designed to support multiple providers.
- Groq
- Google Gemini
- OpenAI
- Anthropic
Currently implemented:
- ✅ Groq
Future support:
- Gemini
- OpenAI
- Anthropic
- Responsive sidebar
- Chat history
- Markdown rendering
- Code syntax highlighting
- Copy response
- Like/Dislike responses
- Regenerate answer
- Upload PDFs
- Voice input placeholder
- Export chat to PDF
- Animated interface
- Mobile responsive
- REST API
- PDF ingestion
- Vector embeddings
- ChromaDB integration
- LangChain retriever
- Retrieval-Augmented Generation (RAG)
- Source references
- Multi-file upload
GROQ_API_KEY=xxxxxxxxxxxxxxxx
Backend
- Flask
- Flask-CORS
- LangChain
- LangChain-Groq
- ChromaDB
- Sentence Transformers
- PyPDF
Frontend
- React
- Vite
- Tailwind CSS
- Axios
- Framer Motion
- React Markdown
- Hero Icons
Add screenshots here.
Example
screenshots/
home.png
chat.png
upload.png
- Authentication
- Database support
- Conversation memory
- Streaming responses
- OCR for scanned PDFs
- Image understanding
- Audio transcription
- Citation highlighting
- Multi-user support
- Cloud deployment
- Admin dashboard
Frontend
- Vercel
- Netlify
Backend
- Render
- Railway
- Azure
- AWS
- API keys stored locally
- Environment variables ignored using
.gitignore - CORS enabled
- Sensitive files excluded from Git
This project is licensed under the MIT License.
Your Name
Industrial Knowledge Intelligence Assistant
Built with ❤️ using React, Flask, LangChain, ChromaDB, and Groq.