DEV Community

Yash Gurav
Yash Gurav

Posted on

My dad's PF clients wait weeks for their own money over one wrong

Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle Submission 💸

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle

What I Built

My dad is a Provident Fund (PF) consultant in Vasai, near Mumbai. He handles PF for dozens of small companies: monthly filings, and the claims workers file when they leave a job and want their savings back.

The part that hurts is rejections. A worker's father's name is "Kannen Krishnadas Bhat" in the EPFO records and "Kannen Bhat" at the bank. Nobody notices. The claim goes in, and three weeks later EPFO rejects it with a remark like:

F/H NAME NOT MATCHING WITH BANK A/C. PL SUBMIT CORRECTED CHQ

The worker waits even longer for their own money. My dad gets the calls: "PF kab aayega?" ("When will my PF come?"). This isn't rare. EPFO's 2024-25 annual report puts it at roughly 1 in 5 claims rejected (Business Today), and for final settlements it was about 1 in 3 in 2022-23 (The Ken).

PF Desk is a back office for PF consultants. It does the experienced colleague's job:

  • Pre-check before filing. It compares names, father's name, date of birth, bank, KYC, Aadhaar link and exit date across records, and says exactly what to fix and which rule says so.
  • Rejection risk and settlement date. TabPFN, trained on past claims, says "High, 59%" and "likely by 29 October".
  • Rejection Decoder. Paste EPFO's cryptic remark and get the real reason, the fix steps, and a message for the worker in Hindi, Marathi and English. This is a model I fine-tuned with Tinker.
  • WhatsApp drafts to the worker in their language, ready to copy.
  • A private help link for workers. "Mera PF kab aayega?" gets answered from their own claim's facts. Anything off-script, like a loan question, goes to the consultant as a task.
  • The monthly cycle per client company, as durable Temporal workflows: ask for the salary sheet, validate contributions, chase, remind before the due date.
  • A Rule Book where every rule cites its source, editable by the consultant.

Who pays: independent PF consultants like my dad. They charge small employers about ₹1,000–2,400 a month per client for PF compliance (listings on IndiaMART). At ₹499–999 a month, PF Desk costs less than one client brings in. It pays for itself if it saves one rejected claim's worth of re-filing and phone calls.

Demo

Live demo (synthetic data only): https://pfdesk.buildwithyash.tech · passcode demo

The free hosting sleeps when idle, so the first visit can take about a minute, and AI answers on the free Gemma API take 15–40 seconds. On the laptop, which is how a consultant actually runs it, they take a few seconds. The video is recorded locally.

Code

PF Desk

Private back office for Provident Fund consultants: pre-checks claims before EPFO rejects them, decodes rejection remarks, estimates settlement dates, and answers employees in Hindi / Marathi / English. Open models only (Gemma via Ollama); real data stays on the consultant's machine.

PF Desk helps consultants prepare and check. It does not file with EPFO, and it is not legal or financial advice. Rules change: always verify with the latest EPFO circulars.

Live demo (synthetic data): https://pfdesk.buildwithyash.tech · Spec: PFDESK_PRD.md · Progress: TASKS.md · License: MIT

Run locally

Needs Node 24+, pnpm, and Ollama with gemma3:4b and nomic-embed-text.

ollama pull gemma3:4b && ollama pull nomic-embed-text
pnpm install
pnpm --filter tabpfn setup  # Python venv for TabPFN (CPU torch); optional — API falls back to baselines
cp .env.example .env      # DEMO_MODE=true loads synthetic data
pnpm dev                  # web http://localhost:3000 (passcode: demo), API :8787, TabPFN :8790
pnpm seed                 # wipe
…
Enter fullscreen mode Exit fullscreen mode

MIT licensed. TypeScript (Hono API + Next.js), Python for the ML pieces, Postgres + pgvector.

How I Built It

The rule I set on day one: an AI never decides anything a rule can decide, and never sees an identifier.

1. Deterministic checks first. Pre-check is plain code driven by Rule Book parameters. Name matching understands Indian name variants: initials ("R. K. Patil"), transliteration (Sunita/Suneeta), and bank-style CAPS. On 800 planted errors it catches all 800, with 0 false alarms on 1,000 clean claims. That's synthetic, so it only proves the rules fire as designed.

2. TabPFN for risk and settlement time. The open TabPFN v2 runs locally on CPU as a small service. Pre-check calls it through two functions, predictRisk and predictEta, with de-identified columns only: form type, service months, match flags, office. No names, no IDs. On a time-ordered split it beat every baseline at ranking risky claims:

Model ROC-AUC Brier
Rejection rate per form 0.549 0.240
Gradient boosting 0.751 0.202
Logistic regression 0.817 0.166
TabPFN 0.834 0.163

Settlement-time error dropped from 3.67 to 2.92 days. The history is synthetic for now; every claim PF Desk sees settled or rejected becomes a new training row automatically.

3. Tinker for the Rejection Decoder. EPFO remarks are terse and inconsistent. I fine-tuned Qwen3-8B with a LoRA on Tinker to turn a remark into strict JSON: {category, fields_involved, fix_step_ids}. Gemma then writes the human messages from that JSON.

The interesting part was the evaluation. My first test set was synthetic, and the model scored 94%, which proved nothing. So I collected 148 real remarks that members had posted publicly, and kept them out of training. On those, 43% fit none of my 15 categories. They were pension (EPS) membership problems, contribution gaps, pending transfers and TDS. I added five categories, wrote new training templates in my own words, and retrained twice. Total training cost on Tinker was about $1.65.

On 148 real remarks Accuracy
Gemma 3 4B, few-shot 53%
Qwen3-8B, no fine-tune 58%
Qwen3-8B + PF Desk LoRA 72% (100% valid JSON)
Same LoRA on my laptop (Q4, llama-server) 72%, about 6 s per remark

Honesty note: the last two rounds were guided by this set's error categories (never its text), so treat 72% as optimistic. The real test is my dad's own remarks; there's a labelling tool built in for that.

4. Gemma does the language. Explanations, WhatsApp drafts and helpline answers come from Gemma: gemma3:4b on the laptop through Ollama, and Gemma 4 on Google AI Studio for the public demo. It's context-first: code gathers the facts, ETA and matching rules, and Gemma only writes. A rejected claim never gets a model-written date; it gets a fixed "your consultant will call" reply.

5. Privacy layer. Every prompt passes through a tokenizer that swaps names, UAN, Aadhaar, PAN, bank account and phone for [NAME_1], [UAN_1], and so on. It's tested against 200 red-team strings with 0 leaks. While recording the demo, I caught a real bug. Gemma echoed the [UAN_1] example from its own instructions, and my un-tokenizer helpfully swapped in the worker's real UAN. Now only placeholders that were actually sent can be restored, and identifiers always come back masked (XXXXXXXX6259). A test covers exactly that case.

6. Temporal for the monthly cycle. Each client's month is a workflow: request the sheet, wait for it, chase, validate, remind on the due date, mark paid. I killed the worker at random moments 20 times. The first run scored 17/20, and the failures exposed a real bug: a salary sheet arriving after the chase window was never validated. After fixing it: 20/20 resumed, 0 duplicate tasks.

7. Rules, researched. I couldn't sit my dad down this week, so I checked every Rule Book entry against official sources instead. That's how I found that the EPF Scheme, 2026 took effect on 1 July: a full PF withdrawal now needs 12 months out of work, not 2. Also, the wage ceiling rose to ₹25,000 in September. Pre-check now knows this and suggests the 75% partial withdrawal instead.

Stack: Hono + Next.js on Node 24; PGlite (embedded Postgres + pgvector) on the laptop and Tiger Data Postgres for the demo; hybrid keyword + vector Rule Book search, which finds the right rule in the top 5 for 29 of 30 test questions; deployed on Render, at a .tech domain.

Why Does Open Innovation Matter?

Look at what a PF consultant handles: Aadhaar numbers, bank accounts, salaries, family names for hundreds of workers. That's exactly the data that should never be pasted into a closed AI service.

Open models make the only acceptable version of this product possible:

  • It runs on the consultant's own laptop. Gemma through Ollama, TabPFN on CPU, and my fine-tuned decoder as a 185 MB LoRA on llama-server. Real client data never leaves the machine. The public demo uses only synthetic people.
  • A small open model beats a general one at the narrow job. EPFO remark-speak ("F/H", "DOE", "PL SUBMIT CORRECTED CHQ") is its own dialect. A $1.65 fine-tune of an 8B model beat Gemma few-shot by 19 points on real remarks, and runs offline.
  • The cost per claim is basically zero. That's what makes ₹499 a month viable for a one-person business. No per-token bill scales with my dad's client list.
  • No lock-in. If a model gets better or cheaper, swap it. The rules, data and fine-tune are his.

My First User

My dad, the PF consultant this was built for. I showed him PF Desk, and he said yes: he's approved it, and he'll use it on his clients' claims. That's the whole point. This started as "build my dad's practice a back office", not as a hackathon idea.

For real work it runs in local mode on his laptop, so his clients' Aadhaar, bank and salary data never touches the cloud. The demo site only has synthetic people. His first job for it: label his own past rejection remarks in the built-in labelling tool, so the next decoder is trained on the remarks his regional office actually writes.

Prize Categories

  • Best Use of Gemma: all explanations, WhatsApp drafts and helpline answers; local through Ollama, Gemma 4 on AI Studio for the demo.
  • Best Use of TabPFN: rejection risk (classification) and settlement ETA (regression) inside every Pre-check and the worker helpline, beating logistic regression and gradient boosting on a time-ordered split.
  • Best Use of Tinker: LoRA fine-tune of Qwen3-8B for EPFO remark decoding. 72% vs 58% base on held-out real remarks, about $1.65 to train, runs offline on a laptop.
  • Best Use of Render: hosts the public demo (web app + API) at pfdesk.buildwithyash.tech.
  • Best Use of Temporal: monthly compliance cycle and claim follow-up workflows, with 20/20 resumes after forced worker kills.
  • Best Use of Tiger Data: Postgres + pgvector for the Rule Book's hybrid keyword + vector search on the live demo.
  • Best Use of a .tech Domain: https://pfdesk.buildwithyash.tech

PF Desk helps consultants prepare and check. It doesn't file with EPFO, and it isn't legal or financial advice. Rules change, so always verify with the latest EPFO circulars.

I built this with an AI coding agent (Claude Code) as my pair programmer. The idea, the product decisions and the problem are my family's. All demo data is synthetic.

Top comments (0)