Inspiration
Every day, millions of citizens across Delhi deal with broken roads, overflowing garbage, water leaks, and failed streetlights — yet filing a complaint remains a frustrating, bureaucratic process. Most people don't know which department to contact, what to write, or how to follow up. Language is another barrier: a resident who speaks Hindi or Hinglish shouldn't have to struggle with English-only forms. We wanted to build something that makes civic participation as simple as sending a text message — one where AI does the hard work of understanding, classifying, and routing the complaint, so the citizen just has to describe what they see.
What It Does
Civic Copilot is an AI-powered citizen complaint management platform built for Delhi. It has two sides: For Citizens: Describe a civic problem in English, Hindi, or Hinglish Optionally attach a photo The AI automatically classifies the issue (road, garbage, water, electricity, streetlight, drainage), detects the location, and assesses urgency A formal complaint letter is auto-generated and routed to the correct government department (PWD, Municipal Corporation, Water Department, etc.)
For Authorities: A mission control dashboard gives civic teams a real-time view of incoming complaints Issues are pre-sorted by type, urgency, and location — no manual triage needed
How We Built It
Frontend: Next.js, deployed on Vercel — a clean, mobile-first three-step complaint flow (describe → photo → submit) Backend / NLP Service: Python + FastAPI, handling complaint processing via a /process endpoint AI Classification: Google Gemini (gemini-2.5-flash) extracts issue type, location, urgency, a short summary, citizen impact, and a confidence score from free-text input Fallback Classifier: A rule-based keyword matcher in Python that handles Gemini downtime or quota limits gracefully Department Router: A deterministic mapping that assigns every classified issue to the correct civic department Formal Complaint Generator: A templated generator that turns raw AI analysis into a structured, official-sounding complaint letter Multilingual Support: Gemini handles English, Hindi, and Hinglish natively in the same prompt
Challenges we ran into
Structured output from LLMs: Getting Gemini to return clean, parseable JSON every time — without markdown fences or hallucinated keys — required careful prompt engineering and a post-processing strip step Multilingual edge cases: Hindi and Hinglish complaints sometimes mixed scripts or informal spellings, which needed both Gemini and the fallback classifier to handle robustly Graceful degradation: Building the fallback classifier so the service never goes down entirely — even without API access — added complexity but was essential for reliability Location detection: Extracting meaningful, specific locations from vague complaint text ("near the big tree on my street") is genuinely hard
Accomplishments we're proud of
End-to-end complaint pipeline working in under a second — from raw citizen text to classified issue, department assignment, and formal letter True trilingual support (English, Hindi, Hinglish) with no separate models or translation step A clean, accessible citizen UI that requires zero technical knowledge to use A robust fallback system ensuring the service works even when the AI API is unavailable
What We Learned
Prompt design is as important as model choice — the structure of the JSON schema in the prompt directly determined output reliability Building for real users means designing for failure: the fallback classifier was an afterthought that became a core feature Civic tech has a genuine language problem — supporting Hindi wasn't a bonus feature, it was a necessity for the target audience Keeping the architecture modular (classifier → router → generator as separate modules) made the system easy to debug and extend
What's Next for Civic Copilot
Photo analysis: Use Gemini Vision to classify issues directly from photos — so citizens can just snap and submit Complaint tracking: Give citizens a reference ID and status updates as their complaint progresses Authority dashboard enhancements: Heat maps, resolution time tracking, and department performance analytics More cities: The department mapping and classifier are easily configurable for other Indian cities WhatsApp / SMS integration: Let citizens file complaints without needing the web app at all
Log in or sign up for Devpost to join the conversation.