Verify it yourself: npm run privacy-proof intercepts every cloud request and checks that no name, phone number or patient ID leaves the device (15 checks pass). Judging? Start with the one-page guide for judges.

Inspiration

In India, a blood test report calls a result "normal" based on whichever range that lab printed, and labs often copy those ranges from kit inserts. A 2026 medRxiv preprint covering 33,244 Indian diagnostic centres found significant variation in reference ranges. Meanwhile, KFF polling shows more people turning to AI chatbots for health information, and many paste in whole reports, uploading their name, patient ID and medical history along the way. We wanted the explanation without the exposure.

Why hybrid

Sending a name, age, phone number and lab ID to a cloud model just to explain one glucose value is the wrong trade. So ClearReport splits the work by sensitivity:

  • On your device: identity fields are found and removed before anything is sent, and Chrome's built-in Gemini Nano reads layouts our parser doesn't know (Chrome on desktop).
  • In the cloud: Gemini explains the anonymous numbers and translates to Hindi, seeing only what you approved.
  • Plain code: ranges, flags and the cross-check against the PDF, the parts that must never guess.

What it does

Meera's lab report says her fasting glucose of 104 mg/dL is normal (lab range 70 to 110). ADA 2026 puts 100 to 125 in the prediabetes range. ClearReport shows both, highlights the disagreement, and turns it into a specific question for her doctor. It never diagnoses.

ClearReport explains a blood test report in plain English or Hindi, and your identity never has to leave your device.

  • Private (PDF): on a laptop with Chrome's built-in AI, the report is read on the device. Name, ID and phone are removed locally, every number is checked against the PDF's own text, and only anonymous numbers go to the cloud, after you approve exactly what is sent.
  • Mask it yourself (any device): cover your details with suggested boxes (from rules, and on capable laptops from on-device AI). Nothing is sent until you approve the exact image.
  • Guideline check: when your lab's printed range and a named guideline (ADA 2026, WHO 2024, NCEP ATP III) disagree, ClearReport says so. When they agree, it stays quiet.
  • Data trail: a live panel shows every step and where it happened: on this device, or in the cloud.
  • "Try a sample report": reach the full experience in under a minute with a synthetic report. No upload needed.

How we built it

Firebase AI Logic in all three hybrid modes:

  • ONLY_ON_DEVICE: Gemini Nano reads PDF layouts our parser doesn't know, and finds personal details in photos. It never falls back to the cloud, because its input contains identity.
  • PREFER_ON_DEVICE: "What does this test mean?" sends only a test name, so it runs locally when possible and falls back to the cloud otherwise.
  • ONLY_IN_CLOUD: Gemini 3.5 Flash-Lite reads masked images and writes the explanation and the Hindi translation.

Plain code where rules are reliable: a PDF parser, a cross-check of every value against the PDF text, identity removal, and a range-check engine built on named guidelines.

Other Firebase products: App Check (reCAPTCHA Enterprise), Anonymous Auth, Remote Config (model choice, a backup model, feature flags) and Hosting. Built with React, TypeScript, Vite, pdf.js and Tesseract.js.

Our design principle: plain code where rules are reliable, on-device AI where data is private, cloud AI where data is anonymous.

Challenges we ran into

  • On-device image reading was the wrong job for the model. On our test laptop (integrated graphics, no dedicated GPU) it took about 2 minutes per report, scored 19% range accuracy on photos, and never admitted uncertainty. We moved on-device work to text, where it shines.
  • Invented digits. The model filled in digits hidden under watermarks. We added a "legible" flag and a cross-check against the PDF text, so a value that can't be confirmed blocks approval until the user checks it.
  • Fragments vs context. Our first on-device fallback for unfamiliar layouts failed because we sent the model fragments. Given whole blocks of text, Gemini Nano read an unseen card layout 10 of 10 correctly in a single call, in three separate runs, and plain code verified every value.
  • Speed. Private reading went from 5 minutes to a few seconds once plain code handled familiar layouts and the model handled only what code couldn't.
  • Cloud limits. We added retries for busy errors, a backup model through Remote Config, an honest daily-limit message, and a plain-language fallback so results never disappear.

Accomplishments that we're proud of

  • Zero identity leaks across every on-device test run, checked automatically by npm run privacy-proof.
  • Two public lab sample reports read privately with every row verified (32 of 32 and 54 of 54).
  • Honest evaluation: every number in our README comes from a run we can reproduce, including the ones that failed.

What we learned

Small on-device models are excellent at bounded language tasks on private text, and poor at being the whole pipeline. The best hybrid design gives each part one job, and is honest about which part did what.

Limits

  • Runs on the Gemini free tier today (about 20 explanations a day).
  • Masking photos is best-effort; PDFs with a text layer are the most reliable.
  • The guideline ranges are sourced but still awaiting review by a doctor.

What's next

A move to Gemini's paid tier, turning the full-report path back on, a public registry of how Indian labs print their ranges (built only from non-personal data), more Indian languages, Android with Gemini Nano, ABDM integration, and a doctor's review of our guideline table.

Built during the submission period

Everything, from scratch.

Built With

  • chrome-built-in-ai
  • firebase
  • firebase-ai-logic
  • firebase-app-check
  • firebase-authentication
  • firebase-hosting
  • firebase-remote-config
  • gemini
  • gemini-nano
  • pdf.js
  • playwright
  • react
  • recaptcha-enterprise
  • tesseract.js
  • typescript
  • vite
Share this project:

Updates

Submission history