Workflow and Operations
The LangGraph orchestration graph turns incoming reports into reviewable work orders through bounded nodes and explicit checkpoints.
Context Normalization & Evidence Extraction
The context loader deterministically normalizes citizen descriptions, categories, GPS coordinates, media metadata, existing incident associations, and clarification responses. The evidence agent produces structured output identifying observable facts, reported claims, hazards, landmarks, and contradictions.
- Differentiates what is directly visible in media from citizen assertions.
- Identifies spatial landmarks (e.g. '14m from DAV Public School Gate').
- Flags safety-critical hazards and missing information.
Hybrid Knowledge Retrieval (BM25 + Dense Semantic RRF)
Municipal standard operating procedures, statutory bylaws, and repair playbooks are retrieved using a hybrid Reciprocal Rank Fusion (RRF, k=60) algorithm combining exact BM25 keyword matching with dense embedding vector similarity. Grounding boundaries enforce strict statutory jurisdiction resolution (e.g. state highways vs municipal ward roads).
Automated Schedule of Rates (SOR) BOQ Costing
The operational planner computes an itemized Bill of Quantities (BOQ) conforming to municipal Schedule of Rates. Defect surface area (cm²) and depth (mm) derived from vision models calculate exact asphalt tonnage, machinery operating hours, labor allocations, emergency priority surcharges, and contingency reserves in INR and USD.
Dynamic Vulnerability SLA Acceleration
Static response times are replaced with vulnerability-aware dynamic SLAs. When incidents occur within 500m of schools, hospitals, elder care facilities, or active flood zones, target response windows automatically accelerate (e.g. 24 hours reduced to 4 hours).
Checkpoint Interrupt & Human Resume
When clarification is needed from a citizen or when a high-impact work order is prepared, the LangGraph graph saves state to PostgreSQL and transitions to WAITING_FOR_CLARIFICATION or WAITING_FOR_REVIEW. Resuming reuses the existing stable thread ID without rebuilding state from scratch.
Starting a workflow for an existing report ID reuses active or completed runs to prevent duplicate work orders.