<?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 thakur.amrita on Medium]]></title>
        <description><![CDATA[Stories by thakur.amrita on Medium]]></description>
        <link>https://medium.com/@amrita.thakur?source=rss-66399411a438------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ZfpSL9PFfi8PCx0P2hDj0Q.jpeg</url>
            <title>Stories by thakur.amrita on Medium</title>
            <link>https://medium.com/@amrita.thakur?source=rss-66399411a438------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 18:28:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@amrita.thakur/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[Getting Started with Google Compute Engine: A Practical Guide to Cloud Virtual Machines]]></title>
            <link>https://medium.com/@amrita.thakur/getting-started-with-google-compute-engine-a-practical-guide-to-cloud-virtual-machines-db4bb9e30380?source=rss-66399411a438------2</link>
            <guid isPermaLink="false">https://medium.com/p/db4bb9e30380</guid>
            <category><![CDATA[gcp-machine-types]]></category>
            <category><![CDATA[gcp-vm]]></category>
            <category><![CDATA[gcp]]></category>
            <category><![CDATA[gcp-disks]]></category>
            <category><![CDATA[gcp-compute-engine]]></category>
            <dc:creator><![CDATA[thakur.amrita]]></dc:creator>
            <pubDate>Wed, 14 Oct 2026 09:03:37 GMT</pubDate>
            <atom:updated>2026-10-14T09:03:37.757Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A beginner-friendly walkthrough of VMs, machine types, pricing, and disks</em></p><p>If you’ve ever wished you could run a server without buying, racking, and babysitting physical hardware, Google Compute Engine is built for exactly that. It’s Google Cloud’s Infrastructure as a Service (IaaS) offering: you get virtual machines (VMs) running on Google’s infrastructure, and you decide the operating system, the software, and how it all scales.</p><p>This post walks through the essentials: what Compute Engine is, how to pick the right machine, how pricing works, how storage behaves, and what a real-world deployment teaches you.</p><h3>Where Compute Engine fits</h3><p>Google Cloud offers a spectrum of compute options: Compute Engine, Google Kubernetes Engine (GKE), App Engine, Cloud Run, and Cloud Run functions. They sit on a scale from “you manage everything” to “Google manages almost everything.”</p><p>Compute Engine is at the maximum-flexibility end. You can run any language, because it’s your virtual machine. You get a VM and an operating system, and you choose how to manage things like autoscaling. That makes it a natural home for general workloads, especially enterprise applications designed to run on traditional servers. It’s also what makes migrating from on-premises so straightforward: at its heart, it’s the kind of server you’re already used to, just running inside Google Cloud.</p><p>When you create a VM, you choose:</p><ul><li><strong>vCPUs and memory</strong> through predefined or custom machine types</li><li><strong>Storage</strong>: persistent disks (HDD or SSD), local SSD, Cloud Storage, or a mix</li><li><strong>Networking</strong>: custom networks, firewall rules, and load balancing</li><li><strong>Operating system</strong>: a mix of Linux and Windows is fine</li></ul><h3>Why not just use CPUs and GPUs for everything?</h3><p>CPUs and GPUs can no longer scale fast enough for machine learning demand. Google’s answer, introduced in 2016, is the Cloud TPU: custom, domain-specific hardware built for ML workloads like matrix multiplication. TPUs are generally faster and far more energy-efficient for AI, and best suited to long-training or large models.</p><h3>Choosing the right machine</h3><p>Machine types are organized in a hierarchy: <strong>machine family → machine series → machine type</strong>. There are four families:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/905/1*vIGYgDFYHj3OxV2lHxweWw.png" /><figcaption>Machine Options</figcaption></figure><p>A few highlights:</p><ul><li><strong>E2</strong> is the budget-friendly pick for day-to-day computing: web servers, small to medium databases, and dev/test environments. It also offers shared-core types for small, non-intensive apps.</li><li><strong>N2 and N2D</strong> balance price and performance across a wide range of shapes, from enterprise apps to medium-to-large databases.</li><li><strong>Tau T2D and T2A</strong> target cost-effective scale-out workloads. T2A is the first Google Cloud series to run on Arm processors.</li><li><strong>C2 and C2D</strong> deliver the highest per-core performance, which is also handy when you pay expensive per-core software licensing.</li><li><strong>M1 and M2</strong> offer up to 4 TB and 12 TB of memory respectively, with the lowest cost per GB of memory on Compute Engine.</li><li><strong>A2</strong> attaches NVIDIA A100 GPUs for massively parallel CUDA workloads.</li></ul><p>If none of the predefined types fit, you can build a <strong>custom machine type</strong>. The rules: 1 vCPU or an even number of vCPUs, between 1 and 8 GB of memory per vCPU, and total memory in multiples of 256 MB. Custom types cost slightly more than equivalent predefined ones, and extended memory is available (at extra cost) if you need more than 8 GB per vCPU.</p><p>Two useful facts to remember: a vCPU equals one hardware hyper-thread, and network throughput scales at 2 Gbps per vCPU, with a theoretical maximum of 200 Gbps on a 176-vCPU C3 instance.</p><p><strong><em>Tip:</em></strong><em> If you plan to use the command line or REST API, configure the instance in the console first, then ask Compute Engine for the equivalent command or REST request. You avoid typos and get the dropdown lists of valid options.</em></p><h3>Understanding the VM lifecycle</h3><p>A VM moves through a set of states, and knowing them helps you predict behavior and cost:</p><ol><li><strong>Provisioning</strong>: CPU, memory, and disks are reserved, but nothing is running yet.</li><li><strong>Staging</strong>: IP addresses are added and the system image boots.</li><li><strong>Running</strong>: startup scripts execute and SSH or RDP access is enabled.</li><li><strong>Stopping / Terminated</strong>: shutdown scripts run, then the VM is terminated. From here you can restart or delete it.</li><li><strong>Suspending / Suspended</strong>: you can resume or delete the VM.</li><li><strong>Repairing</strong>: the VM is temporarily unusable due to an internal error or maintenance. You aren’t billed during repair, but the SLA doesn’t apply either.</li></ol><p>By default, Compute Engine <strong>live migrates</strong> your VM to another host during maintenance, so your applications aren’t interrupted. Together with the automatic restart option, this is controlled through the VM’s availability policy, which you can change while the VM is running.</p><p>One billing detail worth remembering: when a VM is terminated you stop paying for CPU and memory, but you still pay for attached disks and reserved IP addresses.</p><h3>Pricing: how to keep the bill low</h3><p>Compute Engine uses resource-based pricing: you pay for the vCPUs, memory, and GPUs you use, billed in small time increments. Several discount mechanisms are available, though they can’t be combined:</p><ul><li><strong>Sustained use discounts</strong> apply automatically when you run resources for a large part of the month, and grow with usage.</li><li><strong>Committed use discounts</strong> reward stable, predictable workloads in exchange for a 1- or 3-year commitment.</li><li><strong>Preemptible and Spot VMs</strong> use spare capacity at a steep discount, but Compute Engine can reclaim them at any time. Preemptible VMs have a maximum runtime, while Spot VMs don’t, and neither supports live migration or auto restart.</li><li><strong>Rightsizing recommendations</strong> flag underutilized instances so you can resize them and stop paying for capacity you don’t use.</li></ul><p>For workloads needing extra isolation, <strong>sole-tenant nodes</strong> physically isolate your VMs on dedicated hosts (and let you bring your own licenses), while <strong>Shielded VMs</strong> add Secure Boot, a virtual TPM, and integrity monitoring for verifiable integrity.</p><h3>Images: the starting point for every VM</h3><p>An image contains the boot loader, operating system, file system structure, pre-configured software, and any customizations. You can pick a <strong>public image</strong> (Debian, Ubuntu, CentOS, Windows Server, and more, with some premium images carrying extra license charges) or a <strong>custom image</strong> built from your own VM or imported from on-premises or another cloud.</p><p>For backups and cloning, <strong>machine images</strong> are the most complete option, since they capture configuration, metadata, permissions, and data from one or more disks.</p><h3>Disks: choose your trade-offs</h3><p>Every VM comes with a root persistent disk, and you have a range of options for additional storage:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LquFVaRy8WnyFtOpVc8JhQ.png" /><figcaption>Disk Options</figcaption></figure><p>Persistent disks are network storage that appears as a block device. Because disk and compute are separate, the disk can outlive the VM. They are encrypted by default, and you can optionally manage the keys yourself. You can resize them while they’re running and attached, but you can grow them, never shrink them. They also support snapshots (incremental backups), and can be attached read-only to multiple VMs to share static data. Regional persistent disks replicate synchronously across two zones for high availability.</p><p>Snapshots are handy for more than backups. You can use them to move data to another zone, or to switch from an HDD disk to an SSD for better performance.</p><h3>What a real deployment teaches you</h3><p>Building a practical workload on a VM, such as a game server, an internal app, or a database, brings the concepts above together. These lessons carry over to almost any Compute Engine deployment:</p><ul><li><strong>Separate data from the boot disk.</strong> Put application data on its own SSD persistent disk, then format and mount it. It can be resized, snapshotted, and kept even if the VM is deleted.</li><li><strong>Control access with network tags and firewall rules.</strong> A VM can have a public IP and still receive no traffic until a firewall rule targeting its tag allows the right port.</li><li><strong>Reserve a static external IP</strong> so the address stays stable across stops and restarts.</li><li><strong>Keep services running after you disconnect.</strong> Run the application in a detachable session or as a proper service, so closing your SSH window doesn’t stop it.</li><li><strong>Automate backups.</strong> Schedule regular copies of application data to Cloud Storage, and add lifecycle rules so old backups expire instead of piling up.</li><li><strong>Use metadata scripts for startup and shutdown.</strong> Mounting disks, launching the app, and stopping it cleanly can all be scripted, with the scripts stored in Cloud Storage and reused across instances.</li><li><strong>Apply least privilege.</strong> Grant a VM only the API access scopes it needs, such as storage access for backups.</li></ul><p>Together, these practices cover custom disks, networking, static IPs, Cloud Storage, and metadata scripts, which are the building blocks of nearly any Compute Engine deployment.</p><h3>Key takeaways</h3><ul><li>Compute Engine is IaaS: maximum flexibility, and you manage the OS and scaling.</li><li>Pick a machine family that matches your workload, and use custom types when nothing fits.</li><li>Pricing rewards commitment (sustained and committed use) and flexibility (Spot VMs).</li><li>Persistent disks are durable, resizable (grow only), and snapshot-friendly. Local SSDs and RAM disks are fast but ephemeral.</li><li>Metadata plus startup and shutdown scripts let you automate setup and keep your code reusable across instances.</li></ul><p>Ready to try it yourself? Spin up a small E2 instance, attach a data disk, and start experimenting. The best way to learn cloud infrastructure is to build on it.</p><h3>About the Author</h3><p>Amrita Thakur</p><p>Senior Data Scientist | AI Business Consultant | Project Lead</p><p>I am a Data Scientist with a background in generative AI, natural language processing (NLP), explainable AI (XAI), and time-series analysis, with domain experience spanning healthcare, staffing, and the beverage industry. With expertise in developing scalable and efficient AI solutions, I have tackled practical problems and delivered results in various projects.</p><p>For any inquiries, please feel free to reach me at <a href="/service/mailto:amritathakur2055@gmail.com">amritathakur2055@gmail.com</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db4bb9e30380" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Google Cloud VPC Networking: A Practical Guide]]></title>
            <link>https://medium.com/@amrita.thakur/understanding-google-cloud-vpc-networking-a-practical-guide-be5970d0241b?source=rss-66399411a438------2</link>
            <guid isPermaLink="false">https://medium.com/p/be5970d0241b</guid>
            <category><![CDATA[google-cloud-vpc]]></category>
            <category><![CDATA[vpc-routes]]></category>
            <category><![CDATA[gcp-firewall-rules]]></category>
            <category><![CDATA[gcp-vpc-networking]]></category>
            <category><![CDATA[vpc-subnet]]></category>
            <dc:creator><![CDATA[thakur.amrita]]></dc:creator>
            <pubDate>Fri, 02 Oct 2026 09:59:46 GMT</pubDate>
            <atom:updated>2026-10-02T09:59:46.356Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’re getting started with Google Cloud, networking is one of the first things you need to understand. Virtual Private Cloud (VPC) is the foundation that determines how your resources talk to each other, to other networks, and to the internet. This guide covers the core concepts, from projects and VPC types to IP addressing, DNS, routes, firewalls, and pricing.</p><h3>What Is a Virtual Private Cloud?</h3><p>A Virtual Private Cloud (VPC) provides virtual networking for Google Cloud resources. It brings together three things:</p><ul><li><strong>Networks and subnetworks:</strong> project-level virtual networks, subnets, and IP address mappings.</li><li><strong>Traffic control and security:</strong> routes and firewall rules that steer traffic and secure network boundaries.</li><li><strong>Resource connectivity:</strong> links between Compute Engine VM instances, and communication across different virtual networks.</li></ul><h3>Projects: The Starting Point</h3><p>A <strong>project</strong> is the basic organizational container in Google Cloud. It groups, manages, and isolates resources, and it’s the boundary for enabling service APIs, managing IAM permissions, applying quotas, and tracking billing.</p><p>A project can hold compute, storage, networking, and application services. It can also have multiple VPC networks, with a default quota of <strong>15 VPC networks per project</strong> (you can request an increase).</p><h3>The VPC Network</h3><p>A VPC network is a <strong>global, logically isolated virtual network</strong> inside a project. It defines the overall architecture: regional subnets, IP ranges, routing rules, and firewall policies.</p><p>Key characteristics:</p><ul><li><strong>Global scope:</strong> a VPC network spans all Google Cloud regions.</li><li><strong>No IP range of its own:</strong> IP ranges are defined at the subnet level.</li><li><strong>Regional subnets:</strong> each subnet provides IP addresses to resources in its region.</li><li><strong>Traffic control:</strong> routes and firewall rules govern traffic inside the network and to external endpoints.</li><li><strong>Three network types:</strong> Default, Auto Mode, and Custom Mode.</li></ul><h3>The Three VPC Network Types</h3><h4>1. Default VPC Network</h4><p>Created automatically with every new project. It operates as an Auto Mode network, with a subnet in every region, and comes with pre-populated firewall rules (SSH, RDP, ICMP, and internal cross-subnet traffic) plus a default internet gateway. <strong>Best for:</strong> quick testing and sandboxes.</p><h4>2. Auto Mode VPC Network</h4><p>Automatically creates one subnet in every region, using predefined IPv4 ranges (such as /20 blocks, expandable to /16). It adds a new subnet whenever Google launches a new region, and it can be permanently converted to Custom Mode at any time.</p><h4>3. Custom Mode VPC Network</h4><p>Starts with <strong>zero subnets</strong>. You create subnets only in the regions you need, with explicit, non-overlapping IPv4 CIDR ranges. <strong>Best for:</strong> enterprise production, multi-project topologies, and hybrid connectivity (Cloud VPN, VPC Network Peering), since it helps prevent IP overlaps.</p><h3>Networks Isolate Systems</h3><p>A VPC network is a logical isolation boundary:</p><ul><li>Resources in the <strong>same VPC</strong> can talk over internal IPs, even across regions, as long as firewall rules allow it.</li><li>Resources in <strong>different VPCs</strong> can’t communicate over internal IPs by default, even in the same region. They can communicate via external IPs.</li><li>Traffic between VPCs over external IPs inside Google Cloud <strong>doesn’t traverse the public internet</strong>. It stays on Google’s network and edge infrastructure.</li></ul><h3>Subnets Span Zones</h3><p>Subnets are regional, and a region has multiple zones, so a single subnet can span several zones. Two VMs in different zones can share a subnet and communicate over internal IPs. One firewall rule can also cover VMs across multiple zones if its target conditions match them.</p><h3>Reserved IP Addresses</h3><p>Google Cloud reserves four addresses in each subnet’s primary range:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*UAvfghJ3ZUykS1r6CVhbcA.png" /><figcaption>Reserved IP Addresses</figcaption></figure><p>Everything else can be assigned to resources.</p><h4>Expanding a Subnet</h4><p>You can expand a subnet’s IP range <strong>without downtime</strong>. The new range must not overlap with any existing subnet in the VPC, must be a valid and unique CIDR block, and must fall within valid private ranges where applicable. Plan the expansion around real capacity needs.</p><h4>Avoid Oversized Subnets</h4><p>Unnecessarily large CIDR ranges make IP conflicts more likely with multi-NIC setups, VPC Network Peering, Cloud VPN, and on-premises connections. Start with a size that fits current and reasonably anticipated needs, then expand when necessary.</p><h3>IP Addresses in Google Cloud</h3><p>Each VM can have up to two IP addresses.</p><p><strong>Internal IP:</strong> assigned via DHCP. Every VM gets one, as does any service built on VMs, such as App Engine and Google Kubernetes Engine. When you create a VM, its name is registered with an internal DNS service that maps it to the internal IP. This DNS is scoped to the network, so it resolves VM names within the same network but not across different networks.</p><p><strong>External IP (optional):</strong> needed only if the machine is externally facing. It can be:</p><ul><li><strong>Ephemeral</strong>, assigned from a pool, or</li><li><strong>Static</strong>, a reserved address.</li></ul><p>A few billing and ownership notes:</p><ul><li>A reserved static external IP that isn’t attached to a resource (like a VM or forwarding rule) is charged at a <strong>higher rate</strong> than one in use.</li><li>You can <strong>bring your own public IP prefixes</strong> and advertise them on the internet, if you own a /24 block or larger.</li></ul><h4>How External IPs Are Mapped</h4><p>Whether ephemeral or static, <strong>the VM’s operating system doesn’t know its external IP</strong>. Run ifconfig inside the VM and you&#39;ll see only the internal address. The Google Cloud networking layer handles the mapping:</p><pre>External IP → VPC mapping → Internal IP → VM</pre><p>The VM works with internal addresses, and the VPC handles the translation.</p><h3>DNS Resolution</h3><h4>Internal DNS</h4><p>Compute Engine instances get a hostname (typically the instance name) that resolves to the internal IP. Internal DNS supports zonal and global (project-wide) names, and Google generally recommends <strong>zonal DNS</strong> because it limits the impact of DNS registration issues to individual zones.</p><p>The internal FQDN format is:</p><pre>[hostname].[zone].c.[project-id].internal</pre><p>For example: my-server.us-central1-a.c.guestbook-151617.internal</p><p>Resolution runs through the <strong>metadata server at </strong><strong>169.254.169.254</strong>, configured on the VM via DHCP. It resolves local Google Cloud resources and forwards everything else to Google&#39;s public DNS.</p><p>The big advantage of DNS names is stability. If an instance is deleted and recreated, its internal IP may change. Anything hard-coded to the old IP breaks, but a DNS name always resolves to the current address.</p><h4>External DNS</h4><p>A VM with an external IP can accept outside connections, but <strong>public DNS records aren’t created automatically</strong>. If you want users to reach it by domain name, an administrator must create those records.</p><h4>Cloud DNS</h4><p>Cloud DNS is Google’s managed, authoritative DNS service. It hosts zones and records for apps on Google Cloud or elsewhere, uses Google’s global Anycast network for high availability and low latency, and can be managed through the console, CLI, or APIs, so you don’t have to run your own DNS servers.</p><h4>Alias IP Ranges</h4><p>Alias IP ranges let you assign <strong>additional internal IPs or ranges to a VM’s network interface</strong> without adding more interfaces. They’re useful when one VM hosts several applications that each need their own address. The alias range comes from the subnet’s primary or secondary ranges:</p><pre>Subnet IP range → VM network interface → Primary IP + Alias IP range(s)</pre><h3>Routes and Firewall Rules</h3><h4>Routes</h4><p>A route maps an IP range to a destination. Every network has routes that let instances talk to each other, plus a <strong>default route</strong> for traffic leaving the network. Firewall rules must also allow the packet.</p><p>How routes work:</p><ul><li>A route is created when a network is created (enabling delivery from “anywhere”) and again when a subnet is created (enabling VM-to-VM communication on the same network).</li><li>Routes apply to <strong>egress</strong> traffic, meaning traffic leaving a VM.</li><li>Traffic is forwarded along the <strong>most specific</strong> matching route.</li><li>Traffic is delivered only if it also matches a firewall rule.</li><li>A route applies to an instance if the network and instance tags match. If the network matches and no tags are specified, it applies to <strong>all instances</strong> in that network.</li><li>Compute Engine uses the Routes collection to build individual, read-only routing tables per instance.</li></ul><h4>Firewall Rules</h4><p>The VPC network acts as a <strong>distributed firewall</strong>. Rules are defined at the network level, but connections are allowed or denied at the <strong>instance level</strong>. They’re <strong>stateful</strong>, and the implied defaults are <strong>deny all ingress, allow all egress</strong>.</p><p>A firewall rule is made up of:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/1*vrmZ3Tvf5kYTWv-BX7t2GQ.png" /><figcaption>Firewall rule parameters</figcaption></figure><p>In practice, an <strong>egress</strong> rule is defined by destination CIDR ranges, protocols, and ports, with an allow or deny action. An <strong>ingress</strong> rule works the same way, using source CIDR ranges instead.</p><h3>Pricing Basics</h3><p>Network pricing depends on the type, destination, and volume of traffic, and varies by region. Always check current Google Cloud pricing documentation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*qXlP8GF0o0CyNyhim2n2cA.png" /><figcaption>Traffic</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*vrF_owP4fFrqL03KYyTrGw.png" /><figcaption>External IP Addresses</figcaption></figure><h3>Configuration Notes by Network Mode</h3><h4>Auto Mode Defaults</h4><p>Auto Mode networks come with these firewall rules:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*hQ5P9WTj_QbRZV9z-NU-zw.png" /><figcaption>Auto Mode Defaults</figcaption></figure><p>In short: default-allow-internal permits internal-IP connections between instances anywhere in the same network, default-allow-icmp permits ping, and default-allow-ssh and default-allow-rdp permit remote login to Linux (TCP 22) and Windows (TCP 3389) instances over external or internal IPs.</p><h4>Custom Mode</h4><p>In Custom Mode you create every subnet and range yourself, and nothing is created automatically. The implied deny-all ingress rule applies, so even two instances in the same zone <strong>can’t</strong> talk over internal IPs if they’re in different VPC networks.</p><p>To connect different VPCs over internal IPs, you can use:</p><ul><li><strong>VPC Network Peering:</strong> connects two VPC networks for internal-IP communication.</li><li><strong>Cloud VPN:</strong> encrypted connectivity between VPCs, or between a VPC and an on-premises network.</li></ul><p>Without one of these, instances in separate VPCs stay isolated, though they can still reach each other through external IPs when firewall rules and routing permit.</p><h3>Key Takeaways</h3><ol><li>A <strong>VPC is global</strong>; <strong>subnets are regional</strong> and can span multiple zones.</li><li><strong>Custom Mode</strong> is the production-grade choice; Default and Auto Mode suit testing.</li><li>VMs work with <strong>internal IPs</strong>, and Google’s networking layer handles external-IP mapping.</li><li>Use <strong>DNS names, not IPs</strong>, so your services survive IP changes.</li><li><strong>Routes decide where traffic can go; firewall rules decide whether it’s allowed.</strong></li><li>Keep subnets <strong>right-sized</strong>, and watch egress and unused static IPs on your bill.</li></ol><h3>About the Author</h3><p>Amrita Thakur</p><p>Senior Data Scientist | AI Business Consultant | Project Lead</p><p>I am a Data Scientist with a background in generative AI, natural language processing (NLP), explainable AI (XAI), and time-series analysis, with domain experience spanning healthcare, staffing, and the beverage industry. With expertise in developing scalable and efficient AI solutions, I have tackled practical problems and delivered results in various projects.</p><p>For any inquiries, please feel free to reach me at <a href="/service/mailto:amritathakur2055@gmail.com">amritathakur2055@gmail.com</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=be5970d0241b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A First-Timer’s Guide to AWS SMS Registration: What I Wish I’d Known About 10DLC and Toll-Free]]></title>
            <link>https://medium.com/@amrita.thakur/a-first-timers-guide-to-aws-sms-registration-what-i-wish-i-d-known-about-10dlc-and-toll-free-7d9685b84f03?source=rss-66399411a438------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d9685b84f03</guid>
            <category><![CDATA[10dlc]]></category>
            <category><![CDATA[aws-end-user-messaging]]></category>
            <category><![CDATA[aws-sns]]></category>
            <category><![CDATA[a2p-10dlc]]></category>
            <category><![CDATA[campaign-registration]]></category>
            <dc:creator><![CDATA[thakur.amrita]]></dc:creator>
            <pubDate>Fri, 25 Sep 2026 15:59:47 GMT</pubDate>
            <atom:updated>2026-09-25T15:59:47.878Z</atom:updated>
            <content:encoded><![CDATA[<p>By training I’m a data scientist, and I also lead projects, so I’m used to sitting closer to models and pipelines than to carrier compliance paperwork. When SMS messaging setup landed on my plate, I expected a few days of console clicking. It took weeks, working through <strong>A2P 10DLC</strong> and <strong>toll-free number registration</strong> on AWS.</p><p>This isn’t a complaint post. Honestly, once I understood the shape of it, AWS’s approach made a lot of sense: one account, one BAA covering the whole account, solid documentation once you know where to look. The friction wasn’t a reflection of AWS’s execution; it’s that this is a genuinely unfamiliar process for a first-timer, with a lot of moving parts and very little hand-holding on sequencing. So this is the heads-up I wish I’d had going in — what to expect, what to prepare, and what order to do things in.</p><p><strong>Roughly where the weeks went</strong>, so “budget weeks” isn’t just a vague warning: a good chunk was unavoidable carrier/TCR review time we couldn’t compress no matter what we did. But a real portion, probably close to half , was resubmission cycles caused by fixable mistakes on our side: a supporting link that wasn’t externally accessible, wording that read as bundled consent, a workflow description that accidentally implied an undeclared opt-in method. That second category is exactly what this post is trying to help you skip.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cL5TZ61BkOpcCgfalykXpw.png" /><figcaption>Campaign Registration Journey</figcaption></figure><h3>First: SMS registration is its own project, not a config step</h3><p>If you’re used to spinning up cloud resources, the natural instinct is: request a number, get a number, start sending. SMS in the US doesn’t work that way.</p><p>Carriers throttle unregistered numbers so aggressively that they’re unusable for any real application. This is the industry’s defense against spam. Before you can send anything meaningful, you need to go through a registration process that tells carriers your traffic is legitimate. That process, not the number itself, is the actual project.</p><p><strong>Practical upshot:</strong> budget on the order of weeks for your first registration, and treat it as a real workstream with its own owner, not a side task.</p><h3>Toll-free vs. 10DLC: understand both before picking</h3><p>• <strong>10DLC (10-digit long code)</strong> looks like a normal local number. It requires registering a “Brand” (your company) and a “Campaign” (your use case) with The Campaign Registry (TCR). You cannot get an active, sendable 10DLC number without completing both. There’s no partial or provisional state to send from. Review is thorough, and once fields are submitted, some become locked; changing them later can mean registering a new campaign rather than editing the existing one.</p><p>• <strong>Toll-free numbers</strong> (800/888/877/etc.) go through their own, separate registration, lighter than 10DLC’s Brand/Campaign process, but still a real review with its own verification step.</p><p><strong>Decision guidance:</strong> if you’re under time pressure, apply for a toll-free number first. It’s typically the faster path to a working number. Apply for 10DLC in parallel rather than sequentially, since 10DLC’s review generally takes longer regardless of when you start it.</p><p><strong><em>Note on Short Codes:</em></strong><em> AWS also offers </em><strong><em>Short Codes (5 or 6-digit numbers)</em></strong><em>. These require a rigorous, 12+ week carrier vetting process, but they are uniquely required because </em><strong><em>a dedicated short code is the only SMS channel that allows and supports for routing PHI/HIPAA-compliant health data.</em></strong></p><h3>A quick note on international sending, if your team isn’t US-based</h3><p>Two things worth knowing before you pick a path, if any part of your team or footprint is outside the US:</p><p>• <strong>Toll-free numbers support enabling international sending</strong> to 150+ destination countries as an explicit, opt-in capability on the number.</p><p>• <strong>10DLC is US-only by design. I</strong>t doesn’t have an equivalent international sending option.</p><p>Separately, if your <em>company itself</em> is registered outside the US, 10DLC Brand and Campaign review timelines are officially longer than for US-based companies. It’s worth checking AWS’s current documentation for the specific windows, since they publish this distinction directly.</p><h3>The SMS sandbox is a separate, easy-to-miss gate</h3><p>Even after a number and campaign are fully approved, your AWS account still starts in an <strong>SMS sandbox</strong> — a small spending cap and sending restricted to pre-verified destination numbers, independent of number or campaign approval. I found this out the annoying way: toll-free number approved, 10DLC campaign approved, IAM permissions sorted, and the first real test message still went nowhere. No error, no rejection, just silence, because the account itself hadn’t been cleared to send. It took a few minutes of confused console-clicking before the sandbox banner on the Overview page even registered as the actual blocker.</p><p>To get out of it, you request <strong>production access</strong>, which currently can only be done by opening an AWS Support case (not a self-service console toggle). In our case this took several days up to about a week. It’s worth treating as a rough reference point rather than a guarantee, since it can vary by account history and support tier.</p><p>Two things worth knowing going in:</p><ul><li><strong>You need at least one registered campaign before requesting production access, </strong>so this isn’t something to leave until the very end; it depends on earlier steps being done.</li><li><strong>Request it as early as the dependency allows, in parallel with other steps, </strong>not after everything else is finished, since the review time runs independently of your other registrations.</li></ul><h3>Rejection feedback is often about verifiability, not correctness</h3><p>We were rejected a few times with feedback like these, verbatim, even when confident we’d provided what was asked:</p><p>“Opt-in workflow insufficient consent: Opt-in workflow does not obtain sufficient consent.”</p><p>“Opt-in workflow missing: Opt-in workflow URL or image is missing or inaccessible and could not be verified.”</p><p>The underlying pattern: reviewers (and likely some automated checks) need to be able to <strong>directly access and verify</strong> what you submit. A conceptually correct answer that isn’t independently verifiable can still come back as incomplete.</p><p>Concretely:</p><ul><li><strong>Where you host supporting evidence matters: </strong>A general cloud storage share link and a direct, publicly-hosted file link can behave very differently for a reviewer than they do for you personally. Some links that open fine in your own browser may not be reliably accessible the same way externally. Hosting supporting documents on plain, directly-fetchable URLs is the safer default.</li><li><strong>A login wall doesn’t exempt you from providing a screenshot:</strong> If your actual consent/opt-in screen sits behind authentication (a user has to be signed in before they ever see it), registration still requires a screenshot of that screen, since the reviewer obviously can’t log into your application to see it live. Prepare a hosted, static image of the consent screen as the authenticated user would see it, and link to that directly in your opt-in workflow description.</li></ul><h3><strong>“Insufficient consent” is usually about structure, not wording</strong></h3><p>We also hit an “insufficient consent” rejection despite a thorough consent flow. The real issue was more specific than wording: carriers want to see that SMS opt-in is separable from, not a condition of, your underlying service.</p><p>If your core offering has nothing to do with texting, your registration should explicitly state what happens if someone declines SMS: that they still get full access to the underlying service, unaffected. Don’t just describe the opt-in flow. Describe the decline path too. That’s often the missing piece.</p><h3><strong>Watch for accidental “second opt-in methods” hiding in your own text</strong></h3><p>One rejection cycle traced back to something subtle: our workflow description mentioned that users could text <strong>START</strong> or <strong>JOIN</strong> to re-subscribe after opting out, completely standard, carrier-expected behavior. But because only one formal opt-in type was declared (a digital form), while the text also described keyword-based reactivation, it read as an incompletely described second opt-in method.</p><p><strong><em>Lesson: </em></strong><em>if your text mentions any keyword-based action, state explicitly that it’s re-subscription of existing consent, not a second, independent way to originate consent.</em></p><p>That was the fix that finally cleared it. After rounds of specific, targeted corrections (not guesses, actual fixes tied to actual stated reasons), the campaign came back <strong>approved</strong>, with no further feedback. It’s a strangely quiet moment after weeks of back and forth: no confetti, just a status field that finally says something other than “Requires update.”</p><h3><strong>If you’re a multi-tenant platform, decide your branding model deliberately</strong></h3><p>If your product sends SMS on behalf of multiple downstream customers, there’s a real architectural decision to make early: can each customer appear as its own sender, or does everything go out under one shared brand?</p><p>If a customer’s name appears only as <strong>content inside the message</strong>, with your platform as the consistent registered brand, a single Brand/Campaign is sufficient.</p><p>If you want each customer to appear <strong>as the actual sender</strong>, that’s a different model: an ISV/reseller pattern requiring a separate brand registration per customer.</p><p><strong><em>Lesson: </em></strong><em>default to a single unified brand for as long as it’s accurate to do so; only move to per-customer branding when you have a concrete reason to.</em></p><h3><strong>What your Brand registration and message samples actually need to contain</strong></h3><p>A good amount of back and forth could have been avoided by simply knowing the checklist up front. Broadly, two different things get reviewed, and each has its own required elements:</p><p><strong>Brand registration</strong> (your company/entity):</p><p>• Legal company name, registered business details, and tax ID</p><p>• A live website or app URL representing the brand. Reviewers expect to be able to independently verify the business exists.</p><p>• A valid business contact (email, phone) tied to that entity, not a personal or placeholder address</p><p><strong>Message samples and consent flow</strong> (your actual opt-in screen/form):</p><p>• Brand name clearly stated in both the consent screen and the message samples. A generic “you’re opted in” with no company name attached is a common rejection cause.</p><p>• Two separate, independently checkable boxes where both SMS consent and Terms/Privacy Policy acceptance are involved. Bundling them into a single checkbox reads as non-compliant, even if the language itself is fine.</p><p>• Links to your actual Terms of Service and Privacy Policy, not just a mention that they exist</p><p>• Explicit opt-in language describing what the user is agreeing to receive</p><p>• Explicit opt-out (STOP) and help (HELP) instructions, stated as literal reply keywords, not just described in prose</p><p>• Message frequency disclosure (e.g., “message frequency varies”)</p><p>• “Message and data rates may apply” disclosure</p><p>• Consistent brand name usage across the consent screen, message samples, and every compliance message (opt-in confirmation, STOP confirmation, HELP response). Mismatched naming between these is enough to trigger a rejection on its own.</p><p>None of these are individually complicated, but missing even one, most commonly the separate checkbox requirement or the frequency/rates disclosure, is a frequent, specific rejection cause worth checking off deliberately before your first submission rather than discovering after.</p><p>These are the things worth having ready before you open any form at all: your <strong>company’s official business details</strong> (legal name, registered address, EIN/tax ID, business contact, website/app URL). Registration forms ask for this immediately, and gathering it mid-process is a needless slowdown. Pair that with a general sense of the steps ahead (Brand/Campaign for 10DLC, separate toll-free verification, sandbox to production access as its own step) so nothing catches you by surprise partway through.</p><h3><strong>Why we picked AWS: the BAA angle</strong></h3><p>We looked at other providers before settling here, and for a startup, the deciding factor wasn’t the registration process itself. It was <strong>HIPAA compliance economics</strong>. For HIPAA compliance, you need a signed BAA (Business Associate Agreement) with whichever provider is sending your messages. On the provider we evaluated first, getting BAA coverage came with its own separate requirements layered on top of standard registration, including a meaningful cost commitment.</p><p>With AWS, our core infrastructure was already deployed there, under an existing BAA. The relevant detail: <strong>that same BAA extended to cover the SMS/messaging service</strong>, at no additional cost. No separate negotiation, no added fee, no extra commitment tied specifically to messaging.</p><p><strong>If you’re a startup on a constrained budget and HIPAA relevance is part of your picture</strong>, check whether your existing (or planned) cloud BAA already extends to messaging before assuming you need a separate compliance track for SMS. It can remove a real cost line before you even start.</p><h3><strong>If I were starting over</strong></h3><ul><li>Get your company/business details and a written opt-in workflow description ready before starting any form. Run it against the brand and message-sample checklist above so nothing’s missing on first submission.</li><li>Register at least one campaign as early as possible, since production access depends on it. Then file the production access support case right away, expecting several days to a week for a response.</li><li>Apply for toll-free first if you’re under time pressure; apply for 10DLC in parallel rather than waiting.</li><li>Request production access and request/register your phone number in parallel, not sequentially. Production access only depends on having a registered campaign, not on already having a phone number or sender ID, so there’s no need to wait for one before starting the other.</li><li>Host any supporting documents on a plainly, directly accessible URL.</li><li>In your workflow description, explicitly state what happens if a user declines SMS, not just the happy path.</li><li>If any part of your team or footprint is international, check current documentation on toll-free vs. 10DLC international support and registration timelines before choosing.</li><li>If multi-tenant, consciously choose single-brand vs. per-customer branding rather than backing into it.</li><li>If HIPAA relevance is part of your picture, check whether your existing or planned cloud BAA already extends to messaging before assuming a separate compliance track is needed.</li></ul><h3><strong>The takeaway</strong></h3><p>None of this required deep telecom expertise going in. It required patience, careful reading of feedback, and treating “can this be verified externally” as a distinct question from “is this correct.” AWS’s underlying setup (one BAA covering the whole messaging service, solid documentation, a real production support path) is genuinely well thought out for teams that need this. The gap is mostly on the first-timer’s side: knowing what to prepare, what order to do things in, and what to expect along the way. Hopefully this gives you that heads-up before you start, rather than partway through.</p><h3><strong>References</strong></h3><p>AWS End User Messaging SMS, 10DLC registration process and timelines: <a href="https://docs.aws.amazon.com/sms-voice/latest/userguide/registrations-10dlc.html">https://docs.aws.amazon.com/sms-voice/latest/userguide/registrations-10dlc.html</a></p><p>10DLC Registration Best Practices to Send SMS with AWS End User Messaging (AWS blog): <a href="https://aws.amazon.com/blogs/messaging-and-targeting/10dlc-registration-best-practices-to-send-sms-with-amazon-pinpoint/">https://aws.amazon.com/blogs/messaging-and-targeting/10dlc-registration-best-practices-to-send-sms-with-amazon-pinpoint/</a></p><p>10DLC brand registration form: <a href="https://docs.aws.amazon.com/pinpoint/latest/userguide/settings-sms-10dlc-register-company.html">https://docs.aws.amazon.com/pinpoint/latest/userguide/settings-sms-10dlc-register-company.html</a></p><p>How to Build a Compliant SMS Opt-In Process With AWS End User Messaging (AWS blog): <a href="https://aws.amazon.com/blogs/messaging-and-targeting/">https://aws.amazon.com/blogs/messaging-and-targeting/</a></p><p>AWS End User Messaging now supports international sending for US toll-free numbers: <a href="https://aws.amazon.com/about-aws/whats-new/2025/08/aws-end-user-messaging-international-sending-toll-free">https://aws.amazon.com/about-aws/whats-new/2025/08/aws-end-user-messaging-international-sending-toll-free</a></p><p>A Guide to Sending International SMS with US Toll-Free Numbers and AWS End User Messaging: <a href="https://aws.amazon.com/blogs/messaging-and-targeting/a-guide-to-sending-international-sms-with-us-toll-free-numbers-and-aws-end-user-messaging/">https://aws.amazon.com/blogs/messaging-and-targeting/a-guide-to-sending-international-sms-with-us-toll-free-numbers-and-aws-end-user-messaging/</a></p><p>Document history for the AWS End User Messaging SMS User Guide (confirms 10DLC is US-only vs. toll-free’s international capability): <a href="https://docs.aws.amazon.com/sms-voice/latest/userguide/doc-history.html">https://docs.aws.amazon.com/sms-voice/latest/userguide/doc-history.html</a></p><p>SMS Onboarding for SaaS, ISV, and Multi-Tenant Applications with AWS End User Messaging: <a href="https://aws.amazon.com/blogs/messaging-and-targeting/sms-onboarding-for-saas-isv-and-multi-tenant-applications-with-aws-end-user-messaging/">https://aws.amazon.com/blogs/messaging-and-targeting/sms-onboarding-for-saas-isv-and-multi-tenant-applications-with-aws-end-user-messaging/</a></p><p>ISV and multi-brand registration compliance (AWS docs): <a href="https://docs.aws.amazon.com/sms-voice/latest/userguide/rcs-compliance-isv.html">https://docs.aws.amazon.com/sms-voice/latest/userguide/rcs-compliance-isv.html</a></p><h3>About the Author</h3><p>Amrita Thakur</p><p>Senior Data Scientist | AI Business Consultant | Project Lead</p><p>I am a Data Scientist with a background in generative AI, natural language processing (NLP), explainable AI (XAI), and time-series analysis, with domain experience spanning healthcare, staffing, and the beverage industry. With expertise in developing scalable and efficient AI solutions, I have tackled practical problems and delivered results in various projects.</p><p>For any inquiries, please feel free to reach me at <a href="/service/mailto:amritathakur2055@gmail.com">amritathakur2055@gmail.com</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d9685b84f03" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Transcription and Diarization: Comparing Google’s Gemini and Speech-to-Text API]]></title>
            <link>https://medium.com/@amrita.thakur/transcription-and-diarization-comparing-googles-gemini-and-speech-to-text-api-24eaef043558?source=rss-66399411a438------2</link>
            <guid isPermaLink="false">https://medium.com/p/24eaef043558</guid>
            <category><![CDATA[google-speech-to-text]]></category>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[gemini-2-5-flash]]></category>
            <category><![CDATA[openai-whisper]]></category>
            <category><![CDATA[google-gemini]]></category>
            <dc:creator><![CDATA[thakur.amrita]]></dc:creator>
            <pubDate>Thu, 02 Oct 2025 19:35:32 GMT</pubDate>
            <atom:updated>2025-10-02T19:35:32.212Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction to Google Speech-to-Text models</h3><p>Google’s Speech-to-Text service is powered by advanced AI, highlighted by the introduction of Chirp, a Universal Speech Model (USM). Chirp represents a significant evolution in speech recognition, built with over 2 billion parameters and trained using self-supervised learning on millions of hours of audio and billions of text sentences across more than 100 languages. This approach allows a single, unified model to achieve high accuracy for many languages, including those that are under-resourced, a key step in Google’s “thousand language initiative.” Unlike traditional methods that rely heavily on language-specific supervised data, Chirp’s encoder is trained on vast amounts of unlabeled audio data and then fine-tuned for transcription with smaller, supervised datasets.</p><h3>Introduction to Google Gemini models</h3><p>Google Gemini is a family of advanced, multimodal artificial intelligence models designed to seamlessly understand and reason across a wide range of information formats. Built from the ground up with this versatility in mind, Gemini can natively process and combine text, code, images, audio, and video, allowing it to tackle complex tasks that require understanding nuanced, multi-layered information. Available in various sizes, such as the powerful Pro models and the fast and efficient Flash model, Gemini is engineered to scale from vast data center applications to on-device tasks.</p><p>For implementation details, please refer to the official Google blogs linked below. This article focuses on comparing the two models.</p><p><a href="https://cloud.google.com/speech-to-text/docs/best-practices-provide-speech-data"><em>Best practices to send data to the Google’s Speech-to-Text API</em></a></p><p><a href="https://cloud.google.com/speech-to-text/docs/transcription-model"><em>Select a transcription model</em></a></p><p><em>Based on my experience, for optimal speech-to-text accuracy, provide clean, multi-channel, lossless FLAC audio with a sample rate of at least 16kHz, and pair it with a precise API request that specifies the correct language, a specialized model, and phrase hints for context.</em></p><p>The results below are based on tests conducted on three separate audio samples.</p><h3>Live-Transcription using Google’s Speech-to-Text Model</h3><p><a href="https://cloud.google.com/speech-to-text/docs/transcribe-streaming-audio#perform_streaming_speech_recognition_on_an_audio_stream"><em>Perform streaming speech recognition on an audio stream</em></a></p><p>So, how well does the live transcription work in practice? Following are the transcripts generated from those audios:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x98Ve-R4hm6X5GX7lequwQ.png" /><figcaption>1st audio</figcaption></figure><p>Analysis: This transcript suffers from a complete lack of formatting (no punctuation or capitalization) and speaker separation, making it a single, unreadable block of text. It also contains a critical accuracy error, mistaking the name <strong>“Tom”</strong> for <strong>“tongue”</strong>, which confuses the meaning of the doctor’s observation. It’s impossible to tell who is speaking without prior knowledge of the conversation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EZmNzQjSuSwif5mjp3rdKg.png" /><figcaption>2nd audio</figcaption></figure><p><strong>Analysis:</strong> This output is even more problematic. In addition to having no formatting or speaker diarization, it merges distinct lines from different speakers into a continuous, confusing narrative. The most significant error is transcribing the patient’s name <strong>“Mary”</strong> as <strong>“married”</strong>, which completely changes the context of the doctor’s greeting. The lack of speaker separation makes the flow of questions and answers impossible to follow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*uzUhyGs0by_iUDGUfa1Hcw.png" /><figcaption>3rd audio</figcaption></figure><p><strong>Analysis:</strong> While the word-for-word accuracy in this sample is higher than in the previous two, the fundamental issues remain. The transcript is a single, unpunctuated block of text with no indication of when the speaker changes. Without speaker diarization, it is difficult to determine that three different people (Care Coordinator, Doctor, and Patient) are speaking.</p><h3>Transcription and Speaker Diarization using Google’s Speech-to-Text Model</h3><p><a href="https://cloud.google.com/speech-to-text/v2/docs/multiple-voices#speech_transcribe_diarization_beta-python"><em>Detect different speakers in an audio recording</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QtLzV07XhT9Po2xFVyTZ7w.png" /><figcaption>1st audio</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9fiqR4NVX3g0iFyzTX2Yxw.png" /><figcaption>2nd audio</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/1*LB8Tu_xMggDiwL3wLPT8CQ.png" /><figcaption>3rd audio</figcaption></figure><h3>Transcription and Speaker Diarization using Google’s Gemini Model</h3><p><a href="https://cloud.google.com/blog/topics/partners/how-partners-unlock-scalable-audio-transcription-with-gemini/"><em>Audio Transcription with Gemini</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*Yhoiwkt-hxgJsw_Ba0goWw.png" /><figcaption>1st audio</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iAZKPUcTt7vHA-V_XP2ZXg.png" /><figcaption>2nd audio</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*PYUzUszoPgEpinCTCmCyrQ.png" /><figcaption>3rd audio</figcaption></figure><h3>Comparison</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XEnrw1wexFm07Xo5uusRzw.png" /><figcaption>1st audio</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-xgpDkh5Lj_kZZ0KAsQMpA.png" /><figcaption>2nd audio</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2-JggdFZkmCiJRAxqcOClw.png" /><figcaption>3rd audio</figcaption></figure><h3>Conclusion</h3><p>While Google SST successfully captures the majority of the words spoken, its failure to handle speaker diarization, formatting, and critical keywords makes its raw live output unreliable. It would require a significant amount of manual post-processing to correct the speaker labels, add punctuation, and fix transcription errors, defeating the purpose of an automated live transcription system.</p><p>In summary, while Gemini can produce a near-production-ready transcript that may only require minor review for speaker labels, the output from Google SST represents raw, unrefined data. The Google SST transcripts require extensive manual correction in speaker attribution, punctuation, and accuracy checking before they can be considered usable. For any practical application, Gemini’s model provides a far more accurate, reliable, and efficient solution.</p><p><em>While OpenAI’s Whisper is another capable model for transcription and diarization, this analysis focuses on the Gemini suite due to its profound cost advantage. With Gemini 2.5 Flash priced at approximately $0.00002 per minute compared to Whisper’s $0.006 per minute, Gemini clearly stands out as the more effective and scalable solution.</em></p><h3>About the Author</h3><p>Amrita Thakur</p><p><strong>Data Scientist/ Databricks certified Machine Learning Professional</strong></p><p>I am a Data Scientist with a strong background in generative AI, natural language processing (NLP), explainable AI (XAI), and time-series analysis, particularly in healthcare and the soft beverage domain. With expertise in developing scalable and efficient machine learning solutions, I have successfully tackled complex problems and delivered impactful results in various projects.</p><p>For any inquiries, please feel free to reach me at <a href="/service/mailto:amritathakur2055@gmail.com">amritathakur2055@gmail.com</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=24eaef043558" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Evaluating a Question-Answering LLM Model Using mlflow.evaluate()]]></title>
            <link>https://medium.com/@amrita.thakur/evaluating-a-question-answering-llm-model-using-mlflow-evaluate-529aa8ce9500?source=rss-66399411a438------2</link>
            <guid isPermaLink="false">https://medium.com/p/529aa8ce9500</guid>
            <category><![CDATA[llm-evaluation]]></category>
            <category><![CDATA[llm-evaluation-metrics]]></category>
            <category><![CDATA[mlflow]]></category>
            <category><![CDATA[gen-ai-evaluation]]></category>
            <category><![CDATA[mlflow-evaluation]]></category>
            <dc:creator><![CDATA[thakur.amrita]]></dc:creator>
            <pubDate>Thu, 11 Sep 2025 04:40:17 GMT</pubDate>
            <atom:updated>2025-09-11T04:40:17.154Z</atom:updated>
            <content:encoded><![CDATA[<p>Evaluating <strong>Question-Answering (QA) models</strong> requires more than checking whether the answer is correct — it also involves <strong>measuring exactness, clarity, and safety of responses</strong>.<br> MLflow provides a unified API, <strong>mlflow.evaluate()</strong>, to streamline this process by computing <strong>standard metrics, readability scores, and safety checks</strong>.</p><p>This blog explores how to use mlflow.evaluate() for QA tasks, with an example from the <strong>finance domain</strong>.</p><h3>What is mlflow.evaluate()?</h3><p>The mlflow.evaluate() function allows you to evaluate models on a dataset, automatically calculating <strong>task-specific metrics</strong> and logging results as MLflow artifacts.</p><p>When <strong>model_type=&quot;question-answering&quot;</strong>, MLflow uses built-in evaluators to assess QA performance.</p><h3>Default Evaluator Logs for QA</h3><h3>Metrics</h3><ul><li><strong>Exact Match (EM)</strong> → Percentage of predictions that exactly match the reference answer.</li><li><strong>Toxicity</strong> (requires evaluate, torch, transformers) → Safety of generated answers.</li><li><strong>ARI Grade Level</strong> (requires textstat) → Approximate grade level required to understand the answer.</li><li><strong>Flesch-Kincaid Grade Level</strong> (requires textstat) → Readability of the response.</li></ul><h3>Artifacts</h3><p>JSON file containing:</p><ul><li>Input questions</li><li>Model outputs (predicted answers)</li><li>Reference answers</li><li>Per-sample evaluation metrics</li></ul><h3>Key Parameters</h3><ul><li><strong>model_type</strong><br> For QA evaluation:</li></ul><pre>model_type=&quot;question-answering&quot;</pre><p><strong>targets</strong><br> Ground-truth answers.</p><ul><li>If data is a list/NumPy array → pass list of answers.</li><li>If data is a DataFrame → pass column name with answers.</li><li>If data is an mlflow.data.dataset.Dataset → may be optional.</li></ul><h3>Evaluation Metrics Explained</h3><h3>1. Exact Match (EM)</h3><p>Measures how often the model’s prediction <strong>matches the reference answer exactly</strong>.</p><ul><li>EM = 1.0 → Perfect match.</li><li>EM = 0.0 → Completely different.</li></ul><p>In QA, <strong>partial correctness isn’t captured by EM</strong>, so readability and toxicity become equally important.</p><h3>2. Toxicity</h3><p>Ensures generated answers do not contain offensive or harmful language.</p><p>Range: <strong>0.0–1.0</strong></p><ul><li>&lt;0.2 → Safe</li><li>0.3–0.5 → Mildly toxic</li><li>0.7 → Unsafe</li></ul><h3>3. Readability</h3><ul><li><strong>ARI (Automated Readability Index)</strong> → Grade level required.</li><li><strong>Flesch-Kincaid Grade Level</strong> → Grade level based on sentence complexity.</li></ul><p>Useful for ensuring QA systems provide answers tailored to their audience (e.g., <strong>analysts vs. general investors</strong>).</p><h3>Example: Evaluating a QA Model (Finance)</h3><p>Let’s walk through a practical example in the <strong>finance domain</strong>.</p><pre>import mlflow<br>import pandas as pd<br><br># Example finance QA dataset<br>questions = [&quot;What was the company’s revenue in Q2?&quot;]<br>ground_truth = [&quot;$25.3B&quot;]<br>predicted_answers = [&quot;$25B&quot;]<br><br>mlflow.set_experiment(&quot;QA_Evaluation&quot;)<br><br>with mlflow.start_run():<br>    data = pd.DataFrame({<br>        &quot;question&quot;: questions,<br>        &quot;ground_truth&quot;: ground_truth,<br>        &quot;predicted&quot;: predicted_answers<br>    })<br><br>    # Evaluate QA model<br>    results = mlflow.evaluate(<br>        data=data,<br>        targets=&quot;ground_truth&quot;,<br>        predictions=&quot;predicted&quot;,<br>        model_type=&quot;question-answering&quot;<br>    )<br><br>print(results.metrics)</pre><h3><strong>Example Output</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*qEL5FODwgOLIZ_M3XfraKw.png" /></figure><h3>Explanation of Output</h3><ul><li><strong>Exact Match = 0.0</strong> → Prediction ($25B) didn’t exactly match reference ($25.3B).</li><li><strong>Toxicity = 0.02</strong> → Safe response.</li><li><strong>Readability (Grade 8–9)</strong> → Clear enough for a general investor audience.</li></ul><p>Even though the <strong>semantic meaning is close</strong>, EM penalizes strict mismatch. This highlights why <strong>readability and safety</strong> also matter.</p><h3>Conclusion</h3><p>Using <strong>mlflow.evaluate()</strong> for QA models provides:</p><ul><li>Standardized evaluation (Exact Match, readability, toxicity).</li><li>Artifact tracking for per-sample analysis.</li><li>Extensibility via <strong>domain-specific metrics</strong>.</li></ul><p>The finance example demonstrates how this works in practice, but the approach generalizes across other domains too.</p><p><em>References:</em></p><p><a href="https://mlflow.org/docs/2.9.0/model-evaluation/index.html">MLflow Evaluation | MLflow</a></p><h3>About the Author</h3><p>Amrita Thakur</p><p><strong>Data Scientist/ Databricks certified Machine Learning Professional</strong></p><p>I am a Data Scientist with a strong background in generative AI, natural language processing (NLP), explainable AI (XAI), and time-series analysis, particularly in healthcare and the soft beverage domain. With expertise in developing scalable and efficient machine learning solutions, I have successfully tackled complex problems and delivered impactful results in various projects.</p><p>For any inquiries, please feel free to reach me at <a href="/service/mailto:amritathakur2055@gmail.com">amritathakur2055@gmail.com</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=529aa8ce9500" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Evaluating a Text-Summarization Model Using mlflow.evaluate()]]></title>
            <link>https://medium.com/@amrita.thakur/evaluating-a-text-summarization-model-using-mlflow-evaluate-048b0fcc9bc7?source=rss-66399411a438------2</link>
            <guid isPermaLink="false">https://medium.com/p/048b0fcc9bc7</guid>
            <category><![CDATA[llm-evaluation-metrics]]></category>
            <category><![CDATA[gen-ai-evaluation]]></category>
            <category><![CDATA[mlflow]]></category>
            <category><![CDATA[llm-evaluation]]></category>
            <dc:creator><![CDATA[thakur.amrita]]></dc:creator>
            <pubDate>Sat, 06 Sep 2025 16:38:58 GMT</pubDate>
            <atom:updated>2025-09-06T16:38:58.736Z</atom:updated>
            <content:encoded><![CDATA[<p>Evaluating machine learning models is a critical step before deploying them in production. For <strong>text summarization models</strong>, evaluation goes beyond accuracy — it also involves readability, factual correctness, and safety.<br> MLflow provides a convenient API, <strong>mlflow.evaluate()</strong>, to automatically log metrics and artifacts for different model types, including <strong>text-summarization</strong>.</p><h3>What is mlflow.evaluate()?</h3><p>mlflow.evaluate() allows you to evaluate models on datasets using predefined evaluators. For <strong>summarization tasks</strong>, it automatically computes and logs key metrics such as <strong>ROUGE scores, toxicity, and readability</strong>, while also allowing you to add <strong>custom domain-specific metrics</strong>.</p><p>This makes it easier to compare models, track progress, and decide which model is best suited for deployment.</p><h3>Default Evaluator Logs for Text Summarization</h3><h3>Metrics</h3><ul><li><strong>Token Count</strong>: Number of tokens in the generated summary.</li><li><strong>ROUGE</strong> (requires evaluate, nltk, and rouge_score installed)</li><li><strong>Toxicity</strong> (requires evaluate, torch, transformers)</li><li><strong>ARI Grade Level</strong> (requires textstat)</li><li><strong>Flesch-Kincaid Grade Level</strong> (requires textstat)</li></ul><h3>Artifacts</h3><p>JSON file containing:</p><ul><li>Model inputs</li><li>Model outputs (summaries)</li><li>Targets (reference summaries, if provided)</li><li>Per-row evaluation metrics</li></ul><h3>Key Parameters</h3><ul><li><strong>model_type</strong></li></ul><p>Specifies the type of model being evaluated.<br> For summarization:</p><pre>model_type=&quot;text-summarization&quot;</pre><ul><li><strong>targets</strong></li></ul><p>Reference summaries to compare against.</p><ul><li>If data is a list/NumPy array → pass list of references.</li><li>If data is a DataFrame → pass column name with references.</li><li>If data is an mlflow.data.dataset.Dataset → targets may be optional.</li></ul><h3>Evaluation Metrics Explained</h3><h3>1. ROUGE (Recall-Oriented Understudy for Gisting Evaluation)</h3><p>Measures overlap between generated and reference summaries.</p><ul><li><strong>ROUGE-1</strong> → Unigram (word-level) overlap</li><li><strong>ROUGE-2</strong> → Bigram (phrase-level) overlap</li><li><strong>ROUGE-L</strong> → Longest common subsequence</li><li><strong>ROUGE-W / ROUGE-S / ROUGE-SU</strong> → Variants for weighted/skip bigrams</li></ul><p><strong>Interpretation Example:</strong></p><ul><li>ROUGE-1 = 0.75 → 75% of words overlap with reference.</li><li>ROUGE-2 = 0.50 → 50% of bigrams overlap.</li></ul><h3>2. Toxicity Score</h3><p>Measures whether the summary contains toxic or offensive content.</p><ul><li>Range: <strong>0.0–1.0</strong></li><li>0.0–0.2 → Safe</li><li>0.3–0.5 → Slightly toxic</li><li>0.7 → Highly toxic (unacceptable)</li></ul><h3>3. Readability Metrics</h3><ul><li><strong>ARI (Automated Readability Index)</strong> → Predicts grade level required to understand text.</li><li><strong>Flesch-Kincaid Grade Level</strong> → Converts readability into U.S. grade level.</li></ul><p>Useful for ensuring summaries are <strong>clear, professional, and appropriate</strong>.</p><h3>Example: Evaluating a Summarization Model</h3><p>Let’s evaluate a summarization model with <strong>finance text as an example</strong>:</p><pre>import mlflow<br>import pandas as pd<br><br># Example data: finance transcript with ground truth summary<br>transcript = &quot;In Q2, the company reported $25.3B in revenue, up 7% YoY. Net income was $6.1B.&quot;<br>ground_truth_summary = &quot;The company’s Q2 revenue was $25.3B with net income of $6.1B.&quot;<br>generated_summary = &quot;Revenue in Q2 was $25B and profit stood at $6.1B.&quot;<br><br>mlflow.set_experiment(&quot;Summarization Evaluation&quot;)<br><br>with mlflow.start_run():<br>    # Create DataFrame<br>    data = pd.DataFrame({<br>        &quot;transcript&quot;: [transcript],<br>        &quot;ground_truth&quot;: [ground_truth_summary],<br>        &quot;generated_summary&quot;: [generated_summary]<br>    })<br><br>    # Evaluate<br>    results = mlflow.evaluate(<br>        data=data,<br>        targets=&quot;ground_truth&quot;,<br>        predictions=&quot;generated_summary&quot;,<br>        model_type=&quot;text-summarization&quot;<br>    )<br><br>print(results.metrics)</pre><h3><strong>Example Output</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*hR5O2ijIfdq0IvWP0p1Nmw.png" /></figure><h3>Explanation of Output</h3><ul><li><strong>ROUGE Scores</strong> → Generated summary captured most content (ROUGE-1 = 0.81).</li><li><strong>Toxicity</strong> → Very low, safe for business use.</li><li><strong>Readability (FK = 12.3, ARI = 15.3)</strong> → Requires ~grade 12–15 reading level → suitable for financial analysts.</li></ul><h3>Domain-Specific Custom Metrics (Optional)</h3><p>While MLflow provides general-purpose metrics, you can add <strong>custom ones for your domain</strong>.<br>For example, in <strong>finance</strong>:</p><ul><li><strong>Numeric Consistency</strong> → Check if numbers (e.g., revenue, EPS) are preserved correctly.</li><li><strong>Financial Term Coverage</strong> → Ensure key terms like <em>revenue, net income, guidance</em> appear.</li><li><strong>Conciseness Ratio</strong> → Ensure summary is ≤ 25% of transcript length.</li></ul><p>These can be logged alongside MLflow defaults for a more <strong>robust evaluation</strong>.</p><h3>Conclusion</h3><p>Using <strong>mlflow.evaluate()</strong> for text summarization provides:</p><ul><li><strong>Standardized metrics</strong> (ROUGE, readability, toxicity).</li><li><strong>Artifacts</strong> for detailed per-row analysis.</li><li><strong>Extensibility</strong> through custom metrics for specific domains.</li></ul><p>This makes it easier to <strong>compare models, ensure quality, and build trust</strong> before deployment.<br> The finance example above shows how to apply this in practice, but the approach is generalizable to any domain.</p><h3>About the Author</h3><p>Amrita Thakur</p><p><strong>Data Scientist/ Databricks certified Machine Learning Professional</strong></p><p>I am a Data Scientist with a strong background in generative AI, natural language processing (NLP), explainable AI (XAI), and time-series analysis, particularly in healthcare and the soft beverage domain. With expertise in developing scalable and efficient machine learning solutions, I have successfully tackled complex problems and delivered impactful results in various projects.</p><p>For any inquiries, please feel free to reach me at <a href="/service/mailto:amritathakur2055@gmail.com">amritathakur2055@gmail.com</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=048b0fcc9bc7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An Overview to RAG Implementation]]></title>
            <link>https://medium.com/@amrita.thakur/an-overview-to-rag-implementation-087922354351?source=rss-66399411a438------2</link>
            <guid isPermaLink="false">https://medium.com/p/087922354351</guid>
            <category><![CDATA[retrieval-augmented-gen]]></category>
            <category><![CDATA[raptor]]></category>
            <category><![CDATA[langchain]]></category>
            <category><![CDATA[chatbots]]></category>
            <category><![CDATA[vector-search]]></category>
            <dc:creator><![CDATA[thakur.amrita]]></dc:creator>
            <pubDate>Sat, 25 Jan 2025 15:46:06 GMT</pubDate>
            <atom:updated>2025-01-25T15:46:06.951Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Retrieval Augmented Generation (RAG)</strong></p><ul><li>Is a pattern that can improve the efficacy of large language model(LLM) applications by leveraging custom data.</li><li>Is done by retrieving data/documents relevant to a question or task and providing them as context to augment the prompts to an LLM to improve generation.</li></ul><p><strong>Benefits</strong></p><ul><li>Up-to-date and accurate responses.</li><li>Reducing inaccurate responses, or hallucinations</li></ul><p><strong>RAG Overflow</strong></p><ol><li><strong>Index &amp; Embed</strong>: An embedding model used for creating vector representation of the documents and user queries.</li><li><strong>Vector Store</strong>: Specialized to store unstructured data indexed by vectors.</li><li><strong>Retrieval</strong>: Search stored vectors using similarity search to efficiently retrieve relevant information.</li><li><strong>Filtering &amp; Reranking</strong>: The process of selecting or ranking retrieved documents before passing as context. Filtering can be pre-, in-, post- query.</li><li><strong>Prompt Augmentation</strong>: Prompt engineering workflow to enhance context via injection of data retrieved from Vector Store.</li><li><strong>Generation</strong>: A large language model used for generating a response for the user’s request.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/0*qyTP9OJW0HVWA2KX" /></figure><p><strong>Why is Data Prep Important for RAG?<br></strong><em>Potential issues when data is prepared improperly</em></p><ul><li><strong>Poor quality model output</strong>: If data is inaccurate, incomplete, or biased, the RAG system is more likely to produce misleading or incorrect responses.</li><li><strong>“Lost in the middle”</strong>: In long context, LLMs tend to overlook the documents placed in the middle.</li><li><strong>Inefficient retrieval</strong>: Poorly prepared data would decrease the accuracy and precision of retrieving relevant information from the knowledge base.</li><li><strong>Exposing data</strong>: Poor data governance could lead to exposing data during the retrieval process.</li><li><strong>Wrong embedding model</strong>: Wrong embedding model would decrease the quality of embeddings and retrieval accuracy.</li></ul><p><strong>Document Extraction and Chunking</strong></p><ol><li>Split documents into chunks.</li><li>Embed the chunk with a model.</li><li>Store them in a vector store.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/0*dESNlI0JmF0Z_mES" /></figure><p><strong>How to chunk data?</strong></p><p><strong>Context-aware Chunking</strong>:</p><ul><li>Chunk by sentence/paragraph/section</li><li>Leverage special punctuation (i.e., ., \n)</li><li>Include/Inject metadata/tags/title(s)</li></ul><p><strong>Fixed-size Chunking</strong>:</p><ul><li>Divide by a specific number of tokens</li><li>Simple and computationally cheap method</li></ul><p>Please refer to these blogs for detailed understanding about chunking:<br><a href="https://medium.com/@amrita.thakur/how-to-set-the-chunk-size-in-document-splitter-a-guide-to-optimizing-text-chunking-for-embeddings-be7b4a2e53d3"><em>How to set the chunk size?</em></a><em> <br></em><a href="https://medium.com/@amrita.thakur/how-to-properly-split-text-chunks-with-recursivecharactertextsplitter-in-langchain-7dd81c599cf4"><em>How to split text chunks?</em></a></p><p><strong>Advanced Chunking Strategy</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8kPLhfgriCSyJ9An" /></figure><p>Please refer to this blog for detailed understanding about RAPTOR:</p><p><a href="https://medium.com/@amrita.thakur/raptor-recursive-abstractive-processing-for-tree-organized-retrieval-3a3e1f71ef79"><em>RAPTOR: Recursive Abstractive Processing for Tree-Organized Retrieval</em></a></p><p><strong>What are Vector Databases?</strong></p><ul><li>A vector database is a database that is optimized to store and retrieve high-dimensional vectors such as embeddings.</li><li>In RAG architecture, contextual information is stored in vectors.</li><li>Vector databases are designed for efficient storage of vectors utilized in generative AI applications, which rely on identifying documents or images with similarities.</li><li>Vector databases provide a query interface that retrieves vectors most similar to a specified query vector.</li></ul><p><strong>Why use Vector Databases?</strong></p><ul><li>Handles unstructured data</li><li>Query time and</li><li>Scalability</li></ul><p><strong>Common Use Cases</strong></p><ul><li>RAG</li><li>Recommendation Engines</li><li>Similarity Search</li></ul><h3><strong>Frameworks</strong></h3><h4><strong>LangChain</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/0*hB1k260iagtF-8Jz" /></figure><p>Hands-On Project on RAG Implementation can be found <a href="https://github.com/amrita-thakur/mental-healthcare-chatbot">here</a>.</p><h3>About the Author</h3><p>Amrita Thakur</p><p><strong>Data Scientist/ Databricks certified Machine Learning Professional</strong></p><p>I am a Data Scientist with a strong background in generative AI, natural language processing (NLP), explainable AI (XAI), and time-series analysis, particularly in healthcare and the soft beverage domain. With expertise in developing scalable and efficient machine learning solutions, I have successfully tackled complex problems and delivered impactful results in various projects.</p><p>For any inquiries, please feel free to reach me at <a href="/service/mailto:amritathakur2055@gmail.com">amritathakur2055@gmail.com</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=087922354351" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Essentials of Prompt Engineering]]></title>
            <link>https://medium.com/@amrita.thakur/the-essentials-of-prompt-engineering-038250c62316?source=rss-66399411a438------2</link>
            <guid isPermaLink="false">https://medium.com/p/038250c62316</guid>
            <category><![CDATA[prompt]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[prompt-engineering]]></category>
            <dc:creator><![CDATA[thakur.amrita]]></dc:creator>
            <pubDate>Thu, 23 Jan 2025 15:43:31 GMT</pubDate>
            <atom:updated>2025-01-23T15:43:31.012Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Prompt</strong>: An AI prompt is an input or query given to a large language model to elicit a specific response or output.</p><p><strong>Prompt Engineering</strong>: Prompt engineering is the practice of designing and refining prompts to optimize the responses generated by AI models.</p><p><strong>Prompt Components</strong></p><p>A good prompt usually consists of:</p><ul><li><strong>Instruction</strong>: A clear directive that specifies what the model should do.</li><li><strong>Context</strong>: Background/additional information that provides the necessary details to understand the task.</li><li><strong>Input/question</strong>: The specific query or data that the model needs to process.</li><li><strong>Output type/forma</strong>t: The desired structure or style of the response generated by the model.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/260/1*XXJHrzp_BKSZPuZDiz_G6A.png" /></figure><p><strong>Example:</strong></p><p><strong><em>Summarize the following passage and write a list of top 3 key takeaways in bullet point format that address the question:</em></strong></p><p><strong><em>“How does urbanization impact bird populations in metropolitan areas?”</em></strong></p><p><strong><em>Passage:<br></em></strong><em>&lt;The passage describes how urban development affects the habitats, behaviors, and survival rates of bird species in large cities.&gt;</em></p><p><strong>Zero-shot Prompting</strong></p><ul><li>Prompt that generates text or performs a task without providing examples or additional training specific to that task.</li></ul><p><strong>Example:</strong></p><p><strong><em>Classify the following mail into one of the categories: Spam, Informative, or Personal.</em></strong></p><p><strong><em>Mail:</em></strong><em> “Don’t miss out on our biggest sale of the year! Visit our website for amazing deals.”<br></em><strong><em>Category:</em></strong><em> …</em></p><p><strong>Few-shot Prompting</strong></p><ul><li>Prompt provides a few input-output examples to guide the model for generating the desired output.</li></ul><p><strong>Example:</strong></p><p><strong><em>Classify the following email into one of the categories: Spam, Informative, or Personal.</em></strong></p><p><strong><em>Examples:</em></strong></p><ol><li><strong><em>Email:</em></strong><em> “Earn money fast! Click this link to learn more.”<br></em><strong><em>Category:</em></strong><em> Spam</em></li><li><strong><em>Email:</em></strong><em> “Breaking: Scientists discover a new species in the Amazon rainforest.”<br></em><strong><em>Category:</em></strong><em> Informative</em></li><li><strong><em>Email:</em></strong><em> “I just tried that new restaurant downtown, and it was amazing! Let’s plan a visit.”<br></em><strong><em>Category:</em></strong><em> Personal</em></li></ol><p><strong><em>Now classify this email:<br>Email:</em></strong><em> “Don’t miss out on our biggest sale of the year! Visit our website for amazing deals.”<br></em><strong><em>Category:</em></strong><em> …</em></p><p><strong>Prompting Chaining</strong></p><ul><li>Break tasks into subtasks</li><li>Multiple tasks are linked together, with the output of one prompt serving as the input for the next.</li><li>This method allows for more complex tasks to be broken down into manageable steps.</li></ul><p><strong>Example</strong></p><p><strong><em>Step 1: Extract important facts from a document</em></strong></p><p><strong><em>Prompt:<br></em></strong><em>“You are a helpful assistant. Your task is to extract key facts related to the benefits of solar energy from the provided document. Please output the list of facts in bullet point format. If no relevant facts are found, respond with ‘No relevant facts found.’</em></p><p><strong><em>Document:<br></em></strong><em>‘Solar energy is a renewable energy source that reduces greenhouse gas emissions. It can lower electricity bills and requires minimal maintenance compared to traditional energy sources.’</em></p><p><strong><em>Output:</em></strong></p><ul><li><em>Solar energy is a renewable energy source.</em></li><li><em>Reduces greenhouse gas emissions.</em></li><li><em>Lowers electricity bills.</em></li><li><em>Requires minimal maintenance.</em></li></ul><p><strong><em>Step 2: Summarize the key benefits</em></strong></p><p><strong><em>Prompt:<br></em></strong><em>“Based on the key facts provided below, write a concise summary of the main benefits of solar energy in one or two sentences.</em></p><p><strong><em>Key Facts:</em></strong></p><ul><li><em>Solar energy is a renewable energy source.</em></li><li><em>Reduces greenhouse gas emissions.</em></li><li><em>Lowers electricity bills.</em></li><li><em>Requires minimal maintenance.</em></li></ul><p><strong><em>Output:<br></em></strong><em>“Solar energy is an eco-friendly and cost-effective renewable energy source that lowers electricity bills, reduces greenhouse gas emissions, and requires minimal upkeep.”</em></p><p><strong>Chain-of-Thought Prompting</strong></p><ul><li>“Let’s think step-by-step”</li></ul><p><strong>Example:</strong></p><p><strong><em>Prompt:</em></strong></p><p><em>A bakery sells 12 muffins in one box for $18. If a customer buys 3 boxes, how much will the customer pay in total?</em></p><p><strong><em>Answer:</em></strong></p><ul><li><em>Each box contains 12 muffins and costs $18.</em></li><li><em>The customer buys 3 boxes.</em></li><li><em>To find the total cost, multiply the price of one box by the number of boxes: 18×3=54.</em></li></ul><p><em>Therefore, the customer will pay </em><strong><em>$54</em></strong><em> in total.</em></p><p><strong>Prompt Engineering Tips and Tricks</strong></p><p><strong>Tip: Prompts are model-specific</strong></p><p><strong>Tip: Format prompts</strong></p><p><strong>Use clear delimiters</strong> to separate instructions from the context. Examples include:</p><ul><li>Hash signs: ###</li><li>Backticks: ```</li><li>Braces or brackets: { } / [ ]</li><li>Dashes: — -</li></ul><p><strong>Request structured output</strong> for clarity:</p><p>Formats like <strong>HTML</strong>, <strong>JSON</strong>, <strong>tables</strong>, or <strong>markdown</strong> work well.</p><p><strong>Example:</strong></p><p><strong><em>### Instruction ###<br></em></strong><em>Extract the date and event name mentioned in the context below. Return the output as a JSON object formatted like:<br>{“Event”: “Independence Day”, “Date”: “July 4, 1776”}</em></p><p><strong><em>### Context ###<br></em></strong><em>“The United States celebrates its Independence Day every year on July 4th to mark the adoption of the Declaration of Independence in 1776.”</em></p><p><strong>Tip: Guide the Model for Better Responses</strong></p><ul><li><strong>Ask the model not to make things up/hallucinate<br></strong>Example:<br><em>“If you don’t know the answer, say ‘I don’t have enough information to provide a response.’”</em></li><li><strong>Ask the model not to make assumptions or seek sensitive data<br></strong>Example:<br><em>“Do not make guesses about someone’s age or ethnicity.”<br>“Avoid requesting confidential details like credit card numbers.”</em></li><li><strong>Ask the model to proceed thoughtfully and not rush (Chain-of-Thought for reasoning)<br></strong>Example:<br><em>“Explain how you arrived at this conclusion step by step.”<br>“First summarize the passage in 50 words, then outline its key arguments in bullet points.”</em></li></ul><p><strong>Benefits</strong></p><ul><li><strong>Fast and Efficient</strong>: Produces results quickly with minimal effort.</li><li><strong>Consistent Output</strong>: Delivers reliable results that meet predefined standards of accuracy.</li><li><strong>Tailored Responses</strong>: Can be tailored to meet specific needs or preferences.</li></ul><p><strong>Limitations</strong></p><ul><li><strong>Model Dependency</strong>: The quality of the output relies heavily on the model used.</li><li><strong>Knowledge Constraints</strong>: Limited by pre-trained model’s internal knowledge. For external knowledge,we need to use RAG (Retrieval-Augmented Generation).</li></ul><h3>About the Author</h3><p>Amrita Thakur</p><p><strong>Data Scientist/ Databricks certified Machine Learning Professional</strong></p><p>I am a Data Scientist with a strong background in generative AI, natural language processing (NLP), explainable AI (XAI), and time-series analysis, particularly in healthcare and the soft beverage domain. With expertise in developing scalable and efficient machine learning solutions, I have successfully tackled complex problems and delivered impactful results in various projects.</p><p>For any inquiries, please feel free to reach me at <a href="/service/mailto:amritathakur2055@gmail.com">amritathakur2055@gmail.com</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=038250c62316" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding FAISS Vector Store and its Advantages]]></title>
            <link>https://medium.com/@amrita.thakur/understanding-faiss-vector-store-and-its-advantages-cdc7b54afe47?source=rss-66399411a438------2</link>
            <guid isPermaLink="false">https://medium.com/p/cdc7b54afe47</guid>
            <category><![CDATA[vector-search]]></category>
            <category><![CDATA[langchain]]></category>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[faiss]]></category>
            <category><![CDATA[vector-database]]></category>
            <dc:creator><![CDATA[thakur.amrita]]></dc:creator>
            <pubDate>Sat, 14 Dec 2024 17:24:09 GMT</pubDate>
            <atom:updated>2024-12-14T17:24:09.738Z</atom:updated>
            <content:encoded><![CDATA[<p>In the age of information retrieval and natural language processing, efficient document search is critical. <strong>FAISS (Facebook AI Similarity Search)</strong> is a library designed to perform similarity search and clustering of dense vectors at scale. When coupled with embeddings from language models, FAISS enables fast, scalable, and efficient document retrieval.</p><p>This blog explores two ways of saving FAISS vector stores locally, highlighting their advantages for building robust search systems.</p><h3>Why Use FAISS Vector Store?</h3><ol><li><strong>Efficient Similarity Search: </strong>FAISS uses optimized algorithms to compute similarity between vectors, enabling lightning-fast search operations even for large datasets.</li><li><strong>Scalability: </strong>FAISS is designed to handle datasets with millions (or even billions) of vectors, making it ideal for enterprise-grade solutions.</li><li><strong>Local Persistence: </strong>Saving the vector store locally ensures the embeddings are reusable without regenerating them, saving computation time and cost.</li><li><strong>Compatibility with ML Workflows: </strong>FAISS integrates seamlessly with embeddings generated from models like Hugging Face’s sentence-transformers, supporting workflows in NLP and information retrieval.</li></ol><h3><strong>Approach 1: Saving the FAISS Vector Store as a File</strong></h3><p>This approach involves serializing the FAISS vector store into a file (faiss_vectorstore.pkl) using Python&#39;s pickle module.</p><h4>Steps:</h4><ol><li><strong>Load and Split Documents:</strong> Use RecursiveCharacterTextSplitter to divide documents into chunks for embedding generation.</li><li><strong>Generate Embeddings and Save:</strong> Use a transformer model (e.g., sentence-transformers/all-MiniLM-L6-v2) to generate embeddings and create a FAISS vector store. Serialize the vector store using pickle.</li></ol><pre>def save_to_faiss(document_chunks, vectorstore_filename=&quot;faiss_vectorstore.pkl&quot;):<br>    embeddings = HuggingFaceEmbeddings(model_name=&quot;sentence-transformers/all-MiniLM-L6-v2&quot;, model_kwargs={&#39;device&#39;: &quot;cpu&quot;})<br>    vectorstore_contents = FAISS.from_documents(document_chunks, embeddings)<br><br>    with open(vectorstore_filename, &quot;wb&quot;) as f:<br>        pickle.dump(vectorstore_contents, f)<br><br>def load_faiss_vector_store(vectorstore_filename=&quot;faiss_vectorstore.pkl&quot;):<br>    with open(vectorstore_filename, &quot;rb&quot;) as f:<br>        vector_store = pickle.load(f)<br>    retriever = vector_store.as_retriever()<br><br>    return retriever</pre><h4>Advantages:</h4><ul><li><strong>Compact Storage:</strong> A single file can store the entire vector database.</li><li><strong>Portability:</strong> Easily share the file across different environments or systems.</li></ul><h3>Approach 2: Saving the FAISS Vector Store as a Directory</h3><p>This method stores the FAISS vector database in a directory structure, preserving metadata and index files.</p><h4>Steps:</h4><ol><li><strong>Generate Embeddings and Save:</strong> Use a transformer model (e.g., BAAI/bge-small-en-v1.5) to create embeddings and save the vector store using FAISS&#39;s save_local method.</li><li><strong>Load from Directory:</strong> Load the vector store using FAISS’s load_local method.</li></ol><pre>def save_to_faiss(document_chunks, db_path=&quot;faiss_db&quot;):<br>    if os.path.exists(db_path):<br>        shutil.rmtree(db_path)<br>    embeddings = HuggingFaceEmbeddings(model_name=&quot;BAAI/bge-small-en-v1.5&quot;, model_kwargs={&#39;device&#39;: &quot;cpu&quot;})<br>    faiss_vector_database = FAISS.from_documents(document_chunks, embeddings)<br>    faiss_vector_database.save_local(db_path)<br><br>def load_faiss_vector_store(db_directory_path=&quot;faiss_db&quot;):<br>    embeddings = HuggingFaceEmbeddings(model_name=&quot;sentence-transformers/all-MiniLM-L6-v2&quot;, model_kwargs={&#39;device&#39;: &quot;cpu&quot;})<br>    vector_store = FAISS.load_local(db_directory_path, embeddings, allow_dangerous_deserialization=True)<br>    retriever = vector_store.as_retriever()<br><br>    return retriever</pre><h4>Advantages:</h4><ul><li><strong>Scalability:</strong> Suitable for larger databases that require hierarchical storage.</li><li><strong>Flexibility:</strong> Directory-based structure can store additional metadata alongside vectors.</li></ul><h3>When to Use Each Approach?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/905/1*4yDjua8uFeQKoPtKVK5Ixg.png" /></figure><h3>Key Takeaways</h3><ol><li><strong>Time Efficiency:</strong> FAISS enables you to avoid regenerating embeddings by saving and reloading vector stores.</li><li><strong>Flexibility in Retrieval:</strong> Supports document search, Q&amp;A systems, and conversational AI applications.</li><li><strong>Storage Versatility:</strong> Choose between file-based and directory-based saving mechanisms based on your needs.</li></ol><h3>Conclusion</h3><p>FAISS is a powerful tool for building efficient and scalable similarity search systems, making it an invaluable asset for NLP pipelines and document retrieval applications. By saving FAISS vector stores locally, either as a compact file or a structured directory, you can significantly enhance the reusability and performance of your models while reducing computational overhead. The choice between pickle-based and directory-based storage methods depends on your specific use case, with each offering unique advantages for different scales of data. With FAISS, you can unlock the potential for fast and accurate document search, transforming the way information is accessed and utilized in modern AI applications.</p><p>The complete implementation code can be found <a href="https://github.com/amrita-thakur/langchain/blob/main/FAISS_Vector_Store.ipynb">here</a>.</p><h3>About the Author</h3><p>Amrita Thakur</p><p><strong>Data Scientist/ Databricks certified Machine Learning Professional</strong></p><p>I am a Data Scientist with a strong background in generative AI, natural language processing (NLP), explainable AI (XAI), and time-series analysis, particularly in healthcare and the soft beverage domain. With expertise in developing scalable and efficient machine learning solutions, I have successfully tackled complex problems and delivered impactful results in various projects.</p><p>For any inquiries, please feel free to reach me at <a href="/service/mailto:amritathakur2055@gmail.com">amritathakur2055@gmail.com</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cdc7b54afe47" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[RAPTOR: Recursive Abstractive Processing for Tree-Organized Retrieval]]></title>
            <link>https://medium.com/@amrita.thakur/raptor-recursive-abstractive-processing-for-tree-organized-retrieval-3a3e1f71ef79?source=rss-66399411a438------2</link>
            <guid isPermaLink="false">https://medium.com/p/3a3e1f71ef79</guid>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[vector-database-for-ai]]></category>
            <category><![CDATA[generative-ai-use-cases]]></category>
            <category><![CDATA[document-processing]]></category>
            <category><![CDATA[retrieval-augmented-gen]]></category>
            <dc:creator><![CDATA[thakur.amrita]]></dc:creator>
            <pubDate>Sat, 14 Dec 2024 16:55:46 GMT</pubDate>
            <atom:updated>2024-12-14T16:55:46.545Z</atom:updated>
            <content:encoded><![CDATA[<p>RAPTOR, or <strong>Recursive Abstractive Processing for Tree-Organized Retrieval</strong>, is a framework designed to process and retrieve data in a hierarchical, tree-structured manner. It combines modern embedding techniques, dimensionality reduction, clustering, and abstractive summarization to handle large-scale, unstructured text data effectively.</p><p>This blog introduces RAPTOR’s core concepts, detailed code implementations, and use cases to provide a clear understanding of how to apply it in real-world scenarios.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v-ZPZg0GF9sdYZObET8CJg.png" /><figcaption><strong>Tree construction process:</strong> RAPTOR recursively clusters chunks of text based on their vector embeddings and generates text summaries of those clusters, constructing a tree from the bottom up. Nodes clustered together are siblings; a parent node contains the text summary of that cluster.</figcaption></figure><h3>Core Concepts of RAPTOR</h3><ul><li><strong>Hierarchical Organization</strong>: RAPTOR leverages tree-based structures to organize and store information hierarchically. Nodes in the tree represent discrete units of information, and their relationships encode context and dependencies.</li><li><strong>Recursive Abstractive Processing</strong>: Unlike extractive approaches, RAPTOR employs recursive abstractive summarization. This process condenses information at each level of the hierarchy, ensuring that parent nodes represent a concise summary of their child nodes. This abstraction minimizes redundancy while preserving context.</li><li><strong>Efficient Retrieval</strong>: RAPTOR’s retrieval system employs a <strong>collapsed tree retrieval method</strong>, which flattens hierarchical structures for faster query processing. By embedding queries and node representations in a semantic space, RAPTOR identifies the most relevant information using similarity computations, improving both precision and recall.</li></ul><h3><strong>Core Components of RAPTOR</strong></h3><ol><li><strong>Embedding Text Data</strong></li></ol><p>Embeddings transform text data into dense vector representations in a semantic space. Use embedding model of your choice to generate these embeddings.</p><pre>from langchain_huggingface import HuggingFaceEmbeddings<br><br>embeddings = HuggingFaceEmbeddings(model_name=&quot;BAAI/bge-small-en-v1.5&quot;, model_kwargs={&#39;device&#39;:&quot;cpu&quot;})<br><br>def embed(texts):<br>    &quot;&quot;&quot;<br>    Generate embeddings for a list of text documents.<br>    &quot;&quot;&quot;<br>    text_embeddings = embeddings.embed_documents(texts)<br><br>    return np.array(text_embeddings)</pre><p>The embed function processes text data into embeddings using the HuggingFace model. These embeddings serve as inputs for downstream tasks like clustering and summarization.</p><p><strong>2. Clustering for Hierarchical Organization</strong></p><p>RAPTOR applies clustering at both global and local levels to organize data hierarchically. It uses UMAP for dimensionality reduction and Gaussian Mixture Models (GMM) for probabilistic clustering.</p><p><strong>Global Clustering</strong></p><pre>def global_cluster_embeddings(embeddings: np.ndarray, dim: int, metric: str = &quot;cosine&quot;) -&gt; np.ndarray:<br>    &quot;&quot;&quot;<br>    Perform global dimensionality reduction on embeddings using UMAP.<br>    &quot;&quot;&quot;<br><br>    return umap.UMAP(n_components=dim, metric=metric).fit_transform(embeddings)</pre><p><strong>Local Clustering</strong></p><pre>def local_cluster_embeddings(embeddings: np.ndarray, dim: int, num_neighbors: int = 10, metric: str = &quot;cosine&quot;) -&gt; np.ndarray:<br>    &quot;&quot;&quot;<br>    Perform local dimensionality reduction on the embeddings using UMAP.<br>    &quot;&quot;&quot;<br><br>    return umap.UMAP(n_neighbors=num_neighbors, n_components=dim, metric=metric).fit_transform(embeddings)</pre><p><strong>Cluster Optimization</strong></p><pre>def get_optimal_clusters(embeddings: np.ndarray, max_clusters: int = 50) -&gt; int:<br>    &quot;&quot;&quot;<br>    Determine the optimal number of clusters using BIC with a Gaussian Mixture Model.<br>    &quot;&quot;&quot;<br>    bics = []<br>    n_clusters = np.arange(1, max_clusters)<br>    for n in n_clusters:<br>        gm = GaussianMixture(n_components=n).fit(embeddings)<br>        bics.append(gm.bic(embeddings))<br><br>    return n_clusters[np.argmin(bics)]</pre><ul><li>Global clustering reduces dimensionality, making high-dimensional embeddings computationally feasible.</li><li>Local clustering refines groups within global clusters.</li><li>Optimal clusters are determined using BIC to balance model complexity and data fit.</li></ul><p><strong>3. Recursive Clustering</strong></p><p>Recursive clustering combines global and local levels to create a tree-structured hierarchy. Each cluster is processed further until an appropriate granularity is reached.</p><pre>def perform_clustering(embeddings: np.ndarray, dim: int, threshold: float) -&gt; List[np.ndarray]:<br>    &quot;&quot;&quot;<br>    Perform recursive clustering by combining global and local clustering techniques.<br>    &quot;&quot;&quot;<br>    reduced_embeddings_global = global_cluster_embeddings(embeddings, dim)<br>    global_clusters, n_global_clusters = GMM_cluster(reduced_embeddings_global, threshold)<br><br>    all_local_clusters = []<br>    for cluster_id in range(n_global_clusters):<br>        local_embeddings = embeddings[np.array([cluster_id in gc for gc in global_clusters])]<br>        if len(local_embeddings) &gt; dim + 1:<br>            local_reduced = local_cluster_embeddings(local_embeddings, dim)<br>            local_clusters, _ = GMM_cluster(local_reduced, threshold)<br>            all_local_clusters.extend(local_clusters)<br><br>    return all_local_clusters</pre><p>This function applies recursive clustering, allowing RAPTOR to explore each cluster in depth, forming a hierarchical organization.</p><p><strong>4. Summarizing Clustered Data</strong></p><p>After clustering, RAPTOR summarizes the contents of each cluster to provide insights at various levels.</p><pre>def embed_cluster_summarize_texts(texts: List[str], level: int) -&gt; Tuple[pd.DataFrame, pd.DataFrame]:<br>    &quot;&quot;&quot;<br>    Embeds, clusters, and summarizes a list of texts.<br>    &quot;&quot;&quot;<br>    text_embeddings_np = embed(texts)<br>    cluster_labels = perform_clustering(text_embeddings_np, dim=10, threshold=0.1)<br><br>    # Create a DataFrame with texts and clusters<br>    df_clusters = pd.DataFrame({<br>        &quot;text&quot;: texts,<br>        &quot;cluster&quot;: cluster_labels<br>    })<br><br>    # Summarize each cluster<br>    df_summary = df_clusters.groupby(&quot;cluster&quot;)[&quot;text&quot;].apply(lambda x: &quot; &quot;.join(x)).reset_index()<br>    <br>return df_clusters, df_summary</pre><p>The embed_cluster_summarize_texts function generates embeddings, clusters them, and produces a summary for each cluster.</p><p><strong>Workflow of RAPTOR</strong></p><ol><li><strong>Load and Preprocess Data</strong>: Load PDF documents using the DirectoryLoader and convert them to text.</li><li><strong>Generate Embeddings</strong>: Use a HuggingFace embedding model to transform text into numerical vectors.</li><li><strong>Perform Clustering</strong>: Apply UMAP and GMM for global and local clustering to create a hierarchical structure.</li><li><strong>Summarize Clusters</strong>: Abstractive summarization is applied to cluster data for insights.</li></ol><h3>Conclusion</h3><p>RAPTOR, through its recursive abstractive processing and tree-organized retrieval, offers a robust solution for hierarchical data management. Its modularity and scalability make it ideal for applications in document retrieval, summarization, and knowledge management.</p><p>The complete implementation code can be found <a href="https://github.com/amrita-thakur/langchain/blob/main/RAPTOR.ipynb">here</a>.</p><h3>References</h3><p><a href="https://arxiv.org/pdf/2401.18059">RAPTOR</a> research paper.</p><h3>About the Author</h3><p>Amrita Thakur</p><p><strong>Data Scientist/ Databricks certified Machine Learning Professional</strong></p><p>I am a Data Scientist with a strong background in generative AI, natural language processing (NLP), explainable AI (XAI), and time-series analysis, particularly in healthcare and the soft beverage domain. With expertise in developing scalable and efficient machine learning solutions, I have successfully tackled complex problems and delivered impactful results in various projects.</p><p>For any inquiries, please feel free to reach me at <a href="/service/mailto:amritathakur2055@gmail.com">amritathakur2055@gmail.com</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3a3e1f71ef79" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>