A contract-first, federated and zero-trust approach to connecting AI across fragmented government systems without breaking public services or widening the cyberattack surface.
Analysis current to 7 August 2026 · Condensed from the author’s longer research note
On 9 May 2026, the National Health Authority (NHA), IndiaAI Mission and Indian Institute of Science concluded an AB-PMJAY hackathon on automating health-claim work. More than 3,500 people registered; the challenges included clinical-document classification, radiology correlation and forged-document detection. The event put APIs, FHIR, cybersecurity, validation and procurement on the agenda. It did not announce that a winning model had entered production. PIB: AB-PMJAY Auto-Adjudication Hackathon Showcase 2026
That distinction matters. A prototype can classify a discharge summary in a controlled test. A production system must establish that it belongs to the right patient; that a state hospital encoded the procedure in the same way as a national claims platform; that the record is current, authentic and lawfully available; and that a service can stop safely when a source is offline, a field changes meaning or a retrieved document carries malicious instructions.
India already has a clear warning from before AI was added. In its AB-PMJAY performance audit, the Comptroller and Auditor General examined six “brownfield” states that used their own IT platforms and sent claims to the national Transaction Management System through APIs. As of November 2022, claims worth ₹22,619.88 crore—53.30% of the value of settled claims—came through those state interfaces. Yet the transactions used state-specific patient identifiers whose master data was unavailable to NHA, and the portability flag was null across the API table. The exchange worked, but did not provide a shared identity, shared meaning or complete audit trail. CAG: AB-PMJAY claims management
An HTTP success code shows that an endpoint accepted a request. It does not prove that the data is true, semantically equivalent, authorised, safe to reuse or adequate for a public decision.
The tempting response is a central “AI data lake” that copies records from every department and gives a model broad access. India should take the opposite route: contract-first, federated and zero-trust. Data should normally remain with its authoritative source; every exchange should be purpose-bound, versioned, validated and attributable; and the model should receive only the minimum governed view needed for a task. It can recommend. It should not hold the credentials or authority to change a citizen’s legal or service status.
Interoperability is a governance problem
DPI is not merely a very large government database. The World Bank describes it as foundational, reusable building blocks for public benefit—identity, payments and data sharing among them. Its 2025 framework highlights openness, interoperability, modularity, minimalism, privacy by design and governance, while recognising the difficult realities of legacy systems, data quality, cybersecurity, procurement and supplier lock-in. World Bank: Digital Public Infrastructure and Development
India’s scale turns a small integration flaw into a governance event. By July 2026, government figures recorded more than 144 crore Aadhaar IDs, 55.49 crore UPI users, 71.66 crore DigiLocker users and 8,904 APIs listed on API Setu. These measure reach, not interoperability quality—but they demonstrate how many dependencies can be affected by a poor connection. PIB: DPI scale, July 2026
AI raises the stakes because it turns records into inferences. A missing field that once appeared as a blank cell can become a fraud flag, risk score or recommendation to deny a service. It also encourages cross-domain reuse before teams settle whether different systems mean the same thing or whether the new purpose is permitted. Generative systems add one more problem: unstructured text can be data and a malicious instruction to an inadequately designed model.
A schema contract is more than a list of columns
Calling a field admission_date and defining it as a date is only syntax. A public-service data contract must also define its business meaning, code set and time zone; the authoritative identifier and how uncertain matches are treated; its provenance and transformation history; cross-field validity rules; the purpose and authority for use; security controls; and how changes are versioned, tested and rolled back.
This reflects India’s standards direction. MDDS guidance describes semantic interoperability as shared understanding of exchanged information, while the Open API policy calls for documentation, lifecycle publication, security compliance and backward compatibility. If a supplier silently changes a discharge timestamp from local time to UTC, substitutes a state code for a national code or begins returning a key identifier as null, the downstream AI team should not merely “handle it”. Automated contract tests should quarantine the incompatible record, identify the accountable source owner and preserve a safe fallback. API Setu: MDDS and Policy on Open APIs
The CAG findings show why. The audit identified historical API records with invalid chronology, missing decision dates and inconsistent identifiers; it also noted that validation had at times been relaxed to retain data while the exchange was streamlined. These observations do not prove fraud or show the platform’s current condition. They do show why a model must distinguish an imperfect record from a decision-grade fact. If a fraud model trains on unqualified anomalies, it may learn the behaviour of an interface or data-entry workflow rather than misconduct.
Four states must never be collapsed:
- Received is not automatically valid.
- Valid is not automatically authoritative.
- Authoritative is not automatically fit for this decision.
- Fit for a decision is not automatically safe for model training.
Federation keeps correction close to the source
India already has a better architectural direction. ABDM was designed as a federated health-data architecture: records originate at the point of care, while a consent-managed exchange connects information holders and users through domain standards such as FHIR. NHCX extends this standards-based approach to health claims. These initiatives do not prove uniform quality or complete adoption in every transaction, but they demonstrate a more useful principle: exchange records and verifiable facts without treating a central copy as the owner of every fact. NHA: Health Data Retention consultation paper · NHCX FHIR implementation guide
DigiLocker offers a complementary lesson. Its XML specification distinguishes a PDF displayed to a citizen from a standardised, machine-readable representation that a programme can verify and use consistently. Where an authoritative issuer provides structured data, a service should validate and consume that data—not ask an LLM to rediscover it from a scan. OCR can help extract a legacy document, but its output remains unverified until reconciled with the issuer or reviewed. DigiLocker XML format specification
Replication is sometimes necessary for latency, offline operation, analytics or model training. But it should be justified field by field, progressing from a narrow verified assertion, to a purpose-specific view, to a short-lived cache, then only where needed to a governed analytical copy. A training asset requires a further review of purpose, quality, representation, leakage and re-identification risk. Availability through an API does not authorise that final step.
Six gates before data reaches AI
Every payload should pass independently observable gates. A failure should produce a machine-readable error, a named owner and a safe workflow—not a silent default.
| Gate | Question | Safe response to failure |
|---|---|---|
| Syntax | Does the payload match its declared version? | Reject or quarantine; never coerce silently. |
| Semantics | Do source and consumer mean the same thing? | Map explicitly or mark as non-equivalent. |
| Provenance & quality | Where did it come from, when, and is it decision-grade? | Retrieve again, seek correction or route to review. |
| Purpose & authority | May this requester use these fields for this task? | Deny; the model cannot override policy. |
| Security | Is each request protected at every object boundary? | Block, alert, rotate or revoke as needed. |
| Model input | Is approved data safe and suitable for this model? | Exclude it, reduce privileges or require human-only processing. |
The same discipline applies to model output. JSON can be valid yet cite a source that was never retrieved, invent an identifier or suggest an action outside the model’s mandate. A separate decision service should accept only enumerated actions and reason codes, verify source references and reject unsupported free-text commands. An authorised officer should see the evidence and retain the final decision.
Identity and retrieval are separate trust boundaries
Aadhaar, ABHA, a PM-JAY ID, a state health-scheme ID, a school ID and a bank account identify different relationships. Using convenient fields—names, addresses or shared phone numbers—as universal joins can build a de facto population graph and create false matches. A safer identity-mapping service returns the minimum result needed, such as a time-bound pseudonymous case token or a verifiable match assertion. It records confidence and preserves reversible links so a later correction propagates to derived features, caches and decisions.
Retrieval-augmented generation needs equal care. The retrieval service, not the LLM, must decide which documents a user may access. Security labels and purpose restrictions must survive chunking and embedding. Retrieved text should be treated as untrusted: separate it from system instructions; deny models general network or shell access; limit tools to allow-listed, read-only operations; validate output against a fixed schema; and test against indirect prompt injection in relevant Indian languages and scripts. NIST identifies prompt injection, data exposure and unauthorised access as system-design risks, not mere prompting problems. NIST Generative AI Profile
Zero trust applies to workloads as well as employees. Each connector and model runtime needs a distinct identity, short-lived credentials, mutual authentication and least-privilege access. The AI runtime should be read-only by default, denied direct access to legacy databases and isolated from the wider network. This is particularly important in critical systems: public accounts of the 2022 AIIMS ransomware incident cited weak network segmentation among the factors that enabled serious disruption. Lok Sabha: AIIMS cyberattack response
Procure the operating system, not just the model
An AI application depends on more than a foundation model: it may include an embedding model, OCR engine, vector store, orchestration framework, container image, GPU runtime and many libraries. CERT-In’s 2025 guidance recommends an Artificial Intelligence Bill of Materials for government, public-sector and essential-service AI procurements. The inventory should identify models, versions, licences, dependencies, data sources, limitations and known vulnerabilities. It should be tied to each production release, alongside schema versions, mappings, configuration, evaluation results and approval records. CERT-In: AIBOM guidance
A defensible procurement schedule should require a service-and-authority map, a canonical data contract, mapping register, purpose-and-access matrix, threat model, network and secrets design, AIBOM/SBOM, validation pack, migration and rollback plan, monitoring and incident plan, and an exit test. If only the vendor can interpret mappings or reproduce evaluations, database fragmentation has simply become supplier dependency.
Migration should be phased. First inventory the real interfaces, shadow databases, spreadsheets and manual reconciliations; then place adapters around existing systems and observe quality without changing decisions. Run AI in shadow mode, followed by a constrained advisory pilot with evidence, uncertainty and a clear human override. Scale only when each new source passes the same contract and security checks. Retire an old interface only after records and audit trails are preserved, recovery is tested, credentials are revoked and citizens retain a working service and correction route.
Design for rights, continuity and correction
India’s AI Governance Guidelines support AI–DPI integration but do not provide a blanket licence for indiscriminate data joining. They recommend privacy, transparency, interoperability, security, oversight, constraints and audit trails. The Digital Personal Data Protection Act will add relevant data-quality and security duties when its substantive provisions commence on 13 May 2027; as of 7 August 2026, architects should build for those duties while assessing applicable current sectoral, constitutional, IT, contractual and administrative requirements separately. Consent is not a universal integration key: a lawful purpose, authority, necessity and retention rule should be recorded for every flow. India AI Governance Guidelines · DPDP commencement notification
The international lesson is also clear. In 2020, the Hague District Court held that the Dutch SyRI legislation did not meet the required balance under the right to private life, citing insufficient transparency and verifiability. The case is not an Indian legal ruling, but it demonstrates an important architectural point: separate departments may each hold a record lawfully, while combining them for a new risk-analysis purpose creates a qualitatively different system of power. District Court of The Hague: SyRI
For a ministry, state agency, hospital or implementation partner, the operating rules are straightforward: start with the public decision and its authority; name an owner for every field; preserve local meaning through replaceable adapters; prefer federated views over broad replication; separate received, valid, authoritative and decision-grade data; keep policy and final action outside the model; give the model no production master credentials; version and test the whole system; and design the stop path, correction path and citizen remedy before the happy path.
The real opportunity
India does not have to choose between fragmented government databases and a single omniscient AI platform. Its DPI experience points to a third path: open and versioned contracts, domain registries, federated exchange, purpose controls, verifiable credentials and modular services.
AI can classify documents, spot inconsistent claims, summarise a record for a reviewer, translate a service interface or help an officer navigate a complex case. But it should operate within an explicitly governed envelope. The decisive question is not whether a model can read across government. It is whether an institution can prove, for each output, which authorised facts were used, what they meant, how they changed, who could see them, what the model was allowed to do and how a harmful result can be stopped and corrected.
An AI system may read across the state for a lawful, narrow purpose. It must never acquire the state’s master key.
Evidence note: This condensed article draws on the author’s longer research note, including official Indian policy and standards, CAG audit findings, CERT-In guidance, World Bank and NIST publications, OWASP guidance and an official Dutch court summary. The proposed architecture and operating rules are the author’s framework. Historical findings are not presented as the current condition of the systems discussed.