Smart India Hackathon (SIH 2026) โ Problem Statement SIH26107
Team CodeSmiths โข Empowering Indian MSMEs & Manufacturers with Zero-Hallucination Compliance
Executive Overview โข SIH Presentation Deck โข Feature Comparison โข Document Processing (PyMuPDF) โข Architecture & RAG โข UI Showcase โข Quick Start โข Docs
Navigating the Bureau of Indian Standards (BIS) and mandatory Quality Control Orders (QCOs) is daunting for India's 63+ million MSMEs. Technical jargon, complex testing tables, and frequent gazette amendments lead to costly delays, consulting fees, and shipment impoundments.
Manak AI transforms static BIS PDFs into an intelligent, interactive compliance copilot:
- โก Instant Regulatory Mapping: Finds applicable Indian Standards (IS), mandatory QCO dates, and testing requirements in seconds.
- ๐ก๏ธ Zero Hallucination with Proof: Every statement is backed by clause-level citations, section numbers, and verified official excerpts.
- ๐ Automated Gap Analysis: Evaluates manufacturing readiness, identifies missing quality tests, and generates a 7-step certification roadmap.
- ๐ Equitable Bilingual Access: Seamless native toggle between English and Hindi (เคนเคฟเคจเฅเคฆเฅ) for grassroots manufacturers across Tier-2/3 industrial clusters.
Below are the executive presentation slides submitted for Smart India Hackathon 2026:
Overview of core capabilities: End-to-end compliance roadmaps, automated gap analysis, evidence-backed citations, and version awareness.

Full-stack pipeline from user query understanding, dense + sparse hybrid retrieval, and RRF ranking, to Gemini grounding and citation validation.

Demonstrating technical viability on production-ready cloud services and massive business value (faster time-to-market, lower consulting costs, safer products).

Real-world outcomes: 70%+ time saved, 90%+ accurate answers, empowering MSMEs, consumers, consultants, and regulators.

| Capability | MANAK AI (Our Solution) | Official BIS Portal | Generic ChatPDF / RAG | Regulatory Consultants |
|---|---|---|---|---|
| Instant Self-Service Q&A UI | ๐ข Yes (Interactive) | ๐ด No | ๐ข Yes | ๐ด No |
| Precise Clause & Page Citations | ๐ข Yes (Clause-level) | ๐ด No | ๐ก Basic / Unverified | ๐ข Yes |
| Automated AI Compliance Pathway | ๐ข Yes (7-Step Roadmap) | ๐ด No | ๐ด No | ๐ด No |
| Automated Gap Analysis | ๐ข Yes (Instant Audit) | ๐ด No | ๐ด No | ๐ด No |
| Latest Standards & QCO Version Aware | ๐ข Yes (Active prioritised) | ๐ก Manual Search | ๐ด No (Stale/Confused) | ๐ข Human Expertise |
| Native Bilingual UI (Hindi / English) | ๐ข Yes (Full Localization) | ๐ก Partial | ๐ด Weak | ๐ด No |
| Operational Speed & Cost | ๐ข Fast / Low Cost | ๐ก Slow / Free | ๐ข Fast / Low Cost | ๐ด Slow / High Cost |
BIS standards and gazette notifications are highly complex documents containing nested clauses, technical tables, footnotes, and occasionally scanned pages. Manak AI features a dedicated, production-grade Python ingestion pipeline in ingestion/ powered by PyMuPDF (fitz):
[BIS Standard / Gazette PDF]
โ
โผ
[ingestion/parser.py]
โโโ PyMuPDF (fitz) High-Speed Text & Layout Parsing
โโโ Scanned Page Detection Heuristic (len(text) < 50 & images > 0)
โ โโโ Tesseract OCR Fallback (English + Hindi: eng+hin)
โโโ Structured Table Extraction (`page.find_tables()`) โ Markdown Tables
โโโ Clause Boundary Regex Engine (`Clause X.X`, `Annexure [A-Z]`)
โ
โผ
[ingestion/chunker.py]
โโโ Context-Preserving Clause Hierarchy Assembly
โโโ Self-Contained Chunk Generation with Parent Metadata
โ
โผ
[ingestion/embedder.py]
โโโ Gemini Embedding 2 (768-dim Vector Embeddings)
โ
โผ
[Supabase PostgreSQL]
โโโ pgvector (HNSW Index for Cosine Similarity)
โโโ PostgreSQL FTS (tsvector & trigram matching)
- High-Speed PyMuPDF Parsing: Uses
pymupdf(fitz) to extract text and layout coordinates up to 10x faster than traditional PDF parsers. - Native Table Recovery: Identifies tabular data using PyMuPDF's
find_tables()API and converts it into structured Markdown tables so the LLM retains exact testing limits, tolerances, and parameter values. - Scanned Page OCR Fallback: If a page is a scanned document (common in older gazette notifications), it automatically invokes Tesseract OCR with bilingual support (
lang="eng+hin"). - Clause-Aware Segmentation: Rather than arbitrary character chunking,
BISDocumentParsersegments text by regulatory clauses (e.g.,Clause 4.1,Clause 7.2.3), preventing fragmented rules. - Metadata Enrichment: Chunks are enriched with standard number, year, section title, page number, and mandatory QCO enforcement dates before vectorization.
flowchart TD
subgraph Client ["Client Layer (Next.js 15 App Router)"]
UI["Web Interface (Bilingual EN/HI)"]
Chat["Compliance Chat & Split Evidence Drawer"]
Audit["Gap Analysis & 7-Step Pathway Planner"]
end
subgraph API ["Edge & API Layer"]
Route["Next.js Route Handlers (SSE Streaming)"]
QueryEngine["Query Preprocessing & Intent Detection"]
end
subgraph Retrieval ["Hybrid Retrieval Engine"]
Dense["Dense Vector Search<br/>(Gemini Embeddings 768-d)"]
Sparse["Sparse Keyword Search<br/>(PostgreSQL tsvector & trigram)"]
RRF["Reciprocal Rank Fusion (RRF k=60)<br/>Score = ฮฃ 1/(60 + rank)"]
end
subgraph Intelligence ["Inference & Verification"]
Gemini["Google Gemini 2.5 Flash"]
Auditor["Dual-Tier Citation & Grounding Auditor"]
end
subgraph Storage ["Supabase PostgreSQL"]
PGV["pgvector (Vector Chunks)"]
FTS["Full-Text Index"]
Catalog["Standards & QCO Catalog"]
end
UI --> Route
Chat --> Route
Audit --> Route
Route --> QueryEngine
QueryEngine --> Dense
QueryEngine --> Sparse
Dense --> PGV
Sparse --> FTS
PGV --> RRF
FTS --> RRF
RRF --> Gemini
Gemini --> Auditor
Auditor -->|Verified + Cited| Route
To ensure both exact standard codes (like IS 16046 (Part 2)) and conceptual queries (like "lithium battery drop test") are retrieved with 100% recall, we combine vector and keyword ranks:
Before streaming tokens to the client, the response passes through a verification check that cross-references every cited clause against the retrieved evidence chunk. If a claim lacks supporting text, it is flagged or safely suppressed.
| 1. Landing Page & Intelligence Hub | 2. Live Standards Explorer |
|---|---|
![]() |
![]() |
| Hero search launcher, quick metrics, and key features. | Searchable catalog with active/withdrawn filters and QCO tags. |
| 3. Deep Clause Dossier Modal | 4. Automated Compliance Gap Engine |
|---|---|
![]() |
![]() |
| Clause breakdown, testing requirements, and gazette links. | Interactive readiness meter, gap checklist, and lab directory. |
| 5. AI Chat with Split Evidence Drawer | 6. Native Bilingual Support (เคนเคฟเคจเฅเคฆเฅ) |
|---|---|
![]() |
![]() |
| Streaming Q&A with side-by-side clause verification. | Full Devanagari localization for grassroots industrialists. |
Benchmarked against official BIS regulatory test scenarios:
| Metric | Manak AI | Generic RAG | Methodology |
|---|---|---|---|
| Retrieval Recall@5 | 100.0% | 74.5% | Relevant BIS clauses found in top 5 results |
| Retrieval Precision@5 | 79.2% | 51.0% | Proportion of retrieved chunks directly relevant |
| Faithfulness Score | 100.0% | 82.3% | Claims fully supported by retrieved BIS evidence |
| Hallucination Rate | 0.0% | 14.8% | Frequency of fabricated standards, clauses, or specs |
| P95 Response Latency | < 1.8s | 4.2s | End-to-end stream start with citation verification |
| E2E Test Coverage | 100% Passing | โ | Automated Playwright regression test suite |
Frontend & UI
โโโ Next.js 15.1.7 (App Router & React 19)
โโโ TypeScript 5.7 (Strict type-checking)
โโโ Tailwind CSS 3.4 (Custom design system)
โโโ Lucide React (Accessible icons)
โโโ Zustand 5.0 (Bilingual & filter state management)
Backend & Artificial Intelligence
โโโ Next.js API Route Handlers (Edge & SSE streaming)
โโโ Google Gemini 2.5 Flash (Compliance reasoning & generation)
โโโ Google Gemini Embedding 2 (768-dim semantic vectors)
โโโ Reciprocal Rank Fusion (k=60 hybrid re-ranking)
Document Processing Pipeline
โโโ Python 3.11+
โโโ PyMuPDF (fitz >= 1.23.0) (High-speed PDF & table extraction)
โโโ Tesseract OCR (Fallback for scanned gazettes)
โโโ Pillow & Pydantic (Image preprocessing & schema validation)
โโโ BIS Structure Chunker (Clause boundary preservation)
Database & Storage
โโโ Supabase PostgreSQL 15
โโโ pgvector (HNSW vector similarity search)
โโโ PostgreSQL FTS (trigram & tsvector keyword search)
โโโ Prisma ORM 6.4 (Type-safe database client)
Testing & Deployment
โโโ Playwright (Cross-browser E2E testing)
โโโ Vercel (Edge deployment & CDN)
โโโ Automated Screenshot Capture Suite
- Node.js:
v20.xor higher - Python:
3.10+(for document ingestion pipeline) - Google Gemini API Key: Google AI Studio
- Supabase Database with
pgvectorenabled
git clone https://github.com/your-org/manak-ai.git
cd manak-ai# Install Web application dependencies
npm install
# Install Document processing pipeline dependencies
pip install -r ingestion/requirements.txtCreate a .env.local file in the project root:
# Google Gemini API
GEMINI_API_KEY="AIzaSy..."
# Supabase PostgreSQL (pgvector enabled)
DATABASE_URL="postgresql://postgres.[ref]:[password]@aws-0-[region].pooler.supabase.com:6543/postgres?pgbouncer=true"
DIRECT_URL="postgresql://postgres.[ref]:[password]@aws-0-[region].pooler.supabase.com:5432/postgres"
# Supabase Client Keys
NEXT_PUBLIC_SUPABASE_URL="https://[ref].supabase.co"
NEXT_PUBLIC_SUPABASE_ANON_KEY="eyJhbGciOi..."# Push Prisma schema to Supabase
npm run prisma:generate
npm run prisma:push
# (Optional) Run PyMuPDF document ingestion on raw BIS PDFs
python -m ingestion.ingest --embednpm run dev
# Open http://localhost:3000 in your browser# Run Playwright End-to-End browser tests
npm run test:e2e
# Run RAG Retrieval & Faithfulness benchmark evaluation
npm run test:evalmanak-ai/
โโโ docs/ # Engineering documentation & assets
โ โโโ assets/
โ โ โโโ screenshots/ # High-res application screenshots
โ โ โโโ slides/ # SIH 2026 presentation slides
โ โโโ PRD.md # Product Requirements Document
โ โโโ brain.md # System Architecture & Algorithms
โ โโโ Evaluation.md # RAG Evaluation & Benchmarks
โ โโโ APISpec.md # REST / SSE API Specifications
โ โโโ Frontend.md # Design System & UI Architecture
โโโ ingestion/ # Python Document Processing Pipeline
โ โโโ parser.py # PyMuPDF parser + OCR fallback + table finder
โ โโโ chunker.py # Clause boundary & hierarchy chunker
โ โโโ embedder.py # Gemini 768-dim batch vector embedder
โ โโโ ingest.py # CLI ingestion orchestrator
โ โโโ config.py # Ingestion path & DB configurations
โ โโโ requirements.txt # Python dependencies (pymupdf, pytesseract)
โ โโโ data/ # Source PDFs, metadata configs & seeds
โโโ evaluation/ # Benchmark suite & evaluation datasets
โ โโโ run-evaluation.ts # Precision, Recall & Faithfulness harness
โ โโโ benchmark.json # Ground-truth BIS test queries
โโโ prisma/
โ โโโ schema.prisma # Supabase PostgreSQL & pgvector schema
โโโ scripts/
โ โโโ capture-screenshots.ts # Automated Retina screenshot capture script
โ โโโ generate-presentation-pdf.ts # Presentation dossier generator
โโโ src/
โ โโโ app/ # Next.js App Router routes & API endpoints
โ โ โโโ api/ # Standards search & chat streaming handlers
โ โ โโโ chat/ # AI compliance chat with citation drawer
โ โ โโโ compliance/ # Gap analysis & 7-step roadmap UI
โ โ โโโ explore/ # Standards explorer & filtering UI
โ โ โโโ layout.tsx # Root bilingual layout & navigation
โ โโโ components/ # Modular React 19 components
โ โ โโโ chat/ # Messages, citations & split drawer
โ โ โโโ compliance/ # Gap gauges, checklist & lab cards
โ โ โโโ standards/ # Filter bars, cards & clause modals
โ โ โโโ layout/ # Navbar, footer & language switcher
โ โโโ lib/ # Core business logic & integrations
โ โ โโโ gemini.ts # Gemini 2.5 Flash SDK wrapper
โ โ โโโ hybrid-search.ts # Reciprocal Rank Fusion (RRF) search engine
โ โ โโโ store/ # Zustand client state (bilingual toggle)
โ โโโ types/ # Type-safe TypeScript interfaces
โโโ tests/
โ โโโ e2e.ts # Playwright automated test suite
โโโ package.json
โโโ README.md
- ๐ Product Requirements Document (PRD)
- ๐๏ธ System Architecture & RAG Specification
- ๐ API Specification
- ๐งช RAG Evaluation & Benchmark Report
- ๐จ Frontend Architecture & Design Tokens
- ๐ก๏ธ Security & Cost Analysis
- ๐๏ธ SIH Judge Demonstration Script
Manak AI is an intelligent reference and regulatory audit copilot created to assist MSMEs, manufacturers, and compliance teams. It provides grounded references to official BIS documentation but does not replace statutory licenses or official audit decisions issued by the Bureau of Indian Standards. For official statutory certifications, visit manakonline.in.
Built with pride by Team CodeSmiths for Smart India Hackathon 2026 ๐ฎ๐ณ
Empowering Atmanirbhar Bharat through Quality, Standards & Artificial Intelligence





