Inspiration
Billions in government benefits go unclaimed every year — not because people don't qualify, but because they never hear about the scheme, can't decode eligibility rules written for lawyers, or give up after a single rejection letter. India lists thousands of central and state schemes; the UK has dozens of overlapping benefits. The people who need them most have the least time to read official guidance. Haq (हक़) means "what's rightfully yours" — we wanted an AI caseworker that makes sure it reaches you.
What it does
- Talk, don't fill forms. Pick your country, state and language (English, Hinglish, Hindi, Marathi or Bengali), then describe your life in your own words: "Main 20 saal ki student hoon, ghar ki income dedh lakh hai." Haq asks at most three short follow-up questions, with tap-to-answer buttons.
- Checks 977 official schemes (GOV.UK + myScheme.gov.in: Uttar Pradesh, Bihar and central schemes) and shows what you're likely entitled to — with the yearly amount, every requirement checked against your situation (✓ / ✗ / ?) in plain language, documents, how to apply and the official source.
- One combined document checklist, and "one step away" schemes with the exact next step.
- Rejection Rescue: paste or photograph a rejection letter. Haq finds the scheme, checks each reason against the official rules, recommends reapply vs appeal, works out the deadline and drafts a formal appeal letter.
- Private by design: Aadhaar, PAN and National Insurance numbers are removed before any model sees the text. No accounts, no user database. Installable as a PWA on any phone.
How we built it
All reasoning runs on NVIDIA Nemotron 3 via Nebius Token Factory, each model doing the job it's best at:
- Nemotron 3 Nano — turns each chat message into a structured profile in ~2 s (thinking off + strict JSON schema).
- Nemotron 3 Super — offline, converted the eligibility text of 976 official scheme pages into structured rules (0 failures, 92.8% agreement with myScheme's human-curated tags).
- Nemotron 3 Ultra — the final judge: reads the official text of the top 20 schemes in parallel and returns a verdict with per-requirement explanations; also powers Rejection Rescue and appeal letters.
- Helpers on Token Factory: Qwen3-Embedding-8B for semantic search, Gemma 3 27B only to read text from letter photos.
Pipeline: Nano → profile → a deterministic rules engine filters ~1,000 schemes in milliseconds → semantic ranking → 20 Ultra calls in parallel → results stream to the phone one by one.
Stack: Python 3.13 + FastAPI (Docker on Render), React 19 + TypeScript + Tailwind (Vercel, PWA), NumPy in-memory vector search, PostgreSQL + pgvector (Neon) for the data pipeline, 74 automated tests. Token Factory's OpenAI-compatible API meant we used the official openai SDK with only a different base_url.
Challenges we ran into
- Fast models invent facts. With reasoning off, Nano answered "Main student hoon" with gender = female and education = graduate. Our fix — grounded extraction: every fact must quote the user's own words; code checks the quote exists and actually states the fact.
- Spoken numbers. "dedh lakh" came back as 1, "15 hazaar mahina" as ₹15,000 a year, "-20" as age 20. Now code reads the number, scale (lakh/hazaar/crore) and period from the quote itself — the model reads, code does the maths — and rejects impossible values.
- Never wrongly exclude someone. Telling an eligible person "you don't qualify" is the worst mistake. Hard rules only say fail when certain; unknowns stay unknown. Super initially turned "SC OR ST OR ration-card holders" into "SC/ST only" — fixed with explicit prompt rules.
- Subtle legal reasoning. Ultra once counted a pension that starts at 60 as income for a 35-year-old; we added rules and gave it scheme tags and overviews.
- Latency on a phone. Streaming results + parallel Ultra calls: first results in ~2 s, full results in ~12–16 s.
Accomplishments that we're proud of
- From "Main 20 saal ki hoon, BA kar rahi hoon, OBC hain, income dedh lakh" → ₹68,000/year from 17 schemes, including a detail Ultra found in the official text: "the two-sons limit doesn't apply to daughters."
- A UK single mum earning £900/month → Universal Credit (~£12,393/year), Council Tax Reduction, Child Benefit.
- Rejection Rescue reads a phone photo of a letter and returns a correct deadline and a ready-to-send appeal.
- Works in 5 languages, live and open source.
What we learned
Small fast models are perfect for UX but must be fenced in: "quote your evidence, let code do the maths" gave us ~2 s responses with no invented facts in our tests, instead of ~11 s with reasoning on. Using the right Nemotron size for each job (Nano for speed, Super for bulk extraction, Ultra for decisions) mattered more than any single prompt.
What's next
More Indian states and countries (already config-driven), voice input for people who can't type, Tamil and Telugu once quality is good enough, and partnering with legal-aid NGOs so Rejection Rescue letters reach a human caseworker.
Live app: https://haq-alpha.vercel.app · Code: https://github.com/shivanshuJags/haq · Demo: https://youtu.be/QRJ4wIwsSAU
Built With
- docker
- fastapi
- gemma
- gov.uk-api
- nebius-token-factory
- neon
- numpy
- nvidia-nemotron
- openai-sdk
- pgvector
- postgresql
- pwa
- pydantic
- python
- qwen
- react
- render
- tailwindcss
- typescript
- vercel
- vite
Log in or sign up for Devpost to join the conversation.