Skip to main content
0%
Initializing Core
All work
🏆 SIH 2023 National Winner · Recognized by Coal India Limited & CMPDI

MiningNiti

A full-stack AI platform that combines a multi-agent AI pipeline (6 specialized agents across 4 AI providers) with production-grade RAG (hybrid search + cross-encoder reranking) and real-time compliance auditing. Built for the Ministry of Coal to manage safety documentation, regulatory compliance, and institutional knowledge across coal mining operations.

MiningNiti UI

The Problem

Coal mining operations generate thousands of critical documents — MSHA regulations, equipment manuals, safety protocols, environmental impact assessments, and incident investigations. Information is fragmented across PDFs and siloated databases. Compliance risk is high: missing a regulation update can mean violations, fines, or lives. Finding a specific clause across 500 pages takes hours.

The Solution

Deployed 6 specialized AI agents that run concurrently via asyncio: Classifier (Groq/Llama 3.3), Safety Analyzer (Mistral/Magistral), Entity Extractor (Cerebras/GPT-OSS-120B), Summarizer (Cerebras), Compliance Auditor (Gemini), orchestrated by a FastAPI backend. The RAG pipeline uses hybrid search (pgvector cosine + pg_trgm BM25) combined via Reciprocal Rank Fusion, followed by ms-marco-MiniLM-L-6-v2 cross-encoder reranking for precise Top-5 chunk retrieval.

Architecture

Interactive Node Graph

MiningNiti Multi-Agent Pipeline.

System idle. Ready for request.
  • 01Frontend: Next.js 16 + React 19 dashboard with Clerk auth, Framer Motion animations, Recharts analytics, and react-pdf viewer.
  • 02API Gateway: FastAPI 0.128 with Clerk JWT verification, slowapi rate limiting, and Pydantic v2 validation.
  • 03AI Agent Layer: 6 parallel agents (Classifier, Safety Analyzer, Entity Extractor, Summarizer, Compliance Auditor, Orchestrator) across Groq, Mistral, Cerebras, and Gemini.
  • 04RAG Pipeline: Hybrid search (pgvector + pg_trgm BM25) → Reciprocal Rank Fusion → ms-marco-MiniLM-L-6-v2 cross-encoder reranking → Top-5 chunks → LLM generation.
  • 05Database: Supabase PostgreSQL + pgvector (HNSW index) for embeddings + pg_trgm for keyword matching.
  • 06Cache: Upstash Redis for session caching and background job queuing.

Technical Trade-offs

  • Supabase pgvector over Pinecone/Weaviate: Chose Supabase for free-tier PostgreSQL + pgvector to maintain ACID compliance with relational document metadata and eliminate vendor lock-in.
  • 4 AI Providers over Single Provider: Distributed agents across Groq, Cerebras, Mistral, and Gemini to maximize free-tier quotas (14,400+ requests/day combined) and enable automatic fallback.
  • Hybrid Search over Pure Vector: Added BM25 keyword matching alongside cosine similarity via Reciprocal Rank Fusion — crucial for mining domain where exact regulation numbers matter.

Impact & Results

Won Smart India Hackathon 2023 National Finale for the Ministry of Coal. Recognized by Coal India Limited & CMPDI. Enterprise-ready platform that auto-classifies documents, detects hazards, extracts entities, and provides citation-backed RAG chat — all on $0/month infrastructure using free tiers.

Impact

6
Specialized AI Agents
4
AI Providers (Free Tiers)
$0/mo
Infrastructure Cost

Stack

Next.js 16React 19FastAPIPostgreSQL + pgvectorSupabaseUpstash RedisClerk AuthGroqCerebrasMistralGeminiDocker

Want something similar?

Let's build a production-grade system.