Explainable Conversational Crime Intelligence Copilot
Built for KSP Datathon 2026 โ Challenge 01
Intelligent Conversational AI for KSP Crime Database
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 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.
- 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.
- 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.
- 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.
- One-Click Export: Instantly generate professional, timestamped PDF Investigation Reports encapsulating the query, resulting data, and AI summary.
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"]
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
| 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 |
-
Clone the repository:
git clone https://github.com/your-org/BYOMKESH-IntelAI.git cd BYOMKESH-IntelAI -
Install dependencies:
npm install
-
Generate the Synthetic KSP Database: (This creates a localized database of 500+ highly realistic, randomized FIR records across Karnataka)
npm run generate-data
-
Start the Development Server:
npm run dev
-
Access the Terminal: Open
http://localhost:5173in your browser. Click Access Investigator Terminal to launch the secure dashboard.
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
- 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.
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.
