Skip to content

Blog

Notes from building credgate: governing how AI tools use Indian personal and financial data, with results you can reproduce.

Subscribe with the RSS feed, or only the R posts with the R feed. For more R posts from around the community, see R-bloggers.

Redacting Indian personal data in R before it reaches an LLM

R users are wiring language models into their work quickly: summarising call notes with ellmer, classifying tickets, drafting replies. In a bank, an insurer or a hospital those notes are full of Aadhaar numbers, PANs and mobile numbers, and the DPDP Act, RBI guidance and plain caution all say they should not go to a model that does not need them - often not even to one running in-house on a shared server.

credgate is an R package (with a Python twin) that finds Indian personal data and takes it out before the prompt leaves your session. This post shows the R side.

A Shiny app for InfoSec: which models may see which data

Once a bank lets analysts use language models, someone has to decide which models may see what. Customer PANs to the in-house model on the analyst's laptop: probably fine. To a shared GPU server: perhaps not. To an external provider: no. A card number with its CVV: never. That someone is usually InfoSec or compliance, and they should not have to edit YAML to say it.

credgate keeps these decisions in a policy, and its R package includes a Shiny app to edit one. This post walks through it.

Four Indian PII detectors on three datasets, including ones we did not write

Every PII tool looks good on its own test data. credgate's benchmark has always been a corpus we generated ourselves, and our rules were refined on part of it - so its numbers say more about our templates than about the notes, logs and chat transcripts a bank actually has.

So we ran credgate, MaskFlow, Microsoft Presidio and Kavach PII on two public Indian PII datasets written by other people, alongside our own, with the same scoring for every tool. This post is what we found: where credgate is strong, where it clearly trails, and the three detection fixes the public data led to.

Using Claude Code on Indian bank data without sending a single PAN

AI coding assistants are most useful exactly where the data is most sensitive. In a bank or an NBFC, the notebooks, logs and call notes that Claude Code reads are full of PAN, Aadhaar and mobile numbers - and RBI guidance, the DPDP Act and PCI DSS all say those should not reach an external model.

This post shows Claude Code running through credgate, an open-source proxy that applies a policy to every request: identifiers are tokenised or redacted before anything leaves the machine, the real values are put back into the answer for you, and every decision is written to a tamper-evident audit log.