AWS Builder Center

Haqdaar: Replacing AI Guesswork with Provable Welfare Eligibility Using Amazon Verified Permissions

Most eligibility tools guess using LLMs. Haqdaar compiles real Indian welfare scheme rules into Cedar policy code on Amazon Verified Permissions, so every eligibility decision comes with a citable, re-runnable proof — not a hallucination.

The problem: eligibility tools guess. We wanted proof.

Every year, millions of eligible Indians are wrongly turned away — or wrongly told they qualify — for government welfare schemes, because the tools checking them are built on the same pattern: an LLM reads a form, makes its best guess, and hopes it's right. Chatbots hallucinate rules. Static forms are confusing. And when someone is rejected, they rarely know which specific clause they failed, or what would change the outcome.
We built Haqdaar ("the rightful claimant," in Hindi/Urdu) to fix this at the architecture level, not the prompt level: no AI decides eligibility. A deterministic policy engine does.

Why Cedar and Amazon Verified Permissions

The core insight was simple: eligibility rules for a government scheme are not fuzzy — they're boolean logic. "Age ≥ 18 AND owns land AND does not pay income tax" is exactly the kind of authorization decision Cedar, AWS's open-source policy language, was designed to express. So instead of asking an LLM "is this person eligible," we compile each scheme's real eligibility criteria into Cedar  permit()  policies and evaluate them through Amazon Verified Permissions (AVP).
A simplified PM-KISAN policy looks like this:
``` permit(principal, action == Action::"Claim", resource == Scheme::"PM_KISAN") when { principal.occupation == "Farmer" && principal.ownsLand == true && principal.paysIncomeTax == false && principal.holdsConstitutionalPost == false }; ```
This means every ALLOW or DENY decision is:
  • Deterministic — the same input always produces the same output, unlike an LLM.
  • Explainable — we know exactly which clause passed or failed, because AVP evaluates policy statements, not free text.
  • Auditable — we can show the citizen the exact page and section of the official scheme guideline the rule came from.

Architecture

Haqdaar runs entirely on AWS:
  • Amazon Verified Permissions + Cedar — the core decision engine.  is_authorized  for single-scheme checks,  batch_is_authorized  for checking one citizen against every onboarded scheme in a single call.
  • AWS Lambda — eligibility evaluation logic, request orchestration, and DigiLocker OAuth token exchange.
  • Amazon DynamoDB — stores scheme metadata, clause citations, and receipt records.
  • Amazon S3 — stores source scheme guideline PDFs.
  • Amazon Bedrock — used only for drafting plain-language explanations of a decision after the policy engine has already decided — never for the decision itself. This separation is deliberate: Bedrock explains, Cedar decides.
  • AWS Amplify Hosting — deployment.

What "proof" actually looks like

When a citizen checks their eligibility, they don't just see ELIGIBLE or NOT ELIGIBLE. They see a full Statutory Clause Verification Table — every rule evaluated, whether it passed, and a citation to the exact page/section of the source document. If they're denied, we don't stop there: a "What Would Change This Decision?" panel re-runs the policy engine live against a hypothetical change, so the citizen (or a skeptical evaluator) can verify the counterfactual is real, not narrated.

Designing for how welfare access actually scales

A single-user eligibility checker undersells the real problem. In practice, welfare access in India scales through intermediaries — Anganwadi workers, panchayat staff, NGO field agents — who check dozens of households a day, not through individual app downloads. So Haqdaar includes a Frontline Worker Mode: batch-add a cohort, run  batch_is_authorized  across all of them at once, and export the results for reporting.
We also found that the biggest real-world blocker to claiming a scheme usually isn't
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article