<?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 Pratik Pratap Singh on Medium]]></title>
        <description><![CDATA[Stories by Pratik Pratap Singh on Medium]]></description>
        <link>https://medium.com/@pratikpratapsingh?source=rss-1422bd680fec------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*w4BCk0vaRPZExd4I.</url>
            <title>Stories by Pratik Pratap Singh on Medium</title>
            <link>https://medium.com/@pratikpratapsingh?source=rss-1422bd680fec------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 13:48:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pratikpratapsingh/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[The Silent Killer of Microservices: How Cascading Failures Bring Systems Down]]></title>
            <link>https://medium.com/@pratikpratapsingh/the-silent-killer-of-microservices-how-cascading-failures-bring-systems-down-1736ab5f4e7a?source=rss-1422bd680fec------2</link>
            <guid isPermaLink="false">https://medium.com/p/1736ab5f4e7a</guid>
            <category><![CDATA[cascading-failure]]></category>
            <category><![CDATA[rate-limiting]]></category>
            <category><![CDATA[system-design-concepts]]></category>
            <dc:creator><![CDATA[Pratik Pratap Singh]]></dc:creator>
            <pubDate>Sat, 21 Mar 2026 18:52:07 GMT</pubDate>
            <atom:updated>2026-03-21T18:52:07.339Z</atom:updated>
            <content:encoded><![CDATA[<p>You’ve probably seen this happen.</p><p>Your <strong>Product Service</strong> depends on an <strong>Inventory Service</strong>.<br> Everything works fine… until one day, Inventory doesn’t crash — it just becomes <strong>slow</strong>.</p><p>At first, it feels harmless. But here’s what actually happens:</p><pre>User Request → Product Service → Inventory Service (slow...)<br>                                   ↓<br>                         Threads start waiting...<br>                                   ↓<br>                        Thread pool gets exhausted<br>                                   ↓<br>                       Product Service starts failing<br>                                   ↓<br>                    Entire system becomes unavailable</pre><p>💥 This is called a <strong>Cascading Failure</strong><br> One slow service brings down everything.</p><h3>Why Does This Happen?</h3><p>Because your system keeps accepting traffic <strong>without limits</strong>.</p><p>When dependencies slow down:</p><ul><li>Threads pile up</li><li>Resources get exhausted</li><li>Failures spread like a domino effect</li></ul><h3>The Solution: Build Guardrails 🛡️</h3><p>To make systems resilient, we don’t rely on a single fix — we use <strong>layers of protection</strong>.</p><p>Think of it like security checks:</p><pre>Incoming Request<br>      ↓<br>[ Rate Limiter ]<br>      ↓<br>[ Bulkhead ]<br>      ↓<br>[ Time Limiter ]<br>      ↓<br>[ Circuit Breaker ]<br>      ↓<br>  [ Retry ]<br>      ↓<br>Your Service Logic</pre><p>Each layer protects your system differently.</p><p>👉 Today, let’s focus on the <strong>first and most important layer: Rate Limiting</strong></p><h3>Rate Limiter: Your First Line of Defence</h3><p>A <strong>Rate Limiter</strong> controls how many requests your system allows.</p><p>👉 If too many requests come in:</p><ul><li>Some are <strong>delayed</strong></li><li>Some are <strong>rejected (429 Too Many Requests)</strong></li></ul><p>This ensures your system stays stable — even under heavy load or attacks.</p><h3>5 Ways to Implement Rate Limiting</h3><p>Let’s break them down in simple terms:</p><p><strong>1. Token Bucket (Best for Bursts 🚀)</strong></p><p>Imagine a bucket that fills with tokens at a fixed rate.</p><ul><li>1 request = 1 token</li><li>No token → request rejected</li></ul><pre>Bucket (capacity = 50)<br>Refill rate = 10 tokens/sec</pre><p>✔ Allows sudden bursts<br> ✔ Great for APIs with unpredictable traffic</p><p>👉 Example:<br> The user can send 50 requests instantly, then only 10 per second after that.</p><p><strong>2. Leaky Bucket (Smooth Traffic 🌊)</strong></p><p>Here, requests enter freely — but are processed at a fixed speed.</p><pre>Incoming Requests → [ Bucket ]<br>                        ↓<br>                 Process at constant rate</pre><p>✔ Converts spikes into a steady flow<br> ✔ Ideal for background jobs</p><p>❌ Drops requests if the bucket overflows</p><p><strong>3. Fixed Window Counter (Simple but Risky ⚠️)</strong></p><p>You allow a fixed number of requests per time window.</p><pre>Limit: 100 requests per minute</pre><p>Problem:</p><pre>10:00:59 → 100 requests<br>10:01:01 → 100 requests<br>-------------------------<br>= 200 requests in 2 seconds 😬</pre><p>👉 This is called the <strong>boundary problem</strong></p><p><strong>4. Sliding Window Log (Accurate but Heavy 📊)</strong></p><p>You store the timestamp of every request.</p><pre>[ t1, t2, t3, t4, ... ]</pre><p>On each request:</p><ul><li>Remove old timestamps</li><li>Count remaining</li></ul><p>✔ Very accurate<br> ❌ High memory usage</p><p><strong>5. Sliding Window Counter (Best Practical Choice ⭐)</strong></p><p>A smarter hybrid approach.</p><p>Instead of storing all requests:</p><ul><li>Keep counts for the <strong>current window</strong></li><li>Keep counts for the <strong>previous window</strong></li></ul><pre>Effective Count =<br>Current Count +<br>(Previous Count × Remaining Time Weight)</pre><p>✔ Accurate<br> ✔ Memory efficient<br> ✔ Widely used in production</p><p><strong>Putting It All Together</strong></p><p>Without rate limiting:</p><pre>Traffic Spike → System Overload → Cascading Failure 💥</pre><p>With rate limiting:</p><pre>Traffic Spike → Controlled Flow → System Stability ✅</pre><h3>Key Takeaways</h3><ul><li>Cascading failures often start with <strong>slow dependencies</strong>, not crashes</li><li>Rate limiting prevents overload <strong>before it starts</strong></li><li>Choose your strategy based on your use case:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*rWwhrvuLrremRM5qWq3piw.png" /></figure><h3>Final Thought</h3><p>Resilience isn’t about avoiding failure — it’s about <strong>failing gracefully</strong>.</p><p>A well-designed system doesn’t collapse under pressure.<br> It <strong>controls</strong>, <strong>protects</strong>, and <strong>recovers</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1736ab5f4e7a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Behind the Screen: How AI Chatbots Like ChatGPT and Gemini Research Financial Advice — and How…]]></title>
            <link>https://medium.com/@pratikpratapsingh/behind-the-screen-how-ai-chatbots-like-chatgpt-and-gemini-research-financial-advice-and-how-8f516d30ffa4?source=rss-1422bd680fec------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f516d30ffa4</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[chatbots]]></category>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[advice]]></category>
            <category><![CDATA[decision-making]]></category>
            <dc:creator><![CDATA[Pratik Pratap Singh]]></dc:creator>
            <pubDate>Mon, 14 Jul 2025 15:37:28 GMT</pubDate>
            <atom:updated>2025-07-15T10:20:38.548Z</atom:updated>
            <content:encoded><![CDATA[<h3>Behind the Screen: How AI Chatbots Like ChatGPT and Gemini Research Financial Advice — and How Trustworthy They Are</h3><p>As artificial intelligence (AI) tools like OpenAI’s ChatGPT and Google’s Gemini enter the mainstream, users are increasingly consulting these digital assistants for complex life decisions, especially in the realm of personal finance. Whether it’s a query about mutual funds, stock recommendations, or SIP strategies, people expect clear, data-driven insights from tools that are not human, yet are becoming increasingly human-like.</p><h3>But how do these AI models research financial topics in the background? What sources are they relying on? And most importantly, can we trust the investment guidance they offer?</h3><p>This article lifts the hood on how AI chatbots process financial information, how they’re trained to interpret markets, and what users must know about the trustworthiness of their recommendations.</p><p><strong>Understanding the AI Pipeline: From Query to Recommendation</strong></p><p>When a user types something like “Which mutual fund is best for long-term returns in 2025?”, the response that appears is the result of a sophisticated backend process involving:</p><p><strong>1. Natural Language Understanding (NLU)</strong></p><p>The chatbot first identifies what the user wants — key phrases like “mutual fund,” “long-term,” and “returns” are detected and interpreted within context. The AI doesn’t just match keywords; it understands the intent behind the query.</p><p><strong>2. Retrieval of Information</strong></p><p>Depending on whether the chatbot is <strong>connected to the internet (real-time browsing)</strong> or not, it does one of the following:</p><blockquote><strong>Without live web access </strong>(standard ChatGPT/Gemini): The AI draws from its internal knowledge base — essentially a massive “memory” trained on a curated mix of public datasets, financial articles, research papers, educational content (like Investopedia), and official financial disclosures up to its last update.</blockquote><blockquote><strong>With live web access or plugins</strong> (available in premium versions): The chatbot can search real-time financial data, access stock tickers, check Morningstar or Value Research Online, and cite current returns, NAVs, and fund performance metrics.</blockquote><p><strong>3. Reasoning and Response Generation</strong></p><p>Once information is retrieved, the model uses pattern recognition and reasoning to construct a coherent and often personalised response. It can compare mutual funds, summarise stock trends, or even rank investment options based on user-defined criteria, such as risk tolerance or investment horizon.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><strong>Where Is the Financial Data Coming From?</strong></p><p>Modern AI models are trained on <strong>a mix of public, licensed, and curated datasets</strong>. In the context of finance, this often includes:</p><p>* U.S. SEC filings (10-Ks, 10-Qs)</p><p>* Indian AMFI fund disclosures</p><p>* Analyst reports and earnings call transcripts</p><p>* Publicly available stock screening tools</p><p>* Financial publications like Bloomberg, Reuters, CNBC, The Motley Fool, and ET Markets</p><p>* Educational platforms like Investopedia, Khan Academy, and NerdWallet</p><p>Some enterprise-grade models (e.g., BloombergGPT) are trained <strong>exclusively on financial corpora</strong>, allowing domain-specific chatbots to answer investment queries with institutional precision.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><strong>How Reliable Are These AI Chatbots for Financial Decisions?</strong></p><p>This is the crux. While AI chatbots are excellent explainers and decent comparers, they are <strong>not certified advisors</strong>. Here’s how to interpret their reliability:</p><blockquote>💪<strong>Strong for:</strong></blockquote><blockquote>* Explaining financial concepts like SIPs, index funds, compounding</blockquote><blockquote>* Comparing features (expense ratio, fund manager, risk ratings)</blockquote><blockquote>* Summarising past performance (when connected to real-time data)</blockquote><blockquote>* Assisting in DIY financial research and due diligence</blockquote><blockquote>⚠<strong>️Use caution for:</strong></blockquote><blockquote>Stock picking or timing the market — AI does not predict future prices</blockquote><blockquote>Customised advice — It doesn’t know your full financial profile unless integrated with personal finance tools</blockquote><blockquote>Uncited information — If the chatbot doesn’t provide a source, verify before acting</blockquote><p>AI models can sometimes “hallucinate” facts or cite outdated information, especially if web access is disabled. Moreover, most models aren’t legally compliant with financial regulations in jurisdictions like SEBI or FINRA, so they can’t offer regulated financial advice.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><strong>How AI Chatbots Learn Finance (and Keep Evolving)</strong></p><p>AI models do not update themselves in real time. Instead, they are <strong>retrained</strong> periodically with new data from the markets and regulatory filings. This training process involves:</p><blockquote>* <strong>Finetuning</strong> on curated financial datasets</blockquote><blockquote>* <strong>Reinforcement learning</strong> using human experts who review and grade financial answers</blockquote><blockquote>* <strong>Incorporating user feedback</strong> to improve clarity, correctness, and bias</blockquote><p>Platforms like OpenAI are also exploring <strong>custom GPTs</strong>, which can be integrated with real-time APIs (like Alpha Vantage or Zerodha Kite) and private datasets, allowing investment platforms to offer AI support embedded within their tools.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p>The Future: Robo-Advisors Meet Conversational AI</p><p>Soon, AI chatbots will likely merge with <strong>robo-advisory services</strong>. Imagine a voice assistant that not only explains SIP vs. lump sum but also:</p><blockquote>* Knows your portfolio</blockquote><blockquote>* Suggests rebalancing options</blockquote><blockquote>* Tracks tax-saving opportunities</blockquote><blockquote>* Integrates ESG preferences</blockquote><p>This blend of <strong>hyper-personalisation</strong>, real-time data, and conversational UX* could redefine how retail investors interact with financial systems.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><strong>Conclusion: A Powerful Assistant, Not a Final Advisor</strong></p><p>AI chatbots like ChatGPT and Gemini are revolutionising financial research for the everyday investor. They simplify jargon, reduce research time, and democratize access to financial literacy. However, they are <strong>not substitutes for certified financial planners or regulatory platforms</strong>.</p><p>The key to using them effectively lies in knowing their strengths — <strong>education, comparison, and accessibility</strong> — while remaining sceptical about any unverified, uncited, or overly confident claims.</p><p>In a world increasingly shaped by algorithms, the smartest investors will be those who know how to <strong>collaborate with AI, not blindly follow it</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f516d30ffa4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>