<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ratul Banerjee on Medium]]></title>
        <description><![CDATA[Stories by Ratul Banerjee on Medium]]></description>
        <link>https://medium.com/@ratulb07.ai?source=rss-ce041ab795dd------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*LlbzLf5sucsQNwn-</url>
            <title>Stories by Ratul Banerjee on Medium</title>
            <link>https://medium.com/@ratulb07.ai?source=rss-ce041ab795dd------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 21:48:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ratulb07.ai/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[What I Learned Building a Voice “Junior SRE” for Data Pipelines in 48 Hours]]></title>
            <link>https://medium.com/@ratulb07.ai/what-i-learned-building-a-voice-junior-sre-for-data-pipelines-in-48-hours-b85d7fa3d6aa?source=rss-ce041ab795dd------2</link>
            <guid isPermaLink="false">https://medium.com/p/b85d7fa3d6aa</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[gemini-enterprise]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[voice-ai]]></category>
            <category><![CDATA[google-adk]]></category>
            <dc:creator><![CDATA[Ratul Banerjee]]></dc:creator>
            <pubDate>Sun, 06 Dec 2026 12:58:17 GMT</pubDate>
            <atom:updated>2026-12-06T12:58:17.591Z</atom:updated>
            <content:encoded><![CDATA[<p>Picture a familiar 7:00 PM on a weekday. You’re the on-call Data Engineer, stuck in evening traffic inside a noisy cab, laptop zipped inside your backpack.</p><p>Your phone buzzes. A daily retail POS pipeline just threw an alert.</p><p>Somewhere upstream, an East Kolkata POS vendor silently renamed one column — store_id became outlet_id. Thirty-eight of Kolkata&#39;s 100 stores failed validation and got skipped. The other 62 stores loaded fine.</p><p>And quietly, <strong>two problems</strong> start unfolding at the exact same time:</p><ol><li><strong>On the business side:</strong> The regional head opens their revenue dashboard and sees Kolkata revenue down <strong>38%</strong> (₹26.75 Lakhs → ₹16.6 Lakhs). Nothing on the chart says <em>“partial load.”</em> It looks like a genuine business drop.</li><li><strong>On the engineering side:</strong> You need a laptop, a VPN, BigQuery, Cloud Storage, runbooks, and Slack threads just to piece together what happened — a 30–45 minute ritual where most of the time goes into gathering facts before you can even make a decision.</li></ol><p>When I started exploring this problem for the <em>Build with Google Gemini: Shape What’s Next</em> hackathon (YourStory × Google Cloud × Hack2skill), one thing stood out to me: if an AI assistant simply turns a question into SQL and queries BigQuery, it has no idea that 38 stores never loaded. It would politely report that 38% drop as fact.</p><p>So over 48 hours, I tried building an agent that checks <strong>data health first</strong> — and helps both sides of the incident by voice.</p><p>I named it <strong>DataSathi</strong>.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FM4R9mLOkBIY%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DM4R9mLOkBIY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FM4R9mLOkBIY%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/6ddd868feedc67b45fe3911a624a3f71/href">https://medium.com/media/6ddd868feedc67b45fe3911a624a3f71/href</a></iframe><h3>One Principle That Shaped the Whole Build</h3><p>Early on, I asked myself an honest question: <em>as a data engineer, would I actually want to debug SQL stack traces out loud in a cab?</em> Definitely not.</p><p>That led to the core idea behind DataSathi:</p><blockquote>We don’t ask engineers to debug by voice. The agent debugs; the engineer decides by voice.</blockquote><p>Here is how the prototype handles that drifted Kolkata CSV end-to-end:</p><ul><li><strong>Before anyone speaks (~12 seconds):</strong> DataSathi’s background agents wake up on the failure, check BigQuery data quality rules, inspect the GCS CSV header diff, check past incident memory (<em>Ananya Sen fixed this exact East-zone vendor rename on Nov 14</em>), log the incident to BigQuery’s incident_ledger, and post a Slack alert card with a <strong>“Brief me”</strong> button.</li><li><strong>When a regional stakeholder asks in Bengali</strong> (<em>“Kolkata r revenue eto kom keno?”</em>): DataSathi checks dq_results <strong>before</strong> touching the revenue mart. Seeing 38 missing stores, it leads with a <strong>PARTIAL Trust Verdict</strong> (<em>“Please don&#39;t act on this number yet”</em>) and <strong>automatically escalates the incident from P2 → P1</strong> in BigQuery and Slack.</li><li><strong>When I tap “Brief me” on my phone:</strong> Within two seconds, DataSathi starts a brief Hinglish voice update citing the P1 escalation and the outlet_id drift. I can interrupt it mid-sentence (<em>barge-in</em>): <em>“Ruko — last time kisne fix kiya aur dry-run cost kitna aayega?”</em> It pauses immediately, cites Ananya Sen, runs a <strong>real BigQuery Dry-Run</strong> (0.52 MB · ₹0.01), and asks whether to proceed.</li><li><strong>After I say <em>“Proceed”</em>:</strong> It executes an idempotent single-partition backfill (outlet_id → store_id), restores all 100/100 Kolkata stores in ~4 seconds, files a GitHub Issue with the evidence, updates Slack to <strong>RESOLVED</strong>, and flips the stakeholder&#39;s next Bengali query to <strong>TRUSTED (₹26.75L)</strong>.</li></ul><h3>The Architecture — Kept Simple Enough to Debug at 2 AM</h3><p>Since this was a working prototype inside a $100 hackathon credit budget, I wanted everything running live on Google Cloud while keeping the moving parts clean and understandable. Here is how the pieces fit together:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eiSI1YtHpo90qFXW-O0UvA.png" /></figure><p>At a high level, it comes down to <strong>four layers</strong>:</p><ol><li><strong>A Real Data Pipeline:</strong> Five daily POS CSV feeds in <strong>Cloud Storage</strong> flow through a pure-Python runner into four partitioned <strong>BigQuery</strong> tables (raw_pos_orders, mart_city_revenue, dq_results, incident_ledger), publishing live alerts to <strong>Cloud Pub/Sub</strong>.</li><li><strong>Native Bidirectional Voice:</strong> Instead of chaining separate Speech-to-Text, LLM, and Text-to-Speech services (which adds noticeable lag between turns), the browser streams 16kHz PCM audio over WebSockets directly to <strong>Vertex AI Gemini Live API</strong> (gemini-live-2.5-flash-native-audio) and plays back 24kHz PCM audio gaplessly — handling <strong>English, Hindi/Hinglish, Bengali, and Tamil</strong> with native mid-sentence interruptions.</li><li><strong>4 Specialized Agents + Managed Memory:</strong> Four <strong>Google ADK</strong> agents (Evidence Collector, Root-Cause &amp; Knowledge, Business Trust, and Remediation &amp; Guardrail on gemini-3-flash-preview) run alongside <strong>Vertex AI Agent Engine Sessions &amp; Memory Bank</strong>, allowing DataSathi to recall past fixes across cold starts and learn from newly resolved incidents.</li><li><strong>Two Layers of Safety:</strong> <strong>Google Cloud Model Armor</strong> (Layer 1) inspects inbound prompts/transcripts for prompt injection and checks outbound replies, Slack updates, and GitHub issues for PII leaks (~100ms). Underneath it, <strong>Python code-enforced guardrails</strong> (Layer 2) refuse to run execute_scoped_backfill() until a real BigQuery Dry-Run has completed and been approved — and block destructive requests (DROP, TRUNCATE, ALTER) directly in code.</li></ol><p>On paper, that looked pretty tidy.</p><p><strong>In practice, testing it live on my phone quickly showed me everything I hadn’t thought of.</strong></p><h3>4 Things I Got Wrong at First (and What Fixed Them)</h3><p>Building a real-time voice agent over a weekend came with a few humbling surprises. Sharing them here in case they save you a few hours when you build yours:</p><h3>1. Rethinking Cloud Composer (and BigQuery’s 90-Minute Streaming Buffer)</h3><p>Initially, I planned to orchestrate the POS pipeline with Cloud Composer. Once I started building, I realized provisioning Composer takes ~25 minutes and would eat through a big chunk of my $100 credit budget. I also remembered a classic BigQuery gotcha: rows loaded via streaming inserts can’t be DELETEd for up to 90 minutes, which breaks repeatable single-partition backfills.</p><p><strong>What worked instead:</strong> A lightweight pure-Python runner using <strong>BigQuery Load Jobs + SQL DML</strong> over real GCS files and Pub/Sub. It stays 100% real, costs fractions of a rupee per dry-run, and reloads a single partition idempotently in ~4 seconds.</p><h3>2. The “Two Voices Talking Over Each Other” Bug</h3><p>During one of my live mobile tests, my screen suddenly printed this:</p><blockquote>On-Call Engineer: Yes, proceed.Yes, proceed.<br>DataSathi: karke 48.4 MB scan honge, costDry run ₹0.03 complete aegi. ho gaya…</blockquote><p>Two responses were literally interleaving word-for-word inside the same chat bubble!</p><p>Checking Cloud Run logs pointed straight to the issue: two WebSockets had connected <strong>2.7 seconds apart</strong> from the same browser tab. While the phone waited for microphone permissions (getUserMedia), tapping the button a second time opened a parallel WebSocket and left the first one running in the background.</p><p><strong>What fixed it:</strong> Adding an immediate voiceConnecting button lock + session counter in JavaScript, backed by a per-tab client_id map on FastAPI that automatically closes any older socket if the same tab opens a new one.</p><h3>3. When a Helpful Agent Confirms the Same Action Twice</h3><p>Even after fixing the duplicate socket, Gemini Live occasionally gave <strong>two back-to-back spoken confirmations</strong> whenever I asked for two things at once (like <em>“run dry-run and tell me who fixed it last time”</em>) or approved a fix.</p><p>I learned why the hard way: in a live session, <strong>every</strong> send_tool_response prompts the model to generate a new spoken turn. When the model called backfill, then github_issue, then slack_update in sequence, it politely summarized the whole resolution after <em>each</em> tool finished.</p><p><strong>Two patterns that helped a lot:</strong></p><ol><li>Grouping tightly coupled steps into <strong>atomic single-call tools</strong> (one backfill call handles backfill + GitHub ticket + Slack thread; one dry-run call returns scan cost + matched past incident together).</li><li>Adding a short per-session tool deduplication check that returns FunctionResponseScheduling.SILENT — letting Gemini Live absorb redundant calls quietly without repeating itself.</li></ol><h3>4. Remembering That Prompts Aren’t Security Boundaries</h3><p>In a rush to get features working, it’s tempting to just write <em>“never drop tables”</em> in a system prompt and move on. Seeing how easily hurried voice commands or prompt injections can nudge an LLM reminded me why deterministic guardrails matter. Moving Slack and GitHub tokens into <strong>Google Cloud Secret Manager</strong>, adding <strong>Model Armor</strong>, enforcing dry_run_completed checks in Python, and auditing Git history before making the repo public were some of the most valuable hours of the sprint.</p><h3>A Quick Note If You’re Thinking About Building Your Own Agent</h3><p>Forty-eight hours ago, I had <strong>never uploaded a YouTube video</strong>, <strong>never published a Medium post</strong>, and had never stitched Gemini Live AudioWorklets, Google ADK, Agent Engine Memory Bank, and Model Armor into one live app.</p><p>I’m still learning a ton about agentic systems, and DataSathi is far from perfect — but going through this weekend sprint showed me how accessible this stack has become once you connect it to real tools you already use every day.</p><p>If you’ve been curious about building your first AI agent, here are three small takeaways from my weekend that might help:</p><ol><li><strong>Start with a real problem you’ve personally felt.</strong> Solving an incident you’ve actually lived through makes every architecture and UX tradeoff much clearer.</li><li><strong>Put deterministic checks ahead of the LLM.</strong> Let SQL, schema diffs, and code-level guardrails handle ground truth and safety — and let the model shine at reasoning, summarization, and natural conversation.</li><li><strong>Test in messy, realistic conditions early.</strong> Most things feel smooth at a quiet desk; trying your app on a phone with background noise immediately reveals the real edge cases worth fixing.</li></ol><p>If there’s a recurring headache in your workflow you’ve been meaning to automate, give it a weekend — you might be surprised how far you get.</p><p><em>Built for </em><strong><em>Build with Google Gemini: Shape What’s Next</em></strong><em> (YourStory × Google Cloud × Hack2skill).</em><br><strong><em>Code &amp; setup notes:</em></strong><em> </em><a href="https://github.com/ratulbanerjee/DataSathi"><em>github.com/ratulbanerjee/DataSathi</em></a><br><strong><em>2-Minute Demo Video:</em></strong><em> </em><a href="https://www.youtube.com/watch?v=M4R9mLOkBIY"><em>Watch on YouTube</em></a></p><p><em>This is my first Medium post — if you spotted something I could improve, or if you’re building your own data agent, I’d genuinely love to hear your thoughts in the comments or connect on </em><a href="https://www.linkedin.com/in/ratul-banerjee-5445a01b3/"><em>LinkedIn</em></a><em>!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b85d7fa3d6aa" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>