<?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:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[Sonal]]></title><description><![CDATA[Sonal]]></description><link>https://sonalsingh01.substack.com</link><image><url>https://substackcdn.com/image/fetch/$s_!S-Pb!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f4e6707-6c5e-425e-8cad-d9435bbb61d8_480x480.png</url><title>Sonal</title><link>https://sonalsingh01.substack.com</link></image><generator>Substack</generator><lastBuildDate>Sat, 18 Jul 2026 10:35:00 GMT</lastBuildDate><atom:link href="https://sonalsingh01.substack.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Sonal]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[sonalsingh01@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[sonalsingh01@substack.com]]></itunes:email><itunes:name><![CDATA[Sonal]]></itunes:name></itunes:owner><itunes:author><![CDATA[Sonal]]></itunes:author><googleplay:owner><![CDATA[sonalsingh01@substack.com]]></googleplay:owner><googleplay:email><![CDATA[sonalsingh01@substack.com]]></googleplay:email><googleplay:author><![CDATA[Sonal]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Why Transformers Changed Everything]]></title><description><![CDATA[The architecture decision that quietly created the entire generative AI category]]></description><link>https://sonalsingh01.substack.com/p/why-transformers-changed-everything</link><guid isPermaLink="false">https://sonalsingh01.substack.com/p/why-transformers-changed-everything</guid><dc:creator><![CDATA[Sonal]]></dc:creator><pubDate>Mon, 13 Jul 2026 19:35:25 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!8_D6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F695957c5-ec8a-4646-92a8-2ed4ba051152_817x682.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>Attention Is All You Need</h2><p>Before transformers, language models were built on recurrent neural networks (RNNs) and their more capable variant, LSTMs. Both processed text the way a person reads word by word, left to right, carrying a compressed summary of everything read so far into the next step. That sequential design created two compounding problems: it was slow, because each word had to wait for the previous one to finish processing, and it was forgetful, the further back a piece of context sat, the harder it was for the model to retain it, since everything upstream had to survive being repeatedly compressed and passed forward.</p><p>Practically, this meant a model translating a long paragraph or answering a question about something mentioned early in a document would routinely lose the thread. This wasn&#8217;t a training data problem, it was a structural limit of the architecture itself.</p><h2>The paper, and the announcement</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8_D6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F695957c5-ec8a-4646-92a8-2ed4ba051152_817x682.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8_D6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F695957c5-ec8a-4646-92a8-2ed4ba051152_817x682.png 424w, https://substackcdn.com/image/fetch/$s_!8_D6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F695957c5-ec8a-4646-92a8-2ed4ba051152_817x682.png 848w, https://substackcdn.com/image/fetch/$s_!8_D6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F695957c5-ec8a-4646-92a8-2ed4ba051152_817x682.png 1272w, https://substackcdn.com/image/fetch/$s_!8_D6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F695957c5-ec8a-4646-92a8-2ed4ba051152_817x682.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8_D6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F695957c5-ec8a-4646-92a8-2ed4ba051152_817x682.png" width="817" height="682" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/695957c5-ec8a-4646-92a8-2ed4ba051152_817x682.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:682,&quot;width&quot;:817,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:90234,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://sonalsingh01.substack.com/i/206898737?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F041e83fe-5dd7-41b8-b294-3355d60fe23e_817x720.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8_D6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F695957c5-ec8a-4646-92a8-2ed4ba051152_817x682.png 424w, https://substackcdn.com/image/fetch/$s_!8_D6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F695957c5-ec8a-4646-92a8-2ed4ba051152_817x682.png 848w, https://substackcdn.com/image/fetch/$s_!8_D6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F695957c5-ec8a-4646-92a8-2ed4ba051152_817x682.png 1272w, https://substackcdn.com/image/fetch/$s_!8_D6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F695957c5-ec8a-4646-92a8-2ed4ba051152_817x682.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>In June 2017, eight researchers at Google, published &#8220;Attention Is All You Need,&#8221; introducing the Transformer architecture. The core move was to drop recurrence entirely and replace it with self-attention: instead of processing words in sequence, the model looks at the entire input at once and directly computes how relevant every word is to every other word, regardless of distance. Google&#8217;s own research blog post announcing the work, &#8220;Transformer: A Novel Neural Network Architecture for Language Understanding,&#8221; published by co-author Jakob Uszkoreit two months later, framed the practical win plainly: on top of better translation quality, the architecture needed less computation to train and was a far better fit for parallel hardware like GPUs and TPUs, cutting training time by up to an order of magnitude.</p><p>That parallelizability is the underrated part of the story. It&#8217;s not just that transformers understood language better, it&#8217;s that they could be trained at a scale RNNs never could, because you could throw more hardware at the problem and actually get a proportional speedup. That&#8217;s the direct reason &#8220;just add more data and compute&#8221; became a viable scaling strategy after 2017, and it&#8217;s the foundation the entire LLM era was built on.</p><h2>Encoder vs. decoder</h2><p>The Transformer paper describes two halves, an encoder, which builds a rich representation of the input, and a decoder, which generates output based on that representation. Different labs then took the architecture in different directions:</p><ul><li><p><strong>BERT</strong> (Google, 2018) uses only the encoder half. It&#8217;s built to <em>understand</em> text deeply, good for classification, search relevance, and extracting meaning from existing text but it doesn&#8217;t generate new text.</p></li><li><p><strong>GPT</strong> and its lineage use only the decoder half, trained to predict the next token given everything before it. That&#8217;s what makes it a generation engine.</p></li></ul><p>Knowing this distinction is a fast way to evaluate a vendor pitch: if a tool claims to be great at &#8220;understanding intent&#8221; versus &#8220;generating content,&#8221; the underlying architecture family is often a tell for which job it was actually built for.</p><h2>Where this connects to a live problem: the context window</h2><p>Context window is expensive, and it&#8217;s the direct legacy of solving one bottleneck (sequential processing) while creating another. A transformer processes everything in its context window at once, but every additional token in that window increases compute cost, and the model&#8217;s accuracy at recalling and reasoning over information doesn&#8217;t stay flat as the window fills, it degrades. Anthropic&#8217;s own engineering team calls this &#8220;context rot&#8221;: as token count increases, a model&#8217;s ability to accurately retrieve and reason over everything in that window gets worse, even though the window technically still &#8220;contains&#8221; the information.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PUuP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fea16a9dd-0d09-4c40-9d65-49e0d7568e00_882x852.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PUuP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fea16a9dd-0d09-4c40-9d65-49e0d7568e00_882x852.png 424w, https://substackcdn.com/image/fetch/$s_!PUuP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fea16a9dd-0d09-4c40-9d65-49e0d7568e00_882x852.png 848w, https://substackcdn.com/image/fetch/$s_!PUuP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fea16a9dd-0d09-4c40-9d65-49e0d7568e00_882x852.png 1272w, https://substackcdn.com/image/fetch/$s_!PUuP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fea16a9dd-0d09-4c40-9d65-49e0d7568e00_882x852.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PUuP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fea16a9dd-0d09-4c40-9d65-49e0d7568e00_882x852.png" width="882" height="852" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ea16a9dd-0d09-4c40-9d65-49e0d7568e00_882x852.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:852,&quot;width&quot;:882,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:130997,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://sonalsingh01.substack.com/i/206898737?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fea16a9dd-0d09-4c40-9d65-49e0d7568e00_882x852.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!PUuP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fea16a9dd-0d09-4c40-9d65-49e0d7568e00_882x852.png 424w, https://substackcdn.com/image/fetch/$s_!PUuP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fea16a9dd-0d09-4c40-9d65-49e0d7568e00_882x852.png 848w, https://substackcdn.com/image/fetch/$s_!PUuP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fea16a9dd-0d09-4c40-9d65-49e0d7568e00_882x852.png 1272w, https://substackcdn.com/image/fetch/$s_!PUuP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fea16a9dd-0d09-4c40-9d65-49e0d7568e00_882x852.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>This is exactly the problem &#8220;<strong>agent harnesses</strong>&#8221; exist to solve. Anthropic&#8217;s published pattern for long-running coding agents splits the work across two roles: an initializer agent sets up the environment and writes structured tests once, then hands off to a second agent that makes incremental progress across multiple separate context windows, using git commits and a persisted feature list as the state that survives when the context resets, instead of trying to cram an entire multi-hour task into one window. Anthropic also documented a concrete, very PM-relevant failure mode they called &#8220;context anxiety&#8221;: Claude Sonnet 4.5 would wrap up tasks prematurely because it sensed its context limit approaching, so the harness had to add explicit context resets to compensate and when the same harness was later run on a more capable model, that behavior had disappeared and the workaround became dead weight. </p><p>The generalizable takeaway: a transformer&#8217;s context window is not free memory. Every agentic product decision, what gets kept in context, what gets summarized to a file and reloaded later, what gets handed to a fresh sub-agent with a narrower scope is a product tradeoff between cost, latency, and accuracy, not a solved infrastructure detail.</p><h2>What to take into your next agentic product conversation</h2><p>Ask what&#8217;s actually being kept in the active context window versus what&#8217;s being retrieved on demand (RAG) versus what&#8217;s being summarized and reloaded. Those are three different cost and accuracy tradeoffs, and a team that hasn&#8217;t made that decision explicitly is usually the same team that will discover the &#8220;context rot&#8221; problem in production instead of in design.</p><p><span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Shailesh Sharma&quot;,&quot;id&quot;:12258899,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c416730c-8136-46fd-b28e-2fc0e292a42c_756x756.png&quot;,&quot;uuid&quot;:&quot;8b2fa0f2-4027-4b97-be51-d8f4939427ed&quot;}" data-component-name="MentionToDOM"></span> <span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Apoorva Mittal&quot;,&quot;id&quot;:2427084,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/605d943b-b6b8-4f00-a4fc-6b94a14fbbd0_1066x1600.jpeg&quot;,&quot;uuid&quot;:&quot;1854f947-741d-40c6-ab38-20bafff1991f&quot;}" data-component-name="MentionToDOM"></span> </p><h3>Sources</h3><ul><li><p>Vaswani, A. et al. (2017). <em>Attention Is All You Need.</em> arXiv:1706.03762, presented at NeurIPS 2017. <a href="https://arxiv.org/abs/1706.03762">arxiv.org/abs/1706.03762</a></p></li><li><p>Uszkoreit, J. (2017, Aug 31). <em>Transformer: A Novel Neural Network Architecture for Language Understanding.</em> Google Research Blog. <a href="https://research.google/blog/transformer-a-novel-neural-network-architecture-for-language-understanding/">research.google/blog</a></p></li><li><p>Anthropic (2025). <em>Effective context engineering for AI agents.</em> Anthropic Engineering Blog. <a href="https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents">anthropic.com/engineering/effective-context-engineering-for-ai-agents</a></p></li><li><p>Anthropic. <em>Scaling Managed Agents: Decoupling the brain from the hands</em> <a href="https://www.anthropic.com/engineering/managed-agents">anthropic.com/engineering/managed-agents</a></p></li></ul><h3></h3>]]></content:encoded></item><item><title><![CDATA[Beyond Traditional ML: Solving Complex Problems with Deep Learning]]></title><description><![CDATA[A framework for knowing when the model needs a human to name the pattern and when it doesn't.]]></description><link>https://sonalsingh01.substack.com/p/beyond-traditional-ml-solving-complex</link><guid isPermaLink="false">https://sonalsingh01.substack.com/p/beyond-traditional-ml-solving-complex</guid><dc:creator><![CDATA[Sonal]]></dc:creator><pubDate>Mon, 13 Jul 2026 19:27:10 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!fD_2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78b05279-8b74-4574-88a6-9497935f458d_2720x1320.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>The question that separates ML from DL</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fD_2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78b05279-8b74-4574-88a6-9497935f458d_2720x1320.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fD_2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78b05279-8b74-4574-88a6-9497935f458d_2720x1320.png 424w, https://substackcdn.com/image/fetch/$s_!fD_2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78b05279-8b74-4574-88a6-9497935f458d_2720x1320.png 848w, https://substackcdn.com/image/fetch/$s_!fD_2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78b05279-8b74-4574-88a6-9497935f458d_2720x1320.png 1272w, https://substackcdn.com/image/fetch/$s_!fD_2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78b05279-8b74-4574-88a6-9497935f458d_2720x1320.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fD_2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78b05279-8b74-4574-88a6-9497935f458d_2720x1320.png" width="1456" height="707" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/78b05279-8b74-4574-88a6-9497935f458d_2720x1320.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:707,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:222356,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://sonalsingh01.substack.com/i/206898949?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78b05279-8b74-4574-88a6-9497935f458d_2720x1320.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!fD_2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78b05279-8b74-4574-88a6-9497935f458d_2720x1320.png 424w, https://substackcdn.com/image/fetch/$s_!fD_2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78b05279-8b74-4574-88a6-9497935f458d_2720x1320.png 848w, https://substackcdn.com/image/fetch/$s_!fD_2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78b05279-8b74-4574-88a6-9497935f458d_2720x1320.png 1272w, https://substackcdn.com/image/fetch/$s_!fD_2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78b05279-8b74-4574-88a6-9497935f458d_2720x1320.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Every classic machine learning model: logistic regression, decision trees, gradient boosting; depends on a human deciding, in advance, what to measure. Someone has to sit down and say: for this customer, the relevant signals are tenure, return rate, spend velocity, complaint count. That list <em>is</em> the model&#8217;s entire universe. The algorithm is only ever as good as the feature list a person handed it.</p><p>Deep learning removes that constraint by learning its own representation of the data- pixels, tokens, raw sequences, without a human pre-naming the pattern. The practical question for a PM isn&#8217;t &#8220;ML or DL,&#8221; it&#8217;s narrower than that: <strong>can I name the feature that predicts the outcome, or can I not?</strong> If you can name it, you almost never need DL. If you can&#8217;t, because the signal lives in something unstructured like an image of a shoe or a purse, a free-text review, or a voice tone, that&#8217;s your signal to reach for DL.</p><h2>Where this shows up in a marketplace product</h2><p>Lets take an example of a trust-scoring for a B2B sourcing marketplace. For buyer-side risk (has this company defaulted before, what&#8217;s their order volume, how long have they been active), the features are obvious and structured: transaction history, payment terms, account age. A gradient-boosted model on those features would work fine; there was nothing for deep learning to add.</p><p>Seller trust is a different problem. The signal that a seller was likely to ghost an RFx or misrepresent capacity is not sitting in a column anywhere, it is buried in <em>how</em> they communicated: response latency patterns, the tone and specificity of their quotes, inconsistencies between what they claimed and what their catalog showed. There would be no spreadsheet column for &#8220;this quote reads like it was copy-pasted without reading the RFx.&#8221; That&#8217;s a feature engineering dead end for classic ML, and exactly the kind of pattern DL is built to extract from unstructured, multi-signal input.</p><p>The generalizable version of this test: if you&#8217;re building a trust, fraud, or quality signal and you keep listing structured proxies that only approximate the real thing (star rating as a proxy for review authenticity, order count as a proxy for reliability), you&#8217;re looking at a <strong>feature engineering</strong> ceiling. That&#8217;s usually the tell.</p><h2>The nuance to be noted, DL doesn&#8217;t eliminate feature engineering</h2><p>&#8220;DL means no more feature engineering&#8221; is wrong.</p><p>Google&#8217;s 2016 paper on the YouTube recommendation system is the clearest documented case of this. YouTube rebuilt their candidate generation and ranking system on deep neural networks specifically to escape hand-engineered features and their own paper says directly that despite that promise, the team still had to spend considerable engineering effort turning raw user and video data into usable inputs, because raw watch-history data doesn&#8217;t feed cleanly into a feedforward network on its own. They still hand-engineered signals like the transformed square and square-root versions of continuous features, because it gave the network more expressive power even though in theory a large enough network could learn those transformations itself.</p><p><strong>DL reduces the </strong><em><strong>burden</strong></em><strong> of naming atomic features</strong> (edges, pixels, word co-occurrence) but doesn&#8217;t remove the PM&#8217;s job of deciding what raw data and context the model should even see, what the objective function optimizes for, and how noisy implicit signals (a click, a watch, a partial read) get turned into a training label. This is a product decision, not an engineering one. </p><h2>What to take into a model-choice conversation</h2><p>A useful gut check I use in scoping conversations: name the three most predictive features you&#8217;d hand-pick for this problem. If you can name them confidently and they&#8217;re sitting in structured data already, push back on any team defaulting to DL, you&#8217;re paying for complexity you don&#8217;t need. If the answer is &#8220;I know it when I see it&#8221;, a template-sounding review, a seller&#8217;s evasive quote, a product photo that doesn&#8217;t match the listing, that&#8217;s your signal the feature space itself needs to be learned, not engineered.</p><p><span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Shailesh Sharma&quot;,&quot;id&quot;:12258899,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c416730c-8136-46fd-b28e-2fc0e292a42c_756x756.png&quot;,&quot;uuid&quot;:&quot;7949de0a-cfe1-4ad4-bb82-7b0a6da3ec68&quot;}" data-component-name="MentionToDOM"></span> <span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Apoorva Mittal&quot;,&quot;id&quot;:2427084,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/605d943b-b6b8-4f00-a4fc-6b94a14fbbd0_1066x1600.jpeg&quot;,&quot;uuid&quot;:&quot;6925ea17-bcda-45be-8ad0-2a46871be000&quot;}" data-component-name="MentionToDOM"></span> </p><h3>Sources</h3><ul><li><p>https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/45530.pdf</p></li><li><p>Acolyer, A. <em>Deep neural networks for YouTube recommendations &#8212; the morning paper</em> (plain-language walkthrough of the above paper, including the feature-engineering caveat). <a href="https://blog.acolyer.org/2016/09/19/deep-neural-networks-for-youtube-recommendations/">blog.acolyer.org</a></p></li></ul><p></p>]]></content:encoded></item><item><title><![CDATA[ML for PMs: Six Problems, Six Algorithms]]></title><description><![CDATA[The ML problems every AI PM should be able to name]]></description><link>https://sonalsingh01.substack.com/p/ml-for-pms-six-problems-six-algorithms</link><guid isPermaLink="false">https://sonalsingh01.substack.com/p/ml-for-pms-six-problems-six-algorithms</guid><dc:creator><![CDATA[Sonal]]></dc:creator><pubDate>Fri, 03 Jul 2026 22:04:27 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!TQXH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffeaf8b2a-bdaf-4eaa-b015-520558d131a6_1980x1364.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I&#8217;ve been going deeper into the ML fundamentals lately, and one thing became clear pretty quickly: you don&#8217;t need to know how to build these models to work with them well. You need to know which one a given problem calls for, and which decisions are still yours once the model is built.</p><p>Here&#8217;s the shortcut I&#8217;ve started using. Almost every &#8220;which algorithm&#8221; question collapses into one of six questions about what the product actually needs to decide:</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://sonalsingh01.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TQXH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffeaf8b2a-bdaf-4eaa-b015-520558d131a6_1980x1364.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TQXH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffeaf8b2a-bdaf-4eaa-b015-520558d131a6_1980x1364.png 424w, https://substackcdn.com/image/fetch/$s_!TQXH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffeaf8b2a-bdaf-4eaa-b015-520558d131a6_1980x1364.png 848w, https://substackcdn.com/image/fetch/$s_!TQXH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffeaf8b2a-bdaf-4eaa-b015-520558d131a6_1980x1364.png 1272w, https://substackcdn.com/image/fetch/$s_!TQXH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffeaf8b2a-bdaf-4eaa-b015-520558d131a6_1980x1364.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TQXH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffeaf8b2a-bdaf-4eaa-b015-520558d131a6_1980x1364.png" width="1456" height="1003" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/feaf8b2a-bdaf-4eaa-b015-520558d131a6_1980x1364.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1003,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:147885,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://sonalsingh01.substack.com/i/204970481?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffeaf8b2a-bdaf-4eaa-b015-520558d131a6_1980x1364.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!TQXH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffeaf8b2a-bdaf-4eaa-b015-520558d131a6_1980x1364.png 424w, https://substackcdn.com/image/fetch/$s_!TQXH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffeaf8b2a-bdaf-4eaa-b015-520558d131a6_1980x1364.png 848w, https://substackcdn.com/image/fetch/$s_!TQXH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffeaf8b2a-bdaf-4eaa-b015-520558d131a6_1980x1364.png 1272w, https://substackcdn.com/image/fetch/$s_!TQXH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffeaf8b2a-bdaf-4eaa-b015-520558d131a6_1980x1364.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Let me walk through each one, with the examples that made them click for me.</p><h2>Predict a number &#8594; Linear regression</h2><p>This is the one you&#8217;ll run into constantly, because so much of product work is really about predicting a number: an ETA, a price, next month&#8217;s demand.</p><p>Take a food delivery ETA. The delivery time depends on a handful of things: distance, how long the kitchen takes, traffic, whether it&#8217;s raining. Linear regression just says: the outcome is a weighted sum of these inputs.</p><pre><code><code>delivery time = (w1 &#215; distance) + (w2 &#215; prep_time) + (w3 &#215; traffic) + (w4 &#215; rain) + b
</code></code></pre><p>The model&#8217;s job is to find the weights that make its predictions match reality as closely as possible, using historical data (a classic 80/20 train-test split). Once it&#8217;s trained, the weights become a story: if traffic has the highest weight, geography and routing are your bottleneck. If prep time dominates, the fix is in the kitchen, not on the road.</p><p>DoorDash runs this kind of prediction across more than <strong>2 billion orders a year</strong>, and their engineering team reported a <strong>~20% relative improvement</strong> in ETA accuracy after refining their models, because an ETA people can trust is core to whether they come back. </p><p>The PM&#8217;s job here isn&#8217;t building the model, it&#8217;s deciding what error is tolerable. Users forgive a five-minute ETA miss. They don&#8217;t forgive fifteen. That tolerance number is a product call, not a data science one, and it&#8217;s what turns a metric into a ship decision.</p><h2>Predict yes or no &#8594; Logistic regression</h2><p>Some decisions aren&#8217;t a number on a scale, they&#8217;re binary. Approve the loan or not. Will this user churn or stay. Is this transaction fraud.</p><p>Logistic regression works like linear regression under the hood, but it squashes the output into a probability between 0 and 1. Then someone has to pick the cutoff: above what probability do we actually act? That threshold is where the real product thinking lives, because <strong>no classifier is ever 100% right</strong>. Every prediction lands in one of four buckets:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VxxV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1c454b8-aae2-478d-948f-6005dc825afc_1870x1320.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VxxV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1c454b8-aae2-478d-948f-6005dc825afc_1870x1320.png 424w, https://substackcdn.com/image/fetch/$s_!VxxV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1c454b8-aae2-478d-948f-6005dc825afc_1870x1320.png 848w, https://substackcdn.com/image/fetch/$s_!VxxV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1c454b8-aae2-478d-948f-6005dc825afc_1870x1320.png 1272w, https://substackcdn.com/image/fetch/$s_!VxxV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1c454b8-aae2-478d-948f-6005dc825afc_1870x1320.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!VxxV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1c454b8-aae2-478d-948f-6005dc825afc_1870x1320.png" width="1456" height="1028" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c1c454b8-aae2-478d-948f-6005dc825afc_1870x1320.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1028,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:116242,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://sonalsingh01.substack.com/i/204970481?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1c454b8-aae2-478d-948f-6005dc825afc_1870x1320.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!VxxV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1c454b8-aae2-478d-948f-6005dc825afc_1870x1320.png 424w, https://substackcdn.com/image/fetch/$s_!VxxV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1c454b8-aae2-478d-948f-6005dc825afc_1870x1320.png 848w, https://substackcdn.com/image/fetch/$s_!VxxV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1c454b8-aae2-478d-948f-6005dc825afc_1870x1320.png 1272w, https://substackcdn.com/image/fetch/$s_!VxxV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1c454b8-aae2-478d-948f-6005dc825afc_1870x1320.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong>Precision</strong> is what you protect when a false alarm is expensive, think of a fraud model that&#8217;s too trigger-happy and starts declining good customers. Older rule-based fraud systems flagged <strong>70&#8211;95% of alerts as false alarms</strong>; modern ML models with feedback loops bring that down to roughly <strong>15&#8211;30%</strong>, which is the difference between wasting a compliance team&#8217;s week and actually catching fraud.</p><p><strong>Recall</strong> is what you protect when a miss is dangerous, a disease screening tool that tells a sick person they&#8217;re fine is the failure mode you can&#8217;t accept, even at the cost of more false alarms.</p><p>This is why the PM sets the threshold, not the model: only the PM knows whether a false positive or a false negative costs the business more.</p><h2>Explain the decision &#8594; Decision trees</h2><p>Sometimes the output matters less than the reason behind it. If asked &#8220; Why was this post flagged for review?&#8221;, a probability score isn&#8217;t an answer, a decision tree is.</p><p>A tree is basically a flowchart the model builds itself. At each split, it&#8217;s choosing the cut that produces the &#8220;purest&#8221; groups (using something called the Gini score, lower is cleaner). The result is a chain of if-then logic a human can actually trace and defend.</p><p>This is the trade-off worth remembering: trees are usually a little less accurate than the more complex models below, but in lending, hiring, or anything regulated, being able to explain the decision is often a harder requirement than squeezing out an extra percentage point of accuracy. That&#8217;s a call the PM has to make explicitly, not something to leave to whichever model scored best in a notebook.</p><h2>Just maximize accuracy &#8594; Random forest</h2><p>One tree is explainable but a bit fragile, it can latch onto quirks in your training data. A random forest fixes this by growing hundreds of trees, each trained on a different random slice of the data, and letting them vote. Individual mistakes cancel out and accuracy climbs.</p><p>The cost is that you lose the single clean story. A hundred trees voting isn&#8217;t something you can narrate to a VP the way one tree is, so this is the model you reach for once you&#8217;ve already decided accuracy matters more than explainability.</p><p>The one thing worth watching for as a PM: overfitting. If a tree is allowed to grow deep enough, it can start memorizing your training data instead of learning the actual pattern, splitting on something as oddly specific as an exact address. It&#8217;ll look flawless on the data it trained on and then fall apart on real users. So the only accuracy number worth trusting is the one measured on data the model has never seen.</p><h2>No labels, find the groups &#8594; K-means clustering</h2><p>Everything above assumed you had the &#8220;right answer&#8221; to train on, labelled supervised data to rely on. Clustering doesn&#8217;t. You hand the model raw behavior, nobody tells it what the segments are, and it finds the groups on its own.</p><p>K-means does this by picking a number of groups (k), sorting each data point into whichever group&#8217;s center it&#8217;s closest to, then repeating until the groups settle. This is the algorithm quietly running behind a lot of personalization you experience daily. Netflix groups viewers into taste clusters, and has estimated its recommendation engine is worth <strong>over $1 billion a year</strong> in retention, with roughly <strong>80% of what people watch</strong> starting from a recommendation rather than a search.</p><h2>Learn from live feedback &#8594; Multi-armed bandits</h2><p>Last one, a normal A/B test splits traffic 50/50 and holds that split for weeks, which means half your users keep seeing the losing version the entire time, even once the data is already leaning hard one way.</p><p>A multi-armed bandit shifts traffic toward the winner while it&#8217;s still learning, instead of waiting for the test to &#8220;finish.&#8221; It&#8217;s constantly balancing exploring (keep testing to be sure) against exploiting (send more traffic to what&#8217;s already winning). Netflix uses exactly this to personalize the artwork for a title, a bandit can learn that a romance fan and a comedy fan should see two different thumbnails for the same movie, and keeps adjusting as more data comes in.</p><p>The PM&#8217;s job here is picking the reward the bandit chases. Point it at raw clicks and it will happily learn to produce clickbait. Point it at something that reflects real value, a completed order, a 30-day retention, and it optimizes for what actually matters.</p><h2>The pattern underneath all six</h2><p>Every one of these algorithms does the same kind of work: find the weights, split the data, group the points, chase the reward. What none of them do is decide what any of it should mean for the business. That&#8217;s still the PM&#8217;s job, every time:</p><ul><li><p><strong>The metric:</strong> what &#8220;good enough&#8221; looks like for the user</p></li><li><p><strong>The threshold</strong>: which mistake you can afford</p></li><li><p><strong>The trade</strong>: accuracy versus explainability</p></li><li><p><strong>The name</strong>: turning a cluster number into a real segment and an action</p></li><li><p><strong>The reward</strong>: the one thing a live system is allowed to optimize for</p></li></ul><p>One more thread I keep coming back to: in every example above, someone had to decide which inputs mattered in the first place, distance, prep time, credit history. For a long time that required domain experts, and it was a real bottleneck. Getting models to discover useful signals on their own, without a human hand-picking every feature, is a big part of what pushed the field toward deep learning. That&#8217;s probably its own post.</p><p>For now: the algorithm is the easy half. The judgment is still the job.</p><p><span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Shailesh Sharma&quot;,&quot;id&quot;:12258899,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c416730c-8136-46fd-b28e-2fc0e292a42c_756x756.png&quot;,&quot;uuid&quot;:&quot;b19ed6da-51de-4895-b435-228ffa4e9b32&quot;}" data-component-name="MentionToDOM"></span> <span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Technomanagers&quot;,&quot;id&quot;:513693,&quot;type&quot;:&quot;pub&quot;,&quot;url&quot;:&quot;https://open.substack.com/pub/shaileshsharma&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fe778cec-f43e-418d-8ca7-155296f5dd1c_1280x1280.png&quot;,&quot;uuid&quot;:&quot;8590d2f6-8dff-43c0-9ed7-f9e1a4575283&quot;}" data-component-name="MentionToDOM"></span> </p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://sonalsingh01.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[How Deep Learning Changed Everything]]></title><description><![CDATA[Shift from feature engineering to deep learning]]></description><link>https://sonalsingh01.substack.com/p/how-deep-learning-changed-everything</link><guid isPermaLink="false">https://sonalsingh01.substack.com/p/how-deep-learning-changed-everything</guid><dc:creator><![CDATA[Sonal]]></dc:creator><pubDate>Fri, 03 Jul 2026 21:51:19 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!S-Pb!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f4e6707-6c5e-425e-8cad-d9435bbb61d8_480x480.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>You open a music app. A song you&#8217;ve never heard plays. You love it. Nobody told the algorithm what &#8220;your taste&#8221; means, it figured it out.</p><p>Now consider the flip side: a customer uploads a photo of a shoe and wants something similar. You could ask an engineer to manually code the attributes, color, silhouette, material, heel height. But what weight does color get versus shape? Who decides? And what if the right match shares a quality you never thought to name?</p><p>Two problems, same wall. The algorithm can only see what a human told it to look for. That&#8217;s exactly the limit deep learning was built to break.</p><h2>What Deep Learning Actually Changed</h2><p>In traditional ML, a human engineers the features. You decide what inputs matter and hand them to the model. It learns the weights; you chose the variables.</p><p>Deep learning inverts this. Instead of telling the model what to look at, you give it raw data: pixels, text, audio, and let it figure out what matters. The model learns its own internal representations through many stacked layers, each one finding progressively more abstract patterns in the layer before it. That&#8217;s what &#8220;deep&#8221; means: depth of layers, not complexity of math.</p><p>For the shoe problem, the first layer might learn edges. The next, shapes. The next, textures and material. By the output layer, the model has built a representation of &#8220;visual similarity&#8221; that no human defined and that often outperforms anything a human would have designed.</p><p>This is not a small shift. It expands the universe of problems that software can solve. If you cannot define the signal, you can still learn it.</p><h2>The Text Problem And Why It Was Harder</h2><p>Images have spatial structure. Text has something trickier: <strong>context that spans distance.</strong></p><p>Consider: <em>&#8220;The startup couldn&#8217;t raise its next round, the market had dried up.&#8221;</em></p><p>To understand &#8220;market&#8221; here, a model needs to have absorbed &#8220;startup,&#8221; &#8220;raise,&#8221; &#8220;round,&#8221; and their relationship. Earlier neural network architectures (RNNs) processed text sequentially, word by word, which meant by the time they reached the end of a long sentence, early context had faded.</p><p>The deeper problem: static word embeddings gave every word a fixed meaning. The word &#8220;bank&#8221; had one vector , whether you meant a riverbank or a financial institution. Context was invisible to the model.</p><h2>Attention Is All You Need</h2><p>In June 2017, a Google Brain team published <em>&#8220;Attention Is All You Need.&#8221;</em> The core contribution: <strong>self-attention</strong>, a mechanism where every word in a sequence simultaneously evaluates its relationship to every other word, regardless of distance.</p><p>The result: the word &#8220;bank&#8221; in <em>&#8220;the startup&#8217;s bank account was frozen&#8221;</em> produces a different internal representation than &#8220;bank&#8221; in <em>&#8220;they camped on the river bank.&#8221;</em> Same token, different meaning, because the model has read the whole sentence at once and weighted surrounding context into its understanding of each word.</p><p>Before this paper, models processed text like reading a novel one word at a time, forgetting the beginning by the end. After it, the model reads the whole page simultaneously, mapping how every word relates to every other, no matter how far apart.</p><p>The architectural implication: recurrence and convolution were eliminated entirely. The model relies solely on attention mechanisms, enabling all positions in a sequence to attend to all others at once. This also made training dramatically faster, parallelizable across GPUs in a way sequential models never could be.</p><p>Every major language model today: GPT, Claude, Gemini, BERT, LLaMA,is a transformer.</p><h2>What This Means If You&#8217;re Building Products</h2><p>Three things that are now just product decisions, not research problems:</p><p><strong>1. You don&#8217;t need to define the signal.</strong> Visual search, fraud detection, fake review identification, if you have labeled examples and enough data, deep learning can find patterns you never named. Your job as a PM is to frame the outcome clearly, not engineer the features.</p><p><strong>2. Language is now a structured input.</strong> Because transformers understand context, not just keywords, you can build products that reason about intent, not just match strings. A support bot that understands &#8220;this is broken&#8221; means something different from a user who bought yesterday versus one who bought two years ago.</p><p><strong>3. The prompt is a product surface.</strong> LLMs are transformers trained to predict the next token. How you structure input, task, context, examples, constraints, directly shapes output quality. </p><p><span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Shailesh Sharma&quot;,&quot;id&quot;:12258899,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c416730c-8136-46fd-b28e-2fc0e292a42c_756x756.png&quot;,&quot;uuid&quot;:&quot;e096c9d5-758d-4e15-a55f-5f48e22dd12f&quot;}" data-component-name="MentionToDOM"></span> <span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Technomanagers&quot;,&quot;id&quot;:513693,&quot;type&quot;:&quot;pub&quot;,&quot;url&quot;:&quot;https://open.substack.com/pub/shaileshsharma&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fe778cec-f43e-418d-8ca7-155296f5dd1c_1280x1280.png&quot;,&quot;uuid&quot;:&quot;40597cb6-3bfa-4391-95e2-4316612e53a2&quot;}" data-component-name="MentionToDOM"></span> </p><p>Sources: https://research.google/pubs/attention-is-all-you-need/</p>]]></content:encoded></item><item><title><![CDATA[Reinforcement Learning-Rewards and punishment]]></title><description><![CDATA[How reinforcement learning actually works]]></description><link>https://sonalsingh01.substack.com/p/reinforcement-learning-rewards-and</link><guid isPermaLink="false">https://sonalsingh01.substack.com/p/reinforcement-learning-rewards-and</guid><dc:creator><![CDATA[Sonal]]></dc:creator><pubDate>Fri, 03 Jul 2026 18:03:09 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!TGfj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91780911-768c-497e-9873-08d05f15f71a_680x400.svg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TGfj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91780911-768c-497e-9873-08d05f15f71a_680x400.svg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TGfj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91780911-768c-497e-9873-08d05f15f71a_680x400.svg 424w, https://substackcdn.com/image/fetch/$s_!TGfj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91780911-768c-497e-9873-08d05f15f71a_680x400.svg 848w, https://substackcdn.com/image/fetch/$s_!TGfj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91780911-768c-497e-9873-08d05f15f71a_680x400.svg 1272w, https://substackcdn.com/image/fetch/$s_!TGfj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91780911-768c-497e-9873-08d05f15f71a_680x400.svg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TGfj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91780911-768c-497e-9873-08d05f15f71a_680x400.svg" width="1456" height="856" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/91780911-768c-497e-9873-08d05f15f71a_680x400.svg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:856,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:11963,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/svg+xml&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://sonalsingh01.substack.com/i/204951546?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91780911-768c-497e-9873-08d05f15f71a_680x400.svg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!TGfj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91780911-768c-497e-9873-08d05f15f71a_680x400.svg 424w, https://substackcdn.com/image/fetch/$s_!TGfj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91780911-768c-497e-9873-08d05f15f71a_680x400.svg 848w, https://substackcdn.com/image/fetch/$s_!TGfj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91780911-768c-497e-9873-08d05f15f71a_680x400.svg 1272w, https://substackcdn.com/image/fetch/$s_!TGfj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91780911-768c-497e-9873-08d05f15f71a_680x400.svg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>Every time you skip a YouTube video, scroll past an Instagram reel, or close the app mid-scroll, something changes. Not just for that one video. For the AI model that decides what you see next.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://sonalsingh01.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>That&#8217;s reinforcement learning (RL), and it&#8217;s a genuinely different way of training a model than the supervised learning most of us picture when we hear &#8220;AI.&#8221; There&#8217;s no labelled dataset saying &#8220;this is the correct answer.&#8221; There&#8217;s an agent, an environment, and a feedback loop that runs constantly, the model tries something, watches what happens, and adjusts.</p><p>RL runs on four ideas.</p><ul><li><p><strong>State</strong>, what the system currently knows (about you, about the market, about the moment)</p></li><li><p><strong>Action</strong>, what it decides to do (recommend a reel, match a driver)</p></li><li><p><strong>Reward or punishment</strong>, what happens as a result</p></li><li><p><strong>Policy update</strong>, the system nudges its future behavior based on that signal</p></li></ul><p>And then it repeats. Immediately. Every scroll, every ride request, every skip is another lap through that loop.</p><h2>Instagram</h2><p>When you open Instagram, content is suggested to you; from accounts, posts, or reels you may be interested in. One of the underlying AI systems decides what to show you and in what order, by predicting what you&#8217;re most likely to engage with.</p><p>That prediction leans on a mix of signals. <strong>Explicit</strong> ones, like whether you tapped &#8220;interested&#8221; or &#8220;not interested&#8221; on a reel, if you shared a reel, saved it, watched it completely. And <strong>implicit</strong> ones, who you follow, what kind of creator content you linger on, whether you rewatch something.</p><p>At a high level, the system:</p><ol><li><p><strong>Gathers inventory: </strong>pulls in a portion of the public content available on Instagram, photos and reels included.</p></li><li><p><strong>Leverages signals</strong>: watch history, saves, shares, interested/not-interested taps, and a long tail of other inputs.</p></li><li><p><strong>Ranks content</strong>: scores everything it has against what it knows about you.</p></li><li><p><strong>Surfaces the top of that ranking</strong>: content predicted to hold the most value for you gets shown first.</p></li></ol><p>Now, scoring every single reel against every single user directly would be absurdly expensive; millions of items, billions of users, recalculated constantly. So the system does something cleverer: it learns to represent both users and content as vectors, lists of numbers, in the same mathematical space. Finding a good recommendation becomes a matter of finding which content-vectors sit closest to your user-vector.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uCG9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70facbfc-a778-4828-9144-6ff27e61f45a_792x596.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uCG9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70facbfc-a778-4828-9144-6ff27e61f45a_792x596.png 424w, https://substackcdn.com/image/fetch/$s_!uCG9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70facbfc-a778-4828-9144-6ff27e61f45a_792x596.png 848w, https://substackcdn.com/image/fetch/$s_!uCG9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70facbfc-a778-4828-9144-6ff27e61f45a_792x596.png 1272w, https://substackcdn.com/image/fetch/$s_!uCG9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70facbfc-a778-4828-9144-6ff27e61f45a_792x596.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uCG9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70facbfc-a778-4828-9144-6ff27e61f45a_792x596.png" width="792" height="596" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/70facbfc-a778-4828-9144-6ff27e61f45a_792x596.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:596,&quot;width&quot;:792,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:68309,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://sonalsingh01.substack.com/i/204951546?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70facbfc-a778-4828-9144-6ff27e61f45a_792x596.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!uCG9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70facbfc-a778-4828-9144-6ff27e61f45a_792x596.png 424w, https://substackcdn.com/image/fetch/$s_!uCG9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70facbfc-a778-4828-9144-6ff27e61f45a_792x596.png 848w, https://substackcdn.com/image/fetch/$s_!uCG9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70facbfc-a778-4828-9144-6ff27e61f45a_792x596.png 1272w, https://substackcdn.com/image/fetch/$s_!uCG9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70facbfc-a778-4828-9144-6ff27e61f45a_792x596.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This is the <strong>two-tower model</strong>, and it&#8217;s the workhorse behind modern retrieval systems,  Meta has publicly described using it for Instagram Explore, and versions of it are industry standard.</p><ul><li><p>The <strong>user tower</strong> compresses everything the system knows about you- recent watch history, likes, device, time of day; into one vector. Think of it as a GPS coordinate for your current interests, except in 128 dimensions instead of two.</p></li><li><p>The <strong>item tower</strong> does the same for each reel: topic, creator, audio, engagement stats, age; compressed into a vector in that same space.</p></li></ul><p>Here&#8217;s where the reward/punishment framing comes in. If you watch a reel all the way through, that&#8217;s a strong positive signal. The model treats it close to a reward. If you skip fast, or worse, close the app entirely, that&#8217;s a negative signal; closer to a punishment, because it risks losing your session altogether. Based on these outcomes, the system nudges its weights, this reel type worth more, that one worth less and repeats, at scale, across hundreds of millions of users, every few milliseconds.</p><p>The ranking step described above: two towers, retrieval, scoring- is mostly large-scale <em>supervised</em> prediction: &#8220;given this user and this content, what&#8217;s the probability of engagement?&#8221; The genuinely reinforcement-learning part shows up one layer deeper, in how platforms handle the sequential, long-term version of that problem. YouTube&#8217;s own researchers published on exactly this: they built a production recommender on <strong>REINFORCE</strong>, a policy-gradient RL algorithm, specifically to optimize for long-term satisfaction rather than the next single click, and to deliberately balance <strong>exploration</strong> (showing you something a little outside your lane, to learn if you&#8217;d like it) against <strong>exploitation</strong> (showing you more of what already works). That exploration piece is also the platform&#8217;s defense against the filter-bubble problem, if you only ever exploit, the model locks you into a narrower and narrower loop.</p><h2>What should a PM actually take from this</h2><p>This is the part that matters more than the mechanics, because as an AI PM, you&#8217;re rarely the one writing the RL algorithm. You&#8217;re the one deciding what the reward <em>means</em>.</p><ul><li><p><strong>Reward design is a product decision, not a data science detail.</strong> If &#8220;reward = watch time,&#8221; you will get watch time, and you may also get rage-bait, clickbait, and a feed that keeps people scrolling but leaves them worse off. The PM&#8217;s job is defining what &#8220;good&#8221; actually looks like long-term, not just what&#8217;s easy to measure short-term.</p></li><li><p><strong>Exploration vs. exploitation is a tradeoff you own, not just an engineering parameter.</strong> Too much exploitation, filter bubbles and stale feeds. Too much exploration, an irrelevant, frustrating feed. Where that dial sits is a product call.</p></li><li><p><strong>The reward horizon is a product call too.</strong> Instagram&#8217;s lesson generalizes, optimizing for the next single action (the next match, the next click) can actively hurt the metric you actually care about a few steps later. Ask what the true north star is, and over what time window.</p></li><li><p><strong>Cold start doesn&#8217;t go away with RL.</strong> A new user has no history for the state representation to work with. Someone still has to decide the fallback, heuristics, popularity, demographic priors, until real signal accumulates.</p></li><li><p><strong>Because the output is probabilistic, evals matter more than they do in a typical dashboard review.</strong> You can&#8217;t eyeball whether an RL system is &#8220;working&#8221; the way you&#8217;d review a feature launch. You need a way to catch reward hacking or drift before it shows up as a PR problem.</p></li></ul><p><span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Shailesh Sharma&quot;,&quot;id&quot;:12258899,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c416730c-8136-46fd-b28e-2fc0e292a42c_756x756.png&quot;,&quot;uuid&quot;:&quot;0786ddf9-4dd0-4506-a4c5-673815812f1e&quot;}" data-component-name="MentionToDOM"></span> <span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Technomanagers&quot;,&quot;id&quot;:513693,&quot;type&quot;:&quot;pub&quot;,&quot;url&quot;:&quot;https://open.substack.com/pub/shaileshsharma&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fe778cec-f43e-418d-8ca7-155296f5dd1c_1280x1280.png&quot;,&quot;uuid&quot;:&quot;9ea98bf0-5322-4611-bc9f-3ac17bd294b2&quot;}" data-component-name="MentionToDOM"></span> </p><p>Sources: </p><p><a href="https://transparency.meta.com/features/explaining-ranking/ig-feed-recommendations/"><span>https://transparency.meta.com/features/explaining-ranking/ig-feed-recommendations/</span></a></p><p><a href="https://transparency.meta.com/features/explaining-ranking/ig-feed-recommendations/ https://paraschopra.github.io/explainers/recco/index.html"><span>https://paraschopra.github.io/explainers/recco/index.html</span></a></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://sonalsingh01.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item></channel></rss>