🌟 Inspiration
Across colleges, urban neighborhoods, and semi-rural communities, everyday infrastructure hazards—such as open manholes, sunken road craters, leaking water mains, and unlit pedestrian pathways—frequently go unaddressed for weeks or months.
When ordinary citizens attempt to report these problems, the process is intimidating, confusing, and opaque:
- Unstructured and Vague Submissions:Citizens often submit quick, unstructured blurbs lacking critical dimensions, exact landmarks, or hazard severity details.
- Jurisdictional Mismatches:Citizens rarely know whether an issue falls under the Municipal Corporation, State Public Works Department (PWD), Electricity Board, or Water & Sewerage Authority.
- Lack of Administrative Drafting: Most residents lack the administrative and legal phrasing needed to draft formal grievance petitions, collect compelling evidence, or follow an accountable escalation protocol.
We created "CivicPulse" AI to bridge this systemic power imbalance—providing every resident, student, and neighborhood association with an expert AI civic case analyst in their pocket.
💡 What It Does
CivicPulse AI transforms raw community hazard reports into comprehensive, prioritized civic case plans and formal grievance packages:
- Intelligent Triage & Urgency Assessment: Analyzes reports and assigns an advisory urgency level (
Low,Medium,High,Critical) supported by factual risk reasoning. - Epistemic Fact vs. Assumption Separation: Clearly delineates user-provided facts from model-inferred risks and assumptions, preserving high civic credibility.
- Jurisdictional Mapping: Pinpoints the exact authority type (e.g., Municipal Road Maintenance, Public Health, Electricity Board) without fabricating fictional personnel or departments.
- Human Review & Confirmation: Provides citizens with an interactive preview to accept, adjust, or override AI suggestions before creating the official record.
- Instant Formal Complaint Drafting: Generates an authoritative, respectful administrative grievance letter ready to copy-paste into government portals or present to ward counselors.
- Actionable Evidence Checklists: Recommends exact physical measurements, photo angles, geo-tags, and follow-up timeline milestones.
- Full Case Lifecycle Management: Stores cases in local SQLite storage, enabling search, category filtering, lifecycle tracking (
Open,In Progress,Resolved,Closed), chronological activity audit logging, and one-click Markdown dossier export. - Community Insights: Aggregates real-time trends, recurring problem themes, and infrastructure hotspot clustering directly from authentic database records without simulated data.
📐 Triage Assessment Formulation
CivicPulse AI models urgency assessment by weighting physical hazard severity, pedestrian/traffic vulnerability exposure, and elapsed inaction duration:
$$U_{\text{score}} = \alpha \cdot S_{\text{severity}} + \beta \cdot E_{\text{exposure}} + \gamma \cdot T_{\text{duration}}$$
$$\text{subject to } \alpha + \beta + \gamma = 1, \quad S, E, T \in [0, 1]$$
The calculated score informs the advisory urgency classification:
$$U_{\text{tier}} = \begin{cases} \mathbf{Critical}, & U_{\text{score}} \ge 0.85 \ \mathbf{High}, & 0.60 \le U_{\text{score}} < 0.85 \ \mathbf{Medium}, & 0.35 \le U_{\text{score}} < 0.60 \ \mathbf{Low}, & U_{\text{score}} < 0.35 \end{cases}$$
🛠️ How We Built It
- AI Foundation Model: NVIDIA Nemotron (
nvidia/Llama-3.1-Nemotron-70B-Instruct), chosen for its superior instruction-following, logical reasoning, and structured output precision. - High-Throughput Cloud Inference: Hosted on Nebius Token Factory (
https://api.tokenfactory.us-central1.nebius.com/v1/), integrated via the OpenAI-compatible Python SDK for ultra-low latency token generation. - Frontend & UX: Developed in Python with Streamlit, featuring a bespoke civic-tech design system (navy typography, teal and lime accents, responsive metric cards, and accessible status indicators).
- Data Integrity & Schemas: Enforced through Pydantic v2 validation to guarantee deterministic JSON extraction from raw model streams.
- Persistence & Privacy: Local SQLite3 database (
civicpulse.db) with relational schema indexing, activity audit tracking, and secure local file uploads (uploads/). - Telemetry & Verification: Real-time backend connection probing verifying latency and endpoint readiness with zero secret leakage.
🧗 Challenges We Faced
- Guaranteeing Strict Structured JSON Output: Frontier 70B models occasionally introduce conversational preamble or Markdown fences. We engineered multi-stage regex sanitization combined with strict Pydantic model parsing to ensure zero pipeline crashes.
- Responsible AI Guardrails & Anti-Hallucination: A major risk in civic technology is AI fabricating official names, contact numbers, or claiming official legal status. We implemented strict negative constraints in our system prompt, explicit disclaimers that AI assessments are advisory, emergency helpline routing for life-safety hazards, and an essential human confirmation review before any database commit.
- Transparent Connection Telemetry: We avoided naive "mock success" indicators. The UI conducts an authentic live health-check against the Nebius Token Factory endpoint, falling back to clean offline grievance logging if connectivity is unavailable.
🏆 Accomplishments That We're Proud Of
- Tangible Civic Impact: Built a practical, end-to-end tool solving real-world citizen pain points rather than an abstract toy chatbot.
- Ultra-Fast 70B Inference: Achieved lightning-fast analysis cycles leveraging Nebius Token Factory's optimized NVIDIA GPU infrastructure.
- Zero Fabricated Data: Every visualization, metric card, and community insight is derived from real, verified SQLite database records.
- Production-Grade Reliability: Automated test suites covering schema validation, database CRUD operations, and error recovery.
📚 What We Learned
- Schema-Driven Prompting:Constraining frontier models like NVIDIA Nemotron with Pydantic JSON schemas unlocks repeatable, enterprise-grade extraction for civic and administrative workflows.
- Human-in-the-Loop Builds Trust:Citizens value AI assistance when drafting and triaging, but requiring a deliberate confirmation step reinforces ownership and citizen agency.
- Nebius Token Factory Performance:The standardized OpenAI-compatible interface paired with Nebius GPU acceleration made deploying 70B parameters frictionless and cost-effective.
🚀 What's Next for CivicPulse AI
- GIS & Geospatial Hotspot Mapping:Interactive OpenStreetMap / Leaflet layers visualizing hazard density clusters to assist urban planning departments.
- Ward Counselor & Municipal API Dispatch: Direct automated dispatch via email and webhook integration to local municipal portals and citizen grievance helplines.
- Localized Multilingual Support: Expanding triage and letter generation into regional languages to empower diverse communities and non-native speakers.
Log in or sign up for Devpost to join the conversation.