The problem statement
Foundational models like Claude, GPT, and Gemini can read and write Indian languages fluently but fluency does not ensure safety. In real deployments serving health and education needs, these models miss the sociocultural norms, colloquial usage, and shared context that grassroots communities live in. This results in subtle, repeated harms that standard model evals never surface. This talk shares how we found those harms across 4 live NGO deployments and built Kaapi Guardrails — an open-source, configurable safety layer — to catch them.
How it looks in real scenarios
When AI tools go live in the social sector, the failures aren't hypothetical — they're specific and recurring:
A user shares a phone number, Aadhaar number, or a PDF medical report in-line, and it flows straight through to the model.
A health query gets a response carrying a caste/gender slur or an unfounded gender assumption ("Ask your doctor about these symptoms, he can guide you…").
A user describes symptoms to a maternal-health information bot, and instead of pointing them to a clinic, it confidently prescribes a specific medicine and dosage. Thereby, providing medical advice it was never built, qualified, or verified to give.
These are the gaps between "the model speaks Hindi" and "the model is safe for this community.
The solution
We collaborated with 4 grassroots NGOs across health and edtech — SNEHA, VigyanShaala, TAP, Inqui-Lab — to study their on-ground AI deployments, surface immediate safety risks, and build guardrails customisable across domains.
Primary research pointed us to 6 priority issues: PII removal, slur detection, topic relevance, toxicity detection, gender-assumption-bias removal, and answer relevance.
Our Evaluation Method
Manual annotation of input–output pairs sampled from pilot and live data, labelled with domain-specific labels and analysed for patterns of repeated error:
SNEHA (Healthcare): ~60,000 pairs → 1,000 annotated (~1.6%)
VigyanShaala (EdTech): ~20,000 pairs → 500 annotated (~2.5%)
Regular client consultations: The annotation exercise was supported by regular client consultations to understand how their end users interact with their AI tool, which included the following:
Gathering information on actual usage of their AI tool versus its intended purpose.
Risks and harms they anticipated and were observing during pilot runs.
Providing recommendations for safety design based on the manual evaluations.
Discussing configuration needs for individual safety guardrails through multiple rounds of testing on live data.
Technical implementation of guardrails
A standalone REST microservice that sits between your app and the LLM. You call it before sending a prompt to the model (input guardrail) and after receiving the reply (output guardrail); each call returns a safe/unsafe verdict and, optionally, a redacted or rephrased version of the text.
Stack: FastAPI + SQLModel + PostgreSQL, Dockerised; validation engine is the open-source guardrails-ai SDK (v0.10.0).
Configuration-driven, not code-driven: validator presets, banned-word sets, and topic-scope definitions are stored in the DB (scoped per organization_id) — NGOs tune safety to their domain without touching code or redeploying.
Multitenant + observable: every call writes a request_log, and each validator writes a validator_log (PASS/FAIL, input, output, error). User input is redacted from error logs by design, so observability never becomes a leakage vector.
The validator inventory (input → output)
Validator | What it does | How it's built |
|---|
PII Remover (pii_remover) | Redacts 15 entity types incl. India-specific IDs — Aadhaar, PAN, Passport, Voter ID, Vehicle Reg. | Microsoft Presidio + spaCy en_core_web_lg; labelled placeholders e.g. [REDACTED_PERSON_1] |
Lexical Slur (uli_slur_match) | Detects bilingual (Hindi/English) slurs; severity-filterable (low/med/high) | Crowdsourcd Slur list from Project Uli + text normalisation (emoji strip, NFKC, ftfy); redacts [REDACTED_SLUR] |
Ban List (ban_list) | Blocks exact terms (e.g. sonography, gender check for PCPNDT compliance) | Guardrails Hub; word-sets stored in DB, resolved at request time |
Topic Relevance (topic_relevance) | Keeps the bot in-domain; scores 1–3, ≤1 fails | LLM-as-judge (gpt-4o-mini via LiteLLM) wrapping Hub LLMCritic; versioned prompt templates |
Profanity Free (profanity_free) | General profanity screen | Guardrails Hub |
Gender Assumption Bias (gender_assumption_bias) | Replaces stereotyping words with neutral terms; domain categories (healthcare/education/all) | Custom CSV (word, neutral-term, type) |
Toxicity / NSFW (nsfw_text) | ML toxicity classification | textdetox/xlmr-large-toxicity-classifier (XLM-RoBERTa) |
LlamaGuard 7B (llamaguard_7b) | Policy-based safety (violence/hate, sexual, self-harm, etc.) | Meta's LlamaGuard, remote inference |
Pick the right response per risk — three on-fail modes: fix (redact/correct silently), exception (block the message), or rephrase (signal the caller to ask the user to rephrase). Not every unsafe input should be handled the same way.
It works (before → after)
Input | Guarded output | Validator |
|---|
कृपया मेरी रिपोर्ट इस +916163648503 पर भेज दें। | कृपया मेरी रिपोर्ट इस <PHONE_NUMBER> पर भेज दें। | PII |
That chappri staff never responds… | that [REDACTED_SLUR] staff… | LEXICAL_SLUR |
what that spokeswoman said | what that spokesperson said | GENDER_ASSUMPTION_BIAS |
Fig. 1. AI interaction with Guardrail