Skip to content

Latest commit

ย 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

BYOMKESH IntelAI Logo

BYOMKESH IntelAI

Explainable Conversational Crime Intelligence Copilot
Built for KSP Datathon 2026 โ€“ Challenge 01
Intelligent Conversational AI for KSP Crime Database

React TypeScript Node.js Zoho Catalyst AI Security


๐Ÿ“– About The Project

BYOMKESH IntelAI is a state-of-the-art Explainable Crime Intelligence Copilot designed to modernize criminal investigations for the Karnataka State Police (KSP). It bridges the gap between massive, unstructured FIR data and actionable intelligence by transforming conventional database querying into an intelligent, secure conversational interface.

Rather than relying on complex SQL queries or rigid dashboards, investigators can interact with the system using natural language (Text or Voice). The platform securely interprets investigative intent, retrieves verified records from the official FIR database, analyzes criminal networks, and produces 100% explainable insights with complete audit transparency.

Our Vision: "Transform Crime Data into Actionable Intelligence without compromising on Trust, Explainability, or Security."


๐ŸŽฏ The Challenge: KSP Datathon 2026 (Challenge 01)

The State Crime Records Bureau (SCRB) maintains critical crime records from over 1,100 police stations across Karnataka. Existing investigative workflows are heavily dependent on manual queries and static dashboards, creating a bottleneck for deep investigation, pattern discovery, and real-time intelligence gathering.

The BYOMKESH Solution: An AI Copilot that acts as a digital investigative partner. It not only fetches records but actively assists officers in identifying hotspots, drawing network connections, and forecasting trendsโ€”all backed by zero-hallucination verification.


โšก Key Capabilities & Features

๐Ÿง  1. Explainable AI (XAI) Investigation Copilot

  • Conversational Queries: Supports advanced natural language filtering (e.g., "Show me recent chain snatching cases in Mysuru involving repeat offenders").
  • Voice-to-Query: Hands-free operation with multilingual voice recognition (English, Kannada, Hindi).
  • Zero-Hallucination Engine: Every AI response is strictly grounded in the FIR database.
  • Transparent Reasoning: Provides an "Explainability Audit" for every answer, showing exactly which records, filters, and fields were queried to formulate the response.

๐Ÿ•ธ๏ธ 2. Advanced Crime Intelligence

  • Criminal Network Visualization: Instantly maps relationships between FIRs, repeat offenders, and accomplices using D3.js force-directed graphs.
  • Geospatial Hotspot Analytics: Heatmap overlays highlighting crime density across Karnataka districts.
  • Predictive Trend Analytics: Time-series analysis forecasting potential crime spikes based on historical FIR dates.
  • Dynamic Evidence Explorer: A highly robust, fast data grid for filtering, sorting, and examining detailed FIR case files.

๐Ÿ›ก๏ธ 3. Enterprise-Grade Security

  • Role-Based Access Control (RBAC): Strict permissions segregating Admin, DSP, and Inspector access levels.
  • LLM Isolation: The LLM never touches the database directly. It parses queries into a strict Abstract Syntax Tree (AST), which the backend validates before secure execution.
  • Cryptographic Audit Trails: Every query is logged with a SHA-256 hash chain to ensure non-repudiation and legal compliance.

๐Ÿ“„ 4. Professional Reporting

  • One-Click Export: Instantly generate professional, timestamped PDF Investigation Reports encapsulating the query, resulting data, and AI summary.

๐Ÿ—๏ธ System Architecture

flowchart TD
    %% Styling Definitions
    classDef default fill:#1e293b,stroke:#475569,stroke-width:2px,color:#f8fafc;
    classDef user fill:#0284c7,stroke:#bae6fd,stroke-width:3px,color:#fff;
    classDef client fill:#0f172a,stroke:#3b82f6,stroke-width:2px,color:#fff;
    classDef ai fill:#4c1d95,stroke:#c4b5fd,stroke-width:2px,color:#fff;
    classDef db fill:#065f46,stroke:#6ee7b7,stroke-width:2px,color:#fff;
    classDef security fill:#991b1b,stroke:#fca5a5,stroke-width:2px,color:#fff;

    %% Nodes
    Officer([Investigator / Officer]):::user
    
    subgraph Frontend ["Client Tier (React + Vite)"]
        UI["Web Dashboard Interface"]:::client
        Voice["Voice Recognition (EN, KN, HI)"]:::client
        Viz["Visualizers (D3, Leaflet, Recharts)"]:::client
    end
    
    subgraph CoreEngine ["AI Engine"]
        NLP["Natural Language Processor"]:::ai
        Intent["Intent Classifier & Entity Extractor"]:::ai
        ASTBuilder["AST Query Compiler"]:::ai
    end
    
    subgraph SecurityLayer ["Zero-Trust Boundary"]
        RBAC["Role-Based Access Control"]:::security
        Validator["AST Sandbox & Policy Validator"]:::security
        Audit["Cryptographic Audit Logger"]:::security
    end
    
    subgraph BackendStore ["Catalyst Infrastructure"]
        DAL["Data Access Layer"]:::db
        FIRDB[("Official KSP FIR ER Database")]:::db
        ExplainEngine["XAI Explanation Generator"]:::ai
    end

    %% Workflow Connections
    Officer -->|Text/Voice| UI
    Officer -->|Microphone| Voice
    Voice --> UI
    
    UI -->|Raw Query| RBAC
    RBAC -->|Authorized Request| NLP
    
    NLP --> Intent
    Intent --> ASTBuilder
    
    ASTBuilder -->|Generated AST JSON| Validator
    Validator -->|Validated Secure Query| DAL
    Validator -.->|Log Query Hash| Audit
    
    DAL --> FIRDB
    FIRDB -->|Raw Records| ExplainEngine
    
    ExplainEngine -->|Evidence + Summary| UI
    ExplainEngine -.->|Log Result Hash| Audit
    
    UI -->|Render Data| Viz
    Viz -->|Export| PDF["Generate PDF Report"]
Loading

๐Ÿ” Investigation Workflow

sequenceDiagram
    autonumber
    actor Officer as ๐Ÿ‘ฎ Investigator
    participant UI as Copilot Interface
    participant NLU as AI Intent Engine
    participant Sec as Security Sandbox
    participant DB as FIR Database
    participant XAI as Explainability Engine

    Officer->>UI: "Show repeat offenders in Mysuru for Robberies"
    activate UI
    UI->>NLU: Send natural language query
    
    activate NLU
    NLU->>NLU: Detect Intent: NETWORK_SEARCH
    NLU->>NLU: Extract Entities: [Mysuru, Robbery, Repeat_Offender]
    NLU-->>Sec: Generate Abstract Syntax Tree (AST)
    deactivate NLU
    
    activate Sec
    Sec->>Sec: Validate AST against Security Policies
    Sec->>DB: Execute mapped secure query
    deactivate Sec
    
    activate DB
    DB-->>XAI: Return structured FIR records & entities
    deactivate DB
    
    activate XAI
    XAI->>XAI: Synthesize verification logic
    XAI->>XAI: Generate Evidence-backed Summary
    XAI-->>UI: Return Summary + Audit Details + Data
    deactivate XAI
    
    UI->>UI: Render Network Graph & Data Grid
    UI-->>Officer: Display Interactive Results & Explanation
    deactivate UI
Loading

๐Ÿ’ป Technology Stack

Category Technologies
Frontend Framework React 19, TypeScript, Vite
Styling & UI Tailwind CSS, Lucide Icons, Custom Glassmorphism
Visualization D3.js (Networks), Leaflet (Maps), Recharts (Trends)
Backend / Serverless Node.js, Zoho Catalyst Functions
Database Zoho Catalyst Data Store (Mocked via TypeScript Synthetic Generator)
AI / NLU Custom AST Parser, Intent Router, Regex Pipelines
Security SHA-256 Hashing, RBAC, AST Sandboxing

๐Ÿš€ Getting Started (Local Development)

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/your-org/BYOMKESH-IntelAI.git
    cd BYOMKESH-IntelAI
  2. Install dependencies:

    npm install
  3. Generate the Synthetic KSP Database: (This creates a localized database of 500+ highly realistic, randomized FIR records across Karnataka)

    npm run generate-data
  4. Start the Development Server:

    npm run dev
  5. Access the Terminal: Open http://localhost:5173 in your browser. Click Access Investigator Terminal to launch the secure dashboard.


๐Ÿ“ Repository Structure

BYOMKESH-IntelAI/
โ”œโ”€โ”€ public/                 # Static assets
โ”œโ”€โ”€ server/
โ”‚   โ”œโ”€โ”€ schema/             # Synthetic FIR data generator (generateSyntheticData.ts)
โ”‚   โ””โ”€โ”€ functions/          # Zoho Catalyst backend functions 
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ components/         # React Components
โ”‚   โ”‚   โ”œโ”€โ”€ auth/           # RBAC Gateway
โ”‚   โ”‚   โ”œโ”€โ”€ chat/           # Conversational Interface & AI Engine
โ”‚   โ”‚   โ”œโ”€โ”€ dashboard/      # Main Application Shell
โ”‚   โ”‚   โ””โ”€โ”€ visualization/  # D3/Leaflet/Recharts Visualizers
โ”‚   โ”œโ”€โ”€ context/            # React Context (Auth, Language, State)
โ”‚   โ”œโ”€โ”€ services/           # NLU, PDF Reporting, and Mock APIs
โ”‚   โ”œโ”€โ”€ types/              # TypeScript Interfaces (AST, Database Schema)
โ”‚   โ””โ”€โ”€ utils/              # Cryptographic Hashing, Translators
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ tailwind.config.js
โ””โ”€โ”€ README.md

๐Ÿ”ฎ Future Enhancements

  • Real-time FIR Synchronization: Direct live sync with the SCRB mainframe.
  • Advanced Link Prediction: Machine learning models to predict future accomplices based on historical MOs.
  • Cross-State Intelligence Sharing: API federation for analyzing inter-state crime syndicates.
  • Mobile Field App: A lightweight PWA version for officers on active patrol.

๐Ÿค Team BYOMKESH

Inspired by the legendary Indian detective Byomkesh Bakshi, our team merges classical investigative reasoning with modern Artificial Intelligence to build a trustworthy, transparent digital intelligence platform.

Built for KSP Datathon 2026
Building Trustworthy AI for Smarter Investigations


ยฉ 2026 Team BYOMKESH. Educational and research purposes only.

About

Explainable AI Crime Intelligence Copilot for Karnataka State Police | Built for KSP Datathon 2026 using Zoho Catalyst

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages