{"componentChunkName":"component---src-templates-blog-post-js","path":"/blog/2026-06-23-ai-cohort-2-final/","result":{"data":{"site":{"siteMetadata":{"siteUrl":"https://avniproject.org","twitterHandle":"@avniproject"}},"post":{"id":"ad4dc71c-8c63-53be-9eb7-ddc4f8873115","html":"<p><em>Samanvay Foundation | AI Cohort 2 | June 2026</em></p>\n<hr>\n<h2>The Platform: Avni</h2>\n<p><a href=\"https://avniproject.org\">Avni</a> is an open-source, mobile-first field data collection platform. It works offline, syncs when there is a signal — even days later — and is sector-agnostic: health, education, sanitation, livelihoods. It is a recognised Digital Public Good (DPG), stewarded by <a href=\"https://samanvayfoundation.org\">Samanvay Foundation</a> since 2016.</p>\n<p>Today, Avni powers:</p>\n<ul>\n<li><strong>11M+ beneficiaries</strong> tracked across communities</li>\n<li><strong>70+ organisations</strong> — NGOs, social enterprises, government programmes</li>\n<li><strong>100M+ field visits</strong> recorded</li>\n</ul>\n<p>But there has always been a bottleneck: <strong>getting an NGO from programme plan to working app takes 2 to 3 weeks of expert engineering time.</strong> That cost, paid by every new partner, is what we set out to reduce.</p>\n<hr>\n<h2>The Problem We Decided to Solve</h2>\n<p>Meet Priya, an implementation engineer at Samanvay. When an NGO comes to Avni, she translates their programme requirements into a working app — by hand.</p>\n<p>Her typical process:</p>\n<ul>\n<li><strong>Week 1</strong> — turn messy notes, calls, and emails into a structured specification workbook</li>\n<li><strong>Weeks 1–2</strong> — build out 32+ forms by hand</li>\n<li><strong>Weeks 2–3</strong> — write every validation rule and other rules(to make the mobile app work as expected) in JavaScript, one by one</li>\n</ul>\n<p>That last part is the most repetitive. A single spec line like <em>\"Last Menstrual Period — cannot be a future date\"</em> becomes:</p>\n<pre><code class=\"language-javascript\">if (lmp > today)\n  return \"LMP can't be in the future\";\n</code></pre>\n<p>Multiply that by ~300 rules per app. Priya writes each one from scratch.</p>\n<p>The question we brought to the AI cohort was simple: <strong>What if the specification just got converted to a working app automatically — and Priya reviewed instead of typing everything from scratch?</strong></p>\n<hr>\n<h2>The Cohort: Three Months of Learning, Pivoting, and Building</h2>\n<p>Samanvay was selected for <strong>Tech4Dev's AI Cohort 2</strong>, which began in March 2026. We entered with a clear bottleneck identified and an ambitious goal: automate the journey from programme specification to deployable Avni app using AI.</p>\n<p>The path was not straight.</p>\n<p><strong>We started with Dify</strong> for orchestration. It gave us speed to prototype, but not the flexibility we needed for the nuanced, multi-step generation process Avni apps require. The cohort's midpoint check-in — a structured pause to reflect on progress — became a turning point. We stepped back, acknowledged what was not working, and explored two parallel approaches:</p>\n<ol>\n<li><strong>A Claude-based agentic approach</strong> with skills as the backend — promising, but the outputs were not deterministic enough for production use.</li>\n<li><strong>A LangGraph-based orchestration pipeline</strong> — more engineering effort upfront, but the control flow gave us the consistency we needed.</li>\n</ol>\n<p>We chose LangGraph. In a month of focused work after that pivot, we had a working pipeline going from specification to app and had started an internal pilot.</p>\n<p><strong>The key technical learnings from the journey:</strong></p>\n<ul>\n<li><strong>Spec-driven development compounds.</strong> Writing a clear specification first, then generating from it, consistently outperformed iterative prompt-by-prompt development.</li>\n<li><strong>What Actually Made RAG Work.</strong>  Flat JSON + cosine similarity, Voyage AI for code-aware embeddings, hash-based lazy caching, and ruthless curation — together these made RAG reliable over a small domain corpus.</li>\n<li><strong>Balance LLM and deterministic logic.</strong> Not everything should be LLM-generated. LLM for intelligent deduction.\nDeterministic coding when the path is clear. Never give the LLM counting tasks. Always validate LLM output.</li>\n</ul>\n<p><strong>And one soft skill that turned out to matter just as much:</strong></p>\n<p>The final presentation was in front of funders and ecosystem partners — many of them non-technical.  The ability to translate the depth of the problem and the complexity of a solution into a story a non-technical listener can feel — and care about — is something I learnt and improvised based on inputs and feedback.</p>\n<hr>\n<h2>The Numbers:</h2>\n<p><strong>For Ekam's maternal health programme</strong> — 8 visit types, 4 programmes, 32 forms, ~300 rules — the only thing that changed was time:</p>\n<table>\n<thead>\n<tr>\n<th></th>\n<th>Without Avni AI</th>\n<th>With Avni AI</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong>Time to first version</strong></td>\n<td><strong>2–3 weeks</strong></td>\n<td><strong>~1 day</strong></td>\n</tr>\n</tbody>\n</table>\n<p>The ~300 rules Priya once hand-wrote over weeks are drafted on day one. She reviews and refines instead of typing from scratch. Overall effort reduction: <strong>30–50% per implementation.</strong></p>\n<hr>\n<h2>AI at the Edge — Beyond App Generation</h2>\n<p>The cohort also surfaced another dimension of Avni's AI story: inference at the point of care.</p>\n<p>Avni now embeds an oral cancer screening model (developed by TANUH at IISc) directly into the field app. A community health worker photographs a patient's oral cavity. The AI — running entirely on-device, offline — returns a verdict: Suspicious or Non-Suspicious. Suspicious cases get referred immediately, without waiting for network connectivity or a specialist visit.</p>\n<p>India sees 140,000+ new oral cancer cases every year. Most are caught too late. Running AI at the edge, inside the same app field workers already carry, changes that equation without requiring new hardware or internet access.</p>\n<hr>\n<h2>Learning from Peers</h2>\n<p>The cohort was as much about community as it was about technology. The sessions and peer exchanges were genuinely inspiring.</p>\n<p>Watching <strong>Pinky's Promise</strong> tackle women's health challenges through AI, or seeing how <strong>Dalberg</strong> is enabling BRAC to deliver skilling to unemployed youth in Bangladesh — these were not just interesting use cases. They were reminders of why this work matters and how different the entry points into social-sector AI can be.</p>\n<p>Technical sessions on guardrails and evals gave the cohort vocabulary and practice to build reliably and responsibly.</p>\n<p>Each NGO team were assigned external mentors for periodic guidance.</p>\n<div style=\"width:500px;max-width:100%;margin:0 auto;text-align:center;\">\n<span class=\"gatsby-resp-image-wrapper\" style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1077px; \">\n      <a class=\"gatsby-resp-image-link\" href=\"/static/9ada3efdf9ad2afc697d438bd8857754/b15c0/team_pic_with_mentor.jpg\" style=\"display: block\" target=\"_blank\" rel=\"noopener\">\n    <span class=\"gatsby-resp-image-background-image\" style=\"padding-bottom: 56.0546875%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAALABQDASIAAhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAABAAD/8QAFQEBAQAAAAAAAAAAAAAAAAAAAgD/2gAMAwEAAhADEAAAARNI0vG2o//EABoQAAMAAwEAAAAAAAAAAAAAAAECAxESMkL/2gAIAQEAAQUCmoyIpu01DepdHv8A/8QAFhEAAwAAAAAAAAAAAAAAAAAAAhAh/9oACAEDAQE/ARq//8QAFREBAQAAAAAAAAAAAAAAAAAAARD/2gAIAQIBAT8BZ//EABsQAAIBBQAAAAAAAAAAAAAAAAABAhESMUFx/9oACAEBAAY/Aop7KXDSeCIiXT//xAAaEAADAAMBAAAAAAAAAAAAAAAAAREhMUGh/9oACAEBAAE/IX8Apr2NKtZgwg6g8S4bHaz2z//aAAwDAQACAAMAAAAQg8//xAAXEQEBAQEAAAAAAAAAAAAAAAABABFh/9oACAEDAQE/EAB4Wl//xAAYEQACAwAAAAAAAAAAAAAAAAAAAREhUf/aAAgBAgEBPxBrQ50//8QAHBABAQADAAMBAAAAAAAAAAAAAREAIWFRcZHx/9oACAEBAAE/EHXVOp+MJGFijtDjhrLYr4O9wVaRrmKe6PuRSFaaz//Z&apos;); background-size: cover; display: block;\"></span>\n  <img class=\"gatsby-resp-image-image\" alt=\"team pic with mentor\" title=\"team pic with mentor\" src=\"/static/9ada3efdf9ad2afc697d438bd8857754/b15c0/team_pic_with_mentor.jpg\" srcset=\"/static/9ada3efdf9ad2afc697d438bd8857754/36dd4/team_pic_with_mentor.jpg 512w,\n/static/9ada3efdf9ad2afc697d438bd8857754/72e01/team_pic_with_mentor.jpg 1024w,\n/static/9ada3efdf9ad2afc697d438bd8857754/b15c0/team_pic_with_mentor.jpg 1077w\" sizes=\"(max-width: 1077px) 100vw, 1077px\" style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\" loading=\"lazy\">\n  </a>\n    </span>\n<p><i>Team with mentor, Vinay Sudhakaran on left</i></p>\n</div>\n<hr>\n<h2>What This Unlocks for the Social Sector</h2>\n<p>The impact of faster implementation is not just about Samanvay's efficiency. It compounds.</p>\n<ul>\n<li><strong>Faster</strong> — programmes go live in days, not weeks since Priya need not setup/type everything from scratch. </li>\n<li><strong>Cheaper</strong> — lower cost per implementation means smaller NGOs that could not previously afford custom apps can now access them.</li>\n<li><strong>Sustainable</strong> — the same implementation team can serve significantly more partners without proportional growth in headcount.</li>\n</ul>\n<p>And because Avni is open-source infrastructure — a shared digital public good — every improvement to Avni AI benefits every NGO on the platform, for free. Built once, compounded everywhere.</p>\n<hr>\n<h2>Get in Touch</h2>\n<p>If you run an NGO and are looking for an offline-capable, open-source field data platform — or if you are building in the social sector and want to explore what Avni AI can do — reach out.</p>\n<p><strong>Avni:</strong> <a href=\"https://avniproject.org\">avniproject.org</a> · <a href=\"https://github.com/avniproject\">github.com/avniproject</a></p>\n<p><strong>Samanvay Foundation:</strong> <a href=\"https://samanvayfoundation.org\">samanvayfoundation.org</a></p>\n<hr>\n<p><em>Samanvay Foundation builds open-source digital public goods for the social sector. Avni is used by 70+ organisations to track 11M+ beneficiaries across 100M+ field visits.</em></p>","frontmatter":{"date":"June 23, 2026","title":"From Weeks to a Day: How AI Is Changing the Way NGO Field Apps Are Built","author":"Maha Lakshme S","description":null,"tags":["AI","AI cohort"],"image":null},"fields":{"slug":"/blog/2026-06-23-ai-cohort-2-final/"}}},"pageContext":{"id":"ad4dc71c-8c63-53be-9eb7-ddc4f8873115"}},"staticQueryHashes":["1175525803","4080856488"]}