<?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[Nikita Agarwal]]></title><description><![CDATA[AI Infra and startups]]></description><link>https://www.nikiagarwal.com</link><image><url>https://substackcdn.com/image/fetch/$s_!VxCP!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67b6f277-d0a8-42d3-9efa-2e3ce31bf637_1280x1280.png</url><title>Nikita Agarwal</title><link>https://www.nikiagarwal.com</link></image><generator>Substack</generator><lastBuildDate>Sat, 11 Apr 2026 14:23:03 GMT</lastBuildDate><atom:link href="https://www.nikiagarwal.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Nikita Agarwal]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[nikiagarwal@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[nikiagarwal@substack.com]]></itunes:email><itunes:name><![CDATA[Nikita Agarwal]]></itunes:name></itunes:owner><itunes:author><![CDATA[Nikita Agarwal]]></itunes:author><googleplay:owner><![CDATA[nikiagarwal@substack.com]]></googleplay:owner><googleplay:email><![CDATA[nikiagarwal@substack.com]]></googleplay:email><googleplay:author><![CDATA[Nikita Agarwal]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Skills vs Tools. Is it just packaging?]]></title><description><![CDATA[Every few months, there&#8217;s a new keyword that is buzzing AI town.]]></description><link>https://www.nikiagarwal.com/p/skills-vs-tools-is-it-just-packaging</link><guid isPermaLink="false">https://www.nikiagarwal.com/p/skills-vs-tools-is-it-just-packaging</guid><dc:creator><![CDATA[Nikita Agarwal]]></dc:creator><pubDate>Mon, 29 Dec 2025 07:09:27 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!VxCP!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67b6f277-d0a8-42d3-9efa-2e3ce31bf637_1280x1280.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Every few months, there&#8217;s a new keyword that is buzzing AI town. Started with llms, then it was prompts, evals, agents, the MCP, A2A and most recently the new entrant: SKILLS.</p><p>First heard this floating around October when I was deep into the pit of legal stuff for my business, without bandwidth for the leisure of curiosity and I dismissed it as another hot word for tools: - an external tool calling interface to extend model capabilities.</p><p>The slowness of the New Year gifted me the privilege of reading and I found myself digging into announcements, repos and projects using Skills, was pleasantly surprised to find it is more than a rebrand of the MCP tool.</p><p>Yes, tools have been inherently flawed. Bloated contexts, models getting confused, a wholly separate scaffolding to make them WORK. From auth, to orchestration. The efforts we have put to make them work, only to have at max 4-5 tools that can be exposed at a time to a model, lest the possibility of model confusion!</p><p>We are yet to see the true protocol of communication for agentic systems. It mostly won&#8217;t be English even.</p><p>But Skills do take a good bite into the flaws of the simple tooling design introduced by MCP.</p><p>When a new member joins any organisation, we have DOCUMENTATION prepped for their onboarding. More the merrier. Less the more hallucinatory. Similar is the case with artificially intelligent team members.</p><p>But we have hands, they do not. Along with a brain, you need execution. And these two need to share brainspace. The brain, tuned for performing actions, not independent of each other.</p><p>Thus the introduction of skills.</p><p>Along the brain power of a model, you have now extended them with the power of true execution with instruction.</p><p>Provide instructions and now the model layer between the user and model can figure what to do, and do it with some deterministic execution runtime in a sandboxed environment.</p><p>With tools, models would ask the user to execute things for them and wait on responses of results. Now with skills,the model layer comes as a package with execution built in for tools. For the model layer to effectively execute, it is a prerequisite to be able to discover the possibilities of its execution instead of bombarding the model with an arsenal of tools that it could use, without fully understanding their relations or boundaries.</p><p>Thus, the skills folder and tree-like organisation with exploratory prompt formation couples with a skill execution runtime.</p><p>Is this just packaging or functionality? I would say the latter.</p><p>It enables me to be lazier. Create onboarding docs/scripts and start asking for things to be done instead of plumbing out the runtime and thinking thrice before exposing capabilities.</p><p>With Codex recently also pushing Skills into the hat of understood &#8216;languages&#8217; by OpenAI ecosystem, I see a possible new pattern of achieving the meta goal of non-deterministically reliable systems: where known working patterns are baked in and the reasoning, execution is completely in the purview of a model that understands the task end to end, instead of just a single question/answer.</p><p>Bake in memory and self learning, and you are way closer to a system that mimics how humans attempt work.</p><div><hr></div><p><em>What do you think? </em></p><p><em><br>What would be a good design to take this to production from local? </em></p><p><em>What about opensource models? Without such platform benefits, are they missing out?</em></p><p><em>Are there any differences at all between skills and tools?</em><br></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.nikiagarwal.com/p/skills-vs-tools-is-it-just-packaging?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.nikiagarwal.com/p/skills-vs-tools-is-it-just-packaging?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.nikiagarwal.com/p/skills-vs-tools-is-it-just-packaging/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.nikiagarwal.com/p/skills-vs-tools-is-it-just-packaging/comments"><span>Leave a comment</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.nikiagarwal.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.nikiagarwal.com/subscribe?"><span>Subscribe now</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[Where Is the Next.js for AI Workflows?]]></title><description><![CDATA[Every technology wave eventually produces a framework that crystallizes best practices, hides away the ugly parts, and lets developers move faster than they thought possible.]]></description><link>https://www.nikiagarwal.com/p/where-is-the-nextjs-for-ai-workflows</link><guid isPermaLink="false">https://www.nikiagarwal.com/p/where-is-the-nextjs-for-ai-workflows</guid><dc:creator><![CDATA[Nikita Agarwal]]></dc:creator><pubDate>Sun, 05 Oct 2025 05:58:32 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Zgrz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F577a2191-68f9-44ef-acca-d425e633f589_940x624.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Every technology wave eventually produces a framework that crystallizes best practices, hides away the ugly parts, and lets developers move faster than they thought possible. For the web, we saw WordPress turn the act of publishing into something anyone could do. We saw HTML standardize the primitives of the browser. And more recently, we saw Next.js reshape frontend development into something opinionated, integrated, and production-ready.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Zgrz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F577a2191-68f9-44ef-acca-d425e633f589_940x624.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Zgrz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F577a2191-68f9-44ef-acca-d425e633f589_940x624.png 424w, https://substackcdn.com/image/fetch/$s_!Zgrz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F577a2191-68f9-44ef-acca-d425e633f589_940x624.png 848w, https://substackcdn.com/image/fetch/$s_!Zgrz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F577a2191-68f9-44ef-acca-d425e633f589_940x624.png 1272w, https://substackcdn.com/image/fetch/$s_!Zgrz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F577a2191-68f9-44ef-acca-d425e633f589_940x624.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Zgrz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F577a2191-68f9-44ef-acca-d425e633f589_940x624.png" width="713" height="473.31063829787234" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/577a2191-68f9-44ef-acca-d425e633f589_940x624.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:624,&quot;width&quot;:940,&quot;resizeWidth&quot;:713,&quot;bytes&quot;:1091819,&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://nikiagarwal.substack.com/i/175267789?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44ac7775-07a6-4d72-8c79-ab86c180295a_940x788.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_!Zgrz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F577a2191-68f9-44ef-acca-d425e633f589_940x624.png 424w, https://substackcdn.com/image/fetch/$s_!Zgrz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F577a2191-68f9-44ef-acca-d425e633f589_940x624.png 848w, https://substackcdn.com/image/fetch/$s_!Zgrz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F577a2191-68f9-44ef-acca-d425e633f589_940x624.png 1272w, https://substackcdn.com/image/fetch/$s_!Zgrz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F577a2191-68f9-44ef-acca-d425e633f589_940x624.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></p><p>We are now watching a similar story unfold in artificial intelligence. The applications are here: copilots, recommendation engines, AI assistants, multi-agent workflows that coordinate tools on behalf of users. The infrastructure is here too: GPUs, TPUs, vector databases, orchestration layers, workflow engines. And yet, the developer experience of putting these pieces together feels awkward, messy, and inconsistent. It is as if we are still hand-rolling PHP blogs before WordPress, or manually wiring React components before Next.js arrived.</p><p>The truth is that AI still lacks its Next.js moment. We have plenty of powerful libraries and promising frameworks, but none of them yet gives developers the seamless, opinionated defaults that make building distributed AI workflows as natural as building a modern web app. The absence is striking because the need is obvious. Building a serious AI system today means stitching together multiple tools: an orchestration engine like Ray or Temporal, a chaining framework like LangChain or LlamaIndex, a message queue like Kafka or Redis, an inference runtime like vLLM or TensorRT, and various bits of glue code for retries, scaling, and observability. Each component is strong on its own, but together they feel more like a collection of raw materials than a framework.</p><p>This is where the analogy to earlier waves of software is useful. Think about what WordPress did: it democratized publishing by abstracting away complexity, at the cost of some flexibility. Think about HTML: it defined universal primitives so that browsers and developers could speak the same language. Think about Next.js: it did not try to solve everything, but it standardized the 80 percent of patterns developers needed such as routing, server-side rendering, APIs, and deployment. It gave developers a coherent, opinionated way to work. </p><p>That is exactly what is missing for AI workflows. We have tools like n8n that play the role of WordPress, letting people drag and drop pipelines visually. We have base languages and libraries like PyTorch and JAX that play the role of HTML, giving us primitives for expressing computation. But what we don&#8217;t have is the Next.js layer: a framework that takes the complexity of distributed AI workflows and wraps it into a set of defaults and conventions that just work.</p><p>Why does this matter? Because without it, developers are spending too much time on infrastructure problems instead of application problems. When you want to build an AI agent that scrapes documents, summarizes them, and posts results to a channel, you should not need to be an expert in distributed consensus or checkpointing. You should not have to wire up retries manually or tune autoscaling policies by hand. You should be able to declare what the workflow is, and let the framework take care of the infrastructure details. Just as Next.js made deployment, routing, and rendering invisible, the missing AI framework should make distributed execution, autoscaling, retries, and observability invisible.</p><p>This is more than convenience, it is about resilience. The difference between a toy demo and a production system is not just accuracy, it is durability. AI workflows fail constantly. APIs time out. GPUs become unavailable. Inputs arrive in bursts. If you want to run a serious multi-agent architecture, you need autoscaling as a default. You need retries as a default. You need checkpointing as a default. These should not be optional extras. They should be embedded assumptions, invisible to the developer unless they choose to override them. Without these defaults, every team ends up reinventing the same reliability mechanisms, often imperfectly. With them, the ecosystem can move faster and focus on the unique parts of their applications rather than the generic challenges of infrastructure.</p><p>There are promising directions. LangGraph is trying to make agent workflows declarative, representing them as graphs of nodes that can recover from interruptions. Ray is giving us the substrate for distributed execution, letting workloads stretch elastically across heterogeneous clusters. Temporal is providing durable workflows with retries and resumability. Exosphere is building AI-first orchestration with distributed pipelines treated as native constructs rather than special cases. What makes Exosphere interesting is that it is not just borrowing patterns from traditional workflow engines but rethinking orchestration for the AI era. It assumes that LLM workloads are bursty, that they need parallelism at scale, that checkpoints and recovery are non-negotiable, and that developers want a declarative way to define their workflow graphs without wading through Kubernetes manifests. It is early, but it points toward the type of opinionated defaults that could evolve into a Next.js-style framework for AI systems.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.nikiagarwal.com/p/where-is-the-nextjs-for-ai-workflows/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.nikiagarwal.com/p/where-is-the-nextjs-for-ai-workflows/comments"><span>Leave a comment</span></a></p><p>Still, none of these efforts yet provides the integrated developer experience layer that turns powerful primitives into a coherent whole. They are closer to React before Next.js: flexible, expressive, but leaving too much wiring in the hands of developers. What is missing is the unifying layer that integrates these ideas into a single workflow-first experience.</p><p>If you look closely, you&#8217;ll see why the analogy to web frameworks is so apt. Early web development required manually managing state, routing, and server logic. Today&#8217;s AI development requires manually managing state persistence, task queues, and distributed scaling. Early web frameworks removed boilerplate by introducing conventions such as folder structures, default rendering strategies, and automatic bundling. The missing AI framework must do the same: define conventions for agent graphs, standardize error handling, bake in monitoring, and make distributed execution an assumption. Developers should not wonder whether their summarization node will autoscale, they should expect that it will. They should not write retry logic for API calls, they should assume that retries with backoff are built in.</p><p>It is worth noting that low-code tools like n8n or Zapier for AI are not the answer here. They play an important role, just as WordPress still does for websites, but they are not enough for developers building production-grade systems. Professional engineers want composability, performance, and reliability. They want to live close to code, but not so close that they drown in Kubernetes manifests or custom orchestration. They want what Next.js gave to the web: sensible defaults, escape hatches when necessary, and an integrated path from development to deployment.</p><p>The reason this framework does not exist yet is partly cultural. AI is still in its experimental phase, where new architectures, models, and workflows are being invented weekly. Frameworks harden conventions, and conventions require stability. But the demand is growing. As more applications move from proof-of-concept to production, the pain of hand-rolled infra is becoming acute. Just as developers grew tired of configuring webpack, they are now growing tired of wiring together distributed systems for every AI workflow. At some point, someone will ship a framework that says: here is the obvious way to do it. And once that happens, the ecosystem will rally.</p><p>The framework does not need to cover every corner case. It does not need to replace every orchestration engine or inference runtime. It just needs to capture the common patterns such as data ingestion, retrieval, summarization, classification, and multi-step reasoning, and make them trivial. It needs to wrap infrastructure concerns into conventions, so developers can think about the flow of information and logic rather than the plumbing beneath. It needs to define not just APIs but assumptions, the same way Next.js assumed you wanted file-based routing and server-side rendering until you told it otherwise.</p><p>The strategic stakes are high. The team that creates this framework will not just ship another library. They will define the developer experience of AI for the next decade. They will be the ones who decide what default means for distributed agent workflows. They will influence not just how engineers code, but how infrastructure evolves. Cloud providers will optimize for the framework&#8217;s conventions. Monitoring tools will adapt to its abstractions. Developers will standardize on its patterns. That is what frameworks do when they hit at the right moment: they stop being optional and start being the air everyone breathes.</p><p>In hindsight, we will look back at this era of AI systems, the glue code, the manual retries, the hand-tuned autoscaling policies, the fragmented orchestration, the scattered observability, and we will see it as necessary but temporary. Just as the web moved from static HTML to frameworks that embedded production reality into developer defaults, AI will move from stitching together disparate components to building on rails. The frameworks are coming. The only question is who will ship the Next.js of AI workflows first, and how quickly the ecosystem will converge once it does.</p><p>Until then, building AI systems will remain partly an act of infrastructure engineering, partly an act of application design. But the future is clear. </p><p>Just as Next.js gave developers rails for the web, the missing AI framework will give us rails for distributed agents and workflows. And when it arrives, it will not just make developers faster. </p><p>It will change what kinds of AI applications are possible, because the invisible tax of infrastructure will finally be lifted.</p><p><em>Happy building!</em></p><p><em>-Nikita  Ag</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.nikiagarwal.com/p/where-is-the-nextjs-for-ai-workflows?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.nikiagarwal.com/p/where-is-the-nextjs-for-ai-workflows?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.nikiagarwal.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.nikiagarwal.com/subscribe?"><span>Subscribe now</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[A swarm of SLMs vs an LLM]]></title><description><![CDATA[Another chapter in the small vs mighty]]></description><link>https://www.nikiagarwal.com/p/a-swarm-of-slms-vs-an-llm</link><guid isPermaLink="false">https://www.nikiagarwal.com/p/a-swarm-of-slms-vs-an-llm</guid><dc:creator><![CDATA[Nikita Agarwal]]></dc:creator><pubDate>Mon, 08 Sep 2025 17:41:33 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!pO7P!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32ea50b0-24fa-4b14-a45a-afa82dd5d6d0_3840x1076.png" 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_!TYJq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70722e7a-a676-4bed-87cb-9518d7dea0f1_1200x591.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TYJq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70722e7a-a676-4bed-87cb-9518d7dea0f1_1200x591.png 424w, https://substackcdn.com/image/fetch/$s_!TYJq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70722e7a-a676-4bed-87cb-9518d7dea0f1_1200x591.png 848w, https://substackcdn.com/image/fetch/$s_!TYJq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70722e7a-a676-4bed-87cb-9518d7dea0f1_1200x591.png 1272w, https://substackcdn.com/image/fetch/$s_!TYJq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70722e7a-a676-4bed-87cb-9518d7dea0f1_1200x591.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TYJq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70722e7a-a676-4bed-87cb-9518d7dea0f1_1200x591.png" width="1200" height="591" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/70722e7a-a676-4bed-87cb-9518d7dea0f1_1200x591.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:591,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1283231,&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://nikiagarwal.substack.com/i/173088592?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe78dec26-9bcb-4d9b-a8e4-b7926f06ff89_1200x1200.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_!TYJq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70722e7a-a676-4bed-87cb-9518d7dea0f1_1200x591.png 424w, https://substackcdn.com/image/fetch/$s_!TYJq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70722e7a-a676-4bed-87cb-9518d7dea0f1_1200x591.png 848w, https://substackcdn.com/image/fetch/$s_!TYJq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70722e7a-a676-4bed-87cb-9518d7dea0f1_1200x591.png 1272w, https://substackcdn.com/image/fetch/$s_!TYJq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70722e7a-a676-4bed-87cb-9518d7dea0f1_1200x591.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></p><p>Small things often move the biggest mountains. Ants build cities, raindrops carve canyons, tiny services power the apps we use all day.</p><p>Small language models fit that same pattern. They are fast, frugal, and easy to place close to users or data. In the right roles they punch far above their size, and ignoring them now would be like ignoring microservices when monoliths felt inevitable.</p><p>Large language models still shine at broad reasoning and open-ended synthesis, but a swarm of small models can collaborate, specialize, and route work with tight control over cost, latency, and privacy. This essay looks at how SLMs and LLMs complement each other, why a many-small approach changes what you can build, and how to design systems where the small parts add up to something surprisingly powerful.</p><p>The past year has been fascinating to watch. Everyone's been obsessing over the latest frontier models GPT-4, Claude, Gemini while quietly, a different conversation has been brewing in production environments. Teams are discovering that smaller language models aren't just budget alternatives; they're often the better choice.</p><p>I've been working with teams deploying both small and large models at scale, and the pattern is clear: the decision isn't about settling for less capability. It's about matching the right tool to the job. And increasingly, that tool is a small language model.</p><p>Let's talk about when, why, and how to make this choice.</p><h3><strong>Defining SLMs vs LLMs</strong></h3><p>The lines aren't as clear as you might think. It's not just about parameter count it's about deployment philosophy, operational constraints, and what you're trying to achieve.</p><p><strong>Small Language Models (SLMs):</strong></p><ul><li><p>0.1B to 7B parameters</p></li><li><p>Run on edge devices, mobile, single GPUs</p></li><li><p>Sub-50ms latency typical</p></li><li><p>Examples: Phi-3 Mini, Llama 3.2, Gemma 2B</p></li></ul><p><strong>Large Language Models (LLMs):</strong></p><ul><li><p>13B+ parameters</p></li><li><p>Require cloud infrastructure, GPU clusters</p></li><li><p>100ms to 5s+ latency</p></li><li><p>Examples: GPT-4, Claude 3.5, Llama 70B</p></li></ul><p>The interesting boundary is around 7B parameters. That's where deployment constraints kick in hard memory limits, quantization effectiveness, mobile viability. It's not arbitrary; it's where physics meets practicality.</p><h3><strong>The Easy Route: Just Use LLMs</strong></h3><p>Let's be honest starting with LLMs is the path of least resistance. Call OpenAI's API, get great results, ship fast. For most teams getting started, this makes perfect sense.</p><p>LLMs give you:</p><ul><li><p><strong>Broad capability</strong>: Handle almost any task reasonably well</p></li><li><p><strong>Zero infrastructure</strong>: Someone else's problem</p></li><li><p><strong>Rapid prototyping</strong>: From idea to demo in hours</p></li><li><p><strong>Continuous improvement</strong>: Models get better without you doing anything</p></li></ul><p>The math is simple: $0.01-0.10 per 1K tokens, no infrastructure headaches, predictable scaling. For many applications, this is the right choice and you should stop here.</p><p>But if you're processing millions of requests, need sub-100ms latency, have strict privacy requirements, or want to deploy to edge devices, the economics change quickly.</p><h3><strong>Why SLMs? The Compelling Scenarios</strong></h3><p>SLMs are not just cheaper LLMs. They invite different system designs. Benchmark scores alone hide how they reshape latency budgets, privacy posture, and total cost of ownership. The architectural shift is the story: place a capable small model close to the data and the user, and entire classes of experiences stop feeling laggy, leaky, or overpriced.</p><h3><strong>Latency-Critical Applications</strong></h3><p>Latency is the first unlock. Some interactions cannot wait half a second. Real-time voice agents feel human only when responses arrive inside a breath. Coding assistants preserve flow when completions appear faster than a keystroke pause. Simultaneous translation should track a speaker, not a transcript. Even humble edge workloads like sensor triage need decisions inside a control cycle. In these loops an SLM is not a compromise. It is often the only path to sub-50 ms without exotic caching.</p><p>Some applications simply can't wait 500ms for a response:</p><ul><li><p><strong>Real-time conversation</strong>: Voice assistants, gaming NPCs</p></li><li><p><strong>Interactive coding</strong>: Code completion that doesn't break flow</p></li><li><p><strong>Live translation</strong>: Simultaneous interpretation</p></li><li><p><strong>IoT processing</strong>: Sensor data analysis at the edge</p></li></ul><h3><strong>Privacy-First Deployments</strong></h3><p>Privacy is the next one. When data stays on a device or inside a facility, on-device SLMs keep the entire interaction local. A bedside clinical tool that parses notes, an internal finance screener that classifies transactions, a legal reviewer that summarizes privileged documents, a truly personal assistant that never calls home. Zero transmission by default. Fewer hard vendor dependencies because the boundary is physical rather than contractual.</p><p>When data can't leave the device or premises:</p><ul><li><p><strong>Healthcare</strong>: Patient records processing</p></li><li><p><strong>Finance</strong>: Transaction analysis</p></li><li><p><strong>Legal</strong>: Document review</p></li><li><p><strong>Personal assistants</strong>: Truly private AI</p></li></ul><h3><strong>Cost at Scale</strong></h3><p>Then comes cost at scale. The math is dull and decisive. If an SLM runs around 0.0001 to 0.001 dollars per 1K tokens and an LLM sits near 0.01 to 0.10, the gap is two to three orders of magnitude. At ten million tokens a month the spend is roughly 1 to 10 dollars for an SLM versus about 100 to 1000 dollars for an LLM. That delta buys observability, canaries, evals, and a thick layer of QA. At large volumes, economics become architecture.</p><p>The economics flip when you're processing high volumes:</p><ul><li><p>SLM: $0.0001-0.001 per 1K tokens</p></li><li><p>LLM: $0.01-0.10 per 1K tokens</p></li></ul><p>At 10M tokens/month, you're looking at $100-1K vs $100K-1M. The difference pays for a lot of infrastructure.</p><h3><strong>Edge Computing</strong></h3><p>Edge computing ties it together. Put the model where data is born and mobile apps work without a network, manufacturing lines run quality checks in real time, autonomous systems make split-second calls, and remote deployments keep operating through poor connectivity. This is not only about saving bandwidth. It reduces failure modes, removes round trips, and turns AI from a request into a capability.</p><p>Running AI where the data lives:</p><ul><li><p><strong>Mobile apps</strong>: No network dependency</p></li><li><p><strong>Manufacturing</strong>: Real-time quality control</p></li><li><p><strong>Autonomous systems</strong>: Split-second decisions</p></li><li><p><strong>Remote locations</strong>: Limited connectivity</p></li></ul><h3><strong>So how to choose?</strong></h3><p>Choosing between SLMs and LLMs comes down to four things. First, task complexity. SLMs excel at classification, routing, structured extraction, templated responses, and tightly scoped domain tasks, especially with light fine-tuning. LLMs win when multi-step reasoning, broad knowledge synthesis, open-ended creativity, or robust few-shot generalization across messy inputs is required.</p><p>Second, latency. Under 50 ms tends to be SLM territory. Between 100 ms and one second depends on other constraints. Beyond a second, LLMs are usually acceptable.</p><p>Third, privacy and compliance. On-device or on-prem SLMs provide zero data transmission by default, which simplifies regulatory conversations and builds trust while avoiding dependency on a single provider&#8217;s data path.</p><p>Fourth, the economic model. SLMs favor high-volume simple tasks, predictable costs, and long-term steady deployments. LLMs favor bursty or rare workloads, complex infrequent tasks, and situations where value per request dwarfs cost.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.nikiagarwal.com/p/a-swarm-of-slms-vs-an-llm/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.nikiagarwal.com/p/a-swarm-of-slms-vs-an-llm/comments"><span>Leave a comment</span></a></p><p></p><h3><strong>How-To: Building with SLMs</strong></h3><p>Building with SLMs benefits from a different playbook than working with large models. The goal is simple: pick the smallest model that clears the quality bar for the job, shape the memory and inference path so it stays fast and cheap, then add routing so bigger models are used only when there is real uncertainty or complexity.</p><h3><strong>1. Model Selection</strong></h3><p><strong>For general tasks:</strong></p><ul><li><p>Phi-3 Mini (3.8B): Best balance of capability and efficiency</p></li><li><p>Llama 3.2 (3B): Strong performance, good ecosystem</p></li><li><p>Gemma 2B: Lightweight, good for mobile</p></li></ul><p><strong>For specific domains:</strong></p><ul><li><p>Code: CodeLlama 7B, StarCoder</p></li><li><p>Math/Reasoning: DeepSeek-Math, Llama specialized variants</p></li><li><p>Multilingual: mGLM, multilingual Llama variants</p></li></ul><h3><strong>2. Optimization Techniques</strong></h3><p><strong>Memory optimization:</strong></p><ul><li><p>Gradient checkpointing</p></li><li><p>Mixed precision training</p></li><li><p>Parameter-efficient fine-tuning (LoRA, AdaLoRA)</p></li></ul><p><strong>Inference optimization:</strong></p><ul><li><p>Dynamic batching</p></li><li><p>KV cache optimization</p></li><li><p>Speculative decoding</p></li></ul><h3><strong>Smart Routing: The Best of Both Worlds</strong></h3><p>The most sophisticated systems don't choose between SLMs and LLMs they use both intelligently.</p><h3><strong>Cascade Routing</strong></h3><p>Start with SLM, escalate to LLM when needed:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RqdT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29e6a832-cc34-4cad-8767-cfca9c078020_3840x738.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RqdT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29e6a832-cc34-4cad-8767-cfca9c078020_3840x738.png 424w, https://substackcdn.com/image/fetch/$s_!RqdT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29e6a832-cc34-4cad-8767-cfca9c078020_3840x738.png 848w, https://substackcdn.com/image/fetch/$s_!RqdT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29e6a832-cc34-4cad-8767-cfca9c078020_3840x738.png 1272w, https://substackcdn.com/image/fetch/$s_!RqdT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29e6a832-cc34-4cad-8767-cfca9c078020_3840x738.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RqdT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29e6a832-cc34-4cad-8767-cfca9c078020_3840x738.png" width="1456" height="280" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/29e6a832-cc34-4cad-8767-cfca9c078020_3840x738.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:280,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:145091,&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://nikiagarwal.substack.com/i/173088592?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29e6a832-cc34-4cad-8767-cfca9c078020_3840x738.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_!RqdT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29e6a832-cc34-4cad-8767-cfca9c078020_3840x738.png 424w, https://substackcdn.com/image/fetch/$s_!RqdT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29e6a832-cc34-4cad-8767-cfca9c078020_3840x738.png 848w, https://substackcdn.com/image/fetch/$s_!RqdT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29e6a832-cc34-4cad-8767-cfca9c078020_3840x738.png 1272w, https://substackcdn.com/image/fetch/$s_!RqdT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29e6a832-cc34-4cad-8767-cfca9c078020_3840x738.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p></p><p>A cascade pattern handles the majority case with an SLM and escalates only when needed. The request hits the SLM first, the system checks a confidence score line around 0.8, and if the bar is met the response returns in something like 45 milliseconds. If not, the same request moves to an LLM that may take closer to 800 milliseconds but delivers the depth required. Latency stays low for the common path and quality stays high for the hard cases.</p><h3><strong>Parallel Processing</strong></h3><p>Run both, take the first good result:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pO7P!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32ea50b0-24fa-4b14-a45a-afa82dd5d6d0_3840x1076.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pO7P!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32ea50b0-24fa-4b14-a45a-afa82dd5d6d0_3840x1076.png 424w, https://substackcdn.com/image/fetch/$s_!pO7P!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32ea50b0-24fa-4b14-a45a-afa82dd5d6d0_3840x1076.png 848w, https://substackcdn.com/image/fetch/$s_!pO7P!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32ea50b0-24fa-4b14-a45a-afa82dd5d6d0_3840x1076.png 1272w, https://substackcdn.com/image/fetch/$s_!pO7P!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32ea50b0-24fa-4b14-a45a-afa82dd5d6d0_3840x1076.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pO7P!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32ea50b0-24fa-4b14-a45a-afa82dd5d6d0_3840x1076.png" width="1456" height="408" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/32ea50b0-24fa-4b14-a45a-afa82dd5d6d0_3840x1076.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:408,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:191101,&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://nikiagarwal.substack.com/i/173088592?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32ea50b0-24fa-4b14-a45a-afa82dd5d6d0_3840x1076.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_!pO7P!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32ea50b0-24fa-4b14-a45a-afa82dd5d6d0_3840x1076.png 424w, https://substackcdn.com/image/fetch/$s_!pO7P!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32ea50b0-24fa-4b14-a45a-afa82dd5d6d0_3840x1076.png 848w, https://substackcdn.com/image/fetch/$s_!pO7P!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32ea50b0-24fa-4b14-a45a-afa82dd5d6d0_3840x1076.png 1272w, https://substackcdn.com/image/fetch/$s_!pO7P!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32ea50b0-24fa-4b14-a45a-afa82dd5d6d0_3840x1076.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>A racing pattern trades a little extra compute for predictability. An SLM and an LLM start in parallel. If the SLM produces a candidate inside 100 milliseconds, a quick quality gate evaluates it. Passing the gate cancels the LLM and returns the fast result. Failing the gate lets the LLM finish and return its answer. This keeps p95 and p99 latencies tight while preserving quality on the edge cases that truly need more capacity.</p><h3><strong>Context-Aware Routing</strong></h3><p>Route based on query characteristics:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xtXA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88ac7ed5-41eb-44cc-b07c-67907c2ed96d_3840x1015.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xtXA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88ac7ed5-41eb-44cc-b07c-67907c2ed96d_3840x1015.png 424w, https://substackcdn.com/image/fetch/$s_!xtXA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88ac7ed5-41eb-44cc-b07c-67907c2ed96d_3840x1015.png 848w, https://substackcdn.com/image/fetch/$s_!xtXA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88ac7ed5-41eb-44cc-b07c-67907c2ed96d_3840x1015.png 1272w, https://substackcdn.com/image/fetch/$s_!xtXA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88ac7ed5-41eb-44cc-b07c-67907c2ed96d_3840x1015.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xtXA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88ac7ed5-41eb-44cc-b07c-67907c2ed96d_3840x1015.png" width="1456" height="385" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/88ac7ed5-41eb-44cc-b07c-67907c2ed96d_3840x1015.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:385,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:208344,&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://nikiagarwal.substack.com/i/173088592?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88ac7ed5-41eb-44cc-b07c-67907c2ed96d_3840x1015.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_!xtXA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88ac7ed5-41eb-44cc-b07c-67907c2ed96d_3840x1015.png 424w, https://substackcdn.com/image/fetch/$s_!xtXA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88ac7ed5-41eb-44cc-b07c-67907c2ed96d_3840x1015.png 848w, https://substackcdn.com/image/fetch/$s_!xtXA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88ac7ed5-41eb-44cc-b07c-67907c2ed96d_3840x1015.png 1272w, https://substackcdn.com/image/fetch/$s_!xtXA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88ac7ed5-41eb-44cc-b07c-67907c2ed96d_3840x1015.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>Context-aware routing lets the stack make smarter choices before any tokens flow. Privacy constraints route strictly to on-device SLMs. Tight latency budgets favor the small model for speed. Open privacy and relaxed latency push the decision to a complexity score derived from the query and recent outcomes. High complexity routes to an LLM for deeper reasoning, while everything else defaults to the SLM for efficiency.</p><h3><strong>Best SLMs Right Now</strong></h3><p>The landscape is moving fast, but here are the current standouts:</p><h3><strong>General Purpose</strong></h3><ol><li><p><strong>Phi-3 Mini (3.8B)</strong>: Microsoft's efficiency champion</p></li><li><p><strong>Llama 3.2 (3B)</strong>: Meta's balanced approach</p></li><li><p><strong>Gemma 2B</strong>: Google's lightweight option</p></li></ol><h3><strong>Specialized Models</strong></h3><ol><li><p><strong>Code</strong>: CodeLlama 7B, StarCoder 3B</p></li><li><p><strong>Math</strong>: DeepSeek-Math 7B</p></li><li><p><strong>Multilingual</strong>: mGLM 6B</p></li><li><p><strong>Conversational</strong>: Vicuna 7B, Alpaca variants</p></li></ol><h3><strong>Emerging Contenders</strong></h3><ol><li><p><strong>Qwen 2.5</strong>: Strong reasoning capabilities</p></li><li><p><strong>StableLM</strong>: Stability AI's latest</p></li><li><p><strong>TinyLlama</strong>: Ultra-lightweight at 1.1B parameters</p></li></ol><p>Realistically, most teams should start with LLMs and only move to SLMs when they hit specific constraints:</p><ul><li><p><strong>Latency</strong>: Can't wait 200ms+ for responses</p></li><li><p><strong>Privacy</strong>: Data can't leave premises</p></li><li><p><strong>Cost</strong>: Processing millions of requests monthly</p></li><li><p><strong>Connectivity</strong>: Need offline capability</p></li></ul><p>If none of these apply, stick with LLMs. The operational complexity of SLMs model selection, fine-tuning, deployment, monitoring isn't worth it unless you have a compelling reason.</p><p>But when you do have that reason, SLMs can be transformational. They enable applications that simply aren't possible with cloud-based LLMs: truly private AI, real-time interaction, offline operation, and cost-effective scale.</p><p>The future isn't SLMs vs LLMs it's intelligent orchestration of both. The teams building that capability now will have a significant advantage as AI becomes infrastructure.</p><p>What's your experience been with SLMs in production? Are you seeing the same patterns, or different constraints driving your decisions?</p><div><hr></div><p><em>Thanks for reading,</em></p><p><em>Nikita Agarwal, AI Infra Weekly</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.nikiagarwal.com/p/a-swarm-of-slms-vs-an-llm?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.nikiagarwal.com/p/a-swarm-of-slms-vs-an-llm?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.nikiagarwal.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.nikiagarwal.com/subscribe?"><span>Subscribe now</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[More GPUs Won't Save You]]></title><description><![CDATA[The Memory Wall Crisis That's Reshaping AI Infrastructure]]></description><link>https://www.nikiagarwal.com/p/more-gpus-wont-save-you</link><guid isPermaLink="false">https://www.nikiagarwal.com/p/more-gpus-wont-save-you</guid><dc:creator><![CDATA[Nikita Agarwal]]></dc:creator><pubDate>Tue, 02 Sep 2025 03:47:30 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!ji02!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedbd1518-00de-49c8-807a-8608bf3f7e9b_3840x2960.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ji02!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedbd1518-00de-49c8-807a-8608bf3f7e9b_3840x2960.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ji02!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedbd1518-00de-49c8-807a-8608bf3f7e9b_3840x2960.png 424w, https://substackcdn.com/image/fetch/$s_!ji02!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedbd1518-00de-49c8-807a-8608bf3f7e9b_3840x2960.png 848w, https://substackcdn.com/image/fetch/$s_!ji02!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedbd1518-00de-49c8-807a-8608bf3f7e9b_3840x2960.png 1272w, https://substackcdn.com/image/fetch/$s_!ji02!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedbd1518-00de-49c8-807a-8608bf3f7e9b_3840x2960.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ji02!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedbd1518-00de-49c8-807a-8608bf3f7e9b_3840x2960.png" width="1456" height="1122" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/edbd1518-00de-49c8-807a-8608bf3f7e9b_3840x2960.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1122,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:333943,&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://nikiagarwal.substack.com/i/172465670?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedbd1518-00de-49c8-807a-8608bf3f7e9b_3840x2960.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_!ji02!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedbd1518-00de-49c8-807a-8608bf3f7e9b_3840x2960.png 424w, https://substackcdn.com/image/fetch/$s_!ji02!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedbd1518-00de-49c8-807a-8608bf3f7e9b_3840x2960.png 848w, https://substackcdn.com/image/fetch/$s_!ji02!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedbd1518-00de-49c8-807a-8608bf3f7e9b_3840x2960.png 1272w, https://substackcdn.com/image/fetch/$s_!ji02!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedbd1518-00de-49c8-807a-8608bf3f7e9b_3840x2960.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><code> </code></p><p>The bottleneck has shifted. While everyone's been obsessing over compute scaling more GPUs, bigger clusters, faster interconnects a quieter crisis has been building in the shadows. We're hitting the memory wall in AI inference, and it's fundamentally changing how we need to think about serving large language models at scale.</p><p>Having worked on inference infrastructure at scale, I've watched this transition happen in real-time. The symptoms are everywhere: GPU utilization dropping despite queues backing up, latency spikes that don't correlate with compute load, and throughput plateaus that no amount of additional hardware seems to break through.</p><p>The math is unforgiving, and it's time we talked about it.</p><h2><strong>The Fundamental Problem</strong></h2><p>Modern LLMs are memory-bound, not compute-bound. This isn't immediately obvious because training workloads which dominate the narrative are the opposite. Training saturates compute with dense matrix multiplications across massive batches. Inference, particularly for generation tasks, tells a different story entirely.</p><p>Consider the memory requirements for serving a 70B parameter model:</p><ul><li><p><strong>Model weights</strong>: 70B parameters &#215; 16 bits = 140 GB (FP16)</p></li><li><p><strong>KV cache per sequence</strong>: ~2 GB for 4K context (depending on model architecture)</p></li><li><p><strong>Activation memory</strong>: Variable, but typically 1-4 GB during forward pass</p></li></ul><p>For a single H100 with 80GB HBM, you're already at the limit with just the model weights. Add concurrent sequences with their KV caches, and you quickly understand why memory bandwidth not FLOPS determines your serving capacity.</p><p>Let's formalize this. For autoregressive generation, each token requires:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\text{Memory Access} = W + KV_{\\text{read}} + KV_{\\text{write}} + A&quot;,&quot;id&quot;:&quot;SVFQBKXXIW&quot;}" data-component-name="LatexBlockToDOM"></div><p></p><p>Where:</p><ul><li><p>W = Model weights read (constant per token)</p></li><li><p>KVread = Key-value cache read (grows with sequence length)</p></li><li><p>KVwrite = Key-value cache write (new key-value pairs)</p></li><li><p>A = Activation memory (varies by layer)</p></li></ul><p>The key insight: W dominates early in generation, but as sequences grow longer, KV the bottleneck. This creates a non-linear relationship between sequence length and memory pressure that most serving systems handle poorly.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DJ5q!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5324732-48e7-4b63-bb36-0f77cdf539a0_3840x2229.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DJ5q!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5324732-48e7-4b63-bb36-0f77cdf539a0_3840x2229.png 424w, https://substackcdn.com/image/fetch/$s_!DJ5q!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5324732-48e7-4b63-bb36-0f77cdf539a0_3840x2229.png 848w, https://substackcdn.com/image/fetch/$s_!DJ5q!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5324732-48e7-4b63-bb36-0f77cdf539a0_3840x2229.png 1272w, https://substackcdn.com/image/fetch/$s_!DJ5q!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5324732-48e7-4b63-bb36-0f77cdf539a0_3840x2229.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DJ5q!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5324732-48e7-4b63-bb36-0f77cdf539a0_3840x2229.png" width="1456" height="845" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b5324732-48e7-4b63-bb36-0f77cdf539a0_3840x2229.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:845,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:320468,&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://nikiagarwal.substack.com/i/172465670?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5324732-48e7-4b63-bb36-0f77cdf539a0_3840x2229.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_!DJ5q!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5324732-48e7-4b63-bb36-0f77cdf539a0_3840x2229.png 424w, https://substackcdn.com/image/fetch/$s_!DJ5q!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5324732-48e7-4b63-bb36-0f77cdf539a0_3840x2229.png 848w, https://substackcdn.com/image/fetch/$s_!DJ5q!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5324732-48e7-4b63-bb36-0f77cdf539a0_3840x2229.png 1272w, https://substackcdn.com/image/fetch/$s_!DJ5q!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5324732-48e7-4b63-bb36-0f77cdf539a0_3840x2229.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><em>Memory access components during autoregressive generation. Note how KV cache reads dominate as sequence length increases.</em></p><h2><strong>The Arithmetic of Memory Bandwidth</strong></h2><p>Let's work through a concrete example. An H100 has roughly 3 TB/s of memory bandwidth. For a 70B parameter model at FP16:</p><ul><li><p><strong>Weight access per token</strong>: 140 GB</p></li><li><p><strong>Theoretical max tokens/sec</strong>: 3,000 GB/s &#247; 140 GB = ~21 tokens/sec</p></li></ul><p>This is the absolute ceiling for a single sequence, assuming perfect memory access patterns and zero overhead. In practice, you get maybe 60-70% of this due to:</p><ul><li><p>Memory access inefficiencies</p></li><li><p>KV cache overhead growing with sequence length</p></li><li><p>Attention computation patterns</p></li><li><p>System overhead</p></li></ul><p>So realistic peak throughput is closer to 12-15 tokens/sec for long sequences on a single H100. Now consider batching multiple sequences:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\text{Effective Bandwidth per Sequence} = \\frac{\\text{Total Bandwidth}}{N + \\alpha \\cdot \\text{KV Overhead}}&quot;,&quot;id&quot;:&quot;FDATUSPWHZ&quot;}" data-component-name="LatexBlockToDOM"></div><p>Where N<em> </em>is batch size and &#945; represents the KV cache access pattern efficiency. As batch size increases, the weight reads are amortized across sequences, but KV cache pressure grows quadratically with both batch size and sequence length.</p><p>This creates an optimization surface that most serving frameworks haven't properly mapped. The sweet spot isn't just about maximizing batch size it's about finding the optimal balance between batch size, sequence length, and memory access patterns.<code> </code></p><h2><strong>Why Current Solutions Fall Short</strong></h2><p>Most inference serving solutions treat memory as an afterthought. They focus on request routing, model loading, and compute scheduling, but ignore the fundamental memory access patterns that determine actual performance.</p><p><strong>Static Batching</strong> assumes uniform sequence lengths and fails catastrophically when real traffic arrives with mixed lengths. A batch with one 8K sequence and seven 1K sequences performs worse than eight 1K sequences due to memory access patterns.</p><p><strong>Naive KV Caching</strong> stores key-value pairs contiguously in memory, creating fragmentation and inefficient access patterns as sequences grow and shrink dynamically.</p><p><strong>Compute-First Scheduling</strong> allocates GPUs based on model size and expected compute load, ignoring memory bandwidth utilization. You end up with GPUs sitting idle while memory controllers are saturated.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!i9uw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9daf6b4f-9206-4492-b65c-eee3967603ad_3689x3840.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!i9uw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9daf6b4f-9206-4492-b65c-eee3967603ad_3689x3840.png 424w, https://substackcdn.com/image/fetch/$s_!i9uw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9daf6b4f-9206-4492-b65c-eee3967603ad_3689x3840.png 848w, https://substackcdn.com/image/fetch/$s_!i9uw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9daf6b4f-9206-4492-b65c-eee3967603ad_3689x3840.png 1272w, https://substackcdn.com/image/fetch/$s_!i9uw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9daf6b4f-9206-4492-b65c-eee3967603ad_3689x3840.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!i9uw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9daf6b4f-9206-4492-b65c-eee3967603ad_3689x3840.png" width="1456" height="1516" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9daf6b4f-9206-4492-b65c-eee3967603ad_3689x3840.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1516,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:511552,&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://nikiagarwal.substack.com/i/172465670?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9daf6b4f-9206-4492-b65c-eee3967603ad_3689x3840.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_!i9uw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9daf6b4f-9206-4492-b65c-eee3967603ad_3689x3840.png 424w, https://substackcdn.com/image/fetch/$s_!i9uw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9daf6b4f-9206-4492-b65c-eee3967603ad_3689x3840.png 848w, https://substackcdn.com/image/fetch/$s_!i9uw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9daf6b4f-9206-4492-b65c-eee3967603ad_3689x3840.png 1272w, https://substackcdn.com/image/fetch/$s_!i9uw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9daf6b4f-9206-4492-b65c-eee3967603ad_3689x3840.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><em>Typical production scenario: GPU compute utilization remains low while memory bandwidth saturates, creating a hidden bottleneck.</em></p><p>The result? Serving systems that look good on paper but collapse under real production loads.</p><h2><strong>Memory-Aware Serving Patterns</strong></h2><p>The path forward requires treating memory bandwidth as a first-class resource, just like compute. Here are the patterns that actually work at scale:</p><h3><strong>1. Dynamic Memory-Aware Batching</strong></h3><p>Instead of fixed batch sizes, implement dynamic batching that considers memory access patterns:</p><pre><code><code># Exosphere Node: Memory-Aware Dynamic Batching
class MemoryAwareBatchingNode(BaseNode):
    class Inputs(BaseModel):
        requests: str
        memory_budget_gb: str
        
    class Outputs(BaseModel):
        optimized_batch: str
        estimated_memory_usage: str
    
    async def execute(self) -&gt; Outputs:
        # Sort requests by sequence length for memory locality
        sorted_requests = sort_by_sequence_length(self.inputs.requests)
        
        # Greedy batch composition within memory budget
        batch = []
        memory_used = 0.0
        
        for request in sorted_requests:
            memory_cost = estimate_memory_cost(request, len(batch))
            if memory_used + memory_cost &lt;= self.inputs.memory_budget_gb:
                batch.append(request)
                memory_used += memory_cost
            else:
                break  # Budget exceeded
        
        return self.Outputs(
            optimized_batch=batch,
            estimated_memory_usage=memory_used
        )
</code></code></pre><p>The key insight: sequence length homogeneity within batches dramatically improves memory efficiency.</p><h3><strong>2. Streaming KV Cache Management</strong></h3><p>Rather than allocating fixed KV cache blocks, implement streaming cache management that adapts to actual usage patterns:</p><ul><li><p><strong>Chunked allocation</strong>: Allocate KV cache in fixed-size chunks rather than per-sequence</p></li><li><p><strong>Memory pooling</strong>: Reuse deallocated chunks across sequences</p></li><li><p><strong>Predictive prefetching</strong>: Prefetch likely-to-be-accessed cache lines based on attention patterns</p></li></ul><h3><strong>3. Memory Bandwidth Scheduling</strong></h3><p>Schedule requests based on memory bandwidth utilization, not just compute availability:</p><pre><code><code># Exosphere Node: Memory Bandwidth Scheduler
class MemoryBandwidthSchedulerNode(BaseNode):
    class Inputs(BaseModel):
        request: InferenceRequest
        peak_bandwidth_gb_per_sec: str
        current_utilization: str
        
    class Outputs(BaseModel):
        can_schedule: bool
        estimated_bandwidth_usage: str
        utilization_after_scheduling: str
    
    async def execute(self) -&gt; Outputs:
        # Calculate bandwidth requirements for this request
        bandwidth_needed = calculate_bandwidth_requirements(
            model_weights=MODEL_SIZE_GB,
            kv_cache_size=self.inputs.request.sequence_length,
            expected_tokens=self.inputs.request.expected_tokens
        )
        
        # Apply safety margin (80% max utilization)
        max_allowed = self.inputs.peak_bandwidth_gb_per_sec * 0.8
        
        # Check if we can schedule without exceeding bandwidth limits
        can_schedule = (
            self.inputs.current_utilization + bandwidth_needed &lt;= max_allowed
        )
        
        new_utilization = (
            self.inputs.current_utilization + bandwidth_needed 
            if can_schedule else self.inputs.current_utilization
        )
        
        return self.Outputs(
            can_schedule=can_schedule,
            estimated_bandwidth_usage=bandwidth_needed,
            utilization_after_scheduling=new_utilization
        )
</code></code></pre><h3><strong>4. Speculative Memory Allocation</strong></h3><p>For multi-turn conversations and long-form generation, implement speculative memory allocation that reserves bandwidth for likely future requests:</p><pre><code><code># Exosphere Node: Speculative Memory Allocation
class SpeculativeMemoryNode(BaseNode):
    class Inputs(BaseModel):
        conversation_history: str
        current_request: str
        available_memory_gb: str
        
    class Outputs(BaseModel):
        memory_reservation: str
        continuation_probability: str
        predicted_output_length: str
    
    async def execute(self) -&gt; Outputs:
        # Predict likelihood of conversation continuation
        continuation_prob = estimate_continuation_probability(
            self.inputs.conversation_history
        )
        
        # Predict output length based on prompt characteristics
        predicted_length = predict_output_length(
            self.inputs.current_request.prompt
        )
        
        # Calculate memory reservation strategy
        base_memory = calculate_base_memory_requirement(
            self.inputs.current_request
        )
        
        speculative_memory = (
            continuation_prob * 
            predicted_length * 
            MEMORY_PER_TOKEN_GB
        )
        
        # Cap speculative allocation at 30% of available memory
        total_reservation = min(
            base_memory + speculative_memory,
            self.inputs.available_memory_gb * 0.3
        )
        
        return self.Outputs(
            memory_reservation=total_reservation,
            continuation_probability=continuation_prob,
            predicted_output_length=predicted_length
        )
</code></code></pre><h3><strong>Orchestrating Memory-Aware Nodes</strong></h3><p>These individual nodes can be composed into a complete memory-aware inference pipeline using Exosphere's runtime:</p><pre><code><code># Exosphere Runtime: Memory-Aware Inference Pipeline
Runtime(
    namespace="MemoryAwareInference",
    name="memory-optimization-pipeline",
    nodes=[
        MemoryAwareBatchingNode,      # Dynamic batching optimization
        MemoryBandwidthSchedulerNode, # Bandwidth-aware scheduling  
        SpeculativeMemoryNode         # Predictive memory allocation
    ]
).start()

# Alternative: Separate runtimes for different concerns
Runtime(
    namespace="MemoryAwareInference",
    name="batch-optimizer",
    nodes=[MemoryAwareBatchingNode]
).start()

Runtime(
    namespace="MemoryAwareInference", 
    name="bandwidth-scheduler",
    nodes=[MemoryBandwidthSchedulerNode]
).start()
</code></code></pre><p>This modular approach allows you to scale different components independently based on your specific bottlenecks.</p><h2><strong>The Infrastructure Implications</strong></h2><p>Memory-aware serving changes infrastructure requirements fundamentally:</p><p><strong>Hardware Selection</strong>: Memory bandwidth becomes the primary metric, not FLOPS. A GPU with 2x memory bandwidth but 0.8x compute is often better for inference workloads.</p><p><strong>Cluster Architecture</strong>: Network topology matters less; memory hierarchy matters more. NUMA-aware scheduling and memory-local processing become critical.</p><p><strong>Monitoring and Observability</strong>: Traditional metrics like GPU utilization become misleading. Memory bandwidth utilization, cache hit rates, and access pattern efficiency become the key indicators.</p><p><strong>Cost Optimization</strong>: The cost model shifts from compute-hours to memory-bandwidth-hours. Suddenly, techniques like model quantization and sparse attention aren't just about model size they're about memory access efficiency.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vHFf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0a9cca7-f588-4d95-b528-db721952deab_3840x3041.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vHFf!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0a9cca7-f588-4d95-b528-db721952deab_3840x3041.png 424w, https://substackcdn.com/image/fetch/$s_!vHFf!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0a9cca7-f588-4d95-b528-db721952deab_3840x3041.png 848w, https://substackcdn.com/image/fetch/$s_!vHFf!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0a9cca7-f588-4d95-b528-db721952deab_3840x3041.png 1272w, https://substackcdn.com/image/fetch/$s_!vHFf!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0a9cca7-f588-4d95-b528-db721952deab_3840x3041.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vHFf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0a9cca7-f588-4d95-b528-db721952deab_3840x3041.png" width="1456" height="1153" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a0a9cca7-f588-4d95-b528-db721952deab_3840x3041.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1153,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:432543,&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://nikiagarwal.substack.com/i/172465670?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0a9cca7-f588-4d95-b528-db721952deab_3840x3041.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_!vHFf!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0a9cca7-f588-4d95-b528-db721952deab_3840x3041.png 424w, https://substackcdn.com/image/fetch/$s_!vHFf!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0a9cca7-f588-4d95-b528-db721952deab_3840x3041.png 848w, https://substackcdn.com/image/fetch/$s_!vHFf!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0a9cca7-f588-4d95-b528-db721952deab_3840x3041.png 1272w, https://substackcdn.com/image/fetch/$s_!vHFf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0a9cca7-f588-4d95-b528-db721952deab_3840x3041.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><em>Traditional compute-centric cost model vs memory-bandwidth-aware cost model. The optimization targets shift dramatically.</em></p><h2><strong>What This Means for the Next Wave</strong></h2><p>The memory wall in AI inference is forcing a fundamental rethink of serving infrastructure. Just as the transition from CPU to GPU changed everything about training, the transition from compute-bound to memory-bound inference is reshaping the serving landscape.</p><p><strong>Model Architecture Evolution</strong>: Future models will be designed with memory access patterns in mind, not just parameter count. Techniques like mixture-of-experts and dynamic routing become essential for memory efficiency.</p><p><strong>Serving Framework Consolidation</strong>: Frameworks that understand memory bandwidth as a first-class resource will dominate. Those that don't will be relegated to toy demos and benchmarks.</p><p><strong>Hardware-Software Co-design</strong>: The next generation of inference accelerators will be designed around memory bandwidth, with novel memory hierarchies and access patterns optimized for transformer workloads.</p><h2><strong>The Questions We Need to Answer</strong></h2><p>As we navigate this transition, several critical questions emerge:</p><ul><li><p>How do we build serving systems that gracefully degrade under memory pressure rather than failing catastrophically?</p></li><li><p>What's the right abstraction for memory bandwidth scheduling across heterogeneous hardware?</p></li><li><p>How do we balance the tension between batch efficiency and tail latency when memory access patterns are non-uniform?</p></li><li><p>Can we develop memory access pattern prediction that's accurate enough to drive real-time scheduling decisions?</p></li></ul><p>The memory wall isn't just a technical challenge it's an opportunity to build fundamentally better inference infrastructure. The teams that solve this first will have a massive advantage in the next phase of AI deployment.</p><p>What patterns have you seen in your inference workloads? Are you hitting memory bandwidth limits, or are there other bottlenecks I'm missing? The infrastructure that emerges from this transition will shape how we deploy AI for the next decade.</p><p><em>Thanks for reading,</em></p><p><em>Nikita Ag, AI Infra Weekly</em></p>]]></content:encoded></item><item><title><![CDATA[How are intelligent systems redefining what's possible with large data?]]></title><description><![CDATA[Agents at Internet Scale data]]></description><link>https://www.nikiagarwal.com/p/when-agents-go-beyond-human-scale</link><guid isPermaLink="false">https://www.nikiagarwal.com/p/when-agents-go-beyond-human-scale</guid><dc:creator><![CDATA[Nikita Agarwal]]></dc:creator><pubDate>Tue, 26 Aug 2025 03:45:21 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!IXjC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2abec2c4-cab7-47c7-be65-c230707da091_1080x813.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The quiet revolution happening in AI infrastructure isn't just about faster models or cheaper compute. It's about <strong>scale transcendence</strong>, the moment when AI agents stop being tools that extend human capability and become systems that operate entirely beyond human comprehension and capacity.</p><p>This week, I want to walk you through a fascinating case study that perfectly illustrates this transition: WhatPeopleWant, an AI agent that processes Hacker News discussions at internet scale to uncover entrepreneurial opportunities. But more importantly, I want to show you how platforms like Exosphere are making this kind of superhuman data processing accessible to any developer.</p><p><strong>The Scale Problem That Humans Can't Solve</strong></p><p>Let's start with a thought experiment. Imagine you wanted to manually analyze every Hacker News comment posted in the last 24 hours to identify unmet market needs. Here's what you'd be up against:</p><ul><li><p><strong>~500 new posts per day</strong> across all categories</p></li><li><p><strong>~15,000 comments generated daily</strong> across active threads</p></li><li><p><strong>Nested conversation trees</strong> that can go 10+ levels deep</p></li><li><p><strong>Real-time updates</strong> every few minutes as discussions evolve</p></li><li><p><strong>Pattern recognition</strong> across thousands of simultaneous conversations</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uHYG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5002cace-9cfe-4279-9f6c-cb06fdaab45b_2400x1600.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uHYG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5002cace-9cfe-4279-9f6c-cb06fdaab45b_2400x1600.png 424w, https://substackcdn.com/image/fetch/$s_!uHYG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5002cace-9cfe-4279-9f6c-cb06fdaab45b_2400x1600.png 848w, https://substackcdn.com/image/fetch/$s_!uHYG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5002cace-9cfe-4279-9f6c-cb06fdaab45b_2400x1600.png 1272w, https://substackcdn.com/image/fetch/$s_!uHYG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5002cace-9cfe-4279-9f6c-cb06fdaab45b_2400x1600.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uHYG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5002cace-9cfe-4279-9f6c-cb06fdaab45b_2400x1600.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5002cace-9cfe-4279-9f6c-cb06fdaab45b_2400x1600.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Evolution of Internet-Scale Data Processing: From Human-Scale to AI Agent-Scale Operations&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Evolution of Internet-Scale Data Processing: From Human-Scale to AI Agent-Scale Operations" title="Evolution of Internet-Scale Data Processing: From Human-Scale to AI Agent-Scale Operations" srcset="https://substackcdn.com/image/fetch/$s_!uHYG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5002cace-9cfe-4279-9f6c-cb06fdaab45b_2400x1600.png 424w, https://substackcdn.com/image/fetch/$s_!uHYG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5002cace-9cfe-4279-9f6c-cb06fdaab45b_2400x1600.png 848w, https://substackcdn.com/image/fetch/$s_!uHYG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5002cace-9cfe-4279-9f6c-cb06fdaab45b_2400x1600.png 1272w, https://substackcdn.com/image/fetch/$s_!uHYG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5002cace-9cfe-4279-9f6c-cb06fdaab45b_2400x1600.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>Evolution of Internet-Scale Data Processing: From Human-Scale to AI Agent-Scale Operations</p><p>A human analyst, working at superhuman speed, might process 100 comments per hour with decent comprehension. At that rate, analyzing a single day's worth of Hacker News data would take <strong>150 hours</strong>&#8212;nearly a month of full-time work. By the time you finish, you'd have 29 days of new data waiting.</p><p>This is where internet-scale data processing fundamentally breaks human-centric workflows. The traditional approach of "humans + tools" hits a hard ceiling when data velocity exceeds human cognitive throughput by orders of magnitude.</p><p>The WhatPeopleWant project demonstrates a fundamentally different approach. Instead of augmenting human analysis, it replaces it entirely with an autonomous agent pipeline that operates at machine speed.</p><p>Let's dissect the architecture:</p><h3><strong>The Data Ingestion Layer</strong></h3><pre><code><code>class GetMaxItemNode(BaseNode):
    async def execute(self) -&gt; Outputs:
        async with ClientSession() as session:
            async with session.get(MAX_ITEM_ENDPOINT) as response:
                max_item = await response.json()
        return self.Outputs(max_item=str(max_item))
</code></code></pre><p>The agent starts by hitting the Hacker News Firebase API to get the current maximum item ID, essentially the "water mark" for new content. This simple operation reveals something profound: the agent doesn't process data in human-friendly batches. It processes everything, continuously, as a streaming workflow.</p><p><strong>Parallel Data Processing at Scale</strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!07TU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42d7ca6e-083c-4fc1-9a0b-7526f97c7f34_2400x1600.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!07TU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42d7ca6e-083c-4fc1-9a0b-7526f97c7f34_2400x1600.png 424w, https://substackcdn.com/image/fetch/$s_!07TU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42d7ca6e-083c-4fc1-9a0b-7526f97c7f34_2400x1600.png 848w, https://substackcdn.com/image/fetch/$s_!07TU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42d7ca6e-083c-4fc1-9a0b-7526f97c7f34_2400x1600.png 1272w, https://substackcdn.com/image/fetch/$s_!07TU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42d7ca6e-083c-4fc1-9a0b-7526f97c7f34_2400x1600.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!07TU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42d7ca6e-083c-4fc1-9a0b-7526f97c7f34_2400x1600.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/42d7ca6e-083c-4fc1-9a0b-7526f97c7f34_2400x1600.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;WhatPeopleWant Agent: Data Processing Pipeline Volume Analysis&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="WhatPeopleWant Agent: Data Processing Pipeline Volume Analysis" title="WhatPeopleWant Agent: Data Processing Pipeline Volume Analysis" srcset="https://substackcdn.com/image/fetch/$s_!07TU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42d7ca6e-083c-4fc1-9a0b-7526f97c7f34_2400x1600.png 424w, https://substackcdn.com/image/fetch/$s_!07TU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42d7ca6e-083c-4fc1-9a0b-7526f97c7f34_2400x1600.png 848w, https://substackcdn.com/image/fetch/$s_!07TU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42d7ca6e-083c-4fc1-9a0b-7526f97c7f34_2400x1600.png 1272w, https://substackcdn.com/image/fetch/$s_!07TU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42d7ca6e-083c-4fc1-9a0b-7526f97c7f34_2400x1600.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>WhatPeopleWant Agent: Data Processing Pipeline Volume Analysis</p><p>The real magic happens in the <code>GenerateItemsNode</code>, which creates processing tasks for every single item ID in a range:</p><pre><code><code>async def execute(self) -&gt; list[Outputs]:
    outputs = []
    for item_id in range(int(self.inputs.start_id), int(self.inputs.end_id) + 1):
        outputs.append(self.Outputs(item_id=str(item_id)))
    return outputs
</code></code></pre><p>This isn't just batch processing it's <strong>dynamic parallelization</strong>. The agent spawns individual processing tasks for each piece of content, allowing Exosphere's runtime to distribute work across multiple containers automatically. A human would process items sequentially; the agent processes them as a massive parallel operation.</p><p><strong>Graph-Based Relationship Mapping</strong></p><p>The agent doesn't just read comments, it reconstructs entire conversation graphs, identifies discussion clusters, and spots trending topics based on engagement patterns.</p><p>Flowchart showing a LangGraph multi-agent system workflow orchestrating city-related data retrieval and analysis using various agents and APIs.</p><p>This type of multi-dimensional analysis would require a team of human analysts working with specialized tools for weeks.</p><p><strong>The Exosphere Advantage: Infrastructure That Thinks</strong></p><p>What makes this architecture possible isn't just clever code but the underlying platform. Exosphere provides three critical capabilities that transform this from an interesting prototype to a production-scale system:</p><p><strong>1. Automatic Orchestration</strong></p><p>With a simple deployment:</p><pre><code><code>runner-1:
  build: .
  container_name: whatpeoplewant-runner-1
  environment:
    - EXOSPHERE_STATE_MANAGER_URI=http://exosphere-state-manager:8000
    - EXOSPHERE_API_KEY=exosphere@123

# ... repeated for runner-2, runner-3, runner-4
</code></code></pre><p>The system automatically distributes work across four runner instances. When processing load increases, Exosphere can spawn additional runners dynamically. The developer doesn't manage containers, queues, or load balancing&#8212;the platform handles orchestration automatically.</p><p><strong>2. Stateful Workflow Management</strong></p><p>The <code>register.py</code> file defines a complex directed acyclic graph (DAG) of processing nodes:</p><pre><code><code>graph_nodes=[
    {
        "node_name": GetMaxItemNode.__name__,
        "identifier": "GetMaxItem",
        "inputs": {},
        "next_nodes": ["AddDatabasePointer"]
    },
    {
        "node_name": AddDatabasePointerNode.__name__,
        "identifier": "AddDatabasePointer", 
        "inputs": {"item_id": "${{GetMaxItem.outputs.max_item}}"},
        "next_nodes": ["GenerateItems"]
    }
    # ... continues for 8+ nodes
]
</code></code></pre><p>Each node can fail, restart, or scale independently while maintaining state continuity. Traditional processing systems require complex error handling and checkpointing logic. Exosphere provides this as a platform primitive.</p><p>The MongoDB aggregation pipelines create temporal patterns:</p><ul><li><p>Which types of problems get discussed repeatedly?</p></li><li><p>How does sentiment around specific technologies evolve?</p></li><li><p>Which conversation patterns predict successful product launches?</p></li></ul><p>A human analyst might spot individual opportunities. The agent spots <strong>meta-patterns</strong> across thousands of conversations over months of operation. It develops institutional memory that no individual human could maintain</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IXjC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2abec2c4-cab7-47c7-be65-c230707da091_1080x813.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IXjC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2abec2c4-cab7-47c7-be65-c230707da091_1080x813.jpeg 424w, https://substackcdn.com/image/fetch/$s_!IXjC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2abec2c4-cab7-47c7-be65-c230707da091_1080x813.jpeg 848w, https://substackcdn.com/image/fetch/$s_!IXjC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2abec2c4-cab7-47c7-be65-c230707da091_1080x813.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!IXjC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2abec2c4-cab7-47c7-be65-c230707da091_1080x813.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!IXjC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2abec2c4-cab7-47c7-be65-c230707da091_1080x813.jpeg" width="1080" height="813" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2abec2c4-cab7-47c7-be65-c230707da091_1080x813.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:813,&quot;width&quot;:1080,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:177611,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://nikiagarwal.substack.com/i/171880854?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2abec2c4-cab7-47c7-be65-c230707da091_1080x813.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!IXjC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2abec2c4-cab7-47c7-be65-c230707da091_1080x813.jpeg 424w, https://substackcdn.com/image/fetch/$s_!IXjC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2abec2c4-cab7-47c7-be65-c230707da091_1080x813.jpeg 848w, https://substackcdn.com/image/fetch/$s_!IXjC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2abec2c4-cab7-47c7-be65-c230707da091_1080x813.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!IXjC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2abec2c4-cab7-47c7-be65-c230707da091_1080x813.jpeg 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><strong>The Technical Architecture Deep Dive</strong></p><p>Let's examine how Exosphere enables this kind of sophisticated workflow with remarkably simple code:</p><p><strong>Node-Based Processing</strong></p><p>Each processing step is implemented as a <code>BaseNode</code> with standardized inputs and outputs:</p><pre><code><code>class AddItemToDatabaseNode(BaseNode):
    class Inputs(BaseModel):
        item_id: str
    
    class Outputs(BaseModel):
        object_id: str
    
    async def execute(self) -&gt; Outputs:
        item_id = int(self.inputs.item_id)
        item_data = await get_item_from_hacker_news(item_id)
        object_id = await add_item_to_database(item_id, item_data)
        return self.Outputs(object_id=object_id)
</code></code></pre><p>This abstraction allows complex workflows to be composed from simple, testable components. Each node can be developed, tested, and deployed independently while maintaining type safety through Pydantic models.</p><p><strong>Distributed State Management</strong></p><p>The platform maintains a centralized state manager that tracks workflow execution across all nodes:</p><pre><code><code>StateManager(namespace="WhatPeopleWant").trigger(
    graph_name="ScrapeYC",
    state=TriggerState(
        identifier="GetMaxItem",
        inputs={}
    )
)
</code></code></pre><p>This enables sophisticated workflow patterns like conditional branching, parallel execution, and automatic retry logic without requiring developers to implement distributed systems primitives.</p><p><strong>Resource Optimization</strong></p><p>The scheduler automatically batches work based on resource availability and deadline requirements. During high-load periods, it may delay non-critical processing. During low-load periods, it accelerates processing to stay ahead of schedule.</p><p>This dynamic resource allocation is invisible to the developer but critical for cost-effective internet-scale operation.</p><p><strong>The Economics </strong></p><p>Here's where the story gets really interesting. The WhatPeopleWant agent processes more data in an hour than a team of human analysts could handle in weeks. But it doesn't just process more, it processes <strong>differently</strong></p><p>Traditional market research might involve:</p><ul><li><p>Survey design and distribution</p></li><li><p>Response collection and validation</p></li><li><p>Statistical analysis and reporting</p></li><li><p>Weeks of human effort across multiple specialists</p></li></ul><p>The agent approach involves:</p><ul><li><p>Continuous data ingestion from public discussions</p></li><li><p>Real-time sentiment and pattern analysis</p></li><li><p>Automated insight generation and distribution</p></li><li><p>Zero ongoing human effort after initial setup</p></li></ul><p>The unit economics are transformative. Instead of paying $10,000+ for a market research report that's outdated by publication, you get continuous intelligence for the cost of cloud compute&#8212;typically under $50/month for this type of workload.</p><p><strong>What This Means for AI Infrastructure</strong></p><p>The WhatPeopleWant project is a neat preview of how AI infrastructure will evolve. We're moving from platforms that help humans work faster to platforms that enable entirely non-human workflows.</p><p>Key architectural patterns emerging:</p><ol><li><p><strong>Agent-Native Design</strong>: Instead of building human-centric interfaces with API access, we're building agent-native platforms where the primary users are other AI systems.</p></li><li><p><strong>Workflow Declarativity</strong>: Developers describe what they want accomplished, not how to accomplish it. The platform handles optimization, scaling, and reliability automatically.</p></li><li><p><strong>Intelligence Integration</strong>: LLM capabilities are built into the infrastructure layer, not added as external services. This enables more sophisticated processing without complex integration overhead.</p></li><li><p><strong>Scale Economics</strong>: The marginal cost of additional data processing approaches zero, enabling workflows that were previously economically impossible.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.nikiagarwal.com/p/when-agents-go-beyond-human-scale?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.nikiagarwal.com/p/when-agents-go-beyond-human-scale?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></li></ol><p>Platforms like <a href="https://exosphere.host/">Exosphere </a>represent the beginning of a broader infrastructure shift. Today, we're still in the "human + AI tools" era for most applications. But projects like WhatPeopleWant show us what the "AI-native workflow" era looks like.</p><p>The implications are staggering:</p><ul><li><p><strong>Research and Analysis</strong>: Continuous monitoring and analysis of any topic across all available data sources</p></li><li><p><strong>Business Intelligence</strong>: Real-time market sensing and competitive analysis that updates faster than human decision-making cycles</p></li><li><p><strong>Content Creation</strong>: Automated generation of insights, reports, and creative content based on real-time data synthesis</p></li><li><p><strong>System Optimization</strong>: Self-managing infrastructure that optimizes performance, cost, and reliability without human intervention</p></li></ul><p>We're not just building better tools for humans. We're building the foundation for a new class of applications that operate entirely beyond human scale and comprehension.</p><p>The next time someone asks you about AI infrastructure, don't just think about faster GPUs or cheaper inference. Think about platforms that enable entirely superhuman workflows. Because that's where the real transformation is happening.</p><div><hr></div><p><em>Want to explore building your own internet-scale AI workflows? Check out the <a href="https://github.com/NiveditJain/WhatPeopleWant">WhatPeopleWant repository</a> and <a href="https://exosphere.host/">Exosphere's</a> platform to get started. The future is autonomous, and it's arriving faster than most people realize.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.nikiagarwal.com/p/when-agents-go-beyond-human-scale/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.nikiagarwal.com/p/when-agents-go-beyond-human-scale/comments"><span>Leave a comment</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.nikiagarwal.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.nikiagarwal.com/subscribe?"><span>Subscribe now</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[Does inference have an answer to your hallucination problem?]]></title><description><![CDATA[Yes, and the strategy is called Test Time Compute Scaling.]]></description><link>https://www.nikiagarwal.com/p/does-inference-have-an-answer-to</link><guid isPermaLink="false">https://www.nikiagarwal.com/p/does-inference-have-an-answer-to</guid><dc:creator><![CDATA[Nikita Agarwal]]></dc:creator><pubDate>Mon, 18 Aug 2025 16:15:29 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!GA9D!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7bb5d00-ee50-4781-af9a-53aacec403af_1190x574.png" 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_!GA9D!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7bb5d00-ee50-4781-af9a-53aacec403af_1190x574.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GA9D!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7bb5d00-ee50-4781-af9a-53aacec403af_1190x574.png 424w, https://substackcdn.com/image/fetch/$s_!GA9D!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7bb5d00-ee50-4781-af9a-53aacec403af_1190x574.png 848w, https://substackcdn.com/image/fetch/$s_!GA9D!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7bb5d00-ee50-4781-af9a-53aacec403af_1190x574.png 1272w, https://substackcdn.com/image/fetch/$s_!GA9D!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7bb5d00-ee50-4781-af9a-53aacec403af_1190x574.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GA9D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7bb5d00-ee50-4781-af9a-53aacec403af_1190x574.png" width="1190" height="574" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b7bb5d00-ee50-4781-af9a-53aacec403af_1190x574.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:574,&quot;width&quot;:1190,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:834513,&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://nikiagarwal.substack.com/i/171287414?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7bb5d00-ee50-4781-af9a-53aacec403af_1190x574.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_!GA9D!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7bb5d00-ee50-4781-af9a-53aacec403af_1190x574.png 424w, https://substackcdn.com/image/fetch/$s_!GA9D!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7bb5d00-ee50-4781-af9a-53aacec403af_1190x574.png 848w, https://substackcdn.com/image/fetch/$s_!GA9D!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7bb5d00-ee50-4781-af9a-53aacec403af_1190x574.png 1272w, https://substackcdn.com/image/fetch/$s_!GA9D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7bb5d00-ee50-4781-af9a-53aacec403af_1190x574.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></p><p>The last three years were dominated by the race to scale model training. Bigger datasets on larger, more GPUs drove the leap from GPT-3 to GPT-4, from early LLaMAs to Gemini, from &#8220;just text&#8221; to multimodal reasoning. That era gave us the raw capability.</p><p>But once a model is trained, where is its value truly realized?</p><p>Not in the datacenter that produced it, but in the billions of inferences it serves daily. This is where the real frontier lies: inference compute.</p><p>Being on the team handling inference compute at Azure OpenAI, I had the privilege of being on the frontline handling the sheer volume that inference drives, which is growing at rocket speed, not by months but by days. We are only crawling into the inference landscape in my mind.</p><p>Inference has a fundamentally different characteristic than training: it is elastic. Training is a one-shot event where you scale up until the model converges. Inference, by contrast, happens query by query, workflow by workflow. Each request can be cheap or expensive depending on how much &#8220;thinking time&#8221; you allow the model.</p><p><em>This is what we mean by <strong>test-time compute scaling</strong>: deciding at runtime how much computation to spend per query.</em></p><p>That elasticity creates a central tension every infra team now feels: <strong>latency vs reliability vs cost</strong>. Push for low latency and you risk brittle, hallucinated outputs.</p><p>Push for reliability and you must tolerate higher token counts, retries, or parallel search.</p><p>Push for cost efficiency and you need clever policies that dynamically adapt compute to the hardness of the query.</p><p>Balancing these forces is quickly becoming as important as training breakthroughs themselves.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!MGfW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a7604c5-850a-4d6e-9251-be56aec50c7d_2400x1600.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!MGfW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a7604c5-850a-4d6e-9251-be56aec50c7d_2400x1600.png 424w, https://substackcdn.com/image/fetch/$s_!MGfW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a7604c5-850a-4d6e-9251-be56aec50c7d_2400x1600.png 848w, https://substackcdn.com/image/fetch/$s_!MGfW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a7604c5-850a-4d6e-9251-be56aec50c7d_2400x1600.png 1272w, https://substackcdn.com/image/fetch/$s_!MGfW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a7604c5-850a-4d6e-9251-be56aec50c7d_2400x1600.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!MGfW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a7604c5-850a-4d6e-9251-be56aec50c7d_2400x1600.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1a7604c5-850a-4d6e-9251-be56aec50c7d_2400x1600.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Estimated global token usage by LLMs: 2023-2025 (in trillions of tokens)&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Estimated global token usage by LLMs: 2023-2025 (in trillions of tokens)" title="Estimated global token usage by LLMs: 2023-2025 (in trillions of tokens)" srcset="https://substackcdn.com/image/fetch/$s_!MGfW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a7604c5-850a-4d6e-9251-be56aec50c7d_2400x1600.png 424w, https://substackcdn.com/image/fetch/$s_!MGfW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a7604c5-850a-4d6e-9251-be56aec50c7d_2400x1600.png 848w, https://substackcdn.com/image/fetch/$s_!MGfW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a7604c5-850a-4d6e-9251-be56aec50c7d_2400x1600.png 1272w, https://substackcdn.com/image/fetch/$s_!MGfW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a7604c5-850a-4d6e-9251-be56aec50c7d_2400x1600.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><em>Estimated global token usage by LLMs: 2023-2025 (in trillions of tokens)</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.nikiagarwal.com/p/does-inference-have-an-answer-to?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.nikiagarwal.com/p/does-inference-have-an-answer-to?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><h2>What is Test-Time Compute Scaling?</h2><p>At its core, <strong>test-time compute scaling</strong> is about spending more computational effort during inference to get a better answer. Instead of firing off a single forward pass and taking the first decoded response, we allow the model to &#8220;think longer&#8221; by exploring multiple reasoning paths, searching, verifying, and then selecting the most reliable outcome. Crucially, none of this requires retraining the model, the weights remain frozen. <strong>What changes is the strategy we apply at inference?</strong></p><p>It is almost a spectrum. On one end, you have the cheapest possible decode: one forward pass, greedy decoding, instant output. On the other end, you have heavyweight inference: dozens of parallel samples, beam search over reasoning chains, verifier models cross-checking results, even iterative self-repair loops.</p><p>The space in between is where most real-world applications will land, allocating compute dynamically based on query difficulty, user expectations, or system policy.</p><p>This makes test-time compute scaling a knob we can dial per request, contrary to training, where scale is fixed once you launch a run. This knob is becoming an essential infrastructure piece for anyone orchestrating production grade AI workflows.</p><p>AI workflows have evolved to have a large number of steps: retrieval, reasoning, code execution, summarization, routing between agents, and handoffs to humans or external APIs. In these workflows, errors are multiplicative<em><a href="https://nikiagarwal.substack.com/p/make-your-ai-agent-fail-fast-to-succeed">(ref #1)</a></em>. A single weak step, a misparsed field, a hallucinated fact, a failed function call, can derail the entire DAG. The deeper the pipeline, the more fragile it becomes.</p><p>This is where test-time compute scaling becomes essential. By allocating more inference compute <strong>at the leaves of the workflow</strong> the points where correctness matters most one can catch failures before they cascade.</p><p>One of the underappreciated aspects of test-time compute scaling is that it maps perfectly onto <strong>parallel execution patterns</strong> we already know from distributed systems. Multi-sample voting, best-of-N reranking, tree-of-thoughts search, these aren&#8217;t sequential processes. They are inherently parallelizable.</p><p>That parallelism changes the character of test-time scaling. Instead of thinking of it as &#8220;retry until you get a good answer,&#8221; you can treat it as <strong>fanout followed by aggregation</strong>. Fire off ten reasoning paths in parallel, score them as they arrive, and stop early if a quorum emerges. Or run multiple candidates asynchronously, let verifiers score them on the side, and promote a winner as soon as confidence is high enough. This is the same pattern we&#8217;ve been using for years in web services (hedged requests, quorum reads in distributed databases, speculative execution in MapReduce), only now applied at the inference layer.</p><p>The unlock is that these techniques let us trade off latency against reliability without always paying the full sequential cost. From an infrastructure perspective, this means test-time scaling is not a modeling hack, it&#8217;s a <strong>workflow execution problem</strong>.</p><p>How you shard inference requests across GPUs, how you pipeline verifiers, how you detect stragglers, these become first-class concerns. Just as batch processing frameworks like Spark made parallel data transformations tractable, inference orchestrators will need to make <strong>parallel reasoning at test time</strong> a built-in capability.</p><p>So how do you go about implementing this, let&#8217;s get some intuition to get you started.</p><h3>Multi-Sample + Majority Vote</h3><p>The simplest baseline: ask the model the same question multiple times and see what answer comes up most often. This works because LLMs are stochastic when the same output emerges across independent samples, it&#8217;s usually more reliable.</p><pre><code><code>answers = [model(query, temperature=0.7) for _ in range(K)]
final = most_common(answers)

</code></code></pre><p>Like asking five smart people the same question and going with the consensus.</p><div><hr></div><h3>Best-of-N with a Verifier</h3><p>Here, instead of blindly voting, we <strong>score</strong> candidates against some verifier. The verifier might be another model, a set of heuristics, or even ground-truth tests (in coding tasks).</p><pre><code><code>candidates = [model(query) for _ in range(N)]
scored = [(cand, verifier(cand)) for cand in candidates]
final = argmax(scored)   # candidate with highest verifier score</code></code></pre><p>Think of it as generating multiple drafts, then letting an editor pick the best.</p><div><hr></div><h3>Search over Thoughts (Tree/Beam Search)</h3><p>Rather than producing whole answers at once, generate reasoning step by step. Branch on partial outputs, prune weak paths, and expand promising ones.</p><pre><code><code>frontier = [""]
for step in range(max_steps):
    expanded = []
    for partial in frontier:
        continuations = model_step(query, partial, beam_width)
        expanded.extend(continuations)
    frontier = prune(expanded, top_k=beam_width)
final = best(frontier)</code></code></pre><p>Instead of one linear train of thought, imagine exploring multiple branches of reasoning and following the ones that &#8220;look right.&#8221;</p><div><hr></div><h3>Self-Critique and Repair Loops</h3><p>Ask the model to check its own output and revise. This loop often catches simple arithmetic or logical slips.</p><pre><code><code>draft = model(query)
for _ in range(max_iters):
    critique = model(f"Critique this answer: {draft}")
    if "no issues" in critique: break
    draft = model(f"Revise based on critique: {draft}\\n{critique}")
final = draft</code></code></pre><p>Write, proofread, revise repeat.</p><div><hr></div><h3>Tool-Augmented Inference</h3><p>Bring in external checks: calculators for math, retrievers for grounding, unit tests for code.</p><pre><code><code>draft = model(query)
if has_equations(draft):
    result = external_calc(draft)
    draft = inject_result(draft, result)
if not passes_tests(draft):
    draft = repair(draft)</code></code></pre><p>Give the model instruments instead of trusting it to play by ear.</p><div><hr></div><p>Each of these techniques <strong>scales with parallelism:</strong> more samples, more</p><p> branches, more verifier calls. And each one benefits from smart stop rules: don&#8217;t always burn the full budget, quit early when confidence is high.</p><p>The shift from training scale to inference scale is an answer to the determinism problem. Now we are no longer dependant on only bigger models for reliability. We can derive it from <strong>smarter orchestration at runtime</strong>, where parallelism, verifiers, and stop rules combine into systems that steer models toward trustworthy results.</p><p>Test-time compute scaling doesn&#8217;t make models smarter it makes the <em>system</em> around them smarter. And in the new era of AI, that&#8217;s where the real breakthroughs will come from.</p><p><em>What do you think?</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.nikiagarwal.com/p/does-inference-have-an-answer-to/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.nikiagarwal.com/p/does-inference-have-an-answer-to/comments"><span>Leave a comment</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.nikiagarwal.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.nikiagarwal.com/subscribe?"><span>Subscribe now</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[Artificially Intelligent Orchestration of Agents]]></title><description><![CDATA[Centralized policies. Decentralized agents. Deterministic outcomes.]]></description><link>https://www.nikiagarwal.com/p/artificially-intelligent-orchestration</link><guid isPermaLink="false">https://www.nikiagarwal.com/p/artificially-intelligent-orchestration</guid><dc:creator><![CDATA[Nikita Agarwal]]></dc:creator><pubDate>Mon, 11 Aug 2025 12:54:42 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!CFGD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74b77484-4d23-46bc-8656-3dfa6cd96cd2_1200x481.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Intelligence.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!a8rS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b02aed4-9903-45ab-ab20-9e0219604706_1706x670.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!a8rS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b02aed4-9903-45ab-ab20-9e0219604706_1706x670.png 424w, https://substackcdn.com/image/fetch/$s_!a8rS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b02aed4-9903-45ab-ab20-9e0219604706_1706x670.png 848w, https://substackcdn.com/image/fetch/$s_!a8rS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b02aed4-9903-45ab-ab20-9e0219604706_1706x670.png 1272w, https://substackcdn.com/image/fetch/$s_!a8rS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b02aed4-9903-45ab-ab20-9e0219604706_1706x670.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!a8rS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b02aed4-9903-45ab-ab20-9e0219604706_1706x670.png" width="1456" height="572" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9b02aed4-9903-45ab-ab20-9e0219604706_1706x670.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:572,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:222696,&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://nikiagarwal.substack.com/i/170681006?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b02aed4-9903-45ab-ab20-9e0219604706_1706x670.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_!a8rS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b02aed4-9903-45ab-ab20-9e0219604706_1706x670.png 424w, https://substackcdn.com/image/fetch/$s_!a8rS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b02aed4-9903-45ab-ab20-9e0219604706_1706x670.png 848w, https://substackcdn.com/image/fetch/$s_!a8rS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b02aed4-9903-45ab-ab20-9e0219604706_1706x670.png 1272w, https://substackcdn.com/image/fetch/$s_!a8rS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b02aed4-9903-45ab-ab20-9e0219604706_1706x670.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></p><p>&#8216;The ability to understand, learn and think&#8217;. My mind is plagued by the implications of &#8216;intelligence&#8217; being available perpetually, autonomously: what changes? How should we build to cater to such change?</p><p>Last week, it was interesting to work out how simple, innocent-looking graphs could explode into 6 figure node beasts with even mid-scale production data. It was mind blowing to imagine intelligence being made available to each of those nodes, independently, reliably, at scale.</p><p><em><strong>But is intelligence to be limited only to node-level functionality? Why should we limit ourselves to such boundaries?</strong></em></p><p>Humans have probably been one of the most efficient species to have been able to organise and coordinate large groups of people into sub groups and orchestrate accomplishing a large goal. Some call it religion, others call it countries(jk!) That has been our mark of intelligence.</p><p>Now with Artificial Intelligence being made so much more mature, it is exciting to imagine AI coordinating large groups of AI units into subgroups to orchestrate accomplishing a large goal. At scale. Autonomously. <em>Now that&#8217;s exciting.</em></p><p><em><strong>Today, we talk about such intelligent orchestration.</strong></em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CFGD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74b77484-4d23-46bc-8656-3dfa6cd96cd2_1200x481.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CFGD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74b77484-4d23-46bc-8656-3dfa6cd96cd2_1200x481.png 424w, https://substackcdn.com/image/fetch/$s_!CFGD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74b77484-4d23-46bc-8656-3dfa6cd96cd2_1200x481.png 848w, https://substackcdn.com/image/fetch/$s_!CFGD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74b77484-4d23-46bc-8656-3dfa6cd96cd2_1200x481.png 1272w, https://substackcdn.com/image/fetch/$s_!CFGD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74b77484-4d23-46bc-8656-3dfa6cd96cd2_1200x481.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CFGD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74b77484-4d23-46bc-8656-3dfa6cd96cd2_1200x481.png" width="1200" height="481" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/74b77484-4d23-46bc-8656-3dfa6cd96cd2_1200x481.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:481,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:287188,&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://nikiagarwal.substack.com/i/170681006?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e653149-4c75-4cd7-8e62-a8ae06614343_1200x1200.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_!CFGD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74b77484-4d23-46bc-8656-3dfa6cd96cd2_1200x481.png 424w, https://substackcdn.com/image/fetch/$s_!CFGD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74b77484-4d23-46bc-8656-3dfa6cd96cd2_1200x481.png 848w, https://substackcdn.com/image/fetch/$s_!CFGD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74b77484-4d23-46bc-8656-3dfa6cd96cd2_1200x481.png 1272w, https://substackcdn.com/image/fetch/$s_!CFGD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74b77484-4d23-46bc-8656-3dfa6cd96cd2_1200x481.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><h2>Intelligent Orchestration</h2><p>We have accomplished many a complex tasks with many sophistacated workflows, familarly called &#8216;DAGs&#8217; They are almost the basis of any mature system, Kafka queues, Redis streams, all buzzing to keep your system guzzling. But here&#8217;s the interesting thing: with intelligence at our disposal, we now are free from the shackles of a &#8216;DAG&#8217;. We can now create sequences of actions to accomplish tasks at runtime - popularly called &#8216;<em><strong>agents</strong></em>&#8217;. However, only so much can be achieved by a single agent, we need &#8216;<em><strong>multi-agentic</strong></em>&#8217; solutions going forward to accomplish complex tasks for us.</p><p>Agentic systems rarely follow a single, fixed path. Inputs vary, models disagree, and tools fail in surprising ways. Static DAGs force you to anticipate every branch in advance. <em><strong>Dynamic graphs</strong></em> invert that constraint. Edges are chosen at runtime by policies that read live state, which allows fanouts, model A or B trials, mid-run rewires, and graceful failure handling without redeploys.</p><p>Each step produces signals that should change where you go next: confidence scores, schema checks, cost budgets, latency SLOs, abuse filters. Hard-coding branches in code or YAML does not survive the real world where:</p><ul><li><p>Quality or cost policies shift daily</p></li><li><p>Vendors or models need rapid A or B switches</p></li><li><p>Failures are non-uniform and require specific fallbacks</p></li><li><p>Partial progress must be reused to avoid recomputation</p></li></ul><p>We can now treat routing as data that is evaluated at runtime against the current run state. Nodes are long-lived capabilities. Edges are conditional, late-bound, and modifiable while the run is in flight.</p><p>But how do you go about doing this, heck, should you even do this for your use case?</p><p><strong>What scenarios would realistically even need such a &#8216;dynamic&#8217; agent across defined agents?</strong></p><p>Let us look at some concrete scenarios:</p><ul><li><p><strong>Highly variable inputs:</strong> You do not know which path is correct until you inspect the data.</p></li><li><p><strong>Open-ended goals or exploratory tasks:</strong> You discover subgoals as you go.</p></li><li><p><strong>Continuous optimisation:</strong> You want online A/Bs, bandits, or context-aware model selection without redeploys</p></li><li><p><strong>Long-running or event-driven work:</strong> State evolves over hours or days.</p></li><li><p><strong>Combinatorial explosion of possible flows:</strong> The number of potential edges is huge, for example: knowledge graph construction. As new entity or relation types are discovered, the manager dynamically fans out to relation-specific extractors, runs validators, and rewires the next steps based on confidence and coverage gaps.</p></li></ul><p><strong>When is this a bad idea?</strong></p><ul><li><p>Strictly regulated, safety-critical flows that require fully deterministic, auditable paths per version.</p></li><li><p>Very short, stable workflows where a static DAG is simpler to reason about and cheaper to operate.</p></li><li><p>Teams without strong observability or replay. Debugging emergent routing without traces, metrics, and replays is painful.</p></li></ul><p>Now we have a new tool in our box, the power to recruit a team of agents and set up a &#8216;manager&#8217; that would eternally assign tasks to these agents. What would building infra to achieve this usecase of AI look like?</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.nikiagarwal.com/p/artificially-intelligent-orchestration?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.nikiagarwal.com/p/artificially-intelligent-orchestration?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><h3>The vanilla way of setting this up</h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CBvT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f6da6db-538e-426d-a55d-53998237b23d_1536x922.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CBvT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f6da6db-538e-426d-a55d-53998237b23d_1536x922.png 424w, https://substackcdn.com/image/fetch/$s_!CBvT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f6da6db-538e-426d-a55d-53998237b23d_1536x922.png 848w, https://substackcdn.com/image/fetch/$s_!CBvT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f6da6db-538e-426d-a55d-53998237b23d_1536x922.png 1272w, https://substackcdn.com/image/fetch/$s_!CBvT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f6da6db-538e-426d-a55d-53998237b23d_1536x922.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CBvT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f6da6db-538e-426d-a55d-53998237b23d_1536x922.png" width="1536" height="922" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9f6da6db-538e-426d-a55d-53998237b23d_1536x922.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:922,&quot;width&quot;:1536,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:793414,&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://nikiagarwal.substack.com/i/170681006?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b71a6c3-d37b-48da-b2c6-0e20247a69e8_1536x1024.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_!CBvT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f6da6db-538e-426d-a55d-53998237b23d_1536x922.png 424w, https://substackcdn.com/image/fetch/$s_!CBvT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f6da6db-538e-426d-a55d-53998237b23d_1536x922.png 848w, https://substackcdn.com/image/fetch/$s_!CBvT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f6da6db-538e-426d-a55d-53998237b23d_1536x922.png 1272w, https://substackcdn.com/image/fetch/$s_!CBvT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f6da6db-538e-426d-a55d-53998237b23d_1536x922.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><figcaption class="image-caption"><em>Artist: Sora, Chatgpt (please spare the spelling it is only 3 years old xD)</em></figcaption></figure></div><ul><li><p>Router API owns run state and chooses the next hop. Keep the router small, stateless per request, and lock per run_id to avoid double routing.</p></li><li><p>Durable state in a database. Tables for runs, steps, agents, and policies. Store input or output as JSONB, plus metrics like cost and latency for policy checks.</p></li><li><p>Queues per capability. Use Redis Streams, Kafka, or RabbitMQ. Each agent worker consumes its queue, heartbeats, writes outputs, and emits step_done events.</p></li><li><p>Policy engine in data. Start with rule rows that match on features like confidence, elapsed time, tenant, budget remaining. Action is route-to, params, or fanout list.</p></li><li><p>Controls. Retries with backoff, budget guards, latency SLO guards, circuit breakers, and idempotency on step_id. Instrument with OpenTelemetry.</p></li></ul><h3>Tools to get you started</h3><ul><li><p><strong>OpenAI Agents SDK and MCP</strong></p><p><strong>What you get</strong>: Agent runtimes with tool calling, MCP connectors for tools and data, server side execution primitives.</p><p><strong>You implement</strong>: Central router and run level state, policy engine and budgets or SLOs, queues and worker processes, long run persistence and full observability.</p></li><li><p><strong>Temporal</strong></p><p><strong>What you get</strong>: Durable workflows and activities with retries, timers, Signals or Updates, deterministic execution, task queues, visibility and versioning.</p><p><strong>You implement</strong>: Data driven policy engine, agent registry and schemas, budget or SLO guards, experimentation, routing UI, plus the activity workers that call models or tools.</p></li><li><p><strong>Exosphere</strong></p><p><strong>What you get</strong>: Central manager pattern for dynamic graphs, durable runs and steps, policy based routing, queues per capability, background agent execution, budgets or SLO gates, experiments, observability.</p><p><strong>You implement</strong>: Define your concrete agents, schemas and guardrails, integrate specific tools or models.</p></li><li><p><strong>Hatchet</strong></p><p><strong>What you get</strong>: Background task platform with spawning of child tasks, dynamic fanout, retries, concurrency limits, schedules.</p><p><strong>You implement</strong>: Router level policy and state aggregation across tasks, budget or SLO gates, experiments or bandits, agent registry and guardrails.</p></li><li><p><strong>Inngest</strong></p><p><strong>What you get</strong>: Event driven functions with fan out, waits, retries, scheduling, replay or DLQ managed for you.</p><p><strong>You implement</strong>: Cross function run state, routing policies, budget or SLO enforcement, agent registry and worker code for AI calls.</p></li><li><p><strong>AWS Step Functions</strong></p><p><strong>What you get</strong>: Choice and Map or Distributed Map for conditional or parallel routing, retries or catches, deep AWS service integrations, CloudWatch metrics.</p><p><strong>You implement</strong>: Express runtime policies as Choice JSON or Lambdas, external agent workers, cost or latency budgeting, experiment control, richer tracing beyond CloudWatch.</p></li><li><p><strong>Dagster</strong></p><p><strong>What you get</strong>: Dynamic ops or graphs, assets, sensors, type checks, IO managers, orchestration and scheduling.</p><p><strong>You implement</strong>: Central router abstractions, runtime rewiring via API, budget or SLO gates, multi tenant policy tables, queue backed agent workers.</p></li><li><p><strong>Prefect</strong></p><p><strong>What you get</strong>: Python flows with dynamic branching, retries, caching, deployments, result persistence, UI.</p><p><strong>You implement</strong>: Cross flow router and policy in data, per capability queues, budgets or SLOs, experiments, registry of agents or tools.</p></li><li><p><strong>Camunda 8 with DMN</strong></p><p><strong>What you get</strong>: BPMN orchestrations with Zeebe workers, DMN decision tables so routing rules live in data, message correlation, operations UI.</p><p><strong>You implement</strong>: AI agent workers and schema validation, mapping model metrics to DMN inputs, budgeting logic, autoscaling by queue depth, observability integration for AI signals.</p></li><li><p><strong>Ray Serve</strong></p><p><strong>What you get</strong>: Programmable request routers, dynamic backend selection, autoscaling, model composition, metrics.</p><p><strong>You implement</strong>: Multi step run state and history, policy or experiment DB, budgets or SLOs across steps, tool integrations beyond model inference.</p></li><li><p><strong>LangGraph</strong></p><p><strong>What you get</strong>: Node graphs with conditional edges, checkpoints, streaming, interrupt or resume, tool calling.</p><p><strong>You implement</strong>: If avoiding explicit graphs you still need a central manager, plus policies in data, budgets, experiments, queue scaled workers and global run state.</p></li><li><p><strong>Argo Workflows</strong></p><p><strong>What you get</strong>: Kubernetes native DAGs with loops, artifacts, retries, templates, parallelization, K8s autoscaling.</p><p><strong>You implement</strong>: Externalized policy engine for runtime rewiring, agent registry and schemas, budgets or SLOs, cross run observability and replay.</p></li></ul><p>With n independent components in a graph, possibilities of graph executions grow exponentially in order of n, to optimally <em><strong>know</strong></em> what should be done is a hard task, so is managing such <em><strong>variable execution</strong></em>.</p><p>There is no easy way today to get this going, and honestly the models are still maturing to handle such complex context and intelligently manage traffic realtime. I talk to founders each week building such solutions from ground up to support their use case, sharing the same story: <em>a duct-taped framework which is &#8216;running&#8217; and they are choosing to look the other way as capacity constrains.</em></p><p>I also think of the possibility that we might see models meant for such decision making. Or could we have AGI that could itself execute a task end to end without needing an external &#8216;manager&#8217;? Tools and mcps are unlocking such capabilities with higher order models as we go, what&#8217;s your bet?</p><p></p><p><em>-thanks for reading,</em></p><p><em>Nikita Ag</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.nikiagarwal.com/p/artificially-intelligent-orchestration/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.nikiagarwal.com/p/artificially-intelligent-orchestration/comments"><span>Leave a comment</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.nikiagarwal.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.nikiagarwal.com/subscribe?"><span>Subscribe now</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[Think twice before deploying your AI Agent PoC to Prod]]></title><description><![CDATA[What changes when input size changes from 10 to 10K? Here's a story of the pains I encountered at scale, and how you could avoid them.]]></description><link>https://www.nikiagarwal.com/p/think-twice-before-deploying-your</link><guid isPermaLink="false">https://www.nikiagarwal.com/p/think-twice-before-deploying-your</guid><dc:creator><![CDATA[Nikita Agarwal]]></dc:creator><pubDate>Mon, 04 Aug 2025 17:45:50 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!urp3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1ed5de6-9ea4-4cef-b289-89442246e98e_1200x659.png" 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_!urp3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1ed5de6-9ea4-4cef-b289-89442246e98e_1200x659.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!urp3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1ed5de6-9ea4-4cef-b289-89442246e98e_1200x659.png 424w, https://substackcdn.com/image/fetch/$s_!urp3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1ed5de6-9ea4-4cef-b289-89442246e98e_1200x659.png 848w, https://substackcdn.com/image/fetch/$s_!urp3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1ed5de6-9ea4-4cef-b289-89442246e98e_1200x659.png 1272w, https://substackcdn.com/image/fetch/$s_!urp3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1ed5de6-9ea4-4cef-b289-89442246e98e_1200x659.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!urp3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1ed5de6-9ea4-4cef-b289-89442246e98e_1200x659.png" width="724.3472290039062" height="397.78735326131186" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c1ed5de6-9ea4-4cef-b289-89442246e98e_1200x659.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:659,&quot;width&quot;:1200,&quot;resizeWidth&quot;:724.3472290039062,&quot;bytes&quot;:1260508,&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://nikiagarwal.substack.com/i/170017050?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1162a576-71ad-4b48-91fb-bc23e991642a_1200x1200.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!urp3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1ed5de6-9ea4-4cef-b289-89442246e98e_1200x659.png 424w, https://substackcdn.com/image/fetch/$s_!urp3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1ed5de6-9ea4-4cef-b289-89442246e98e_1200x659.png 848w, https://substackcdn.com/image/fetch/$s_!urp3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1ed5de6-9ea4-4cef-b289-89442246e98e_1200x659.png 1272w, https://substackcdn.com/image/fetch/$s_!urp3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1ed5de6-9ea4-4cef-b289-89442246e98e_1200x659.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>Over the past eighteen months almost every data-science or platform team has built at least one &#8220;single-file&#8221; agent demo: drop in a PDF, get a summary, maybe run a retrieval-augmented chat. These experiments validated raw capability but hid three things that only show up in production: <strong>sustained throughput, failure handling and cost control.</strong></p><ul><li><p><strong>Adoption numbers</strong></p><ul><li><p>51 % of the 1 300 professionals surveyed by LangChain already run at least one agent in production, and 78 % have concrete deployment plans. Mid-sized companies (100-2 000 employees) are the most aggressive, with 63 % already live. <a href="https://www.langchain.com/stateofaiagents">langchain.com</a></p></li><li><p>IBM&#8217;s June 2025 enterprise study found 76 % of executives have an agentic proof-of-concept running but are now asking &#8220;how do we scale and govern this?&#8221; <a href="https://www.ibm.com/think/insights/scale-ai-agents-business">IBM</a></p></li></ul></li></ul><h3>What breaks when you scale</h3><p>Moving from <em>one</em> document to <em>tens of millions</em>, or from a <em>single</em> tool invocation to <em>hundreds</em> per minute, exposes three recurrent pain points:</p><h4>Latency balloons from seconds to minutes</h4><ul><li><p><strong>Root cause:</strong> Serial tool calls and synchronous I/O</p></li><li><p><strong>Why the PoC missed it:</strong> Demo only processed one request at a time</p></li></ul><h4>Costs explode unpredictably</h4><ul><li><p><strong>Root cause:</strong> Exponential token growth when agents recurse or retry</p></li><li><p><strong>Why the PoC missed it:</strong> PoC ran on free-tier limits</p></li></ul><h4>Silent accuracy regressions</h4><ul><li><p><strong>Root cause:</strong> No tracing or automated evals <em>(Ref vol 1)</em></p></li><li><p><strong>Why the PoC missed it:</strong> Manual eyeballing felt &#8220;good enough&#8221;</p></li></ul><div><hr></div><h1>Lets take an example.</h1><p>Picture a steady stream of <strong>20 000 PDF documents</strong> flowing into your pipeline, each with <strong>more than ten pages</strong> and an average of <strong>one image per page</strong>. Every page must pass through OCR to harvest text, and each image needs separate extraction. After pulling this multimodal content, the workflow stitches the text and images back together, runs a custom summarisation step, and finally stores the results in your datastore, all while you juggle a very modest pool of CPU and GPU resources.</p><p>To understand how such a workload scales, we will estimate the total number of discrete processing nodes, project the compute time and power these nodes consume under realistic parallelism, and factor in retry overhead for inevitable failures. From there, we can outline the minimal yet resilient infrastructure, think task orchestrator, worker pools, message broker, observability stack, that keeps this many moving parts humming in production.</p><h3>How many workflow-nodes will be spin up?</h3><p><strong>A. OCR + layout on each page</strong></p><ul><li><p>Granularity: page-level</p></li><li><p>Workload: 20 000 PDFs &#215; 10 pages &#8776; <strong>200 000 pages</strong></p></li><li><p>Nodes needed: <strong>200 000</strong></p></li></ul><p><strong>B. Image extraction</strong></p><ul><li><p>Granularity: page-level (&#8776;1 image per page)</p></li><li><p>Items: 200 000 pages</p></li><li><p>Nodes needed: <strong>200 000</strong></p></li></ul><p><strong>C. Concatenate text + images</strong></p><ul><li><p>Granularity: per PDF</p></li><li><p>Items: 20 000 PDFs</p></li><li><p>Nodes needed: <strong>20 000</strong></p></li></ul><p><strong>D. Summarise PDF</strong></p><ul><li><p>Granularity: per PDF</p></li><li><p>Items: 20 000 PDFs</p></li><li><p>Nodes needed: <strong>20 000</strong></p></li></ul><p><strong>E. Push to datastore</strong></p><ul><li><p>Granularity: per PDF</p></li><li><p>Items: 20 000 PDFs</p></li><li><p>Nodes needed: <strong>20 000</strong></p></li></ul><p><strong>Subtotal:</strong> <strong>460 000 nodes</strong></p><p><strong>Retry buffer (&#8776; 2 % for network/OCR hiccups):</strong> <strong>&#8776; 9 200 nodes</strong></p><p><strong>Grand total:</strong> <strong>&#8776; 469 000 nodes!!</strong></p><div><hr></div><h3>Computational Cost Assessment</h3><p><strong>OCR processing</strong></p><ul><li><p>Compute: ~0.79 s per page (CPU) &#8594; 158 000 s raw runtime</p></li><li><p>Parallelization: 8 vCPUs handle &#8776;10 pages / s</p></li><li><p>Wall-clock time: <strong>&#8776; 5 &#189; hours</strong></p></li></ul><p><strong>Image extraction</strong></p><ul><li><p>Compute: ~60 ms per image &#8594; 12 000 s total</p></li><li><p>Runs concurrently with OCR, so the extra wall-clock time is <strong>negligible</strong></p></li></ul><p><strong>Concatenation</strong></p><ul><li><p>Compute: &lt;10 ms per document</p></li><li><p>Kicked off asynchronously; effectively hidden behind other work</p></li></ul><p><strong>Summarization</strong></p><ul><li><p>Compute: ~25.5 s per document on a single GPU &#8594; 142 h raw runtime</p><ul><li><p>CPU fallback: ~73 h but at higher token cost</p></li></ul></li><li><p>With one GPU, summarization dominates the schedule: <strong>&#8776; 6 days!</strong></p></li></ul><p><strong>Data insertion</strong></p><ul><li><p>Compute: ~50 ms per document</p></li><li><p>Buffered and streamed asynchronously; latency is masked</p></li></ul><h3>Optimization Strategies</h3><ul><li><p>Implementing <strong>GPU-accelerated OCR</strong> reduces CPU demands significantly.</p></li><li><p>Utilizing <strong>quantized or smaller-scale language models</strong> substantially decreases summarization durations.</p></li><li><p>Leveraging <strong>speculative decoding and batch processing</strong> enhances GPU throughput.</p></li><li><p>Adopting <strong>incremental summarization strategies</strong> reduces memory load and promotes parallel execution.</p></li><li><p>Employing <strong>spot instances</strong> mitigates expenses for stateless, computation-heavy processes.</p></li></ul><h3>Execution Strategy Examples</h3><ul><li><p><strong>Baseline</strong> (32 CPUs + 1 GPU): approximately 148 hours (~6 days)</p></li><li><p><strong>Optimized</strong> (32 CPUs + 2 GPUs or GPU OCR): approximately 48 hours</p></li><li><p><strong>Budget-focused</strong> (8 CPUs only): approximately 95 hours (~4 days)</p></li></ul><p>To summarise:</p><ul><li><p>Expect <strong>~4.7 &#215; 10&#8309; discrete workflow nodes!!</strong></p></li><li><p>S<strong>ummarisation dictates total elapsed time.</strong></p></li><li><p><strong>One modest GPU often beats many CPU cores for LLM work,</strong> but only if you can <strong>batch or run speculative decoding</strong>; otherwise adding CPU workers is still competitive.</p></li><li><p>Keep the pipeline <strong>idempotent and checkpoint after every fan-in</strong> so partial failures don&#8217;t force a restart of earlier stages.</p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.nikiagarwal.com/p/think-twice-before-deploying-your?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.nikiagarwal.com/p/think-twice-before-deploying-your?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><h1><strong>So how to solve this simply?</strong></h1><p>Effectively processing gigabyte-scale or high-document-count workloads means treating your agent pipeline like a miniature data-platform rather than a single script. The following patterns have emerged as the most </p><p>reliable way to keep throughput high without astronomical costs.</p><h3>1. Batch Processing APIs</h3><ul><li><p>Implement batch endpoints providing asynchronous job identifiers.</p></li><li><p>Utilize asynchronous callbacks or polling for result retrieval.</p></li><li><p>Incorporate adaptive throttling for back-pressure management.</p></li></ul><h3>2. Intelligent Task Batching</h3><ul><li><p>Cluster tasks semantically to maximize embedding cache effectiveness.</p></li><li><p>Dynamically adjust batch sizes to resource constraints (e.g., via Ray Data, Torch DataLoader).</p></li><li><p>Employ predictive token estimation (e.g., TikToken) for optimized model usage.</p></li></ul><h3>3. Advanced Scheduling Techniques</h3><ul><li><p>Utilize explicit Directed Acyclic Graph (DAG) structures for precise failure recovery (Airflow, Exosphere, Prefect, Argo).</p></li><li><p>Enable dynamic task generation to ensure accurate task tracking.</p></li><li><p>Leverage cost-effective scheduling through the intelligent allocation of spot instances.</p></li></ul><h3>4. Effective Parallelization and Autoscaling</h3><ul><li><p>Implement distributed queuing mechanisms for automated scaling (Kubernetes HPA, AWS Batch, Azure Container Apps).</p></li><li><p>Clearly delineate GPU- and CPU-intensive tasks.</p></li><li><p>Employ concurrency controls to mitigate overload scenarios.</p></li></ul><h3>5. Comprehensive Observability and Fault Tolerance</h3><ul><li><p>Generate structured logs and metrics (via OpenTelemetry, Prometheus).</p></li><li><p>Establish isolation protocols for recurrent task failures.</p></li><li><p>Introduce budget monitoring checkpoints for proactive cost management.</p></li></ul><h2>Tools in a snapshot by Capability</h2><p><strong>Batch APIs</strong></p><ul><li><p><em>Existing Solutions:</em> AWS SageMaker, Google AI Platform, vLLM KV cache</p></li><li><p><em>Comprehensive Integration with Exosphere:</em> one place to run batch jobs across different models and API formats</p></li></ul><p><strong>Scheduling</strong></p><ul><li><p><em>Existing Solutions:</em> Airflow, Prefect, Argo</p></li><li><p><em>Comprehensive Integration with Exosphere: </em>built-in DAG plus dynamic task orchestration that fits agent-style workflows</p></li></ul><p><strong>Autoscaling</strong></p><ul><li><p><em>Existing Solutions:</em>  Kubernetes HPA, AWS Batch</p></li><li><p><em>Comprehensive Integration with Exosphere: </em>resource-aware scaling tuned separately for GPUs and CPUs</p></li></ul><p><strong>Observability</strong></p><ul><li><p><em>Existing Solutions:</em> Prometheus, Grafana, OpenTelemetry</p></li><li><p><em>Comprehensive Integration with Exosphere:</em> agent-specific metrics pushed straight into the same dashboards you already use</p></li></ul><div><hr></div><p>We have finally crossed a threshold where AI agents are no longer weekend experiments but full-fledged production workloads moving terabytes of text, images, and embeddings every day. The patterns we covered: batch-first APIs, size-aware micro-batches, dynamic fan-out schedulers, and spot-friendly autoscaling turn what used to be fragile, one-off scripts into resilient data factories. They also surface a new set of questions that teams rarely faced at smaller scale:</p><ul><li><p><em>How do you budget for transient GPU spikes when token usage can quadruple overnight?</em></p></li><li><p><em>Which retry policy balances cost against accuracy when your upstream model provider silently throttles half your requests?</em></p></li><li><p><em>Where do you draw the line between &#8220;smart batching&#8221; and needlessly complex micro-batch orchestration?</em></p></li></ul><p>These questions will shape the next wave of infrastructure tooling just as early CI/CD tools reshaped software delivery. </p><p>I would love to hear your war stories. What tactics brought your throughput from hundreds to millions of tokens per minute? Which tools saved the day, and which surprised you by becoming bottlenecks? Have you abandoned certain libraries entirely, or patched together bespoke glue code that still feels irreplaceable?</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.nikiagarwal.com/p/think-twice-before-deploying-your/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.nikiagarwal.com/p/think-twice-before-deploying-your/comments"><span>Leave a comment</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.nikiagarwal.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.nikiagarwal.com/subscribe?"><span>Subscribe now</span></a></p><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[Make your AI agent fail fast to succeed]]></title><description><![CDATA[Per node failure detection and resurrection is a necessity, not an option, here's the math worked out to simplify it for you.]]></description><link>https://www.nikiagarwal.com/p/make-your-ai-agent-fail-fast-to-succeed</link><guid isPermaLink="false">https://www.nikiagarwal.com/p/make-your-ai-agent-fail-fast-to-succeed</guid><dc:creator><![CDATA[Nikita Agarwal]]></dc:creator><pubDate>Mon, 28 Jul 2025 03:35:22 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!2XLJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b7bc1c2-c163-4d15-a6a5-3afead38a344_1918x848.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I am betting on the increasing autonomy of computer systems going forward, driven by rapid advances in artificial intelligence. This implies that many interacting agents and solutions will collaboratively work towards common goals, potentially running for extended periods, hours or even days in the background.</p><p>While we haven't fully reached this stage yet, we are currently experiencing its precursor: long-running AI workflows. These workflows are well-defined processes with fixed inputs, sequential steps, and expected outputs. They're widely used in various applications today, such as:</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.nikiagarwal.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><ul><li><p>Database queries</p></li><li><p>Deep research across multiple domains</p></li><li><p>Coding agents and assistants</p></li></ul><p>As we push the limits of multi-model workflows, it is crucial to pause and critically assess their current performance and reliability. Given the substantial cost associated with these workflows, including heavy CPU/GPU compute, extensive data handling, and extended runtimes, identifying failures only at the final stages can lead to exponentially costly repercussions.</p><h3>Defining Key Terminology</h3><p>To understand this better, let's define some working terminology:</p><ul><li><p><strong>Node</strong>: An atomic unit within a workflow, such as a model call, a data formatting operation, or an aggregation step.</p></li><li><p><strong>Workflow</strong>: An end-to-end sequence of nodes with defined entry and exit points.</p></li><li><p><strong>Metrics</strong>: Hyperparameters influencing workflow performance:</p><ul><li><p>Probability that a node successfully completes a task (defining success and failure itself is an intricate topic addressed later):</p></li></ul></li></ul><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;P(node_i) = P_i&quot;,&quot;id&quot;:&quot;LUADINRNDK&quot;}" data-component-name="LatexBlockToDOM"></div><p></p><ul><li><p>Maximum number of retries configured for each node:</p></li></ul><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;Max(Retry)_{node_i} = r_i , ~~\nr_i>1&quot;,&quot;id&quot;:&quot;MDVGRQYAJP&quot;}" data-component-name="LatexBlockToDOM"></div><p></p><ul><li><p>Probability that the workflow ends in a successful state, given n nodes:</p></li></ul><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;P(workflow) = f(\\{ P_i \\},\\{r_i \\})&quot;,&quot;id&quot;:&quot;XNTAPLQNIC&quot;}" data-component-name="LatexBlockToDOM"></div><p></p><h3>Probability and Workflow Reliability</h3><p>Considering a base scenario, we calculate the probability of node failure after retries:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;P(node)_i'=(1-P_i)^{r_i} \n&quot;,&quot;id&quot;:&quot;FSVHNTPPAG&quot;}" data-component-name="LatexBlockToDOM"></div><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;&quot;,&quot;id&quot;:&quot;ZPPPOCSCOL&quot;}" data-component-name="LatexBlockToDOM"></div><p></p><p>Hence, the probability of node success becomes:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;=> P(node)_i = 1-(1-P_i)^{r_i}&quot;,&quot;id&quot;:&quot;IUOZUJIQRH&quot;}" data-component-name="LatexBlockToDOM"></div><p></p><p>Thus, the workflow's overall success probability is:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;P(workflow) = \\prod_{i=1}^{n}(1- (1-P_i)^{r_i})&quot;,&quot;id&quot;:&quot;URGPMFGBFA&quot;}" data-component-name="LatexBlockToDOM"></div><p></p><h3>Observations from Probability Analysis</h3><p>Analyzing relationships between metrics reveals critical insights (x axis denotes number of steps n):</p><ul><li><p><strong>Scenario 1 (Single Attempt, Moderate Probability)</strong>:</p></li></ul><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot; {\\forall} ~r_i=1 ,  P_i = 0.8 &quot;,&quot;id&quot;:&quot;RPLWFGBBBW&quot;}" data-component-name="LatexBlockToDOM"></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2XLJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b7bc1c2-c163-4d15-a6a5-3afead38a344_1918x848.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2XLJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b7bc1c2-c163-4d15-a6a5-3afead38a344_1918x848.png 424w, https://substackcdn.com/image/fetch/$s_!2XLJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b7bc1c2-c163-4d15-a6a5-3afead38a344_1918x848.png 848w, https://substackcdn.com/image/fetch/$s_!2XLJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b7bc1c2-c163-4d15-a6a5-3afead38a344_1918x848.png 1272w, https://substackcdn.com/image/fetch/$s_!2XLJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b7bc1c2-c163-4d15-a6a5-3afead38a344_1918x848.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2XLJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b7bc1c2-c163-4d15-a6a5-3afead38a344_1918x848.png" width="1456" height="644" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5b7bc1c2-c163-4d15-a6a5-3afead38a344_1918x848.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:644,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:132459,&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://nikiagarwal.substack.com/i/169363799?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b7bc1c2-c163-4d15-a6a5-3afead38a344_1918x848.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_!2XLJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b7bc1c2-c163-4d15-a6a5-3afead38a344_1918x848.png 424w, https://substackcdn.com/image/fetch/$s_!2XLJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b7bc1c2-c163-4d15-a6a5-3afead38a344_1918x848.png 848w, https://substackcdn.com/image/fetch/$s_!2XLJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b7bc1c2-c163-4d15-a6a5-3afead38a344_1918x848.png 1272w, https://substackcdn.com/image/fetch/$s_!2XLJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5b7bc1c2-c163-4d15-a6a5-3afead38a344_1918x848.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></p><p>A workflow with even two sequential steps has less than a 50% chance of success if each step has an 80% success rate.</p><ul><li><p><strong>Scenario 2 (Single Attempt, High Probability)</strong>:</p></li></ul><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot; {\\forall} ~r_i=1 ,  P_i = 0.9:&quot;,&quot;id&quot;:&quot;MMGGTQXZWU&quot;}" data-component-name="LatexBlockToDOM"></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!T5LE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b00ef92-39d9-4ecd-8ff0-b3a4c498cc22_1919x864.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!T5LE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b00ef92-39d9-4ecd-8ff0-b3a4c498cc22_1919x864.png 424w, https://substackcdn.com/image/fetch/$s_!T5LE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b00ef92-39d9-4ecd-8ff0-b3a4c498cc22_1919x864.png 848w, https://substackcdn.com/image/fetch/$s_!T5LE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b00ef92-39d9-4ecd-8ff0-b3a4c498cc22_1919x864.png 1272w, https://substackcdn.com/image/fetch/$s_!T5LE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b00ef92-39d9-4ecd-8ff0-b3a4c498cc22_1919x864.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!T5LE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b00ef92-39d9-4ecd-8ff0-b3a4c498cc22_1919x864.png" width="1456" height="656" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9b00ef92-39d9-4ecd-8ff0-b3a4c498cc22_1919x864.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:656,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:217658,&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://nikiagarwal.substack.com/i/169363799?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b00ef92-39d9-4ecd-8ff0-b3a4c498cc22_1919x864.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_!T5LE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b00ef92-39d9-4ecd-8ff0-b3a4c498cc22_1919x864.png 424w, https://substackcdn.com/image/fetch/$s_!T5LE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b00ef92-39d9-4ecd-8ff0-b3a4c498cc22_1919x864.png 848w, https://substackcdn.com/image/fetch/$s_!T5LE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b00ef92-39d9-4ecd-8ff0-b3a4c498cc22_1919x864.png 1272w, https://substackcdn.com/image/fetch/$s_!T5LE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b00ef92-39d9-4ecd-8ff0-b3a4c498cc22_1919x864.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>In this case 2-step workflow reaches around 80% reliability, but reliability drops significantly beyond six steps</p><h3>Impact of Retries</h3><p>What if we are able to accurately identify failures and trigger immediate retries, how do the numbers change? <br><br>Including retries dramatically improves reliability:</p><ul><li><p><strong>Moderate Probability (80%) with Retries</strong>:</p></li></ul><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot; {\\forall} ~r_i=2 ,  P_i = 0.8 :&quot;,&quot;id&quot;:&quot;DCLUWHZIGB&quot;}" data-component-name="LatexBlockToDOM"></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!rEtV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedf146c2-f1e3-45e0-8aed-f178360a75c6_1913x870.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rEtV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedf146c2-f1e3-45e0-8aed-f178360a75c6_1913x870.png 424w, https://substackcdn.com/image/fetch/$s_!rEtV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedf146c2-f1e3-45e0-8aed-f178360a75c6_1913x870.png 848w, https://substackcdn.com/image/fetch/$s_!rEtV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedf146c2-f1e3-45e0-8aed-f178360a75c6_1913x870.png 1272w, https://substackcdn.com/image/fetch/$s_!rEtV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedf146c2-f1e3-45e0-8aed-f178360a75c6_1913x870.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!rEtV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedf146c2-f1e3-45e0-8aed-f178360a75c6_1913x870.png" width="1456" height="662" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/edf146c2-f1e3-45e0-8aed-f178360a75c6_1913x870.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:662,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:116975,&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://nikiagarwal.substack.com/i/169363799?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedf146c2-f1e3-45e0-8aed-f178360a75c6_1913x870.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_!rEtV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedf146c2-f1e3-45e0-8aed-f178360a75c6_1913x870.png 424w, https://substackcdn.com/image/fetch/$s_!rEtV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedf146c2-f1e3-45e0-8aed-f178360a75c6_1913x870.png 848w, https://substackcdn.com/image/fetch/$s_!rEtV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedf146c2-f1e3-45e0-8aed-f178360a75c6_1913x870.png 1272w, https://substackcdn.com/image/fetch/$s_!rEtV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedf146c2-f1e3-45e0-8aed-f178360a75c6_1913x870.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>With just a single retry on failure, at accuracy as low as 80% we are able to run workflows with much larger sequences! Comparing to the 2-step workflow failing with no checks, this is a significant improvement. <br><br>And if we consider higher probablity of per node success, numbers shine even brighter:</p><ul><li><p><strong>Higher Probability (90%) with Retries</strong>:</p></li></ul><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot; {\\forall} ~r_i=2 ,  P_i = 0.9 :&quot;,&quot;id&quot;:&quot;RHMMVYUNED&quot;}" data-component-name="LatexBlockToDOM"></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uIYy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ccdcdc8-f01d-47da-9882-cf149306b0e6_1916x826.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uIYy!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ccdcdc8-f01d-47da-9882-cf149306b0e6_1916x826.png 424w, https://substackcdn.com/image/fetch/$s_!uIYy!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ccdcdc8-f01d-47da-9882-cf149306b0e6_1916x826.png 848w, https://substackcdn.com/image/fetch/$s_!uIYy!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ccdcdc8-f01d-47da-9882-cf149306b0e6_1916x826.png 1272w, https://substackcdn.com/image/fetch/$s_!uIYy!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ccdcdc8-f01d-47da-9882-cf149306b0e6_1916x826.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uIYy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ccdcdc8-f01d-47da-9882-cf149306b0e6_1916x826.png" width="1456" height="628" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5ccdcdc8-f01d-47da-9882-cf149306b0e6_1916x826.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:628,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:100202,&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://nikiagarwal.substack.com/i/169363799?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ccdcdc8-f01d-47da-9882-cf149306b0e6_1916x826.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_!uIYy!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ccdcdc8-f01d-47da-9882-cf149306b0e6_1916x826.png 424w, https://substackcdn.com/image/fetch/$s_!uIYy!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ccdcdc8-f01d-47da-9882-cf149306b0e6_1916x826.png 848w, https://substackcdn.com/image/fetch/$s_!uIYy!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ccdcdc8-f01d-47da-9882-cf149306b0e6_1916x826.png 1272w, https://substackcdn.com/image/fetch/$s_!uIYy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ccdcdc8-f01d-47da-9882-cf149306b0e6_1916x826.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>Only now do we start seeing longer (&gt;20 step workflows) to have a chance at running reliably.</p><p>Furthermore, with higher intelligence and increased retries (e.g., r=4), even extensive workflows (e.g., 100-step workflows) achieve remarkably high reliability, approaching 99.9%.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Yibe!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe357ba9c-bace-46e2-b1df-58b5b90b8c88_1915x689.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Yibe!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe357ba9c-bace-46e2-b1df-58b5b90b8c88_1915x689.png 424w, https://substackcdn.com/image/fetch/$s_!Yibe!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe357ba9c-bace-46e2-b1df-58b5b90b8c88_1915x689.png 848w, https://substackcdn.com/image/fetch/$s_!Yibe!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe357ba9c-bace-46e2-b1df-58b5b90b8c88_1915x689.png 1272w, https://substackcdn.com/image/fetch/$s_!Yibe!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe357ba9c-bace-46e2-b1df-58b5b90b8c88_1915x689.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Yibe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe357ba9c-bace-46e2-b1df-58b5b90b8c88_1915x689.png" width="1456" height="524" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e357ba9c-bace-46e2-b1df-58b5b90b8c88_1915x689.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:524,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:77443,&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://nikiagarwal.substack.com/i/169363799?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe357ba9c-bace-46e2-b1df-58b5b90b8c88_1915x689.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_!Yibe!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe357ba9c-bace-46e2-b1df-58b5b90b8c88_1915x689.png 424w, https://substackcdn.com/image/fetch/$s_!Yibe!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe357ba9c-bace-46e2-b1df-58b5b90b8c88_1915x689.png 848w, https://substackcdn.com/image/fetch/$s_!Yibe!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe357ba9c-bace-46e2-b1df-58b5b90b8c88_1915x689.png 1272w, https://substackcdn.com/image/fetch/$s_!Yibe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe357ba9c-bace-46e2-b1df-58b5b90b8c88_1915x689.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>Plotting P(W) against number of retries at number of steps = 100. We see P(W) stabilises at r=4 considering P=0.9</p><p></p><p>What has been your experience working with AI agents with successive non-deterministic steps?</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.nikiagarwal.com/p/make-your-ai-agent-fail-fast-to-succeed/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.nikiagarwal.com/p/make-your-ai-agent-fail-fast-to-succeed/comments"><span>Leave a comment</span></a></p><p></p><h2>Why Node-level Failure Detection Matters</h2><p>Effective AI workflows rely heavily on accurately detecting and addressing failures at each individual step or node. Implementing robust node-level checks rather than solely depending on end-to-end workflow validations provides substantial benefits:</p><ul><li><p><strong>Reduced Resource Wastage:</strong> Quickly identifying and resolving node failures prevents repeated, costly retries of the entire workflow.</p></li><li><p><strong>Improved Reliability:</strong> Early detection enables granular retry logic, improving workflow resiliency and uptime.</p></li><li><p><strong>Enhanced Debugging Capabilities:</strong> Pinpointing failures at the node level simplifies debugging, offering clearer visibility into which component failed and why.</p></li></ul><p>In large-scale AI workflows, single-node failures if left unchecked can propagate silently and magnify resource usage exponentially, leading to cascading failures and degraded performance.</p><h2>How to?</h2><h3>Identifying Failures in Non-deterministic Nodes</h3><p>Non-deterministic nodes such as LLM-generated content, probabilistic algorithms, and stochastic processes introduce unique challenges in identifying failures accurately. Unlike deterministic tasks, outputs from these nodes vary naturally, complicating the differentiation between acceptable variance and genuine failures.</p><p>Several effective strategies to tackle these challenges include:</p><h4>Hybrid Evaluation Techniques</h4><p>Hybrid evaluation blends deterministic checks with statistical or heuristic indicators. This method improves robustness by assessing multiple indicators rather than relying on binary pass/fail outcomes. Techniques include:</p><ul><li><p><strong>Confidence Score Thresholding:</strong> Using model confidence metrics to evaluate if node outputs are within acceptable thresholds.</p></li><li><p><strong>Statistical Heuristics:</strong> Establishing expected distributions or statistical bounds (e.g., KL-divergence, Jensen-Shannon divergence) to identify anomalies or outliers.</p></li><li><p><strong>Drift Detection Algorithms:</strong> Implementing methods like Adaptive Windowing (ADWIN) or Kolmogorov&#8211;Smirnov tests to dynamically assess node performance against expected behavior.</p></li></ul><h4>LLM-based Judging Systems</h4><p>Utilizing advanced language models as evaluative judges provides a powerful mechanism for validating outputs of non-deterministic nodes. In practice, this involves:</p><ul><li><p><strong>Prompt-based Validation:</strong> Generating structured prompts to solicit detailed evaluations of task outcomes from an LLM (e.g., GPT-4, GPT-4o).</p></li><li><p><strong>Self-consistency Checks:</strong> Using multiple samples or chain-of-thought reasoning to improve the reliability of the evaluation.</p></li><li><p><strong>Meta-evaluation Layers:</strong> Applying hierarchical evaluations, where one LLM judges node outputs and another assesses the reliability of the first evaluator, thus improving overall accuracy.</p></li></ul><p>While highly effective, these methods may introduce additional latency and computational costs. Balancing these trade-offs requires careful calibration to workflow demands.</p><h2>Intelligent Failure Handling</h2><p>Beyond detection, intelligently handling failures is essential for robust workflows. Strategies include:</p><ul><li><p><strong>Dynamic Retry Logic:</strong> Implementing adaptive retry mechanisms, such as exponential backoff combined with smart checkpointing, to reduce resource usage without compromising reliability.</p></li><li><p><strong>Task-Specific Error Handling:</strong> Developing tailored responses to node-specific failures, for example, fallback methods, alternative models, or parameter adjustments to minimize workflow interruptions.</p></li><li><p><strong>Resource-aware Retries:</strong> Integrating resource estimation models (e.g., predictive cost and compute time) into retry decision-making, ensuring retries occur only when justified by resource efficiency and probability of success.</p></li></ul><h2>Choosing the Right Evaluation Method</h2><p>Selecting suitable evaluation metrics or criteria involves detailed trade-off analysis:</p><ul><li><p><strong>Accuracy vs. Overhead:</strong> Choosing metrics that offer the best compromise between evaluation accuracy and computational or latency overhead. High-stakes nodes may justify resource-intensive evaluations, whereas lower-impact nodes require lightweight heuristics.</p></li><li><p><strong>Node-specific Metrics:</strong> Employing specialized metrics aligned closely with node functionality. Examples include BLEU scores for language generation tasks, Structural Similarity Index (SSIM) for visual outputs, or F1 scores for classification tasks.</p></li><li><p><strong>Operational Benchmarks:</strong> Integrating operational metrics such as memory usage, inference latency, or CPU/GPU utilization to proactively identify performance degradation that precedes outright failures.</p></li></ul><h2>Parallelization: Maximizing Reliability Without Latency</h2><p>Parallelization significantly enhances workflow robustness by addressing multiple potential failure points simultaneously. Effective parallelization involves:</p><ul><li><p><strong>Concurrent Execution of Critical Nodes:</strong> Ensuring that critical or failure-prone tasks run in parallel with redundancy (replicated nodes), preventing single points of failure.</p></li><li><p><strong>Preemptive Checks and Parallel Validation:</strong> Performing concurrent validation tasks to promptly isolate failures, allowing recovery measures before the primary workflow is disrupted.</p></li><li><p><strong>Fine-Grained Node Splitting:</strong> Breaking down complex nodes into smaller, concurrent tasks that can be executed and validated independently, facilitating quicker failure detection and reducing rollback overhead.</p></li></ul><p>Advanced orchestration tools (e.g., Apache Airflow, Kubernetes Jobs, Exosphere, AWS Step Functions) are often leveraged to efficiently manage parallel execution, providing built-in fault tolerance, automatic retry mechanisms, and granular monitoring.</p><h2>Make your AI agent fail fast to succeed</h2><p>As AI workflows scale in complexity and criticality, implementing sophisticated node-level failure detection, intelligent retry strategies, and well-orchestrated parallelization becomes imperative. These technical measures ensure robust, efficient operations, reduce computational waste, and mitigate costly downtime.</p><p>Embracing these best practices brings us closer to achieving truly autonomous, reliable, and resource-efficient AI systems, capable of handling increasingly complex, long-duration tasks at scale. </p><p>How are you measuring success and achieving it?</p><p></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.nikiagarwal.com/p/make-your-ai-agent-fail-fast-to-succeed?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.nikiagarwal.com/p/make-your-ai-agent-fail-fast-to-succeed?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.nikiagarwal.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[The Bangalore Startup Experience]]></title><description><![CDATA[An anecdote of my first startup experience as a college undergrad]]></description><link>https://www.nikiagarwal.com/p/the-bangalore-startup-experience</link><guid isPermaLink="false">https://www.nikiagarwal.com/p/the-bangalore-startup-experience</guid><dc:creator><![CDATA[Nikita Agarwal]]></dc:creator><pubDate>Wed, 09 Oct 2024 14:12:55 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!XuJs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fa5a759-1aff-4dfc-af7b-0e049cde7989_1200x900.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote><p><em>A 9 to 5 isn&#8217;t enough for me.</em></p><p><em>Nah, I will</em> f<em>ollow my *passion*</em></p><p><em>Idea chahiye bas, fir toh aish hi aish</em></p><p>Startup is a trend today. It has evolved into a culture. Everyone wants to be their own boss, everyone looks at it with lusty eyes, but can you do it? Do you have it in you to actually startup? Is there anything special even, separating CEOs from normal janta?</p><p>I, like any other engineer, am a part of the startup-hype clan. Even I had these exact questions, looking for answers for which, I was fortunate enough to get an internship at a startup in Bangalore, the Silicon Valley of India.</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!XuJs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fa5a759-1aff-4dfc-af7b-0e049cde7989_1200x900.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XuJs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fa5a759-1aff-4dfc-af7b-0e049cde7989_1200x900.jpeg 424w, https://substackcdn.com/image/fetch/$s_!XuJs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fa5a759-1aff-4dfc-af7b-0e049cde7989_1200x900.jpeg 848w, https://substackcdn.com/image/fetch/$s_!XuJs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fa5a759-1aff-4dfc-af7b-0e049cde7989_1200x900.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!XuJs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fa5a759-1aff-4dfc-af7b-0e049cde7989_1200x900.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!XuJs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fa5a759-1aff-4dfc-af7b-0e049cde7989_1200x900.jpeg" width="1200" height="900" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6fa5a759-1aff-4dfc-af7b-0e049cde7989_1200x900.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:900,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!XuJs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fa5a759-1aff-4dfc-af7b-0e049cde7989_1200x900.jpeg 424w, https://substackcdn.com/image/fetch/$s_!XuJs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fa5a759-1aff-4dfc-af7b-0e049cde7989_1200x900.jpeg 848w, https://substackcdn.com/image/fetch/$s_!XuJs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fa5a759-1aff-4dfc-af7b-0e049cde7989_1200x900.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!XuJs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fa5a759-1aff-4dfc-af7b-0e049cde7989_1200x900.jpeg 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><figcaption class="image-caption"><strong>Touchdown</strong></figcaption></figure></div><blockquote><p>Two months back, I touched down in this city, not knowing what to imagine or expect in the coming months. This was a city of complete strangers, without a single point of fully known contact at the time of landing, other than my Dad, who had come to set things up for me. I was excited, hopeful, nervous and cautioned with scepticism. I was sure of only one thing: to get to know startups as well as it may be possible. I wanted to meet and get to know the people who dare to actually embark and continue on this fogged journey, albeit of self-satisfaction. What vision do they have, what belief systems they function on, how do they stay sane!</p><p>In the very first week, it was evident how Bangalore is different from any other city. It is a city of youths. Almost everyone here has a rented space somewhere in the city; many wear glasses and carry backpacks while travelling on autos with plugged in ear-pods, blasting music. Most swiggy their meals every day, making each restaurant serve their own &#8220;Combo for 1&#8221;. Almost all everyday services like laundry, point-to-point delivery, and transportation are decentralised and optimised for the city&#8217;s young town boy. Just like that, there are countless PGs; each lane has &#8220;To-let&#8221; boards inviting guests over and also co-working spaces.&nbsp;</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lIhe!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac807759-1c4e-4604-ab42-08fd89456923_1200x1199.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lIhe!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac807759-1c4e-4604-ab42-08fd89456923_1200x1199.jpeg 424w, https://substackcdn.com/image/fetch/$s_!lIhe!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac807759-1c4e-4604-ab42-08fd89456923_1200x1199.jpeg 848w, https://substackcdn.com/image/fetch/$s_!lIhe!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac807759-1c4e-4604-ab42-08fd89456923_1200x1199.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!lIhe!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac807759-1c4e-4604-ab42-08fd89456923_1200x1199.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lIhe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac807759-1c4e-4604-ab42-08fd89456923_1200x1199.jpeg" width="1200" height="1199" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ac807759-1c4e-4604-ab42-08fd89456923_1200x1199.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1199,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!lIhe!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac807759-1c4e-4604-ab42-08fd89456923_1200x1199.jpeg 424w, https://substackcdn.com/image/fetch/$s_!lIhe!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac807759-1c4e-4604-ab42-08fd89456923_1200x1199.jpeg 848w, https://substackcdn.com/image/fetch/$s_!lIhe!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac807759-1c4e-4604-ab42-08fd89456923_1200x1199.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!lIhe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac807759-1c4e-4604-ab42-08fd89456923_1200x1199.jpeg 1456w" sizes="100vw"></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><figcaption class="image-caption"><strong>The Office</strong></figcaption></figure></div><blockquote><p>Multiple offices functioning from a single facility, benefitting from the common well-equipped Conference Rooms and Chai Point dispensers, is the ideal space for startups to flourish(after moving out from your own house-office). I remember being stunned by the look of my own office space; it was modern, well-lit, had vending machines and great coffee. To top it all, my particular office had the cutest husky to grasp all attention and send me on a guilt trip every day for eating fruits alone without succumbing to his accosting demands(only for your good, Dexter!).</p><p>Just like that, I got my first desk at a physical office. After initially fumbling to work with multiple screens, I made myself comfortable and got into the grind of morning meetings and code-ridden evenings. I learnt how offices function and what goes into envisioning a product. How the work is assigned, coordinated and accomplished. Every morning my team would meet up to discuss the progress made in the previous day and the plan for the current day. I loved the independence given to each developer regarding their own work. After being assigned to a developer, a task was theirs, and it was up to them to achieve it most efficiently. This was the trust that the seniors had in each developer, to give them the space to work however suits them best. Also, guidance and teamwork were in practice very efficiently. I, being an intern, was given a seat right next to the team lead to make it easy for me to bug him for help whenever I got stuck, which he always did, without question. My best learning happened during morning meetings when you learn about projects other than your own. It was during this time when I would intently listen to the discussion that I started building my understanding of the product we wish to deliver and methods to act on deliverance.</p><p>Further, I saw how value is consistently added with the detailed work being done here. Doing something which has not been done before comes with its own challenges. It makes you rethink solutions and look at available technology more minutely, to find ways to squeeze out your own path to achieve your goals and expectations. Low-level development, shredding the &#8220;benefit&#8221; of high level frameworks, gives you this power to achieve the unachieved. This particularly requires development of great expertise in the domain, to know and implement on the what&#8217;s what of the system.</p><p>Apart from the routine work that goes around from 10 to 7, was the office banter, which taught me it&#8217;s own share of things. Morning traffic woes, new tech releases, cricket analyses(which I was so out of), Hindutva and ottomans made the day whizz past in what looked like an hour on most days. During this time, I also got the chance to squeeze some time out with our CEO, going off-topic discussing one thing and another. Being a founder of a company requires the right mix of mind-bending philosophy and lightheadedness. Knowing that doing nothing is the most ideal way of life, and making what you do, count, go hand in hand. Fully believing that there is no other outcome possible than success and accepting any other outcome also go hand in hand. Being an open book while being mysterious is just the same.&nbsp;</p><p><strong>Making it work does not depend on an idea</strong>. It depends on how much you think that the idea will work. Establishing a direct dependency on the people working with you, how much do they believe in it? It is the team and the value they are adding, that is, the technology that is created. Belief is not plucked off a bush, it is this added value, which is the asset on which you can stand tall without flinching an eye, making you believe, for real. This asset is backed by the team you put your trust in. If you believe, you find yourself working towards it, building stuff and making it happen, which is when you have <em>started up</em>.</p><p>I had heard people say: &#8220;The idea is just 1% of the startup,&#8221; I think I understand this statement to some extent now, if not entirely. So while starting up: focus on one thing, <strong>what value are you adding with this name</strong>? The answer to this one question would then be enough to make you wield your stick on the foggy road and rocky terrain.</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WoAq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa1297c09-3e89-4022-9b9f-e33ebd6f4447_1024x866.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WoAq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa1297c09-3e89-4022-9b9f-e33ebd6f4447_1024x866.jpeg 424w, https://substackcdn.com/image/fetch/$s_!WoAq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa1297c09-3e89-4022-9b9f-e33ebd6f4447_1024x866.jpeg 848w, https://substackcdn.com/image/fetch/$s_!WoAq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa1297c09-3e89-4022-9b9f-e33ebd6f4447_1024x866.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!WoAq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa1297c09-3e89-4022-9b9f-e33ebd6f4447_1024x866.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WoAq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa1297c09-3e89-4022-9b9f-e33ebd6f4447_1024x866.jpeg" width="1024" height="866" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a1297c09-3e89-4022-9b9f-e33ebd6f4447_1024x866.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:866,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!WoAq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa1297c09-3e89-4022-9b9f-e33ebd6f4447_1024x866.jpeg 424w, https://substackcdn.com/image/fetch/$s_!WoAq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa1297c09-3e89-4022-9b9f-e33ebd6f4447_1024x866.jpeg 848w, https://substackcdn.com/image/fetch/$s_!WoAq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa1297c09-3e89-4022-9b9f-e33ebd6f4447_1024x866.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!WoAq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa1297c09-3e89-4022-9b9f-e33ebd6f4447_1024x866.jpeg 1456w" sizes="100vw"></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><figcaption class="image-caption"><strong>The Trek</strong></figcaption></figure></div><blockquote><p>Incidentally, I happened to go on a rocky trek with my team during my time here, and it was a challenging trek, both up and down. Going up was difficult because of the uncertainty. I did not know how steep it would get, how slippery the rocks ahead of me were and how much distance was left to cover. This became incredibly easier when I believed that I could reach the top,&nbsp; exactly when uncertainty turned into conviction. However weary, sweated out, or dehydrated, I&#8217;d undoubtedly reach. Coming down was easy just because of the surety of me knowing my way down, but was difficult because I was already tired and shaky, with my grip risking failure at some points. This became much easier when I started focusing, one hundred per cent on the way ahead of me. Finding the best way down, optimising the way based on my recent experience of handling such unwelcome rocks.&nbsp;</p><p>On the drive back home, only one thought looped in my head: that trek was exactly the story I had come to experience in Bangalore. The story of a startup, from zero to the top, to further ahead. The three-hour trek was such a succinct description of every startup from start to finish.</p><p>Both your laughter and cry count during this journey are greatly affected by the hands, holding you from slipping down and stealing your food when you&#8217;re looking away. It depends on the team. How to choose this team? I think this is the one question left to answer, which cannot have an objective method mapped out. I imagine it to be a gut instinct that would instantly say yes or no to a person in front of you, an acquired skill, in my opinion.&nbsp;</p><p>A <strong>starting point</strong>, a <strong>vision</strong>(even if blurred in spots) and <strong>some hands to hold</strong>, that could be listed as the potion to a startup, to hopefully someday, have you seated in a Bugatti, whizzing on the streets of Bangalore to your home, where, when you lay in bed, you can tell yourself, &#8220;Yes, I add some value to technology, and life, in general.&#8221;</p></blockquote><p><em>Published originally on https://hillstotech.wordpress.com/</em></p><p><em><strong>October 25, 2021</strong></em></p>]]></content:encoded></item><item><title><![CDATA[Where's your gaze? ]]></title><description><![CDATA[The chasm between who I am and who I want to be]]></description><link>https://www.nikiagarwal.com/p/wheres-your-gaze</link><guid isPermaLink="false">https://www.nikiagarwal.com/p/wheres-your-gaze</guid><dc:creator><![CDATA[Nikita Agarwal]]></dc:creator><pubDate>Wed, 09 Oct 2024 14:01:55 GMT</pubDate><enclosure url="https://images.unsplash.com/photo-1517185051431-f92ca046f4f5?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMzJ8fGdhemV8ZW58MHx8fHwxNzI4NDgyNDIxfDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.nikiagarwal.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.nikiagarwal.com/subscribe?"><span>Subscribe now</span></a></p><h2></h2><p>We all want to achieve a list of things, this, that and then the next. We even probably jot down a well thought out plan and envision ourselves on track to reaching the next goal post. But often, we see ourselves falling behind on those plans we chalked out for ourselves. There&#8217;s the gap, between plans and reality and while this could happen due to a concoction of things, I find a big reason behind me falling behind, to be where my eyes are locked in. Let me explain.</p><p>In the last few months, I have come up with a list of lists of steps to achieve a list of things, of which, only a meagre percentage has been actualized. That&#8217;s embarrassing, in the least. Why?</p><p>My gaze. I realized that while following my said plan my eyes are looking outwards on something, someone or some place outside of myself to take a call, follow through on accepted task splits or another task. And am waiting, for this external force to take action, while my plans go stale, and I stagnate in the same pool of quicksand, once again crying for help than walking myself out.</p><p>This is not a self-journal, but an observation on how we tend to abandon ourselves because we are not self-aware. We often choose goals that are not our own and of some other agent and then go on to wait on those external forces to push us towards action. That, when I talk about it, is downright foolish, and puts you in a weak and vulnerable position. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://images.unsplash.com/photo-1623473757643-0c63b7fe7f4d?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw3fHxtYWhhYmhhcmF0fGVufDB8fHx8MTcyODQ4MjQ1N3ww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://images.unsplash.com/photo-1623473757643-0c63b7fe7f4d?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw3fHxtYWhhYmhhcmF0fGVufDB8fHx8MTcyODQ4MjQ1N3ww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1623473757643-0c63b7fe7f4d?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw3fHxtYWhhYmhhcmF0fGVufDB8fHx8MTcyODQ4MjQ1N3ww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1623473757643-0c63b7fe7f4d?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw3fHxtYWhhYmhhcmF0fGVufDB8fHx8MTcyODQ4MjQ1N3ww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1623473757643-0c63b7fe7f4d?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw3fHxtYWhhYmhhcmF0fGVufDB8fHx8MTcyODQ4MjQ1N3ww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1456w" sizes="100vw"><img src="https://images.unsplash.com/photo-1623473757643-0c63b7fe7f4d?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw3fHxtYWhhYmhhcmF0fGVufDB8fHx8MTcyODQ4MjQ1N3ww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" width="6000" height="4000" data-attrs="{&quot;src&quot;:&quot;https://images.unsplash.com/photo-1623473757643-0c63b7fe7f4d?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw3fHxtYWhhYmhhcmF0fGVufDB8fHx8MTcyODQ4MjQ1N3ww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:4000,&quot;width&quot;:6000,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;brown concrete wall with human face embossed&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="brown concrete wall with human face embossed" title="brown concrete wall with human face embossed" srcset="https://images.unsplash.com/photo-1623473757643-0c63b7fe7f4d?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw3fHxtYWhhYmhhcmF0fGVufDB8fHx8MTcyODQ4MjQ1N3ww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1623473757643-0c63b7fe7f4d?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw3fHxtYWhhYmhhcmF0fGVufDB8fHx8MTcyODQ4MjQ1N3ww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1623473757643-0c63b7fe7f4d?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw3fHxtYWhhYmhhcmF0fGVufDB8fHx8MTcyODQ4MjQ1N3ww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1623473757643-0c63b7fe7f4d?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw3fHxtYWhhYmhhcmF0fGVufDB8fHx8MTcyODQ4MjQ1N3ww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 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><figcaption class="image-caption">Photo by <a href="true">Sumit Mangela</a> on <a href="https://unsplash.com">Unsplash</a></figcaption></figure></div><p>This reminds me of a rather famous anecdote from Mahabharata, where Arjun was poised with an impossible challenge of shooting a moving fish in the eye by just the reflection in the water bowl, with one of the heaviest bows of the time. While most princes at the competition were unable to even flinch the bow, let alone complete the challenge, Arjun took the challenge and with his eye focused on the fish&#8217;s, he landed the arrow at his target in the very first shot. This oversimplified version of the story tells just one thing, do you have your eye fixated on the goal, or on the onlookers? Is your focus undivided on the target ahead of you to have you unbeatable or are you deterred by the task and your eyes are now scanning the arena looking for a helping hand?</p><p>This brings to my mind, a similar anecdote from the same epic, that of Draupadi and the infamous &#8220;vastra-haran&#8221;. Her plight continued on as long as her fearful eyes kept scanning the courtyard. The moment she reflected on herself, and remembered &#8220;Krishna,&#8221; the story goes on to tell a miracle saved her. But I find it intriguing how Draupadi was also called &#8220;Krishnaa&#8221; fondly by Krishna himself. Is this a way to hint on the same principle, of self-reflection, self-resiliency and the truth that true power only comes from yourself. Only you, can save yourself. Yudishthir, let his eyes wander to people in the courtyard and took decisions to satisfy their vision of him, and not to help himself and his own. Focus, gaze, should always be inward. What could I do better? What is in my power? What can I change? What do I want to achieve? </p><p>I notice, dependencies, partnerships and them falling out, often leave us looking outward for action, and instead of us taking up the sword and fighting out the situation, well, we fall behind. </p><p>This makes me question, was my picking this goal the right call? If I cannot take a fight for something to happen, did I really want it in the first place?</p><p>So how do we unknowingly land up with such convoluted goals? Again, those wandering eyes are to blame, looking for shiny things that catch their attention. What does the world want, what do &#8220;they&#8221; think and, thus, what achievement would have me shining before the world? Gaze. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://images.unsplash.com/photo-1517185051431-f92ca046f4f5?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMzJ8fGdhemV8ZW58MHx8fHwxNzI4NDgyNDIxfDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://images.unsplash.com/photo-1517185051431-f92ca046f4f5?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMzJ8fGdhemV8ZW58MHx8fHwxNzI4NDgyNDIxfDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1517185051431-f92ca046f4f5?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMzJ8fGdhemV8ZW58MHx8fHwxNzI4NDgyNDIxfDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1517185051431-f92ca046f4f5?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMzJ8fGdhemV8ZW58MHx8fHwxNzI4NDgyNDIxfDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1517185051431-f92ca046f4f5?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMzJ8fGdhemV8ZW58MHx8fHwxNzI4NDgyNDIxfDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1456w" sizes="100vw"><img src="https://images.unsplash.com/photo-1517185051431-f92ca046f4f5?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMzJ8fGdhemV8ZW58MHx8fHwxNzI4NDgyNDIxfDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" width="5184" height="3456" data-attrs="{&quot;src&quot;:&quot;https://images.unsplash.com/photo-1517185051431-f92ca046f4f5?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMzJ8fGdhemV8ZW58MHx8fHwxNzI4NDgyNDIxfDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:3456,&quot;width&quot;:5184,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Leopard walking on grass&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Leopard walking on grass" title="Leopard walking on grass" srcset="https://images.unsplash.com/photo-1517185051431-f92ca046f4f5?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMzJ8fGdhemV8ZW58MHx8fHwxNzI4NDgyNDIxfDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1517185051431-f92ca046f4f5?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMzJ8fGdhemV8ZW58MHx8fHwxNzI4NDgyNDIxfDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1517185051431-f92ca046f4f5?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMzJ8fGdhemV8ZW58MHx8fHwxNzI4NDgyNDIxfDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1517185051431-f92ca046f4f5?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMzJ8fGdhemV8ZW58MHx8fHwxNzI4NDgyNDIxfDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 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><figcaption class="image-caption">Photo by <a href="true">Lareised Leneseur</a> on <a href="https://unsplash.com">Unsplash</a></figcaption></figure></div><p>Where is my gaze at?</p><p>Is at at myself, at my interests, passions, time, and desires or am I gazing at the guy next door and implicating what I should be doing instead? Where is my gaze, and where&#8217;s yours? </p><p>Where is the focus? On the world, or at yourself?</p><p>That&#8217;s something I would be acting upon, until next time :)</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.nikiagarwal.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 Nikita&#8217;s Substack! 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></p>]]></content:encoded></item></channel></rss>