<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Virat Chourasia</title>
    <description>The latest articles on DEV Community by Virat Chourasia (@viratc).</description>
    <link>https://dev.to/viratc</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3939520%2Ffc333ff3-8163-432b-aea6-c30699960506.png</url>
      <title>DEV Community: Virat Chourasia</title>
      <link>https://dev.to/viratc</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/viratc"/>
    <language>en</language>
    <item>
      <title>OCR Reads, Gemma Reasons: ClaimSetu for Evidence-Backed Health Claim Review</title>
      <dc:creator>Virat Chourasia</dc:creator>
      <pubDate>Sun, 24 May 2026 14:29:36 +0000</pubDate>
      <link>https://dev.to/viratc/ocr-reads-gemma-reasons-claimsetu-for-evidence-backed-health-claim-review-o71</link>
      <guid>https://dev.to/viratc/ocr-reads-gemma-reasons-claimsetu-for-evidence-backed-health-claim-review-o71</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/google-gemma-2026-05-06"&gt;Gemma 4 Challenge: Build with Gemma 4&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Claim review is not a chatbot problem. It is an evidence problem.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ClaimSetu&lt;/strong&gt; was built to answer one question safely: does the submitted hospital claim packet contain enough evidence for a human reviewer to move forward?&lt;/p&gt;

&lt;p&gt;ClaimSetu is a local-first, evidence-backed claim-review assistant for health insurance workflows. It reads messy claim packets — scanned PDFs, photos, discharge notes, bills, lab reports, procedure records, and clinical notes — and turns them into a reviewer-ready evidence pack.&lt;/p&gt;

&lt;p&gt;It produces:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;document classification and page triage&lt;/li&gt;
&lt;li&gt;extracted claim fields with provenance&lt;/li&gt;
&lt;li&gt;admission, diagnosis, treatment, and discharge timeline checks&lt;/li&gt;
&lt;li&gt;missing-document and weak-evidence flags&lt;/li&gt;
&lt;li&gt;package-rule findings&lt;/li&gt;
&lt;li&gt;a &lt;strong&gt;PASS / CONDITIONAL / REVIEW&lt;/strong&gt; recommendation for human review&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In health insurance workflows, a delayed or unclear claim decision is not just an operational issue. It can create back-and-forth between hospitals, payers, and beneficiaries. ClaimSetu focuses on making review faster, more consistent, and more explainable without removing the human decision-maker.&lt;/p&gt;

&lt;p&gt;The core principle is simple:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;OCR reads. Gemma reasons. Humans decide.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;ClaimSetu is not an autonomous adjudicator. If evidence is missing, weak, or contradictory, it does not guess. It escalates the claim to &lt;strong&gt;CONDITIONAL&lt;/strong&gt; or &lt;strong&gt;REVIEW&lt;/strong&gt; with source-backed reasons.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;Video walkthrough: &lt;a href="https://www.youtube.com/watch?v=pygwfJl8b5M" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=pygwfJl8b5M&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The demo shows ClaimSetu reviewing a severe anemia claim packet. The system identifies useful admission evidence, diagnostic evidence, and clinical notes, but flags missing treatment details, post-treatment evidence, and discharge summary evidence.&lt;/p&gt;

&lt;p&gt;Instead of forcing an approval, ClaimSetu returns a &lt;strong&gt;CONDITIONAL&lt;/strong&gt; recommendation with reviewer-facing reasons and evidence gaps.&lt;/p&gt;

&lt;p&gt;That is the behavior I wanted: not a confident black box, but a cautious co-pilot for human reviewers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;GitHub repository: &lt;a href="https://github.com/ai-suraksha/claimsetu" rel="noopener noreferrer"&gt;https://github.com/ai-suraksha/claimsetu&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The repository includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the local claim-review pipeline in &lt;code&gt;claimsAssistant.py&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;a FastAPI demo app in &lt;code&gt;app.py&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;an interactive browser demo in &lt;code&gt;demo/index.html&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;architecture and design assets&lt;/li&gt;
&lt;li&gt;setup instructions for running Gemma 4 locally through Ollama&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The public repository does not redistribute real claim packets, patient identifiers, hospital names, doctor names, or private annotations. Raw claim data is expected to stay local and private.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Used Gemma 4
&lt;/h2&gt;

&lt;p&gt;ClaimSetu uses Gemma 4 as the understanding and reasoning layer inside a hybrid evidence pipeline.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foazvt8h043lgrcq1r10r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foazvt8h043lgrcq1r10r.png" alt="ClaimSetu architecture" width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I intentionally did &lt;strong&gt;not&lt;/strong&gt; use Gemma as a black-box OCR engine. Healthcare claim review needs traceability: source page, extracted text, confidence, and evidence links. So ClaimSetu first uses PaddleOCR and PyTesseract to read documents, then sends the OCR evidence to Gemma 4.&lt;/p&gt;

&lt;p&gt;I used a two-model strategy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Gemma 4 E4B&lt;/strong&gt; handles the edge layer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;cleanup of noisy OCR text&lt;/li&gt;
&lt;li&gt;page triage&lt;/li&gt;
&lt;li&gt;document classification fallback&lt;/li&gt;
&lt;li&gt;structured extraction from messy claim pages&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;E4B was the right fit because this stage needs to be fast, local, and repeatable across many pages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Gemma 4 26B MoE&lt;/strong&gt; handles the reasoning layer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;claim-level timeline interpretation&lt;/li&gt;
&lt;li&gt;package-rule reasoning&lt;/li&gt;
&lt;li&gt;contradiction detection&lt;/li&gt;
&lt;li&gt;reviewer-facing explanation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PASS / CONDITIONAL / REVIEW&lt;/strong&gt; recommendation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;26B MoE was the right fit because final claim review needs broader context and stronger reasoning, while still supporting local or local-network inference.&lt;/p&gt;

&lt;p&gt;The most important design choice was separating model reasoning from safety enforcement. Gemma interprets messy evidence and explains what the reviewer should verify next. Deterministic code enforces date validation, source-text checks, confidence thresholds, missing-document rules, and timeline consistency.&lt;/p&gt;

&lt;p&gt;That separation made ClaimSetu more useful, more auditable, and safer for healthcare workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;p&gt;The biggest lesson from building ClaimSetu was that LLMs are most useful in regulated workflows when they are constrained by evidence.&lt;/p&gt;

&lt;p&gt;Gemma 4 was strongest when it had a focused job: structure messy OCR, reason over extracted facts, and explain what the reviewer should verify next.&lt;/p&gt;

&lt;p&gt;The system became safer when I stopped asking the model to “decide the claim” and instead designed it to support a human reviewer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;OCR reads. Gemma reasons. Humans decide.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>gemmachallenge</category>
      <category>gemma</category>
    </item>
  </channel>
</rss>
