Skip to content

vsrupeshkumar/BIS-Navigator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏗️ BIS Navigator: Sovereign AI for National Compliance

Python 3.10+ FastAPI RAG Production Ready

BIS Navigator is a production-grade, RAG-enhanced (Retrieval-Augmented Generation) intelligence platform designed to bridge the gap between complex industrial standards (BIS SP 21) and ground-level manufacturing operations. It reduces weeks of manual compliance research to under 3 seconds.


🏛️ System Architecture

The system utilizes a multi-layered architecture designed for high throughput and sovereign data handling.

graph TD
    subgraph "External Integration Layer"
        WA[WhatsApp Business API] --> |Webhook| WH[FastAPI Webhook Handler]
        FE[React Frontend] --> |REST/WS| API[FastAPI Gateway]
    end

    subgraph "Intelligence Core"
        RAG[BIS Rag Pipeline]
        AE[Audit Engine]
        EX[Explainability Module]
    end

    subgraph "Data & Vector Layer"
        PG[(PostgreSQL + pgvector)]
        RD[(Redis Cache)]
        FA[FAISS In-Memory Index]
    end

    WH --> RAG
    API --> AE
    API --> EX
    RAG --> FA
    AE --> PG
    EX --> RAG
    PG --> AE
Loading

📐 Mathematical Foundation

1. Vector Semantic Similarity

The core of our recommendation engine relies on high-dimensional embedding projections. For a given product description $d$ and standard clause $c$, the similarity score is computed using the Cosine Similarity of their vector representations $\mathbf{v}_d$ and $\mathbf{v}_c$:

$$ S(d, c) = \frac{\mathbf{v}_d \cdot \mathbf{v}_c}{|\mathbf{v}_d| |\mathbf{v}_c|} = \frac{\sum_{i=1}^{n} v_{d,i} v_{c,i}}{\sqrt{\sum_{i=1}^{n} v_{d,i}^2} \sqrt{\sum_{i=1}^{n} v_{c,i}^2}} $$

2. RAG Retrieval Scoring (Hybrid Relevance)

To ensure regulatory precision, we implement a hybrid ranking function $R$ that combines semantic proximity with keyword-based frequency (BM25) to mitigate hallucination:

$$ R(query, document) = \alpha \cdot \text{CosineSim}(v_q, v_d) + (1 - \alpha) \cdot \sum_{i=1}^{n} \text{IDF}(q_i) \cdot \frac{f(q_i, D) \cdot (k_1 + 1)}{f(q_i, D) + k_1 \cdot (1 - b + b \cdot \frac{|D|}{\text{avgdl}})} $$

Where $\alpha = 0.7$ emphasizes semantic intent while preserving exact standard ID matches.


🔄 Audit Workflow Logic

The Audit Engine performs a multi-step verification against the indexed BIS corpus, ensuring every claim is backed by a verified citation.

sequenceDiagram
    participant U as Manufacturer (User)
    participant B as BIS Navigator Backend
    participant R as RAG Engine
    participant L as LLM (Ollama/Fallback)

    U->>B: Submit Product Draft
    B->>R: Vector Search (Top-K Standards)
    R-->>B: Applicable Standards List
    B->>L: Contextual Compliance Audit
    L-->>B: Risk Analysis + Suggested Fixes
    B->>U: Final Compliance Report (Verified Citations)
Loading

🌐 10 Integrated Real-World Data Sources

Unlike simple prototypes, BIS Navigator is connected to 10 live/scraped government data sources:

  1. BIS Certified Licensees: Real-time lookup of 40,000+ certified manufacturers.
  2. MSME/Udyam Portal: Geospatial factory data for cluster-based risk mapping.
  3. BIS Laboratory Network: Geographic mapping of 500+ testing labs.
  4. Enforcement & Violations: Historical seizure data for predictive non-compliance.
  5. SP 21 Standards Catalog: 19,000+ indexed BIS standard documents.
  6. HSN Code Registry: Cross-referencing 5,000+ HSN codes with BIS mandates.
  7. India GeoJSON Boundaries: High-resolution state/district maps for analytics.
  8. BIS News & Alerts: Automated scraping of the latest compliance circulars.
  9. Import/Export Policy: Identification of items under Compulsory Registration Order (CRO).
  10. International Standard Mapping: ISO/IEC cross-references for export readiness.

🛠️ Installation & Setup

1. Infrastructure

Ensure Docker and Python 3.10+ are installed.

docker-compose up -d

2. Seeding Real Data

Populate the PostgreSQL instance with production-grade datasets.

python seed_real_data.py

3. Launch Services

# Start Backend
python -m uvicorn app.main:app --port 8000

# Start Frontend
cd frontend
npm run dev

🌟 Real-World Applications

  • For Manufacturers: Instant "Compliance Readiness" score for new product prototypes.
  • For MSMEs: Step-by-step guidance on obtaining the ISI mark via the WhatsApp assistant.
  • For Regulators: Heatmaps identifying high-risk industrial regions based on violation density and factory concentration.

Developed for the National Compliance Intelligence Hackathon 2024.

About

An intelligent compliance orchestration platform that predicts regulatory risk, maps clause-level obligations, and streamlines certification workflows with audit-grade precision.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors