Inspiration
During natural disasters, people often lose internet access but still have basic cellular connectivity. Emergency services get overwhelmed with unverified reports, misinformation spreads rapidly, and real distress signals get lost in noise.
We were inspired to build RES-Q AI to solve a critical gap: How can we intelligently detect real disaster situations from simple text messages or tweets and provide immediate, structured emergency guidance?
Our goal was to combine the speed of traditional machine learning with the reasoning power of large language models to build a scalable, cost-efficient disaster intelligence system that could work even in low-connectivity environments.
What it does
RES-Q AI is a hybrid ML + LLM disaster detection system.
It:
Analyzes SMS or social media messages.
Classifies whether the message represents a real disaster.
Computes a confidence score using a trained Logistic Regression model.
If high risk, triggers Gemini AI to:
Identify disaster type.
Classify severity (Low / Medium / High / Critical).
Retrieve live news using Google Search integration.
Provide safety cautions.
Generate an emergency action plan.
Infer possible location from context.
This ensures fast filtering, intelligent reasoning, and actionable outputs — all in one pipeline.
How we built it
We designed RES-Q AI using a hybrid architecture:
1️⃣ Data & Preprocessing
Used a disaster tweet dataset.
Cleaned text (removed URLs, mentions, punctuation, numbers).
Normalized and structured input data.
2️⃣ Machine Learning Layer
Implemented TF-IDF vectorization (1–3 gram range).
Trained a Logistic Regression classifier with class balancing.
Tuned probability threshold to reduce false positives.
Evaluated using Accuracy, F1 Score, and Confusion Matrix.
3️⃣ Intelligent LLM Layer
Integrated Google Gemini API.
Used Google Search tool for live news retrieval.
Designed structured prompts for:
Severity classification
Emergency planning
Risk prediction
4️⃣ Cost-Efficient Routing
Gemini is triggered only when ML confidence exceeds threshold.
This reduces API usage and improves scalability.
The system runs as a Python-based application and can be integrated with Flask for SMS-based deployment.
Challenges we ran into
Balancing False Positives and False Negatives Lower thresholds increased disaster detection but caused false alarms. We had to tune probability thresholds carefully.
API Rate Limits & Quotas Free-tier Gemini usage limits forced us to design a cost-efficient hybrid pipeline instead of sending every message to the LLM.
Prompt Engineering Getting structured, reliable emergency output required multiple iterations of prompt refinement.
Live Search Integration Designing prompts that effectively use live search without generating irrelevant results required experimentation.
System Design Decisions Deciding when to use ML vs when to invoke LLM was a critical architectural challenge.
Accomplishments that we're proud of
Built a complete hybrid AI architecture within hackathon constraints.
Successfully integrated traditional ML with real-time LLM reasoning.
Implemented live news retrieval for disaster context.
Designed a scalable, cost-aware AI routing mechanism.
Created a system that could realistically integrate with SMS gateways and emergency dashboards.
Tuned the model to achieve strong F1 performance while minimizing false alarms.
Most importantly, we built a solution with real-world applicability — not just a prototype demo.
What we learned
Hybrid AI systems are more practical than pure LLM systems.
Cost efficiency and scalability are as important as intelligence.
Prompt engineering significantly impacts output reliability.
Traditional ML still plays a crucial role in real-time systems.
Emergency-tech solutions require careful design to avoid misuse or false alerts.
Architecture decisions matter more than flashy UI in real-world systems.
This project strengthened our understanding of AI system design beyond just model training.
What's next for RES-Q AI
SMS Gateway Integration
Connect with SMS providers for real-world testing.
Real-Time Dashboard
Live disaster heatmap with geospatial visualization.
Auto-Routing to Emergency Services
Notify relevant authorities based on disaster type.
Multi-Language Support
Support regional languages for broader accessibility.
Deep Learning Upgrade
Fine-tune transformer-based models for improved accuracy.
Cloud Deployment
Deploy backend as scalable API service.
Government / NGO Collaboration
Pilot testing in disaster-prone regions.
Our long-term vision is to build an intelligent disaster intelligence layer that assists emergency systems in faster, smarter decision-making.
Built With
- advanced
- api
- backend
- classification
- cleaning
- computations
- core
- data
- disaster
- expressions
- extraction
- feature
- flask
- for
- framework
- gemini
- implementation
- integration
- language
- large
- learning
- loading
- logistic
- machine
- model
- normalization
- numerical
- numpy
- pandas
- preprocessing
- programming
- python
- re)
- reasoning
- regression
- regular
- scikit-learn
- search
- text
- tf-idf
- tool
- vectorizer
Log in or sign up for Devpost to join the conversation.