All projects
RAG (Retrieval-Augmented Generation)
ClearPack — PackIQ Copilot
AI-powered RAG backend for packaging-line technicians: troubleshooting, maintenance, production analytics, alert insights, and knowledge-base search with streaming copilot responses.

Overview
PackIQ Copilot is the ClearPack backend that helps factory technicians ask natural-language questions about machines (MDS), faults, maintenance, changeover, and line performance. It uses a V3 RAG architecture with LLM-based intent routing, hybrid vector retrieval over ingested manuals, and dedicated analytics flows for production trends, alerts, and state rankings. Responses stream over SSE and can include structured visuals such as hourly productivity charts.
Highlights
- ›V3 copilot with category-specific flows instead of a single generic prompt
- ›Analytics intent resolver — maps natural queries to production_trend, alerts, or state_ranking
- ›EdgeCloud trend/history integration for MDS-mapped production lines
- ›RAG over operational manuals, spare parts, changeover media, and tribal knowledge
- ›Session store for follow-up context, last visual type, and date-range carry-over
Features
- ✓Combined LLM router for greetings, follow-ups, and category routing (troubleshooting, maintenance, changeover, features, enquiry, operations, analytics)
- ✓Production trend analytics — hourly productivity, best/worst productive hour, idle and fault-heavy periods via EdgeCloud API
- ✓Alert analytics — open faults, KB gaps, summaries, and chart visuals
- ✓State ranking analytics — top/bottom faults, downtime, and duration metrics
- ✓Knowledge base ingestion — PDF/manual chunking, embeddings, Qdrant hybrid search
- ✓Operational and troubleshoot retrieval with session context and multi-turn follow-ups
- ✓Voice pipeline — transcription and TTS (Deepgram)
- ✓Structured visual payloads — time-series charts for productivity trends
- ✓Reply language control — English, Hindi, Hinglish
API endpoints
- POST /api/copilot/v3/chat — Main PackIQ copilot (RAG + analytics, SSE)
- GET /api/edgecloud/oee — OEE dashboard proxy
- GET /api/edgecloud/shift-history — Shift/fault history proxy
- POST /api/kb/upload — Knowledge base document upload
- GET /api/kb/search — Semantic KB search
- GET /alerts — Alert listing and management
- GET /health — Service health