MODEL 02 · Open models for Indian languages

Yama Judges, Chitragupta Keeps the Records: Open-Source AI for Indian Languages

Chitragupta, an Apache-2.0 model that finds and masks Aadhaar, PAN, UPI and other personal data in 13 languages, paired with Yama.

By Arun Prabhakaran · Originally published 24 Oct 2026 in Towards AI · 11 min full read

TL;DR

Chitragupta is a free, local, Apache-2.0 model that detects and masks 18 kinds of personal data, including Aadhaar, PAN and UPI IDs, in 13 Indian languages and Hinglish. A fine-tuned XLM-RoBERTa-large tagger plus checksum rules reaches 0.959 exact-span F1 on a hard synthetic test set, although GLiNER-PII does better on two public benchmarks.

  • 18PII types
  • 13languages
  • 0.959exact-span F1
  • 99.0%PII characters masked
  • ~24 msper message, CPU

Summary

This article introduces Chitragupta (arunp0/chitragupta-pii-indic), an Apache-2.0 model that detects and masks personal information in Indian text, and pairs it with the Yama classifier. Named after the record-keeper who serves Yama the judge, it tags 18 types of personal data, including Aadhaar, PAN, voter ID, GSTIN, UPI IDs, IFSC codes, card and bank numbers, phone numbers, emails, addresses and names. It covers 13 languages in native script or Roman letters, even when digits are written in native numerals or spoken as words, and runs locally at about 24 ms per short message on a multi-core CPU.

The design is an XLM-RoBERTa-large tagger plus a small rule layer. Many Indian IDs carry checksums (Verhoeff for Aadhaar, Luhn for cards), so the rules repair split spans and let arithmetic pick the label. That lifted exact-span F1 from 0.876 to 0.959.

No real personal data was used. Gemma 4 wrote 114,431 synthetic messages with placeholders, code inserted the values so the offsets were exact, and Qwen3.6 checked the result. The test set was built to resist memorisation: a different writer model, 10 unseen document types and new ID formats for 65% of the values.

The article is candid about losses. GLiNER-PII beats it on two public benchmarks, short addresses are often missed, and a v2 that topped one benchmark was not shipped because it hurt driving-licence accuracy under a release rule written down before the results. Against Presidio with Indian recognisers, it masked 99.0% of personal-data characters versus 55.0%.

This page is a short summary written for this site. Every figure, table, code sample and reference is in the original article on Towards AI.

Questions this article answers

How do you detect Aadhaar numbers in text?

A pattern alone is not enough, because people type Aadhaar numbers with spaces, dashes or dots in unpredictable places. Chitragupta combines a fine-tuned XLM-RoBERTa-large tagger with a rule layer: Aadhaar numbers must pass the Verhoeff checksum, cards the Luhn checksum, and GSTINs end in a check character. The rules join fragments the tagger splits and let the checksum decide the label, raising exact-span F1 from 0.876 to 0.959.

How can I redact PII from Hindi or Hinglish text before sending it to an LLM?

Run a local redaction model first and send only the masked text. Chitragupta replaces values with labels such as [PERSON], [AADHAAR], [UPI_ID] and [PHONE], works on Hindi, Hinglish and 11 more languages, and returns character offsets so you can hash or tokenise instead. Ordinary order numbers and dates are left alone. Nothing leaves your machine, and the article then passes the masked text to Yama for classification.

Can you train a PII detector on synthetic data?

Chitragupta was trained only on synthetic text. Gemma 4 wrote 114,431 messages in 14 document types, from WhatsApp chats to KYC forms, using placeholders such as {AADHAAR_1}; code then filled in valid values in many formats, so span offsets were exact. Qwen3.6 reviewed every text, and anything with unlabelled personal data was dropped. The author's lesson: let the LLM write the text and let code write the labels.

How accurate is Chitragupta compared with GLiNER-PII and Presidio?

On its own hard synthetic test set of 1,582 texts, Chitragupta scores 0.959 exact-span F1 and hid 99.0% of the characters belonging to personal data; Presidio with its Indian recognisers hid 55.0%. On two public benchmarks built by others, knowledgator's GLiNER-PII is better, 0.966 and 0.965 against 0.954 and 0.878. The gaps come from tagging unannotated speaker names and missing short one-line addresses.

What are the limitations of Chitragupta?

Short one-line addresses are often missed, though the nearby pincode is usually caught. Timestamps, order IDs and similar look-alike numbers are sometimes tagged as accounts, cards or licences, and bank account numbers, which have no checksum, are the weakest label at 0.879 F1. For long inputs of 450 to 1,400 tokens, F1 falls to 0.93–0.94, so run it per message. All evaluation is synthetic, and it is one layer of a privacy process, not a compliance tool.

More in Open models for Indian languages