| title | Corporate RAG Bot Backend |
|---|---|
| emoji | 🤖 |
| sdk | docker |
| app_port | 7860 |
Corporate-Bot is a production-grade, agentic Retrieval-Augmented Generation (RAG) assistant that enables users to upload corporate PDFs and interact with them using natural language.
It provides accurate, grounded answers and structured workplace actions powered by HuggingFace-hosted LLM inference.
Frontend: Next.js (Vercel) Backend: Flask API (HuggingFace Spaces — Docker) LLM: HuggingFace Inference API (meta-llama/Llama-3.2-3B-Instruct:novita)
Upload any corporate PDF and:
- Ask factual questions
- Get grounded answers
- Receive structured responses
- Prevent hallucinations
Supports:
- Text
- Tables
- Structured content
The system intelligently detects user intent:
Example:
User Input
Create a ticket for VPN not working
Output
{
"action": "create_ticket",
"department": "IT",
"priority": "High",
"description": "VPN not working"
}Strict refusal logic:
If answer not present:
Information not found in uploaded document.
No guessing. No fabricated answers.
PDF Upload
↓
Unstructured Parser
↓
Structure-Aware Chunking
↓
Embedding (BGE)
↓
FAISS Vector Store
↓
Retriever
↓
Cross-Encoder Reranker
↓
Agent Supervisor
↓
HuggingFace LLM Inference
↓
Final Response
| Component | Tool |
|---|---|
| Backend | Flask |
| Frontend | Next.js |
| Embeddings | BAAI/bge-small-en |
| Vector DB | FAISS |
| Reranker | cross-encoder/ms-marco |
| LLM | HuggingFace Inference |
| PDF Parser | Unstructured |
| Hosting | HuggingFace Spaces |
| Frontend Hosting | Vercel |
GET /
Response:
{
"success": true
}POST /api/v1/upload
POST /api/v1/chat
Backend:
https://AyushAnand413-corporate-rag-bot-backend.hf.space
Frontend:
(Your Vercel URL)
What is the vision of 6G networks?
What was revenue growth in FY25?
What are key risks mentioned?
Create a ticket for VPN not working
✔ No hallucinated data ✔ Evidence-based answers ✔ Strict refusal logic ✔ Secure inference via HF Token
Python 3.10+
pip install -r requirements.txtpython web_app.pyOpen:
http://localhost:7860
Required:
HF_TOKEN=your_token
Optional:
HF_GENERATION_MODEL=meta-llama/Llama-3.2-3B-Instruct:novita
ALLOWED_ORIGINS=*
Corporate-bot/
│
├ agent/
├ ingestion/
├ retrieval/
├ llm/
├ frontend/
├ web_app.py
├ Dockerfile
└ requirements.txt
✔ Docker deployment ✔ CI/CD via GitHub Actions ✔ HF Spaces hosting ✔ Vercel frontend ✔ Runtime PDF ingestion ✔ API-first backend
Enterprise assistants Corporate document search Legal document QA Financial report analysis Internal automation bots
meta-llama/Llama-3.2-3B-Instruct:novita
Hosted via:
HuggingFace Inference API
Ayush Kumar Anand
Swarnim Vatsyayan
Shuchay Viswanathan
Corporate-Bot is a fully production-ready enterprise AI assistant combining:
- Retrieval-Augmented Generation
- Agent-based reasoning
- Secure cloud inference
- Modern frontend architecture