<?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 Solleti Krishna Chaitanya Subhash on Medium]]></title>
        <description><![CDATA[Stories by Solleti Krishna Chaitanya Subhash on Medium]]></description>
        <link>https://medium.com/@solletisubhash24?source=rss-fbdb9c007664------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*v05ihauteQ4TMuWYIziECQ.jpeg</url>
            <title>Stories by Solleti Krishna Chaitanya Subhash on Medium</title>
            <link>https://medium.com/@solletisubhash24?source=rss-fbdb9c007664------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 04:00:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@solletisubhash24/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[How I Built a Real-Time LLM Poisoning Monitoring Dashboard on Google Cloud]]></title>
            <link>https://medium.com/code-vipassana/how-i-built-a-real-time-llm-poisoning-monitoring-dashboard-on-google-cloud-51379f58761e?source=rss-fbdb9c007664------2</link>
            <guid isPermaLink="false">https://medium.com/p/51379f58761e</guid>
            <category><![CDATA[llm-poisoning]]></category>
            <category><![CDATA[vertex-ai]]></category>
            <category><![CDATA[proactive-monitoring]]></category>
            <category><![CDATA[llm-security]]></category>
            <category><![CDATA[google-cloud]]></category>
            <dc:creator><![CDATA[Solleti Krishna Chaitanya Subhash]]></dc:creator>
            <pubDate>Tue, 18 Nov 2025 07:20:21 GMT</pubDate>
            <atom:updated>2025-11-28T12:12:14.999Z</atom:updated>
            <content:encoded><![CDATA[<p><em>From a </em>Curiosity <em>to an MVP: A Product Engineer’s Build Story</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D7tRkFxAl82vWA1YkZXBRQ.png" /><figcaption>Gemini Generated Image</figcaption></figure><h3>Introduction | Overview</h3><p>This entire project started with a simple curiosity. Whenever I asked any <strong>LLM</strong>: Gemini, ChatGPT, Grok, that <strong>“Who is Subhash?”</strong>, the model would fetch whatever the web held and respond confidently. Accurate or not, the LLM didn’t care.</p><p>That triggered a thought:<br><strong>If LLMs rely on whatever information is floating out there, what happens if that information is intentionally poisoned?</strong></p><p>I went deeper, tested multiple queries, tried manipulating context, experimented with conflicting metadata, and quickly realized something unsettling: <strong>LLM poisoning is not theoretical; it’s happening.</strong><br>Anyone can pollute data sources, craft malicious prompts, or push adversarial patterns that deceive LLM reasoning.</p><p>So I began researching how will intruders will exploit:</p><ul><li>system prompt override vectors</li><li>indirect injection</li><li>payload-based jailbreaks</li><li>backdoor-style prompt triggers</li><li>context poisoning via external sources</li></ul><p><strong>That’s when I identified the gap and built an MVP. LLM systems need proactive oversight, not reactive fixes.</strong></p><p>This blog explains how I designed and deployed a <strong>real-time ML Model Poisoning Monitoring Dashboard</strong> that:</p><ul><li>Detects anomalies in LLM prompts</li><li>Classifies poisoning patterns using Gemini 2.5 Pro</li><li>Auto-blocks intruder IPs</li><li>Surfaces insights on a live dashboard</li><li>Helps developers maintain clean model interactions</li></ul><p>This is written for engineers, product teams, and security-minded builders who operate or integrate LLM systems at scale.</p><p>By the end of this tutorial, you’ll understand:</p><ul><li>the full architecture</li><li>how the system works end-to-end</li><li>how you can build and extend the same MVP</li><li>what’s possible next, from dataset scaling to model accuracy improvements</li></ul><h3>Design</h3><p>The architecture was driven by one principle: <strong>Detect poisoning behaviors before they influence the model or downstream workflows.</strong></p><p>To make the monitoring layer low-ops, high-signal, and autonomous, I used a serverless, event-driven topology.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*VjRYBdTivmR3U-xrO1PXsA.png" /><figcaption>This design minimizes cross-service coupling while maintaining deterministic enforcement pathways</figcaption></figure><h3>Core Design Rationale</h3><ul><li>Firestore provides instant log ingestion for all LLM prompts.</li><li>Gemini Embeddings power semantic anomaly detection.</li><li>Vertex AI Isolation Forest identifies behavioral outliers.</li><li>Gemini 2.5 Pro generates deterministic JSON threat signatures.</li><li>Cloud Functions Gen2 acts as the enforcement engine.</li><li>Cloud Run hosts the dashboard with real-time visualization.</li><li>Cloud Storage stores the training dataset and artifacts.</li></ul><h3>Prerequisites</h3><ul><li>Google Cloud project</li><li>Billing enabled</li><li>Python 3.12</li><li>Node.js 18+</li></ul><p><strong>Enabled APIs:</strong></p><ul><li>Firestore Native Mode</li><li>Cloud Functions Gen2</li><li>Vertex AI</li><li>Cloud Run</li><li>Eventarc</li></ul><p><strong>Tools:</strong></p><ul><li>Gemini Embedding model</li><li>Gemini 2.5 Pro</li><li>Vertex AI Isolation Forest</li><li>Firestore SDK</li><li>GCS bucket for datasets and model artifacts</li></ul><h3>Step-by-Step Instructions</h3><h3>1. Ingest Logs into Firestore</h3><p>Start with a synthetic dataset simulating normal + adversarial prompts.</p><pre>pypthon generate_logs.py</pre><p><em>This seeds 2,000 logs with realistic poisoning signals</em>.</p><h3>2. Generate Embeddings + Features</h3><p>Compute:</p><ul><li>semantic embedding vectors</li><li>prompt length</li><li>user frequency</li><li>timestamp diffs</li></ul><pre>python prep_data.py</pre><p>Uploads anomaly_data.csv → Cloud Storage.</p><h3>3. Train the Isolation Forest Anomaly Model</h3><p>Feature-scaled + pipeline-wrapped for Vertex deployment.</p><pre>python train_model.py</pre><p>Outputs model.joblib → GCS.</p><h3>4. Deploy the ML Model to Vertex AI</h3><pre>python deploy_endpoint.py</pre><p>Creates:</p><ul><li>Model ID</li><li>Endpoint ID</li></ul><h3>5. Deploy the Real-Time Detection Engine</h3><p>Event-driven Cloud Function monitoring every new Firestore entry.</p><pre>gcloud functions deploy llm-poisoning-detector</pre><p>This component:</p><ul><li>extracts features</li><li>runs anomaly detection</li><li>calls Gemini for classification</li><li>auto-blocks IPs</li><li>writes threat signatures</li></ul><h3>6. Deploy the Cloud Run Dashboard</h3><pre>gcloud run deploy poisoning-dashboard --source </pre><p>Features:</p><ul><li>threat feed</li><li>risk scoring</li><li>sentiment context</li><li>attack-intensity chart</li><li>live IP block counter</li></ul><h3>Result / Demo</h3><p>Youtube Video Link:</p><p>By this stage, you’ll see a full end-to-end operational MVP.</p><p>You’ll observe:</p><ul><li><strong>Real-time alerts</strong> when malicious prompts hit</li><li><strong>Classification labels:</strong> jailbreak, data leak, backdoor, injection</li><li><strong>Auto-mitigations:</strong> IP block + hardened prompt suggestions</li><li><strong>Visual trends:</strong> timeline graphs, cumulative attack curves</li><li><strong>Behavioral insights:</strong> repetitive users, burst attacks, anomaly spikes</li></ul><p><strong>Visualization decisions:</strong></p><ul><li>high-contrast color mappings</li><li>clean labeling</li><li>no clutter; single graph per artifact</li><li>timestamp-normalized sequences</li></ul><p>The system now behaves like a <strong>proactive LLM SOC (Security Operations Center)</strong>.</p><h3>What’s next?</h3><p>This is MVP, but the roadmap naturally extends:</p><h3>Enhancements</h3><ul><li>Scale dataset size to increase anomaly detection precision</li><li>Integrate Cloud Armor for real perimeter IP enforcement</li><li>Add weekly retraining with Vertex Pipelines</li><li>Extend to Chronicle for enterprise logging</li><li>Incorporate agentic multi-step red-teaming simulations</li><li>Build a full Next.js dashboard with real-time Firestore streams</li></ul><p>The infrastructure is ready for production-hardening and security expansion.</p><h3><strong>End of Build</strong></h3><blockquote>The core loop is built, validated, and deployable. Next steps are all refinement — accuracy, resilience, automation. Code on, build after build</blockquote><p><em>Disclaimer:This story is written in my own words and ideas, but I used AI to restructure and polish the narrative flow for clarity. All accompanying visuals are AI-generated to support the storytelling context.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=51379f58761e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/code-vipassana/how-i-built-a-real-time-llm-poisoning-monitoring-dashboard-on-google-cloud-51379f58761e">How I Built a Real-Time LLM Poisoning Monitoring Dashboard on Google Cloud</a> was originally published in <a href="https://medium.com/code-vipassana">Code Vipassana Community Blogs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Token-Saving Sidekick: My TOON Adventure as a Spring Boot Dev]]></title>
            <link>https://medium.com/@solletisubhash24/toon-for-devs-llm-tokens-optimization-6aeec79e3ff8?source=rss-fbdb9c007664------2</link>
            <guid isPermaLink="false">https://medium.com/p/6aeec79e3ff8</guid>
            <category><![CDATA[llm-optimization]]></category>
            <category><![CDATA[toon]]></category>
            <category><![CDATA[json-vs-toon]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[json]]></category>
            <dc:creator><![CDATA[Solleti Krishna Chaitanya Subhash]]></dc:creator>
            <pubDate>Sat, 08 Nov 2025 23:09:44 GMT</pubDate>
            <atom:updated>2025-11-08T23:50:49.761Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A Product engineer’s real-world hack to slash LLM token costs without the hassle. From JSON bloat to TOON bliss in one rainy weekend.</em></p><p>Hey fellow devs, picture this: It’s a rainy weekend, and I’m knee-deep in debugging my Spring Boot app. The app, let’s call it FraudShield, crunches invoice data from a tricky external endpoint and pipes it to GPT-5 for fraud checks. Sounds straightforward, right? but it isn’t. The endpoint takes forever, pulling fresh data. And the JSON payload to the LLM? It’s a beast. Nested line items, customer details, timestamps, all wrapped in quotes and braces, chewing through tokens like there’s no tomorrow. My token bill is spiking, and I’m staring at the console like, “This can’t be sustainable.”</p><p>That’s when a late-night Hacker News scroll introduces me to TOON. Token-Oriented Object Notation, a fresh format cooked up by Johann Schopplich, blending YAML’s clean indents with CSV’s row efficiency. It’s built for LLM inputs, slashing tokens by ditching repeats. As a Java guy, I snag JToon from Maven Central, tweak my service layer, and boom: tokens drop noticeably. The LLM groks it instantly, thanks to those handy length markers. Latency dips, costs drop, and I finally grab that weekend nap. But TOON isn’t magic for every commit. Let’s unpack the wins, pitfalls, and when to deploy it like a pro, all through real dev scenarios.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Z0W9lOUs4on3YYBpnSIAw.png" /></figure><h3>The Wins: TOON as Your Efficiency Wingman</h3><p>In my FraudShield flow, TOON turned a pain point into a breeze. Here’s why it clicks for us Spring Boot folks.</p><p><strong>First off, </strong>massive token cuts. For uniform arrays, like invoice batches with fixed fields (ID, amount, date, items), you declare keys once in a header. No more JSON key spam. Pro: 30–60% fewer tokens, straight to your wallet. In a high-volume setup, that’s 50% off your monthly LLM tab without touching the backend.</p><p><strong>JSON Payload</strong> (bulky, repetitive keys):</p><pre>{<br>  &quot;invoices&quot;: [<br>    { &quot;id&quot;: &quot;INV001&quot;, &quot;date&quot;: &quot;2025-11-01&quot;, &quot;amount&quot;: 1500.75, &quot;items&quot;: [&quot;item1&quot;, &quot;item2&quot;] },<br>    { &quot;id&quot;: &quot;INV002&quot;, &quot;date&quot;: &quot;2025-11-02&quot;, &quot;amount&quot;: 2300.50, &quot;items&quot;: [&quot;item3&quot;] }<br>  ]<br>}</pre><p><strong>TOON Payload</strong> (compact, single header):</p><pre>invoices[2]{id,date,amount,items}:<br>  INV001,2025-11-01,1500.75,[2]:item1,item2<br>  INV002,2025-11-02,2300.50,[1]:item3</pre><p><em>The JSON repeats “id”, “date”, etc., for each invoice, bloating the token count. TOON declares fields once, slashing redundancy. In my tests, this cut tokens by ~40%, saving budget for more fraud checks.</em></p><p><strong>Second,</strong> it plays nice with LLMs. Those [N] lengths and {field1,field2} headers act like training wheels, boosting parse accuracy to 74% vs JSON’s 70% in benchmarks. Pro: Fewer hallucinations in fraud alerts. As a product engineer, I love how it makes prompts self-validating, no extra instructions needed.</p><p><strong>Third,</strong> readability without the fluff. Indents keep it scannable in logs or IDEs, better than minified JSON. Pro: Quick debugs during standups. And with JToon’s POJO support, it’s a drop-in: <strong>@Autowired</strong> a service, encode your DTO, done.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*1ud5nYDyz4glCWVKuM0QNQ.png" /></figure><h3><strong>The Gotchas: Handling TOON’s Rough Edges Smartly</strong></h3><p>Not every repo needs TOON. I hit snags when data gets wonky, but here’s how I flipped them.</p><p><strong>Pitfall 1:</strong> It bloats on deep nests or irregular shapes. In a user profile endpoint with optional nested addresses, TOON’s list mode added 15% tokens over compact JSON. Con: Savings vanish if tabular eligibility dips below 50%.</p><p><strong>JSON Payload</strong> (nested, compact):</p><pre>{<br>  &quot;users&quot;: [<br>    {&quot;id&quot;: 1, &quot;name&quot;: &quot;Alice&quot;, &quot;address&quot;: {&quot;street&quot;: &quot;123 Main&quot;, &quot;city&quot;: &quot;Boston&quot;}},<br>    {&quot;id&quot;: 2, &quot;name&quot;: &quot;Bob&quot;}<br>  ]<br>}</pre><p><strong>TOON Payload</strong> (list mode, less efficient):</p><pre>users[2]:<br>  - id: 1<br>    name: Alice<br>    address:<br>      street: 123 Main<br>      city: Boston<br>  - id: 2<br>    name: Bob</pre><p><strong>Fix it best: </strong>Flatten upfront. Whip up a mapper in your <strong>@Service</strong> to unnest (e.g., “address.street” as a flat field). Now, even semi-uniform data tabulates nicely, turning con into a cleaner DTO.</p><p><strong>Pitfall 2: </strong>Tiny encoding latency. JToon’s encode() adds milliseconds, annoying in sub-second APIs like real-time trades. Con: Overhead bites low-volume calls. Best play: Gate it behind a flag. Use <strong>@ConditionalOnProperty</strong> in Spring to toggle TOON only for LLM routes. Profile with Micrometer; in my SOAP slog (1-min waits), it’s invisible, and token wins eclipse it.</p><p><strong>Pitfall 3:</strong> Nesting limits. Multi-level configs? Indents pile up, edging JSON. Con: Not ideal for YAML-like setups. Smart twist: Go hybrid. TOON the tabular chunks (e.g., line items), JSON the nests, embed in prompts. LLMs handle mixes fine; I did this for vendor configs, keeping 40% savings where it counts.</p><p><strong>Pitfall 4:</strong> Uneven LLM support. Not all LLMs parse TOON equally well, it’s new, not a standard for most production APIs. Con: Integration might need prompt engineering or even retraining, as models vary in handling custom formats. Best play: Validate upfront. Test with sample prompts on your target LLM (e.g., via playgrounds like OpenAI’s). Run benchmarks: Send TOON vs. JSON payloads, check accuracy on tasks like data extraction. Start small pilot in non-prod, tweak prompts like “Parse this TOON data: [explain structure briefly].” If issues persist, fallback to JSON or use TOON as a wrapper. In my setup, GPT-5 handled it fine after a quick format demo in the prompt.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LGn9oHDzLEyhSQwxWrqXOw.png" /></figure><h3>Dev Scenarios: Picking Inputs and Plays for LLM Flows</h3><p>As a tech enthusiast, I geek out on tailoring tools to inputs. Here’s scenario-based advice for LLM-bound data in Spring Boot.</p><p><strong>Scenario 1:</strong> Tabular time-series (e.g., daily metrics logs). Input: Uniform arrays from DB queries via JdbcTemplate. Use TOON with tab delimiters: <strong>JToon.encode(metrics, new EncodeOptions(2, Delimiter.TAB, true))</strong>. Pro: 59% token drop, accurate aggregations. Con none here; it’s the sweet spot.</p><p><strong>Scenario 2:</strong> Semi-uniform events (e.g., user actions with optional nests). Input: Mixed POJOs from Kafka streams. Flatten first in a processor, then TOON. Pro: Still 15–30% savings post-flatten. Con: Extra mapping code; offset by reusable <strong>@Component</strong> flatteners.</p><p><strong>Scenario 3: </strong>Deep configs (e.g., app settings for dynamic rules). Input: Nested YAML from props. Skip TOON, use JSON. Pro: Zero bloat. Con avoided: No forced indents.</p><p><strong>Scenario 4:</strong> Low-volume singles (e.g., one-off fraud checks). Input: Single DTOs. Stick to JSON compact. Pro: No overhead. Con of TOON (latency) dodged.</p><p>In FraudShield, I async-ed the endpoint with WebClient, flattened the data post-mapping, and encoded it to TOON for the LLM.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V7RSq2Q-ePDkf3pOk9felQ.png" /></figure><h3>Wrapping the Quest: Code On, Token-Wise</h3><blockquote>TOON leveled up my Spring Boot game, turning token traps into triumphs. It’s not for every pull request, but in LLM-heavy flows, it’s a dev’s best friend. Grab JToon, benchmark your payloads, and iterate. What’s your next optimization saga? Hit the comments.</blockquote><p><em>Disclaimer: This story is written in my own words and ideas, but I used AI to restructure and polish the narrative flow for clarity. All accompanying visuals are AI-generated to support the storytelling context.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6aeec79e3ff8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>