BIS Intel-Bot is an enterprise-grade Retrieval-Augmented Generation (RAG) system engineered to solve the complex accessibility challenge surrounding Indian Standards (IS), Bureau of Indian Standards (BIS) certifications, compulsory registration schemes (CRS), and quality compliance frameworks.
Designed with zero-hallucination constraints, dynamic multi-query decomposition, key-rotation fault tolerance, and streaming citation metadata, BIS Intel-Bot provides instantaneous, verified regulatory intelligence to citizens, manufacturers, and compliance auditors.
Navigating public regulatory documents like BIS specifications involves parsing thousands of pages across heterogeneous formats (.pdf, .md, .docx, web tables). Traditional search engines fail on normative queries requiring exact cross-references (e.g., comparing Scheme-I ISI marking with Scheme-II CRS for IT products, or identifying exact voltage parameters under IS 694).
BIS Intel-Bot resolves this by:
- Performing high-density vector search over verified BIS document corpora.
- Decomposing compound user queries into parallel sub-vector searches.
- Enforcing deterministic grounding and anti-hallucination system constraints.
- Supplying verifiable direct source URLs for every regulatory assertion.
┌───────────────────────────┐
│ Client Application │
│ Next.js 16 + React 19 UI │
└─────────────┬─────────────┘
│
HTTP POST /api/chat
(JSON Message Stream)
│
▼
┌───────────────────────────┐
│ Next.js Route Engine │
│ Query Decomposition │
└─────────────┬─────────────┘
│
┌──────────────────────┴──────────────────────┐
│ │
▼ ▼
┌─────────────────────────────┐ ┌─────────────────────────────┐
│ Gemini Embedding Engine │ │ Pinecone Vector Index │
│ (gemini-embedding-001) │ │ Cosine Similarity Search │
└──────────────┬──────────────┘ └──────────────┬──────────────┘
│ │
└──────────────────────┬──────────────────────┘
│
Context Documents
│
▼
┌───────────────────────────┐
│ System Prompt Engine │
│ Grounding & Citation Rules│
└─────────────┬─────────────┘
│
▼
┌───────────────────────────┐
│ Resilient Gemini Pool │
│ (Key Rotation & Backoff) │
└─────────────┬─────────────┘
│
Streamed Server Response
(X-Sources Header)
- Implements thread-safe, state-aware API key rotation across multi-key pools.
- Automatically handles HTTP
429 (Too Many Requests)and500 (Internal Server Error)by marking rate-limited credentials as exhausted and falling back gracefully without dropping active user web streams.
- Parses user prompts into discrete logical query vectors.
- Correlates multi-turn conversation memory with vector retrieval to preserve context across complex multi-step user dialogues.
- System instructions strictly isolate the LLM's operational context to retrieved Pinecone vectors.
- If parameters (fees, timelines, or standard numbers) are absent from current vector indices, the system explicitly reports data unavailability rather than interpolating values.
- Node.js
^20.0.0or later - npm
^10.0.0or later - Pinecone Index with 768-dim embeddings (
gemini-embedding-001)
-
Clone the repository:
git clone https://github.com/your-username/bis-intel-bot.git cd bis-intel-bot -
Install dependencies:
npm install
-
Configure Environment Variables: Create
.env.localin the project root:PINECONE_API_KEY=your_pinecone_api_key PINECONE_INDEX=bis-standards FIRECRAWL_API_KEY=your_firecrawl_api_key GOOGLE_GENERATIVE_AI_API_KEYS=key1,key2,key3
-
Execute TypeScript Verification:
npx tsc --noEmit
-
Start Development Server:
npm run dev
Open
http://localhost:3000to access the production interface.
This application is ready for zero-downtime deployment on Vercel, AWS Amplify, or Docker container environments:
npm run build
npm run startDistributed under the MIT License. See LICENSE for full licensing terms.