KanyaRakshak: A Distributed LLM-Integrated Personal Safety System with Real-Time Geospatial Risk Prediction

Personal safety applications often focus on sending an emergency alert, but an effective system must process location information, respond reliably under concurrent requests, and provide meaningful contextual awareness. This paper presents KanyaRakshak, a distributed personal safety system that combines real-time location telemetry, geospatial analysis, machine learning, and a conversational large language model. The system is implemented as a browser-based frontend, a FastAPI backend, managed Upstash Redis, and external LLM inference services (openai/gpt-oss-20b via Groq). To decouple telemetry ingestion from background processing, KanyaRakshak employs a Redis Streams pipeline. Geospatial risk modeling is handled via a hybrid approach using DBSCAN clustering to identify spatial risk zones and a Random Forest model to classify locations into risk levels based on spatial and temporal features. The resulting risk context is integrated into an interactive conversational safety assistant. The application was empirically evaluated using direct latency measurements, load testing with Locust, and supervised model evaluation: Model Evaluation & Data Leakage: An initial 100% accuracy result was identified as data leakage because the label-generation rule was available as an input feature. After introducing label noise and spatial variation, the held-out accuracy adjusted to a realistic 82% on the synthetic dataset. Concurrency Optimization: Concurrent testing identified a blocking Redis operation in the asynchronous SOS route handlers. Offloading synchronous calls to worker threads using asyncio.to_thread() reduced average response times from 27.5 seconds to 9.7 seconds under 10 concurrent users without request failures. The paper documents the architectural design, empirical findings, engineering trade-offs, and critical limitations regarding synthetic data and cloud hosting.

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-10-31
DOI
https://doi.org/10.5281/zenodo.23844470
Primary Topic
IoT and GPS-based Vehicle Safety Systems
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
preprint

KanyaRakshak: A Distributed LLM-Integrated Personal Safety System with Real-Time Geospatial Risk Prediction

Naga Abhijith Ramayanam, Hema K., Rajiv Rathan Erroju, Harshavardhan Ponnam
Zenodo (CERN European Organization for Nuclear Research)
IoT and GPS-based Vehicle Safety Systems
preprint

KanyaRakshak: A Distributed LLM-Integrated Personal Safety System with Real-Time Geospatial Risk Prediction

Naga Abhijith Ramayanam, Hema K., Rajiv Rathan Erroju, Harshavardhan Ponnam
preprint en

Abstract

Personal safety applications often focus on sending an emergency alert, but an effective system must process location information, respond reliably under concurrent requests, and provide meaningful contextual awareness. This paper presents KanyaRakshak, a distributed personal safety system that combines real-time location telemetry, geospatial analysis, machine learning, and a conversational large language model. The system is implemented as a browser-based frontend, a FastAPI backend, managed Upstash Redis, and external LLM inference services (openai/gpt-oss-20b via Groq). To decouple telemetry ingestion from background processing, KanyaRakshak employs a Redis Streams pipeline. Geospatial risk modeling is handled via a hybrid approach using DBSCAN clustering to identify spatial risk zones and a Random Forest model to classify locations into risk levels based on spatial and temporal features. The resulting risk context is integrated into an interactive conversational safety assistant. The application was empirically evaluated using direct latency measurements, load testing with Locust, and supervised model evaluation: Model Evaluation & Data Leakage: An initial 100% accuracy result was identified as data leakage because the label-generation rule was available as an input feature. After introducing label noise and spatial variation, the held-out accuracy adjusted to a realistic 82% on the synthetic dataset. Concurrency Optimization: Concurrent testing identified a blocking Redis operation in the asynchronous SOS route handlers. Offloading synchronous calls to worker threads using asyncio.to_thread() reduced average response times from 27.5 seconds to 9.7 seconds under 10 concurrent users without request failures. The paper documents the architectural design, empirical findings, engineering trade-offs, and critical limitations regarding synthetic data and cloud hosting.

Zenodo (CERN European Organization for Nuclear Research)
Koneru Lakshmaiah Education Foundation (IN)
IoT and GPS-based Vehicle Safety Systems
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon
KanyaRakshak: A Distributed LLM-Integrated Personal Safety System with Real-Time Geospatial Risk Prediction — Naga Abhijith Ramayanam, Hema K., et al. · Zenodo (CERN European Organization for Nuclear Research) (2026) | TGRS Research Map | TGRS