Team Name: Genex
WiBD GenAI Hackathon 2026
Problem Statement Number: 5
Problem Statement Title: AI-Powered Weather-Aware Activity Planning System
WeatherWise is an intelligent conversational agent that solves the problem of uncertainty in outdoor activity planning due to unpredictable weather conditions.
People often struggle to decide whether weather conditions are suitable for their planned outdoor activities, leading to:
- Cancelled events due to poor weather
- Safety risks from inadequate preparation
- Missed opportunities on perfect weather days
- Outdoor enthusiasts planning recreational activities
- Event organizers scheduling outdoor events
- Families planning picnics, trips, and gatherings
- Sports teams scheduling practices and games
- Real-time risk assessment with 0-100 risk scores
- Personalized recommendations based on activity type and weather
- Smart packing lists tailored to conditions
- Backup plan suggestions when weather is unfavorable
- Natural conversation interface - no complex forms
- Instant validation - rejects past dates and fictional locations
WeatherWise transforms weather data into actionable decisions using a backend-controlled conversation state machine that gathers information incrementally, validates inputs deterministically, and generates comprehensive plans with professional dashboard visualization.
- Backend controls all conversation logic (NO LLM conversation control)
- Incremental information gathering (activity β location β date)
- Partial updates allowed (fill in missing pieces naturally)
- LLM called only once when all inputs are complete
- Follow-up questions answered without LLM calls
- Context-aware conversations with session memory
- Regex-based entity extraction (NO LLM for parsing)
- Deterministic input validation (past dates, >7 days, invalid cities)
- Structured response format:
{status, chat_reply, dashboard} - Session state tracking:
WAITING_ACTIVITY β WAITING_LOCATION β WAITING_DATE β READY - Efficient LLM usage with strict JSON prompts
- 2-Column Layout: Live chat interface + Real-time analytics
- Weather Summary Card: Temperature, humidity, wind speed, precipitation
- Feasibility Assessment: Excellent/Good/Moderate/Poor/Not Recommended
- Risk Analysis: Score (0-100) with identified risk factors
- Best Time Recommendations: Optimal time windows based on conditions
- Smart Packing List: Activity + weather-based suggestions
- Backup Plan Card: Alternative options for risky conditions
- LLM-generated risk scores based on activity type and weather
- Risk factors identified (heat, rain, wind, humidity)
- Verdict with clear explanation
- Activity-specific feasibility assessment
- Natural language date resolution (today, tomorrow, this weekend)
- Past date rejection with clear messaging
- 7-day forecast limit enforcement
- ISO format date storage (YYYY-MM-DD)
- Open-Meteo API integration (free, no API key)
- Geocoding for 47+ Indian cities
- Multi-day forecast support
- Comprehensive hourly weather metrics
WeatherWise uses a deterministic state machine architecture where the backend controls all conversation logic, ensuring predictable behavior and efficient LLM usage.
User Message
β
[1] Entity Extraction (Regex-based, NO LLM)
β
[2] Session Update (Partial updates allowed)
β
[3] Location Validation (API-based, with blacklist)
β
[4] Date Validation (Past rejection, 7-day limit)
β
[5] Completeness Check
β
ββ Missing field? β Ask clarification (Backend decides)
ββ Invalid input? β Return error (Deterministic rules)
ββ Complete? β [6] Weather API β [7] LLM (ONCE) β [8] Formatted Plan
-
Backend-Controlled State Machine
- NO LLM for conversation control
- 4 states:
WAITING_ACTIVITY β WAITING_LOCATION β WAITING_DATE β READY - Deterministic transitions based on entity presence
-
Regex-Based Entity Extraction
- Activity: 14+ outdoor activities (picnic, hiking, beach, etc.)
- Location: 47+ Indian cities with geocoding validation
- Date: Natural language (today, tomorrow, this saturday, etc.)
- Time Preference: morning, afternoon, evening, night
-
Strict Validation Rules
- Past time detection: "yesterday", "last week", "2 days ago"
- Far future rejection: >7 days ahead
- Fictional city blacklist: wakanda, asgard, narnia, hogwarts, etc.
- Real location validation via geocoding API
-
Efficient LLM Usage
- LLM called ONLY ONCE when all inputs complete
- Strict JSON response format enforced
- Follow-up questions answered from stored plan (NO LLM)
-
Multi-Provider Fallback
- Primary: Google Gemini Pro
- Fallback 1: Groq Llama 3.3 70B
- Fallback 2: Ollama (local)
βββββββββββββββ
β User β
β (Browser) β
βββββββ¬ββββββββ
β HTTP
βΌ
βββββββββββββββββββ
β dashboard.html β βββ Frontend (Vanilla JS)
βββββββ¬ββββββββββββ
β POST /ask
βΌ
βββββββββββββββββββ
β FastAPI β
β api.py β βββ REST API
βββββββ¬ββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββ
β Conversation Manager β
β (State Machine Controller) β
βββββββββββββββββββββββββββββββββββ€
β β’ Entity Extractor (Regex) β
β β’ Validator (Rules) β
β β’ Response Formatter β
βββββββ¬ββββββββββββββββββββββββββββ
β
ββββββββββββΊ Weather Fetcher βββΊ Open-Meteo API
β
ββββββββββββΊ Planner Service βββΊ Gemini / Groq / Ollama
(LLM - ONCE)
weather_wise/
βββ api.py # FastAPI backend server
βββ dashboard.html # Professional dashboard UI
βββ requirements.txt # Python dependencies
βββ .env # Environment variables (not in git)
βββ .env.example # Template for API keys
βββ .gitignore # Git ignore rules
βββ README.md # Project documentation
βββ SETUP.md # Quick setup guide
β
βββ core/ # Core business logic
β βββ conversation_manager.py # State machine controller
β βββ entity_extractor.py # Regex-based entity extraction
β βββ validator.py # Input validation rules
β βββ planner_service.py # Weather + LLM planning
β βββ response_formatter.py # Response schema formatter
β βββ weather_fetcher.py # Open-Meteo API client
β βββ response_generator.py # Legacy response module
β βββ risk_calculator.py # Risk scoring logic
β βββ __init__.py
β
βββ config/ # Configuration
β βββ settings.py # Environment config
β
βββ utils/ # Utility functions
β βββ helpers.py # Date parsing, validation
β βββ intent_classifier.py # Intent classification
β βββ memory.py # Session management
β βββ __init__.py
β
βββ prompts/ # LLM prompt templates
β βββ intent_extraction.txt
β βββ response_generation.txt
β βββ weather_advisor.txt
β
βββ data/ # Data storage
β βββ conversations.json # Conversation logs
β
βββ test_state_machine.py # State machine tests
Team Genex
- Niyati Shah - @ShahNiyati | shahniyati349@gmail.com
- Dhairyati Pandya - @Dhairyati | pandyadhairyati@gmail.com
- Ishita Prajapati - @IshitaPrajapati01 | ishitaprajapati024@gmail.com
- Pia Patel - @Pia-07 | 23cs073@charusat.edu.in
- Jayti Shah - @jaytishah | jaytishah20@gmail.com
- Users plan activities within 7-day forecast window
- Activity types are limited to 14 outdoor categories
- Indian cities primarily supported (47+ cities)
- Sessions stored in-memory (single user demo)
- Weather API provides data for 16 days maximum
- Gemini Pro may have rate limits on free tier
- Session data cleared on server restart
- No user authentication system
- Multi-user support with Redis session storage
- User authentication and saved preferences
- Historical weather data analysis
- Mobile app with push notifications
- Integration with calendar apps
- Support for international cities
- Weather alerts and warnings
- Activity recommendation engine based on user history
- Python 3.13+ (recommended) or Python 3.10+
- pip package manager
- Google API key (for Gemini)
- Groq API key (optional, for fallback)
git clone https://github.com/YOUR_USERNAME/weather_wise.git
cd weather_wisepython -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -r requirements.txtCreate a .env file in the project root:
cp .env.example .envEdit .env and add your API keys:
# Get API key from https://makersuite.google.com/app/apikey
GOOGLE_API_KEY=your_google_api_key_here
# Optional: Get from https://console.groq.com/
GROQ_API_KEY=your_groq_api_key_herepython api.pyThe API will start at http://localhost:8000
Open dashboard.html in your browser:
open dashboard.html # macOS
start dashboard.html # Windows
xdg-open dashboard.html # LinuxOr manually navigate to:
file:///path/to/weather_wise/dashboard.html
POST /ask- Send user query, receive planGET /health- Check session stateGET /reset- Reset conversation sessionGET /docs- FastAPI interactive documentation
curl -X POST http://localhost:8000/ask \
-H "Content-Type: application/json" \
-d '{"query": "plan picnic tomorrow in Mumbai"}'User: "I want to plan a picnic"
Bot: "Where are you planning this picnic?"
User: "Mumbai"
Bot: "When are you planning this picnic in Mumbai?"
User: "Tomorrow"
Bot: β
[Fetches weather, calls LLM once, returns plan]
User: "Plan hiking tomorrow in Bangalore"
Bot: β
[Extracts all entities, fetches weather, calls LLM once, returns plan]
User: "Plan beach visit in Chennai tomorrow"
Bot: β
[Returns plan with dashboard]
User: "Why?"
Bot: "Here's why: High UV index, Hot temperature, Low wind"
User: "What should I carry?"
Bot: "You should carry: Sunscreen, Hat, Water bottle, Sunglasses"
User: "Backup plan?"
Bot: "Visit in early morning (6-9 AM) when temperatures are cooler"
User: "What should I pack?"
β Generates activity + weather-based packing list from stored plan
User: "Should I go hiking in Denver or Boulder tomorrow?"
β Fetches weather for both cities, compares risk scores
User: "Plan picnic tomorrow in Mumbai"
Agent: "β
Analysis complete..."
User: "Why not the day after?"
β Explains reasoning for date recommendation
- Python 3.13.3 - Core backend development
- FastAPI - RESTful API backend
- Uvicorn - ASGI server
- Pydantic - Data validation
- Requests - HTTP client
- Google Gemini Pro - Primary LLM for plan generation
- Groq Llama 3.3 70B - Fallback LLM provider
- Ollama - Local LLM fallback (offline support)
- Open-Meteo API - Weather data and geocoding (free, no auth required)
- Vanilla JavaScript - Interactive dashboard
- HTML5/CSS3 - Modern UI with dark theme
- TailwindCSS concepts - Responsive design
- In-memory session storage - Demo implementation (production: Redis recommended)
- Local development - Python FastAPI server
- Production ready - Can be deployed to Heroku, Railway, or Docker
- Colors: #0B1026 β #121A3A β #1B2A6B
- Effects: Glass morphism, neon borders, hover animations
- Typography: Modern sans-serif with proper hierarchy
- Weather Summary (4-metric grid)
- Suitability Score (circular gauge with color coding)
- Agent Reasoning (step-by-step transparency)
- Best Time (time window recommendations)
- What to Carry (dynamic packing list)
- Backup Plan (shown only when risk > 60)
- β
All API keys stored in
.env(git-ignored) - β No hardcoded credentials in source code
- β Environment variable validation at runtime
- β
.env.exampleprovides safe template - β
Comprehensive
.gitignorefor sensitive files
Contributions welcome! Please:
- Fork the repository
- Create feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open Pull Request
This project is licensed under the MIT License.
This project was developed as part of WiBD GenAI Hackathon 2026.
All code was written during the hackathon period by Team Genex. We confirm that:
- The solution is original and developed from scratch
- All external APIs and libraries are properly credited
- The codebase follows best practices and is production-ready
- Documentation is comprehensive and accurate
- Open-Meteo - Free weather API with no authentication
- Google Gemini - Advanced LLM capabilities
- Groq - Fast LLM inference
- FastAPI - Modern Python web framework
- WiBD - Organizing the GenAI Hackathon 2026
Built with by Team Genex for WiBD GenAI Hackathon 2026