Drishti AI — Grievance Intelligence Platform
Chief Minister's Office, Haryana (CMO Haryana) — State Government of India
An AI-powered grievance intelligence platform that cross-references citizen complaints, government Action Taken Reports and recorded call transcripts to score genuine resolution quality, surface false closures and rank cases for supervisory action — giving the CMO a real-time audit layer over the state grievance system.
- Engagement
- R&D + product build
- Delivery model
- Cloud (drishti.osipl.dev); architecture on-prem-ready
- Team
- 4–6 across solution architecture, AI/ML engineering, full-stack, DevOps
- Industry
- GovTech / e-governance / public grievance redressal
PROJECT PROFILE — Drishti AI: Grievance Intelligence Platform
1. Snapshot
Government departments routinely close citizen complaints by submitting generic or copy-pasted Action Taken Reports (ATRs) — leaving the Chief Minister's Office of Haryana with no systematic way to distinguish genuine resolutions from administrative closures. OSIPL designed and built Drishti AI as a proof-of-concept platform that ingests grievance cases from the CMO Haryana Samadhan system (complaint PDFs, ATR documents and recorded call transcripts) and runs a multi-source AI analysis to score each case on a 0–100 alignment scale, detect fraud signals, reconstruct the case journey and surface misaligned cases for supervisory review. Across 98 real cases analysed end-to-end, the system extracted 975 traceable evidence signals and identified 15 cases where the citizen's own recorded voice directly contradicted the official ATR closure — a detection capability that did not previously exist.
2. The Challenge
CMO Haryana processes thousands of public grievances monthly routed through the Samadhan portal. District and departmental officers submit ATRs to mark cases closed, but the CMO has no automated mechanism to audit whether the ATR bears any real relation to the citizen's original complaint. Supervisory officers cannot manually listen to call recordings for hundreds of cases per week, and there is no quantitative signal to prioritise review effort. Three specific failure modes were prevalent: generic ATR templates (departments submitting identically worded closures for substantively different complaints); copy-paste fraud (the interim departmental report copied verbatim into the final ATR); and unverified verbal closures (a citizen marked as "satisfied" with no corroborating transcript evidence).
The data constraints made this technically demanding. PDFs exported from the Samadhan portal are unstructured, OCR-noisy and interspersed with Hinglish text and portal-format artefacts. Call recordings arrive as raw ZIP archives of audio files, with transcription quality varying from clear to garbled. Cases have highly variable document completeness — some have all three evidence sources, others only a ticket with no ATR or audio.
3. What We Built
Drishti's core is a three-source evidence triangulation engine. An ingestion pipeline extracts and cleans complaint and ATR PDFs (PyMuPDF + pdfplumber, with custom OCR-artefact cleaning for portal timestamps, Hinglish formatting and broken date strings), transcribes call recordings (Whisper), and stores everything with a dual-identifier scheme: an internal Drishti UID (DRI-XXXXXX) alongside the CMO's own case_ref for cross-system traceability.
The AI analysis engine (R1-v2.0 prompt) runs a six-step chain-of-thought over all available sources, returning: a 0–100 alignment score; sentiment (Satisfied / Neutral / Dissatisfied / Frustrated); a High / Medium / Low confidence rating; issue flags (MISSING_ATR, ATR_COPY_PASTE, ATR_CONTRADICTS_CALL, GENERIC_ATR); an audio-vs-ATR verdict (Confirmed / Contradicted / Unverifiable); extracted evidence citations — exact quoted phrases from source documents, highlighted in the UI; a case timeline (filed date, closed date, resolution days); and a six-stage case journey with ping-pong detection and bottleneck identification. A tiered SLA decay multiplier (full credit at 0–30 days, decaying to zero at 180 days) yields a separate SLA Speed Score, and a combined "Drishti Score" = Quality × SLA multiplier gives a single executive metric. All three scoring lenses are surfaced across the UI.
The web platform, developed in Next.js 16 / React / TypeScript, delivered: an executive dashboard with an AI-generated situational briefing written fresh from live case data; a case registry with three-lens scoring and 7-dimension filtering; a 360° case detail view with highlighted in-document citations; semantic search powered by local AI embeddings; district and department performance analytics with dual-axis charts; a CMO Foundational KPI dashboard tracking officer performance, repeat complainants and grievance demand trends; a score calibration panel with 14 configurable parameters and saveable profiles; and a live AI model configuration panel supporting Gemini, OpenAI, Anthropic Claude and Nexus as interchangeable providers — all switchable without a code deployment.
4. Architecture & How It Works
Three processing stages feed a central PostgreSQL 16 + pgvector store:
Ingestion layer. PDFs are parsed with PyMuPDF and pdfplumber, then cleaned of OCR artefacts, portal timestamp headers, page-number markers and Hinglish formatting inconsistencies. Audio ZIPs are extracted and transcribed with Whisper. Each case is assigned a Drishti UID and the source system's case_ref, with a 1–3 data completeness score (Complete / Partial / Minimal) based on document availability.
AI analysis layer (R1-v2.0). A six-step chain-of-thought prompt runs over the cleaned documents: complaint understanding → data quality assessment → cross-reference match → audio vs ATR triangulation → process and timeline extraction → final judgment. A hard "No Assumption Policy" prevents the model from inferring resolution where evidence is absent — missing documents are stated explicitly and penalise the score. Copy-paste ATR detection compares interim and final report text similarity (>85% string overlap triggers a flag). When a call transcript contradicts the ATR, the citizen's own voice is elevated as ground truth. Providers are abstracted via an AIProvider base class — Gemini 2.5 Flash is the production default, swappable to OpenAI GPT-4, Anthropic Claude or a Nexus on-prem proxy via environment config or a live superadmin panel; no code change required.
Semantic layer. All cases are embedded with sentence-transformers / all-MiniLM-L6-v2 (384 dimensions, run entirely locally — no API cost or data egress) into pgvector. This powers both natural-language grievance search and automatic related-case suggestions on every case detail page.
The frontend is Next.js 16 with TypeScript and Tailwind CSS; charts are built with Recharts. Authentication is JWT HS256 (30-minute expiry) with role-based access control (user / superadmin). Production services run under systemd for auto-restart, behind Nginx with SSL, and are deployed at drishti.osipl.dev.
Key design decisions. Multi-provider AI abstraction future-proofs the scoring engine against model deprecation or procurement constraints. Local embeddings keep semantic search free of recurring API costs. The dual-identifier scheme (internal UID + source system case_ref) preserves cross-system traceability for future portal integration. A tiered SLA decay curve — rather than a binary SLA pass/fail — preserves scoring nuance for cases resolved near the threshold.
5. Technology Stack
- AI/ML models: Gemini 2.5 Flash (primary); OpenAI GPT-4, Anthropic Claude, Nexus (configurable); Whisper (audio transcription); chain-of-thought prompting; multi-provider abstraction layer
- Vector & data: pgvector; sentence-transformers
all-MiniLM-L6-v2(384-dim, fully local); PostgreSQL 16; semantic search; related-case retrieval - Backend: FastAPI; Python 3.12; SQLAlchemy (async); PyMuPDF; pdfplumber; Alembic; Pydantic v2; structlog
- Frontend: Next.js 16; React; TypeScript; Tailwind CSS; Recharts; pdfjs-dist (inline PDF viewer)
- Security & compliance: JWT HS256; RBAC (user / superadmin); 30-minute token expiry; cookie-based auth
- Infra & deployment: PostgreSQL 16; Nginx + SSL; systemd (auto-restart); Docker-ready
6. Capabilities & Expertise Demonstrated
LLM prompt engineering & chain-of-thought design → Designed and iterated to v2.0 a six-step structured reasoning prompt returning alignment score, confidence, sentiment, case timeline, issue flags, exact evidence citations and an audio-vs-ATR verdict, with an explicit No Assumption Policy that prevents hallucination on incomplete government data.
Multi-source evidence triangulation → Built a three-document cross-reference pipeline (complaint PDF + ATR + call transcript) that elevates the citizen's recorded voice to ground truth when it contradicts the official ATR, and flags copy-paste closure fraud via string-similarity analysis.
Multi-provider AI abstraction → Engineered a swappable AIProvider abstraction layer supporting Gemini, OpenAI, Claude and Nexus; providers switch via environment variable or a live admin panel with no code deployment — demonstrated in production.
Vector search & local embedding architecture → Built pgvector semantic search with locally-run sentence-transformer embeddings (zero API cost, zero data egress), serving natural-language case queries and automatic related-case suggestions.
GovTech data ingestion & cleaning → Ingested and structured unstructured government PDFs — OCR-noisy, Hinglish, multi-format — with a custom cleaning pipeline that normalises broken dates, removes portal artefacts and flags data quality tier per case.
SLA scoring design → Designed a tiered SLA decay scoring formula (three zones, 0–180 days) and a composite Drishti Score that combines quality and speed, surfaced as three independently switchable scoring lenses across the UI.
Executive analytics & GovTech dashboarding → Delivered an AI-generated executive briefing, district/department dual-axis performance charts, officer-level performance ranking, repeat-complainant analysis and a seven-week demand trend model for CMO situational awareness.
Score calibration & configurability → Built a 14-parameter live calibration panel with saveable named profiles, allowing scoring behaviour to be tuned by evaluators without touching code.
7. Hard Problems Solved / Innovations
Audio as ground truth, not corroboration. When a citizen's call transcript contradicts the ATR's closure claim, Drishti overrides the official departmental record with the citizen's own recorded words. Implementing this required a prompt rule explicit and firm enough that the LLM applies it consistently across varied language and quality levels — and a dedicated audio_vs_atr_verdict field (Confirmed / Contradicted / Unverifiable) surfaced prominently in the UI rather than buried in a summary. In the 98-case POC corpus, 15 cases showed contradiction — a meaningful detection rate that would have been invisible without this layer.
Copy-paste ATR fraud detection. Departments sometimes copy the interim report verbatim into the final ATR, signalling no additional investigation took place. Drishti detects this by extracting both report sections from the ATR text and computing string-overlap similarity; above 85% the case is automatically flagged before the LLM scores it. This catches a specific failure mode that no alignment score alone would surface.
Hallucination prevention on variable-completeness government data. Case files arrive with wildly inconsistent document availability. Rather than allowing the model to assume or impute missing evidence, the prompt assesses data quality explicitly at Step 2 and the No Assumption Policy requires it to reason only on what is present. Missing ATRs score the case poorly; missing transcripts are stated as such. This prevents the common LLM failure of inflating scores to appear helpful.
Composite scoring that preserves SLA nuance. A binary SLA pass/fail loses the signal that a case resolved in 31 days is meaningfully better than one resolved in 121 days. Drishti's tiered decay curve — full credit for 0–30 days, smooth decay to zero at 180 days — preserves that signal and surfaces it as a distinct scoring dimension alongside quality, giving supervisors a two-axis view of case health.
8. Outcomes & Impact
Measured (from the 98-case POC):
- 98 real CMO Haryana grievance cases ingested, cleaned, scored and stored end-to-end.
- 975 evidence signals extracted, cited with exact source quotes and highlighted in the case detail UI.
- 15 cases identified where the citizen's recorded call contradicted the official ATR closure — a detection rate of ~15%.
- 65+ cases flagged as low-alignment (score < 40%), surfaced automatically for supervisory action.
- Full-stack platform deployed at drishti.osipl.dev with systemd-managed uptime and SSL.
Modelled / projected (not yet measured at scale):
- At operational scale (hundreds of cases weekly), a system of this type could reduce manual supervisory review burden by an estimated 60–80%, concentrating officer attention on the flagged minority where the AI has identified genuine concern. Actual figures depend on production portal integration and representative data quality at volume.
9. Roadmap & Evolution
- Phase 0 — Foundation (delivered): ingestion pipeline; PDF + audio processing; AI scoring; PostgreSQL/pgvector foundation; initial Next.js UI; core case API.
- Phase 1 — Intelligence & Impact (delivered): semantic search; three-lens scoring; evidence citations with in-document highlighting; case journey reconstruction; CMO KPI dashboard; score calibration panel; multi-provider AI; analytics with district/department charts.
- Phase 2 — Automation & Integration (planned): direct API integration with the Samadhan portal for automated case pull; batch reanalysis on model upgrade; WhatsApp / SMS alert integration for supervisory officers; case re-escalation workflow.
- Phase 3 — Scale & Generalisation (scoped): multi-state deployment; configurable domain adaptation for other grievance portals; air-gapped on-prem deployment variant.
Related projects
Connected through shared technologies and capabilities.
DocuMind — Government Document AI Pipeline
In productiona state government department of personnel (India); integrates with the state e-archive
An air-gapped government document AI pipeline that turns inbound departmental PDFs into searchable, summarised, archive-ready records — with self-service ops controls that replaced terminal SQL with audit-logged UI actions.
AI-Powered Fabric Sourcing Platform
Proof of conceptone of India's largest vertically-integrated textile manufacturers (supplies global apparel brands)
An on-prem AI sourcing platform that turns a fabric image into the right match across a 70,000-SKU catalogue in seconds, powered by a proprietary, explainable 4-pillar matching engine.
HireStream — Overseas Placement Portal
Staging-verifieda state electronics & IT corporation (India), under the State's Department of Information Technology
A configuration-driven, multi-role overseas-placement platform that takes a candidate from the State from registration to verified placement abroad through KYB-licensed agencies and employers — wrapped in an embedded testing framework with a pre-merge confidence gate that calibrates release risk on every push.
Facing a similar problem?
Talk to Agentryx