<?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[Swapan Rajdev]]></title><description><![CDATA[Building the future with AI]]></description><link>https://www.srajdev.com</link><image><url>https://substackcdn.com/image/fetch/$s_!dLOw!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff45da7e4-a998-4713-966f-8e3c08b7d9f7_176x176.png</url><title>Swapan Rajdev</title><link>https://www.srajdev.com</link></image><generator>Substack</generator><lastBuildDate>Sun, 10 May 2026 11:28:12 GMT</lastBuildDate><atom:link href="https://www.srajdev.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Swapan]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[swapan@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[swapan@substack.com]]></itunes:email><itunes:name><![CDATA[Swapan]]></itunes:name></itunes:owner><itunes:author><![CDATA[Swapan]]></itunes:author><googleplay:owner><![CDATA[swapan@substack.com]]></googleplay:owner><googleplay:email><![CDATA[swapan@substack.com]]></googleplay:email><googleplay:author><![CDATA[Swapan]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[The Only Real Moat in AI: Speed]]></title><description><![CDATA[Why Speed Is the Only Moat Left in AI and Startups]]></description><link>https://www.srajdev.com/p/the-only-real-moat-in-ai-speed</link><guid isPermaLink="false">https://www.srajdev.com/p/the-only-real-moat-in-ai-speed</guid><dc:creator><![CDATA[Swapan]]></dc:creator><pubDate>Fri, 25 Jul 2025 05:22:39 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/fca79b7e-de4d-4d2c-b1dd-8c4bf96af99b_1200x630.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>This Isn&#8217;t a Typical Post (But I Think It&#8217;s Important)</strong></p><p>Typically, I write technical analyses, breakdowns, and implementation ideas. Today&#8217;s post is a little different. It&#8217;s more of a thought I&#8217;ve been sitting with, one I keep repeating to founders, builders, and myself.</p><p>If you like (or don&#8217;t like) this type of note, hit the like button or leave a quick comment. That way, I&#8217;ll know whether to share more of these in the future.</p><h3>The Only Real Moat Left: Speed</h3><p>Lots of people keep asking me:</p><blockquote><p><em>&#8220;How do I build a moat in today&#8217;s AI-everywhere world?&#8221;</em></p></blockquote><p>My answer is simple: <strong>speed of execution</strong>.</p><p>OpenAI took Codex from <a href="https://analyticsindiamag.com/ai-news-updates/openai-built-codex-in-just-7-weeks-from-scratch/">idea to public product in seven weeks</a>. Eight engineers. Zero quarterly-planning detours.</p><p>Replit&#8217;s AI agent once <a href="https://x.com/amasad/status/1946986468586721478">nuked a customer&#8217;s production database</a>. The team pulled an all-nighter, restored the data, and shipped new guardrails, all within 24 hours.</p><p>On the funding side, Dharmesh Shah jumped on a <em><a href="https://www.linkedin.com/posts/dharmesh_the-quick-story-of-how-i-came-to-invest-in-activity-7351611880966082561-lWeM/">Sunday</a></em><a href="https://www.linkedin.com/posts/dharmesh_the-quick-story-of-how-i-came-to-invest-in-activity-7351611880966082561-lWeM/"> Zoom</a> with Lovable founder Anton Osika and wired the check <em>Monday morning</em>.</p><p>Even the giants get it. Google and Meta are scooping up top AI talent in 48&#8211;72 hours. No red tape, just action.</p><p>For every one of these success stories, there&#8217;s another team killing ideas <em>faster</em> than slower teams can finish their pitch decks. That&#8217;s product velocity, deal velocity, hiring velocity, compounding quietly while others complain that &#8220;AI is too crowded.&#8221;</p><p>At Haptik, we had a rule:<br><strong>Inaction is worse than failure.</strong><br>In 2025, inaction isn&#8217;t just worse, it&#8217;s lethal.</p><p>If your AI idea needs 4&#8211;5 months of &#8220;alignment etc.&#8221; before users can touch it, someone faster has already eaten your lunch.</p><p>So let&#8217;s build.</p><p>Drop the overthinking. Quit waiting for permission. Ship something today.<br>Then learn, iterate, and ship again.</p>]]></content:encoded></item><item><title><![CDATA[LLM Evaluation Metrics: Your Production Scorecard]]></title><description><![CDATA[Evaluation Metrics to measure for Enterprise Success]]></description><link>https://www.srajdev.com/p/llm-evaluation-metrics</link><guid isPermaLink="false">https://www.srajdev.com/p/llm-evaluation-metrics</guid><dc:creator><![CDATA[Swapan]]></dc:creator><pubDate>Thu, 17 Jul 2025 06:38:18 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!dnFW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2586d600-00e5-4837-b817-db0ee8a8c7db_1334x1014.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_!dnFW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2586d600-00e5-4837-b817-db0ee8a8c7db_1334x1014.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dnFW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2586d600-00e5-4837-b817-db0ee8a8c7db_1334x1014.png 424w, https://substackcdn.com/image/fetch/$s_!dnFW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2586d600-00e5-4837-b817-db0ee8a8c7db_1334x1014.png 848w, https://substackcdn.com/image/fetch/$s_!dnFW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2586d600-00e5-4837-b817-db0ee8a8c7db_1334x1014.png 1272w, https://substackcdn.com/image/fetch/$s_!dnFW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2586d600-00e5-4837-b817-db0ee8a8c7db_1334x1014.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dnFW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2586d600-00e5-4837-b817-db0ee8a8c7db_1334x1014.png" width="1334" height="1014" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2586d600-00e5-4837-b817-db0ee8a8c7db_1334x1014.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1014,&quot;width&quot;:1334,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:169751,&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://www.srajdev.com/i/168449239?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2586d600-00e5-4837-b817-db0ee8a8c7db_1334x1014.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_!dnFW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2586d600-00e5-4837-b817-db0ee8a8c7db_1334x1014.png 424w, https://substackcdn.com/image/fetch/$s_!dnFW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2586d600-00e5-4837-b817-db0ee8a8c7db_1334x1014.png 848w, https://substackcdn.com/image/fetch/$s_!dnFW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2586d600-00e5-4837-b817-db0ee8a8c7db_1334x1014.png 1272w, https://substackcdn.com/image/fetch/$s_!dnFW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2586d600-00e5-4837-b817-db0ee8a8c7db_1334x1014.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><h2>The Enterprise LLM Scaling Reality Check</h2><p>You launched the GenAI app, the demo impressed everyone, but then day-to-day use exposed the cracks. Some replies are spot-on, others fail in odd ways, and every prompt tweak feels risky, as you are unsure what else will break.</p><p>After shipping more than 500 enterprise chatbots, I learned the solution to all of these is a clear <strong>evaluation scorecard</strong> you can track and share. It has four simple parts:</p><ul><li><p><strong>Quality</strong> &#8211; Are the answers correct and helpful?</p></li><li><p><strong>Outcome</strong> &#8211; Do users finish their tasks and drive real value?</p></li><li><p><strong>Performance</strong> &#8211; Do they arrive quickly and stay within budget?</p></li><li><p><strong>Safety &amp; Compliance</strong> &#8211; Do they avoid toxic or private content?</p></li></ul><p>The rest of this guide breaks down how to measure each part so you can improve with confidence and show the proof.</p><div><hr></div><h2>Why LLM Evaluation Metrics Are Critical for Enterprise Success</h2><p>Without proper evaluation frameworks, enterprises face:</p><ul><li><p><strong>&#128260; Change paralysis:</strong> No confidence in making prompt improvements without breaking functionality</p></li><li><p><strong>&#128201; Quality degradation:</strong> Issues go unnoticed until users complain or satisfaction drops</p></li><li><p><strong>&#128683; No optimization path:</strong> Can't improve what you can't measure</p></li><li><p><strong>&#128184; Cost explosions:</strong> Per-user costs growing to $8, $15, even $20 per interaction</p></li></ul><p><strong>Bottom line:</strong> Evaluation isn't overhead, it's how you scale profitably and safely.</p><div><hr></div><h2>The 4 Essential LLM Evaluation Categories for Production</h2><p>Think of evaluation as your executive dashboard. These four categories tell you everything you need to know about your LLM application's health:</p><ul><li><p><strong>Quality Metrics:</strong> answer correctness, relevance, context quality, and hallucination rates. </p></li><li><p><strong>Outcome Metrics:</strong> user satisfaction, task completion, and use-case-specific success metrics. </p></li><li><p><strong>Performance Metrics:</strong> cost per query, response time, uptime, and system reliability. </p></li><li><p><strong>Safety &amp; Compliance:</strong> toxicity detection, security violations, and data leak prevention.</p></li></ul><h3>When to Measure Each Category</h3><div id="datawrapper-iframe" class="datawrapper-wrap outer" data-attrs="{&quot;url&quot;:&quot;https://datawrapper.dwcdn.net/MRh5k/2/&quot;,&quot;thumbnail_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/35aeef6e-0925-4cac-b2ed-9faaab5a205d_1260x660.png&quot;,&quot;thumbnail_url_full&quot;:&quot;&quot;,&quot;height&quot;:320,&quot;title&quot;:&quot;Metric Categories&quot;,&quot;description&quot;:&quot;&quot;}" data-component-name="DatawrapperToDOM"><iframe id="iframe-datawrapper" class="datawrapper-iframe" src="https://datawrapper.dwcdn.net/MRh5k/2/" width="730" height="320" frameborder="0" scrolling="no"></iframe><script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();</script></div><p><strong>Key Insight:</strong> Quality and safety metrics are your insurance policies; test them thoroughly before launch, then monitor continuously. Business and performance metrics are the heartbeat of your production.</p><div><hr></div><h2>12 Essential LLM Metrics Everyone Should Track</h2><h3>&#127919; Quality Metrics</h3><p>Ensure accurate, relevant responses. Test thoroughly before production, validate regularly with sample data.</p><div id="datawrapper-iframe" class="datawrapper-wrap outer" data-attrs="{&quot;url&quot;:&quot;https://datawrapper.dwcdn.net/Y2E4o/2/&quot;,&quot;thumbnail_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/aa8f4ae4-7424-4564-b0ac-8f0577193bc4_1260x660.png&quot;,&quot;thumbnail_url_full&quot;:&quot;&quot;,&quot;height&quot;:877,&quot;title&quot;:&quot;Quality Metrics&quot;,&quot;description&quot;:&quot;&quot;}" data-component-name="DatawrapperToDOM"><iframe id="iframe-datawrapper" class="datawrapper-iframe" src="https://datawrapper.dwcdn.net/Y2E4o/2/" width="730" height="877" frameborder="0" scrolling="no"></iframe><script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();</script></div><p>Note: <strong>Answer Correctness</strong> measures "Is it TRUE?" while <strong>Answer Relevancy</strong> measures "Does it answer the QUESTION?" You need both, a response can be factually accurate but completely off-topic, or relevant but factually wrong.</p><h3>&#128176; Outcome Metrics</h3><p>Track these in real-time on production traffic, they directly impact your P&amp;L.</p><div id="datawrapper-iframe" class="datawrapper-wrap outer" data-attrs="{&quot;url&quot;:&quot;https://datawrapper.dwcdn.net/GNNo7/2/&quot;,&quot;thumbnail_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c6bb0a4b-0451-4c46-8348-2098412109e0_1260x660.png&quot;,&quot;thumbnail_url_full&quot;:&quot;&quot;,&quot;height&quot;:740,&quot;title&quot;:&quot;Outcome Metrics&quot;,&quot;description&quot;:&quot;&quot;}" data-component-name="DatawrapperToDOM"><iframe id="iframe-datawrapper" class="datawrapper-iframe" src="https://datawrapper.dwcdn.net/GNNo7/2/" width="730" height="740" frameborder="0" scrolling="no"></iframe><script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();</script></div><h3>&#9889; Performance Metrics</h3><p>Ensure speed and reliability within budget. Monitor continuously in production.</p><div id="datawrapper-iframe" class="datawrapper-wrap outer" data-attrs="{&quot;url&quot;:&quot;https://datawrapper.dwcdn.net/AOTKQ/3/&quot;,&quot;thumbnail_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ded3d7df-611d-48c6-891d-0ba96133b1f4_1260x660.png&quot;,&quot;thumbnail_url_full&quot;:&quot;&quot;,&quot;height&quot;:559,&quot;title&quot;:&quot;Performance Metrics&quot;,&quot;description&quot;:&quot;&quot;}" data-component-name="DatawrapperToDOM"><iframe id="iframe-datawrapper" class="datawrapper-iframe" src="https://datawrapper.dwcdn.net/AOTKQ/3/" width="730" height="559" frameborder="0" scrolling="no"></iframe><script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();</script></div><h3>&#128737;&#65039; Safety &amp; Compliance Metrics</h3><p>Protect the brand and ensure compliance. Implement before launch, monitor continuously.</p><div id="datawrapper-iframe" class="datawrapper-wrap outer" data-attrs="{&quot;url&quot;:&quot;https://datawrapper.dwcdn.net/6oYhW/1/&quot;,&quot;thumbnail_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/713c5994-e8d6-4a83-adcc-10d96afc32fd_1260x660.png&quot;,&quot;thumbnail_url_full&quot;:&quot;&quot;,&quot;height&quot;:505,&quot;title&quot;:&quot;Safety Metrics&quot;,&quot;description&quot;:&quot;&quot;}" data-component-name="DatawrapperToDOM"><iframe id="iframe-datawrapper" class="datawrapper-iframe" src="https://datawrapper.dwcdn.net/6oYhW/1/" width="730" height="505" frameborder="0" scrolling="no"></iframe><script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();</script></div><div><hr></div><h2>Enterprise Use-Case Metrics Mapping</h2><p>Choose your metrics based on your primary use case. Start with "Must Have" metrics for production readiness, then add "Good to Have" for optimization.</p><div id="datawrapper-iframe" class="datawrapper-wrap outer" data-attrs="{&quot;url&quot;:&quot;https://datawrapper.dwcdn.net/xu8nA/1/&quot;,&quot;thumbnail_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f2bece5d-2549-49cf-b770-8189bfbc891a_1260x660.png&quot;,&quot;thumbnail_url_full&quot;:&quot;&quot;,&quot;height&quot;:1199,&quot;title&quot;:&quot;Use-Case Metrics&quot;,&quot;description&quot;:&quot;&quot;}" data-component-name="DatawrapperToDOM"><iframe id="iframe-datawrapper" class="datawrapper-iframe" src="https://datawrapper.dwcdn.net/xu8nA/1/" width="730" height="1199" frameborder="0" scrolling="no"></iframe><script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();</script></div><h3>Metric Implementation Priority Framework</h3><p><strong>&#128640; Start Here (Week 1):</strong> Pick one metric from each category</p><ul><li><p><strong>&#128176; Business:</strong> Cost per Query OR Task Completion Rate</p></li><li><p><strong>&#127919; Quality:</strong> Answer Correctness OR Answer Relevancy</p></li><li><p><strong>&#9889; Performance:</strong> Response Time</p></li><li><p><strong>&#128737;&#65039; Safety:</strong> Toxicity Detection OR Security Violations</p></li></ul><p><strong>&#128200; Scale Up (Month 2):</strong> Add remaining "Must Have" metrics from your use case</p><p><strong>&#127919; Optimize (Month 3+):</strong> Layer in "Good to Have" metrics for comprehensive monitoring</p><div><hr></div><h3>Common Implementation Pitfalls to Avoid</h3><ul><li><p><strong>Don't measure everything at once</strong> - Start with 4-5 core metrics</p></li><li><p><strong>Don't ignore edge cases</strong> - Test with adversarial inputs</p></li><li><p><strong>Don't skip baseline measurement</strong> - Establish benchmarks before optimization</p></li><li><p><strong>Don't forget user feedback</strong> - Implicit signals matter as much as explicit ratings</p></li><li><p><strong>Don't over-rely on manual review</strong> - Automate evaluation where possible, use human-in-the-loop only for edge cases and quality spot-checks</p></li></ul><div><hr></div><h2>Conclusion: Building Your Production-Ready LLM Evaluation System</h2><p>Companies succeeding with LLMs in production don't have better models, they have better measurement systems. With proper evaluation metrics, you can deploy changes confidently, optimize systematically, and scale user satisfaction.</p><p><strong>Your Action Plan:</strong></p><ol><li><p><strong>Choose your use case</strong> from the mapping table above</p></li><li><p><strong>Implement "Must Have" metrics</strong> first, these are critical for production success</p></li><li><p><strong>Set up technical infrastructure</strong> using the implementation details provided</p></li><li><p><strong>Start optimizing</strong> based on real production data</p></li></ol><p>Start measuring today. Your evaluation system is your competitive advantage.</p>]]></content:encoded></item><item><title><![CDATA[Multi-Layered Guardrails for AI Agents ]]></title><description><![CDATA[Runtime Protection Alongside Model Alignment Is Essent]]></description><link>https://www.srajdev.com/p/multi-layered-guardrails-for-ai-agents</link><guid isPermaLink="false">https://www.srajdev.com/p/multi-layered-guardrails-for-ai-agents</guid><dc:creator><![CDATA[Swapan]]></dc:creator><pubDate>Thu, 01 May 2025 07:42:06 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!6cNo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48696c2a-95e6-4566-b9df-f24badf043c5_1536x1024.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_!6cNo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48696c2a-95e6-4566-b9df-f24badf043c5_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6cNo!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48696c2a-95e6-4566-b9df-f24badf043c5_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!6cNo!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48696c2a-95e6-4566-b9df-f24badf043c5_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!6cNo!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48696c2a-95e6-4566-b9df-f24badf043c5_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!6cNo!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48696c2a-95e6-4566-b9df-f24badf043c5_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6cNo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48696c2a-95e6-4566-b9df-f24badf043c5_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/48696c2a-95e6-4566-b9df-f24badf043c5_1536x1024.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;:1438909,&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://www.srajdev.com/i/162596215?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48696c2a-95e6-4566-b9df-f24badf043c5_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_!6cNo!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48696c2a-95e6-4566-b9df-f24badf043c5_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!6cNo!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48696c2a-95e6-4566-b9df-f24badf043c5_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!6cNo!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48696c2a-95e6-4566-b9df-f24badf043c5_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!6cNo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48696c2a-95e6-4566-b9df-f24badf043c5_1536x1024.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><h2>Why Guardrails Matter More Than Ever</h2><p>In early 2025, Meta&#8217;s AI assistant confidently told users that conservative activist Robby Starbuck had taken part in the January 6 Capitol riot. He hadn&#8217;t. The AI hallucinated it. And the damage, reputational, personal, legal, was very real.</p><p>This isn&#8217;t just a glitch. As AI agents become more autonomous, planning, executing, and acting on behalf of users, we need serious guardrails. And not the kind most people are used to.</p><p>Most organizations treat guardrails like seatbelts, a last-minute safety feature bolted onto an otherwise complete system. But in today's complex AI agents, effective guardrails must be woven into the system architecture itself.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.srajdev.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 Swapan Rajdev! 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><h2>The Narrow View: How Most People Think About Guardrails</h2><p>Most guardrail implementations focus on a limited set of basic protections:</p><ul><li><p><strong>Input filters</strong> &#8211; Scan prompts for banned content</p></li><li><p><strong>Output moderation</strong> &#8211; Flag risky responses</p></li><li><p><strong>Prompt sanitization</strong> &#8211; Strip out sensitive data</p></li></ul><p>But these are single-point fixes, better suited to chatbots than agentic systems. Today's agents reason, plan, use tools, store memory, and interact with APIs. Limiting guardrails to input/output creates massive blind spots.</p><h2>A Broader Approach: Guardrails Must Span the Full Agent System</h2><p>Think of agents as systems, not models. Each part needs its own protections:</p><ul><li><p><strong>Goals</strong>: Ensure objectives remain aligned with human values and organizational policies</p></li><li><p><strong>Context</strong>: Verify that environmental information isn't misleading or manipulated</p></li><li><p><strong>Memory</strong>: Protect against persistence of sensitive data or memory poisoning</p></li><li><p><strong>Reasoning</strong>: Guard against logical fallacies and confirmation bias</p></li><li><p><strong>Planning</strong>: Validate that steps align with goals and don't violate safety constraints</p></li><li><p><strong>Tools</strong>: Control access to external systems and verify proper use</p></li><li><p><strong>Knowledge bases</strong>: Prevent retrieval of sensitive information or toxic content</p></li></ul><p>This is why we need multi-layered guardrails that span the entire agent architecture. The Swiss Cheese Model from safety engineering, recently adapted for AI systems by Shamsujjoha et al. in their paper '<a href="https://arxiv.org/abs/2408.02205">Swiss Cheese Model for AI Safety' (2025)</a>, provides a useful metaphor: multiple protective layers with different strengths and weaknesses ensure that holes in any single layer won't lead to catastrophic failure.</p><h2>Key Attributes of Good Guardrails</h2><p>Effective guardrails protect several critical attributes:</p><ul><li><p><strong>Accuracy:</strong> Guardrails must prevent hallucinations, misinformation, and factually incorrect steps. As we saw with Meta's AI falsely linking Robby Starbuck to events he had no connection with, accuracy failures can have serious real-world consequences.</p></li><li><p><strong>Privacy</strong>: AI systems must avoid leaking sensitive information. Samsung learned this lesson when employees inadvertently leaked proprietary code through ChatGPT, leading to a company-wide ban on AI tools.</p></li><li><p><strong>Security</strong>: Guardrails need to prevent injection attacks, unsafe tool usage, or malicious code execution when AI agents access internal systems and resources.</p></li><li><p><strong>Safety</strong>: AI systems should prevent harm, whether emotional, physical, or reputational, that could result from their behavior, from refusing to generate malicious code to avoiding dangerous medical advice.</p></li><li><p><strong>Compliance</strong>: Outputs must adhere to legal and regulatory constraints, from financial disclosure requirements to HIPAA compliance in healthcare to GDPR in European operations.</p></li><li><p><strong>Fairness</strong>: AI agents should avoid biased behavior based on characteristics like race, gender, or geography that could undermine ethical standards and organizational diversity goals.</p></li></ul><h2>Guardrail Actions: The Essential Toolkit</h2><p>Now that we understand what to guard, let's explore the actions to perform:</p><ul><li><p><strong>Block</strong>: Prevents harmful inputs or outputs entirely, from rejecting jailbreak attempts to restricting access to sensitive data fields.</p></li><li><p><strong>Modify</strong>: Transforms inputs or outputs to remove sensitive information or add necessary context, such as automatically redacting PII before passing data to external services.</p></li><li><p><strong>Flag</strong>: Alerts human reviewers when situations require attention rather than automatic intervention, like detecting potential self-harm signals in customer interactions.</p></li><li><p><strong>Validate</strong>: Ensures plans, tool calls, or outputs meet specific requirements before proceeding, such as confirming financial transactions fall within authorized limits.</p></li><li><p><strong>Defer / Human-in-the-loop:</strong> Delays high-risk actions until explicit human approval is provided, particularly for irreversible operations or sensitive communications.</p></li></ul><h2>Looking Ahead</h2><p>Implementing these layers takes effort but the tools are maturing. Frameworks like <strong><a href="https://docs.nvidia.com/nemo/guardrails/latest/index.html">NeMo Guardrails</a></strong>, <strong><a href="https://portkey.ai/features/guardrails">Portkey</a></strong>, and <strong><a href="https://www.guardrailsai.com/">GuardrailsAI</a></strong> offer building blocks, and in my next post, I&#8217;ll walk through real-world implementations with architecture patterns and code.</p><h2>Conclusion</h2><p>AI agent safety requires shifting from narrow output filtering to comprehensive, multi-layered protection. By implementing guardrails that address key attributes across your entire agent architecture, you can build systems that remain helpful, honest, and safe&#8212;even as they grow increasingly autonomous. Remember: guardrails aren't afterthoughts but core architectural principles that should evolve alongside your AI capabilities.</p><h2>Acknowledgment</h2><p>This article draws from the research paper "Swiss Cheese Model for AI Safety: A Taxonomy and Reference Architecture for Multi-Layered Guardrails of Foundation Model Based Agents" by Md Shamsujjoha, Qinghua Lu, Dehai Zhao, and Liming Zhu (Data61, CSIRO, Australia, 2025). Their comprehensive framework for AI guardrails informed many of the concepts presented here. Read <a href="https://arxiv.org/abs/2408.02205">the full paper</a> for a deeper technical exploration.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.srajdev.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 Swapan Rajdev! 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[A Summary of LLM Post-Training Techniques ]]></title><description><![CDATA[Why fine-tuning, reinforcement learning, and test-time scaling are essential to turning language models into useful agents.]]></description><link>https://www.srajdev.com/p/a-deep-dive-into-llm-post-training</link><guid isPermaLink="false">https://www.srajdev.com/p/a-deep-dive-into-llm-post-training</guid><dc:creator><![CDATA[Swapan]]></dc:creator><pubDate>Thu, 27 Mar 2025 03:33:35 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/9ddba0bb-a7d5-4d1f-95b2-8866f339dad5_922x908.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_!GYj-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72a9012d-b1c7-460e-b851-b32327b1c1ba_922x908.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GYj-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72a9012d-b1c7-460e-b851-b32327b1c1ba_922x908.png 424w, https://substackcdn.com/image/fetch/$s_!GYj-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72a9012d-b1c7-460e-b851-b32327b1c1ba_922x908.png 848w, https://substackcdn.com/image/fetch/$s_!GYj-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72a9012d-b1c7-460e-b851-b32327b1c1ba_922x908.png 1272w, https://substackcdn.com/image/fetch/$s_!GYj-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72a9012d-b1c7-460e-b851-b32327b1c1ba_922x908.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GYj-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72a9012d-b1c7-460e-b851-b32327b1c1ba_922x908.png" width="922" height="908" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/72a9012d-b1c7-460e-b851-b32327b1c1ba_922x908.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:908,&quot;width&quot;:922,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:366781,&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://www.srajdev.com/i/159887610?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72a9012d-b1c7-460e-b851-b32327b1c1ba_922x908.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_!GYj-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72a9012d-b1c7-460e-b851-b32327b1c1ba_922x908.png 424w, https://substackcdn.com/image/fetch/$s_!GYj-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72a9012d-b1c7-460e-b851-b32327b1c1ba_922x908.png 848w, https://substackcdn.com/image/fetch/$s_!GYj-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72a9012d-b1c7-460e-b851-b32327b1c1ba_922x908.png 1272w, https://substackcdn.com/image/fetch/$s_!GYj-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72a9012d-b1c7-460e-b851-b32327b1c1ba_922x908.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><em>Fig1: Taxonomy of post training methods taken from <strong><a href="https://arxiv.org/abs/2502.21321">LLM Post-Training: A Deep Dive into Reasoning Large Language Models&#8221;</a> </strong></em></p><h2><strong>Introduction: The Foundation and the Fine-Tuning</strong></h2><p>This post is based on insights from the recent survey <strong><a href="https://arxiv.org/abs/2502.21321">&#8220;LLM Post-Training: A Deep Dive into Reasoning Large Language Models&#8221;</a></strong>, which organizes and explains the landscape of post-training techniques. I&#8217;ve distilled the core methodologies from the paper into this concise summary to make the concepts more accessible for practitioners and builders.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.srajdev.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 Swapan Rajdev! 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>Large Language Models (LLMs) have transformed what machines can do with text. They can write, summarize, translate, and even reason to a degree. But raw pretraining, even on trillions of tokens, is only the beginning.</p><p><strong>Post-training</strong> is where LLMs gain purpose: the ability to align with human goals, specialize in domains, and generate trustworthy outputs. This &#8220;second phase&#8221; includes fine-tuning, reinforcement learning, and smart techniques applied at inference time to push performance without retraining the model.</p><h2><strong>Why Post-Training is Essential for Your AI Applications</strong></h2><p>Pretrained models are generalists; they're &#8220;trained on everything,&#8221; but often confused by specifics. Without post-training:</p><ul><li><p>They hallucinate facts</p></li><li><p>Fail to follow instructions</p></li><li><p>Ignore ethical and safety boundaries</p></li><li><p>Struggle with complex, multi-step reasoning</p></li></ul><p>Post-training <strong>solves these problems</strong> by:</p><ul><li><p><strong>Aligning</strong> the model with human preferences</p></li><li><p><strong>Specializing</strong> in tasks or domains</p></li><li><p><strong>Boosting reasoning</strong> and factuality</p></li><li><p><strong>Making smaller models act smarter</strong> via test-time enhancements</p></li></ul><p>If pretraining is learning language, post-training is learning <em>usefulness</em>.</p><h2><strong>Key Post-Training Methodologies Explained</strong></h2><p>We group post-training into three big buckets:</p><ol><li><p><strong>Fine-Tuning: </strong>Specializes the model using curated data.</p></li><li><p><strong>Test-Time Scaling (TTS): </strong>Boosts performance during inference</p></li><li><p><strong>Reinforcement Learning (RL): </strong>Aligns behavior using feedback signals</p></li></ol><p>Each approach solves different challenges, and together, they unlock powerful capabilities.</p><div id="datawrapper-iframe" class="datawrapper-wrap outer" data-attrs="{&quot;url&quot;:&quot;https://datawrapper.dwcdn.net/TgOwC/7/&quot;,&quot;thumbnail_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/eeffefaf-9807-4b46-901a-3e9bbaf55c09_1260x660.png&quot;,&quot;thumbnail_url_full&quot;:&quot;&quot;,&quot;height&quot;:874,&quot;title&quot;:&quot;Fine-tuning&nbsp;Techniques&quot;,&quot;description&quot;:&quot;&quot;}" data-component-name="DatawrapperToDOM"><iframe id="iframe-datawrapper" class="datawrapper-iframe" src="https://datawrapper.dwcdn.net/TgOwC/7/" width="730" height="874" frameborder="0" scrolling="no"></iframe><script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();</script></div><div id="datawrapper-iframe" class="datawrapper-wrap outer" data-attrs="{&quot;url&quot;:&quot;https://datawrapper.dwcdn.net/9dBLn/3/&quot;,&quot;thumbnail_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cab7d57d-4c3c-4383-b771-c48e4a88f40b_1260x660.png&quot;,&quot;thumbnail_url_full&quot;:&quot;&quot;,&quot;height&quot;:1102,&quot;title&quot;:&quot;Test-Time Scaling Techniques&quot;,&quot;description&quot;:&quot;&quot;}" data-component-name="DatawrapperToDOM"><iframe id="iframe-datawrapper" class="datawrapper-iframe" src="https://datawrapper.dwcdn.net/9dBLn/3/" width="730" height="1102" frameborder="0" scrolling="no"></iframe><script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();</script></div><div id="datawrapper-iframe" class="datawrapper-wrap outer" data-attrs="{&quot;url&quot;:&quot;https://datawrapper.dwcdn.net/DklIk/2/&quot;,&quot;thumbnail_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c60395c0-9dc8-4d84-8921-0e6f6f3dfbe2_1260x660.png&quot;,&quot;thumbnail_url_full&quot;:&quot;&quot;,&quot;height&quot;:700,&quot;title&quot;:&quot;&nbsp;Reinforcement Learning Techniques&quot;,&quot;description&quot;:&quot;&quot;}" data-component-name="DatawrapperToDOM"><iframe id="iframe-datawrapper" class="datawrapper-iframe" src="https://datawrapper.dwcdn.net/DklIk/2/" width="730" height="700" frameborder="0" scrolling="no"></iframe><script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();</script></div><h2><strong>Looking Ahead: The Evolving Landscape of Post-Training</strong></h2><p>The future of post-training is rich and experimental. We're already seeing:</p><ul><li><p><strong>AI feedback replacing human feedback</strong> (RLAIF, Constitutional AI)</p></li><li><p><strong>Search-based reasoning</strong> (ToT, Graph-of-Thoughts)</p></li><li><p><strong>Self-critiquing and refinement loops</strong> for continuous output polishing</p></li><li><p><strong>Inference-level intelligence</strong> replacing brute-force scaling</p></li></ul><p>The real magic now lies not in growing models, but in teaching them how to think better.</p><h2><strong>Conclusion</strong></h2><p>The best AI models today aren&#8217;t just <em>big</em>. They&#8217;re <strong>well-refined</strong>. Post-training is how we bridge the gap between raw capabilities and trustworthy, helpful, aligned agents.</p><p>Mastering the post-training stack is essential whether you're building a customer assistant, a reasoning agent, or a specialized chatbot.</p><p>It&#8217;s not about more data. It&#8217;s about smarter training.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.srajdev.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 Swapan Rajdev! 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[Building Moats in the Age of AI]]></title><description><![CDATA[Strategies for Sustainable Competitive Advantage]]></description><link>https://www.srajdev.com/p/building-moats-in-the-age-of-ai</link><guid isPermaLink="false">https://www.srajdev.com/p/building-moats-in-the-age-of-ai</guid><dc:creator><![CDATA[Swapan]]></dc:creator><pubDate>Wed, 19 Mar 2025 05:04:53 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!9gbZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbf8f450-f511-45c6-a40c-c9b9cc047000_1792x1024.webp" 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_!9gbZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbf8f450-f511-45c6-a40c-c9b9cc047000_1792x1024.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9gbZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbf8f450-f511-45c6-a40c-c9b9cc047000_1792x1024.webp 424w, https://substackcdn.com/image/fetch/$s_!9gbZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbf8f450-f511-45c6-a40c-c9b9cc047000_1792x1024.webp 848w, https://substackcdn.com/image/fetch/$s_!9gbZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbf8f450-f511-45c6-a40c-c9b9cc047000_1792x1024.webp 1272w, https://substackcdn.com/image/fetch/$s_!9gbZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbf8f450-f511-45c6-a40c-c9b9cc047000_1792x1024.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9gbZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbf8f450-f511-45c6-a40c-c9b9cc047000_1792x1024.webp" width="1456" height="832" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cbf8f450-f511-45c6-a40c-c9b9cc047000_1792x1024.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:832,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:203228,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/webp&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.srajdev.com/i/159389173?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbf8f450-f511-45c6-a40c-c9b9cc047000_1792x1024.webp&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9gbZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbf8f450-f511-45c6-a40c-c9b9cc047000_1792x1024.webp 424w, https://substackcdn.com/image/fetch/$s_!9gbZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbf8f450-f511-45c6-a40c-c9b9cc047000_1792x1024.webp 848w, https://substackcdn.com/image/fetch/$s_!9gbZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbf8f450-f511-45c6-a40c-c9b9cc047000_1792x1024.webp 1272w, https://substackcdn.com/image/fetch/$s_!9gbZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbf8f450-f511-45c6-a40c-c9b9cc047000_1792x1024.webp 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>The AI landscape is evolving at breakneck speed, making traditional moats increasingly difficult to build and maintain. Let me expand on your thoughts and provide a comprehensive perspective on building defensible AI companies today.</p><h2>The Challenge of Building Moats in Today's AI Ecosystem</h2><p>The AI landscape has fundamentally altered the dynamics of competitive advantage. Traditional moats are increasingly difficult to establish and maintain for several compelling reasons:</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.srajdev.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 Swapan Rajdev! 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><strong>Unprecedented Technology Democratization: </strong>Once-proprietary AI capabilities are now available as APIs or open-source implementations, dramatically lowering barriers to entry. What was cutting-edge six months ago is now a commodity.</p></li><li><p><strong>Product Lifecycle Compression</strong>: The time from idea to market has shrunk dramatically. What once took years now takes weeks or months, and successful products are quickly replicated.</p></li><li><p><strong>Open Source Momentum:</strong> The open-source AI community is advancing at a staggering pace, with models like Llama, Mistral, and others rapidly closing performance gaps with proprietary alternatives. This creates a powerful "free alternative" for many use cases.</p></li></ul><h2>The Three Viable Moats for Companies</h2><h3>1. Speed</h3><p>In today's AI landscape, velocity is perhaps the most powerful competitive advantage:</p><ul><li><p>Small, nimble teams can outmaneuver larger organizations by shipping faster</p></li><li><p>Rapid iteration allows for quick feedback loops and product-market fit discovery</p></li><li><p>Fast execution creates breathing room before competitors catch up</p></li></ul><p>The companies winning today demonstrate exceptional execution velocity - they ship weekly or monthly updates that meaningfully improve their products.</p><h3>2. Quality</h3><p>Despite the democratization of AI technology, quality remains a significant differentiator:</p><ul><li><p>Exceptional UX/UI that makes complex AI capabilities accessible</p></li><li><p>Superior performance on key metrics that matter to users</p></li><li><p>Thoughtful implementation that addresses edge cases and failure modes</p></li></ul><p>Quality encompasses not just technical performance but the entire user experience - how the product feels, how it handles errors, and how it delights users.</p><h3>3. Distribution</h3><p>Perhaps the most durable moat in today's landscape:</p><ul><li><p>Network effects that increase value as more users join</p></li><li><p>Strategic partnerships that provide exclusive access to customers</p></li><li><p>Community building that creates advocates and reduces churn</p></li><li><p>Novel go-to-market strategies that bypass established channels</p></li></ul><h2>Embracing the "Wrapper" Mindset</h2><p>The stigma around being a "wrapper" company is misplaced:</p><ul><li><p>Many of today's most successful AI companies (Perplexity, Cursor, etc.) are effectively wrappers around foundational models</p></li><li><p>The value isn't just in the base technology but in the thoughtful <a href="https://www.srajdev.com/p/the-ai-stack">application layer</a></p></li><li><p>Building a great wrapper requires deep product thinking and user empathy</p></li></ul><p>Creating an effective wrapper involves:</p><ul><li><p>Identifying specific workflows where AI can create 10x improvements</p></li><li><p>Building intuitive interfaces that abstract complexity</p></li><li><p>Automating repetitive tasks completely</p></li><li><p>Deeply understanding domain-specific challenges</p></li></ul><h2>AI-Native Thinking</h2><p>The companies that will dominate in this new era are approaching problems with an AI-native mindset:</p><ul><li><p>Rather than incrementally improving existing solutions, they're reimagining entire workflows</p></li><li><p>They're not constrained by industry conventions or legacy thinking</p></li><li><p>They focus on outcomes rather than methods</p></li></ul><p>This creates a unique opportunity for outsiders to disrupt established industries. Those without industry baggage can envision entirely new approaches that established players might miss.</p><h2>Building for the Long Term</h2><p>While the pace of change is rapid, this AI wave is here to stay:</p><ul><li><p>The foundational technology continues to improve at a remarkable pace</p></li><li><p>Enterprise and consumer adoption is just starting</p></li><li><p>The economic impact is becoming increasingly clear</p></li></ul><p>For entrepreneurs, this means:</p><ul><li><p>It's worth investing in building expertise and capabilities now</p></li><li><p>Early failures can be valuable learning experiences</p></li><li><p>Position yourself for long-term success as the market matures</p></li></ul><h2>Conclusion</h2><p>Building a moat in today's AI landscape requires a combination of execution speed, product quality, and distribution strategy. While the challenges are significant, the opportunities for companies that navigate these waters successfully are enormous.</p><p>The most successful AI companies will embrace wrapper strategies while bringing AI-native thinking to their domains. They'll focus on creating exceptional user experiences, move with extraordinary speed, and develop innovative distribution channels.</p><p>The window is open now for entrepreneurs willing to experiment, learn quickly, and persevere through early challenges. Those who build the right capabilities today will be positioned to lead as the market matures.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.srajdev.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 Swapan Rajdev! 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 AI Stack: Understanding the Key Layers Powering the AI Ecosystem]]></title><description><![CDATA[A Breakdown of AI Infrastructure, Data, Models, Tooling, and Applications for Builders and Businesses]]></description><link>https://www.srajdev.com/p/the-ai-stack</link><guid isPermaLink="false">https://www.srajdev.com/p/the-ai-stack</guid><dc:creator><![CDATA[Swapan]]></dc:creator><pubDate>Wed, 26 Feb 2025 05:28:25 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!FpoY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd10ba748-e8d2-4e83-8d1c-ea6c97c4efc0_1774x1054.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_!FpoY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd10ba748-e8d2-4e83-8d1c-ea6c97c4efc0_1774x1054.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!FpoY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd10ba748-e8d2-4e83-8d1c-ea6c97c4efc0_1774x1054.png 424w, https://substackcdn.com/image/fetch/$s_!FpoY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd10ba748-e8d2-4e83-8d1c-ea6c97c4efc0_1774x1054.png 848w, https://substackcdn.com/image/fetch/$s_!FpoY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd10ba748-e8d2-4e83-8d1c-ea6c97c4efc0_1774x1054.png 1272w, https://substackcdn.com/image/fetch/$s_!FpoY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd10ba748-e8d2-4e83-8d1c-ea6c97c4efc0_1774x1054.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!FpoY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd10ba748-e8d2-4e83-8d1c-ea6c97c4efc0_1774x1054.png" width="1456" height="865" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d10ba748-e8d2-4e83-8d1c-ea6c97c4efc0_1774x1054.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:865,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1720501,&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://www.srajdev.com/i/157863821?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd10ba748-e8d2-4e83-8d1c-ea6c97c4efc0_1774x1054.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_!FpoY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd10ba748-e8d2-4e83-8d1c-ea6c97c4efc0_1774x1054.png 424w, https://substackcdn.com/image/fetch/$s_!FpoY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd10ba748-e8d2-4e83-8d1c-ea6c97c4efc0_1774x1054.png 848w, https://substackcdn.com/image/fetch/$s_!FpoY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd10ba748-e8d2-4e83-8d1c-ea6c97c4efc0_1774x1054.png 1272w, https://substackcdn.com/image/fetch/$s_!FpoY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd10ba748-e8d2-4e83-8d1c-ea6c97c4efc0_1774x1054.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>AI is transforming industries at an unprecedented pace, but to truly understand where value is created and how businesses differentiate, it's essential to break down the AI stack. While this might be obvious to some, having a clear framework helps founders, builders, and investors pinpoint opportunities, competition, and where real moats can be built.</p><p>Here&#8217;s how I see the full AI stack, from the foundational infrastructure to the applications that deliver AI-powered experiences to users.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.srajdev.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 Swapan Rajdev! 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><h3>1. <strong>Infrastructure Layer</strong> (The Hardware &amp; Compute Backbone)</h3><p>At the base of the AI stack lies the <strong>infrastructure layer</strong>, which includes the <strong>hardware and low-level software</strong> required to run AI models. This consists of:</p><ul><li><p><strong>GPUs &amp; AI Accelerators</strong> &#8211; <a href="https://www.nvidia.com/">NVIDIA</a>, <a href="https://www.amd.com/">AMD</a>, <a href="https://www.intel.com/">Intel</a>, <a href="https://cloud.google.com/tpu">Google TPUs</a>, <a href="https://aws.amazon.com/">AWS</a> Trainium, etc.</p></li><li><p><strong>Compute &amp; Cloud Providers</strong> &#8211; <a href="https://aws.amazon.com/">AWS</a>, <a href="https://cloud.google.com/">Google Cloud</a>, <a href="https://azure.microsoft.com/">Azure</a>, <a href="https://www.oracle.com/cloud/">Oracle Cloud</a>, etc.</p></li><li><p><strong>Software Libraries</strong> &#8211; <a href="https://developer.nvidia.com/cuda-toolkit">CUDA</a> (for NVIDIA GPUs), <a href="https://www.amd.com/en/products/software/rocm.html">ROCm</a> (for AMD), <a href="https://www.intel.com/content/www/us/en/developer/tools/oneapi/onednn.html">oneDNN</a> (for Intel), etc.</p></li></ul><p>Without this layer, no AI models can be trained or deployed efficiently. The companies operating here are capital-intensive but provide the critical foundation for the AI ecosystem.</p><p>(Note: Electricity, cooling, and data center infrastructure also play a crucial role in this layer, but we have not gone deep into that here.)</p><h3>2. <strong>Model Layer</strong></h3><p>The model layer consists of two key types of AI models:</p><ul><li><p><strong>Foundation Models (Pre-Training)</strong> &#8211; These are large-scale models trained on vast datasets and used as the base for further adaptation. Companies building these include <a href="https://openai.com/">OpenAI</a> (GPT-4, DALL&#183;E), Anthropic (<a href="https://claude.ai/">Claude</a>), Google (<a href="https://gemini.google.com/">Gemini</a>), <a href="https://mistral.ai/">Mistral</a>, Meta (<a href="https://www.llama.com/">Llama</a>), etc.</p></li><li><p><strong>Post-Trained &amp; Fine-Tuned Models</strong> &#8211; These are models that have been adapted using proprietary or domain-specific data for targeted use cases. <a href="https://cohere.com/">Cohere</a>, <a href="https://huggingface.co/">Hugging Face</a>, <a href="https://stability.ai/">Stability AI</a>, <a href="https://replit.com/">Replit</a> (code models), and others focusing on specific use cases like legal, medical, or scientific AI.</p></li></ul><p>This distinction is crucial, as foundation models provide a general base, while post-trained models refine them for real-world applications.</p><p>The foundation model layer is where most of the cutting-edge AI research happens, and while only a few companies have the resources to train these models from scratch, many build upon them.</p><h3>3. <strong>Data Layer</strong></h3><p>Like the model layer, the data layer can be divided into two parts: data for <strong>foundation models</strong> (pre-training) and data for <strong>post-training/inferencing</strong>. Each of these requires different types of datasets:</p><ul><li><p><strong>Data for Foundation Models (Pre-Training)</strong> &#8211; Companies like <a href="https://scale.com/">Scale AI</a>, <a href="https://commoncrawl.org/">Common Crawl</a>, <a href="https://karya.in/">Karya</a>, and <a href="https://labelbox.com/">Labelbox</a> specialize in <strong>data annotation and labeling</strong> for large-scale pre-training purposes.</p></li><li><p><strong>Data for Post-Training &amp; Inferencing</strong> &#8211; Companies like <a href="https://www.snowflake.com/en/">Snowflake</a>, <a href="https://www.databricks.com/">Databricks</a> (DBRX), and synthetic data providers focus on <strong>fine-tuning and real-time inferencing</strong> needs.</p></li></ul><p>This layer is crucial because high-quality, diverse, and well-labeled data directly impacts model performance and reliability.</p><h3>4. <strong>Tooling Layer</strong></h3><p>Once foundation models exist, they need to be adapted, fine-tuned, and deployed efficiently. The <strong>tooling layer</strong> includes:</p><ul><li><p><strong>MLOps &amp; AI Deployment</strong> &#8211; <a href="https://portkey.ai/">PortKey</a>, <a href="https://wandb.ai/">Weights &amp; Biases</a>, <a href="https://mlflow.org/">MLflow</a>, etc</p></li><li><p><strong>Vector Databases &amp; Retrieval-Augmented Generation (RAG)</strong> &#8211; <a href="https://www.pinecone.io/">Pinecone</a>, <a href="https://weaviate.io/">Weaviate</a>, <a href="https://www.trychroma.com/">ChromaDB</a>, etc.</p></li><li><p><strong>AI API Marketplaces</strong> &#8211; <a href="https://huggingface.co/spaces">Hugging Face Spaces</a>, <a href="https://replicate.com/">Replicate</a>, <a href="https://www.assemblyai.com/">AssemblyAI</a>, etc.</p></li><li><p><strong>Agentic &amp; Workflow Tools</strong> &#8211; <a href="https://composio.dev/">Composio</a>, <a href="https://www.langchain.com/">LangChain</a>, <a href="https://www.llamaindex.ai/">LlamaIndex</a> and orchestration frameworks that make AI more useful in workflows.</p></li></ul><p>This layer is about <strong>enabling businesses to use AI effectively</strong>&#8212;ensuring reliability, monitoring, and deployment at scale.</p><h3>5. <strong>Application Layer</strong></h3><p>At the top of the stack sits the <strong>application layer</strong>, where AI is delivered to end users. These applications integrate <strong>models, data, and infrastructure</strong> to solve real-world problems. Examples include:</p><ul><li><p><strong>AI Assistants &amp; Chatbots</strong> &#8211; <a href="https://openai.com/">ChatGPT</a>, <a href="https://www.perplexity.ai/">Perplexity</a>, <a href="https://www.jasper.ai/">Jasper</a>, <a href="https://www.copy.ai/">Copy.ai</a>, etc.</p></li><li><p><strong>B2B AI SaaS</strong> &#8211; <a href="https://www.haptik.ai/">Haptik</a>, <a href="https://www.glean.com/">Glean</a>, <a href="https://decagon.ai/">Decagon</a>, <a href="https://www.cursor.com/">Cursor</a> etc.</p></li><li><p><strong>AI in Vertical Markets</strong> &#8211; Legal (<a href="https://www.harvey.ai/">Harvey AI</a>), Healthcare (<a href="https://www.qure.ai/">Qure.ai</a>), etc.</p></li></ul><p>A key aspect of succeeding in this layer is <strong>seamless integration with other systems and workflows</strong>. AI applications need to be embedded into existing software stacks, enterprise systems, or consumer applications to maximize utility and adoption. Companies that effectively integrate AI into industry-specific workflows or existing SaaS products have a better chance of owning this layer and delivering differentiated value.</p><div><hr></div><h3>Why This Matters</h3><p>The AI ecosystem is rapidly evolving, and companies that fail to clearly define their place within the stack risk being outpaced by more strategic players. Whether you're a founder, investor, or engineer, understanding the <strong>layers you operate in</strong> is essential for long-term success. Here&#8217;s why this matters:</p><ul><li><p><strong>Identify Your Unique Edge</strong> &#8211; Are you competing in a commoditized layer, or are you creating unique value? Differentiation is key to building a sustainable business.</p></li><li><p><strong>Anticipate Market Shifts</strong> &#8211; AI is not static. New technologies, open-source advancements, and regulatory changes constantly reshape the landscape. Knowing your layer helps you stay ahead.</p></li><li><p><strong>Know Your True Competitors</strong> &#8211; Your biggest challenge might not be another startup but a hyperscaler, a foundation model provider, or an incumbent integrating AI more effectively.</p></li><li><p><strong>Build Defensible Moats</strong> &#8211; True AI moats come from ownership&#8212;of data, distribution, or deep integrations within enterprise workflows. Relying too much on other layers can leave you vulnerable.</p></li></ul><p>Different companies operate at different layers of the AI stack. For example, an AI application company might use <strong>proprietary customer data</strong> to fine-tune models but still rely on foundation models from OpenAI or Anthropic and infrastructure from AWS. Clearly defining <strong>which layers you are leveraging vs. where you are creating unique differentiation</strong> helps businesses make strategic decisions on partnerships, investments, and long-term vision.</p><p>This is just the beginning. In a future post, I&#8217;ll explore <strong>AI moats</strong>&#8212;how companies can build lasting defensibility in an industry that is evolving faster than ever.</p><p>Thanks to <a href="https://x.com/177pc">Pratyush</a> and <a href="https://x.com/aakrit">Aakrit</a> for reviewing and providing valuable feedback on this post</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.srajdev.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 Swapan Rajdev! 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[Understanding GPU Components for LLMs]]></title><description><![CDATA[In the fast-evolving world of artificial intelligence, each new GPU release is met with a mix of excitement and scrutiny.]]></description><link>https://www.srajdev.com/p/understanding-gpu-components-for-llms</link><guid isPermaLink="false">https://www.srajdev.com/p/understanding-gpu-components-for-llms</guid><dc:creator><![CDATA[Swapan]]></dc:creator><pubDate>Wed, 08 Jan 2025 08:14:04 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/f94f28f6-fd98-4d15-9053-cd64397fc2c4_1792x1024.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!InIx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6fdfb0b-8701-4cbe-bc64-5510e3014c31_1792x1024.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!InIx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6fdfb0b-8701-4cbe-bc64-5510e3014c31_1792x1024.webp 424w, https://substackcdn.com/image/fetch/$s_!InIx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6fdfb0b-8701-4cbe-bc64-5510e3014c31_1792x1024.webp 848w, https://substackcdn.com/image/fetch/$s_!InIx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6fdfb0b-8701-4cbe-bc64-5510e3014c31_1792x1024.webp 1272w, https://substackcdn.com/image/fetch/$s_!InIx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6fdfb0b-8701-4cbe-bc64-5510e3014c31_1792x1024.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!InIx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6fdfb0b-8701-4cbe-bc64-5510e3014c31_1792x1024.webp" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a6fdfb0b-8701-4cbe-bc64-5510e3014c31_1792x1024.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Understanding GPU Components for LLMs&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="Understanding GPU Components for LLMs" title="Understanding GPU Components for LLMs" srcset="https://substackcdn.com/image/fetch/$s_!InIx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6fdfb0b-8701-4cbe-bc64-5510e3014c31_1792x1024.webp 424w, https://substackcdn.com/image/fetch/$s_!InIx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6fdfb0b-8701-4cbe-bc64-5510e3014c31_1792x1024.webp 848w, https://substackcdn.com/image/fetch/$s_!InIx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6fdfb0b-8701-4cbe-bc64-5510e3014c31_1792x1024.webp 1272w, https://substackcdn.com/image/fetch/$s_!InIx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6fdfb0b-8701-4cbe-bc64-5510e3014c31_1792x1024.webp 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a><p>In the fast-evolving world of artificial intelligence, each new GPU release is met with a mix of excitement and scrutiny. Terms like cores, memory, and bandwidth are frequently discussed, but what do they mean for training and inferencing large language models? For anyone working in this space, understanding these GPU components is not just helpful&#8212;it&#8217;s essential. This blog unpacks why GPU specs matter and how they influence the performance and scalability of LLMs.</p><div><hr></div><h2><strong>The Math Behind LLMs</strong></h2><p>Large Language Models are essentially sophisticated layers of mathematical operations, primarily centered around matrix multiplications. Let&#8217;s explore this in simple terms:</p><h3><strong>Matrix Multiplication Basics</strong></h3><p>Consider two matrices:</p><ul><li><p><strong>A (3x2):</strong> [[1, 2], [3, 4], [5, 6]]</p></li><li><p><strong>B (2x3):</strong> [[7, 8, 9], [10, 11, 12]]</p></li></ul><p>To calculate A&#215;B</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lRVh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d915890-2906-47de-a5c1-2eae86fe8bc4_1158x1120.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lRVh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d915890-2906-47de-a5c1-2eae86fe8bc4_1158x1120.png 424w, https://substackcdn.com/image/fetch/$s_!lRVh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d915890-2906-47de-a5c1-2eae86fe8bc4_1158x1120.png 848w, https://substackcdn.com/image/fetch/$s_!lRVh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d915890-2906-47de-a5c1-2eae86fe8bc4_1158x1120.png 1272w, https://substackcdn.com/image/fetch/$s_!lRVh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d915890-2906-47de-a5c1-2eae86fe8bc4_1158x1120.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lRVh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d915890-2906-47de-a5c1-2eae86fe8bc4_1158x1120.png" width="1158" height="1120" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6d915890-2906-47de-a5c1-2eae86fe8bc4_1158x1120.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1120,&quot;width&quot;:1158,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Understanding GPU Components for LLMs&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="Understanding GPU Components for LLMs" title="Understanding GPU Components for LLMs" srcset="https://substackcdn.com/image/fetch/$s_!lRVh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d915890-2906-47de-a5c1-2eae86fe8bc4_1158x1120.png 424w, https://substackcdn.com/image/fetch/$s_!lRVh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d915890-2906-47de-a5c1-2eae86fe8bc4_1158x1120.png 848w, https://substackcdn.com/image/fetch/$s_!lRVh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d915890-2906-47de-a5c1-2eae86fe8bc4_1158x1120.png 1272w, https://substackcdn.com/image/fetch/$s_!lRVh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d915890-2906-47de-a5c1-2eae86fe8bc4_1158x1120.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>Just for the multiplication of 2 matrix above, below are the number of operations:</p><ul><li><p><strong>Multiplications:</strong> 18</p></li><li><p><strong>Additions:</strong> 9</p></li><li><p><strong>Total Operations:</strong> 27</p></li></ul><p>This is straightforward math, but when scaled to LLMs, the matrices involved often contain billions of elements. The number of operations grows exponentially, making computational efficiency critical.</p><p>Quick note: while our example used integers for simplicity, LLMs rely on floating-point numbers for greater precision&#8212;a topic we&#8217;ll cover shortly.</p><h3><strong>Training and Inference Operations</strong></h3><p>According to the <a href="https://arxiv.org/abs/2001.08361?ref=srajdev.com">scaling laws</a> for training LLMs, the total operations required can be approximated using:</p><p>Training&nbsp;Operations = 6 &#215; N &#215; D</p><p>Inference Operations = 2 &#215; N</p><p>Where:</p><ul><li><p>N: Number of model parameters</p></li><li><p>D: Number of tokens in the training dataset</p></li><li><p>The factor 6 accounts for forward and backward passes and optimization overhead.</p></li></ul><p>For instance, training a <strong>LLaMA 7B</strong> model requires <strong>1.26&#215;10&#178;&#178; operations</strong>, while inference for the same model uses 2 &#215; N, equating to <strong>1.4&#215;10&#185;&#8304; operations</strong>. Imagine the computational demand for models with 70 billion or even 400 billion parameters!</p><div><hr></div><h2><strong>Floating-Point Precision in LLMs</strong></h2><p>Floating-point numbers are indispensable in LLMs, offering the flexibility to represent extremely large or small values with fractional precision. Here&#8217;s a quick breakdown of the most common types of floating-point precisions:</p><p><strong>PrecisionUsageAdvantagesDisadvantagesRelevance in LLMsFP32</strong>TrainingHigh precision and numerical stabilityHigh memory and computational costEssential for critical calculations like gradient updates.<strong>FP16</strong>Training &amp; InferenceFaster computations, lower memory usageSusceptible to underflow/overflowWidely used in mixed-precision training.<strong>BF16</strong>Training &amp; InferenceCombines FP32 range with lower precisionSlightly less precise than FP32Preferred for training due to stability and efficiency.<strong>INT8</strong>InferenceLow memory and latencyPotential accuracy lossIdeal for deploying LLMs on resource-constrained systems.<strong>INT4</strong>ExperimentalUltra-compressed, hardware efficientSignificant accuracy lossEmerging for deploying very large models.</p><h3><strong>Memory Usage</strong></h3><p>Each floating-point number consumes memory when loading a model.</p><ul><li><p><strong>FP32:</strong> 4 bytes (32 bits) per parameter.</p></li><li><p><strong>FP16:</strong> 2 bytes (16 bits) per parameter.</p></li><li><p><strong>BF16:</strong> 2 bytes (16 bits) per parameter.</p></li><li><p><strong>INT8:</strong> 1 byte (8 bits) per parameter.</p></li></ul><p>Here&#8217;s how memory usage scales with precision for a model like <strong>LLaMA 7B</strong>:</p><ul><li><p><strong>FP32:</strong> 7&#215;10^9 &#215; 4bytes = <strong>28&#8201;GB</strong></p></li><li><p><strong>FP16/BF16:</strong> 7&#215;10^9 &#215; 2byte = <strong>14&#8201;GB</strong></p></li><li><p><strong>INT8:</strong> 7&#215;10^9 &#215; 1byte = <strong>7&#8201;GB</strong></p></li><li><p><strong>INT4:</strong> 7&#215;10^9&#215;0.5bytes = <strong>3.5&#8201;GB</strong></p></li></ul><p>Note: Additional memory is consumed for optimizations like K-V caching, which will be explored in future posts.</p><div><hr></div><h2><strong>Key GPU Components for LLMs</strong></h2><p>To meet the massive computational and storage requirements of LLMs, GPUs are designed with specialized components. Let&#8217;s break down their roles:</p><h3><strong>Tensor Cores</strong></h3><p>Optimized for matrix multiplications, Tensor Cores handle mixed-precision computations (e.g., FP16/FP32) with high throughput, drastically reducing training and inference time.</p><h3><strong>FLOPS (Floating Point Operations Per Second)</strong></h3><p>As the name suggests FLOPS is how many operations a GPU can perform per second and is a measure of the GPU's raw computational power. Higher FLOPS directly translate to faster training and inference, making them critical for LLM workloads.</p><h3><strong>Memory (VRAM) and Bandwidth</strong></h3><ul><li><p><strong>VRAM:</strong> Tells so how much capacity the GPU&#8217;s has to store large model parameters.</p></li><li><p><strong>Bandwidth:</strong> Shows the speed of data transfer, critical during forward and backward passes.</p></li></ul><h3><strong>NVLink and Interconnects</strong></h3><p>In multi-GPU setups, NVLink ensures efficient communication, a necessity for distributed training of large models.</p><h3><strong>Power and Thermal Efficiency</strong></h3><p>Every GPU operation consumes power. Efficient designs minimize cost and ensure thermal stability during intensive tasks.</p><div><hr></div><h2><strong>Decoding GPU Tech Sheets</strong></h2><p>To illustrate, let&#8217;s consider the <a href="https://nvdam.widen.net/s/nb5zzzsjdf/hpc-datasheet-sc23-h200-datasheet-3002446?ref=srajdev.com">data sheet</a> of an NVIDIA H200 GPU. Equipped with the knowledge of FLOPS, Tensor Cores, and memory bandwidth, you can now interpret what makes these GPUs optimal for AI workloads.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!NiwJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb6d970e-6aab-4041-80dd-4cfacb09ad83_1688x1270.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!NiwJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb6d970e-6aab-4041-80dd-4cfacb09ad83_1688x1270.png 424w, https://substackcdn.com/image/fetch/$s_!NiwJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb6d970e-6aab-4041-80dd-4cfacb09ad83_1688x1270.png 848w, https://substackcdn.com/image/fetch/$s_!NiwJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb6d970e-6aab-4041-80dd-4cfacb09ad83_1688x1270.png 1272w, https://substackcdn.com/image/fetch/$s_!NiwJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb6d970e-6aab-4041-80dd-4cfacb09ad83_1688x1270.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!NiwJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb6d970e-6aab-4041-80dd-4cfacb09ad83_1688x1270.png" width="1688" height="1270" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/db6d970e-6aab-4041-80dd-4cfacb09ad83_1688x1270.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1270,&quot;width&quot;:1688,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Understanding GPU Components for LLMs&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="Understanding GPU Components for LLMs" title="Understanding GPU Components for LLMs" srcset="https://substackcdn.com/image/fetch/$s_!NiwJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb6d970e-6aab-4041-80dd-4cfacb09ad83_1688x1270.png 424w, https://substackcdn.com/image/fetch/$s_!NiwJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb6d970e-6aab-4041-80dd-4cfacb09ad83_1688x1270.png 848w, https://substackcdn.com/image/fetch/$s_!NiwJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb6d970e-6aab-4041-80dd-4cfacb09ad83_1688x1270.png 1272w, https://substackcdn.com/image/fetch/$s_!NiwJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb6d970e-6aab-4041-80dd-4cfacb09ad83_1688x1270.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><div><hr></div><h2><strong>Closing Thoughts</strong></h2><p>GPUs are the backbone of modern AI, particularly for LLMs. Understanding key specifications like cores, FLOPS, memory, and bandwidth empowers developers to make informed choices, maximizing performance and scalability.</p><p>Whether you're training multi-billion parameter models or optimizing for real-time inference, the right GPU can unlock new possibilities in AI innovation. As the AI landscape evolves, staying informed about GPU advancements will keep you ahead in this exciting field.</p>]]></content:encoded></item><item><title><![CDATA[DeepSeek-V3: The Pinnacle of Open-Source AI]]></title><description><![CDATA[DeepSeek-V3 currently stands as the best open-source AI model, decisively outperforming competitors such as Llama 3.1 405B, Qwen, and Mistral in benchmarks.]]></description><link>https://www.srajdev.com/p/deepseek-v3-the-pinnacle-of-open-source-ai</link><guid isPermaLink="false">https://www.srajdev.com/p/deepseek-v3-the-pinnacle-of-open-source-ai</guid><dc:creator><![CDATA[Swapan]]></dc:creator><pubDate>Fri, 03 Jan 2025 09:17:42 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/774ff116-57da-4bdc-9aa8-fefef44de28f_1280x678.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LGSV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8f8b4de-34e4-4a36-8525-04165d483ce0_1280x678.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LGSV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8f8b4de-34e4-4a36-8525-04165d483ce0_1280x678.jpeg 424w, https://substackcdn.com/image/fetch/$s_!LGSV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8f8b4de-34e4-4a36-8525-04165d483ce0_1280x678.jpeg 848w, https://substackcdn.com/image/fetch/$s_!LGSV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8f8b4de-34e4-4a36-8525-04165d483ce0_1280x678.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!LGSV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8f8b4de-34e4-4a36-8525-04165d483ce0_1280x678.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LGSV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8f8b4de-34e4-4a36-8525-04165d483ce0_1280x678.jpeg" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a8f8b4de-34e4-4a36-8525-04165d483ce0_1280x678.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;DeepSeek-V3: The Pinnacle of Open-Source AI&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="DeepSeek-V3: The Pinnacle of Open-Source AI" title="DeepSeek-V3: The Pinnacle of Open-Source AI" srcset="https://substackcdn.com/image/fetch/$s_!LGSV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8f8b4de-34e4-4a36-8525-04165d483ce0_1280x678.jpeg 424w, https://substackcdn.com/image/fetch/$s_!LGSV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8f8b4de-34e4-4a36-8525-04165d483ce0_1280x678.jpeg 848w, https://substackcdn.com/image/fetch/$s_!LGSV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8f8b4de-34e4-4a36-8525-04165d483ce0_1280x678.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!LGSV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8f8b4de-34e4-4a36-8525-04165d483ce0_1280x678.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a><p>DeepSeek-V3 currently stands as the best open-source AI model, decisively outperforming competitors such as Llama 3.1 405B, Qwen, and Mistral in benchmarks. Remarkably, it is on par with leading closed-source models like OpenAI&#8217;s GPT-4o and Claude 3.5 Sonnet. Not only does it excel in performance, but it was also trained at an astonishingly low cost of $5.576 million, significantly less than its counterparts. For example, GPT-4 reportedly cost hundreds of millions of dollars to train, showcasing DeepSeek-V3&#8217;s efficiency. Furthermore, it offers unparalleled inference speed and can be hosted inexpensively, making it an ideal choice for organizations of all sizes.</p><div><hr></div><h3><strong>1. Introduction</strong></h3><h5><strong>About Deepseek</strong></h5><p><a href="https://www.deepseek.com/?ref=srajdev.com">DeepSeek</a>, a Chinese artificial intelligence company founded in 2023, has made remarkable advancements within just one year of its inception. Established by Liang Wenfeng, the founder of the Chinese quantitative hedge fund High-Flyer, DeepSeek focuses on developing advanced AI models with a vision of achieving artificial general intelligence (AGI). In this short span, the company has launched multiple groundbreaking models, including DeepSeek-V3, which boasts 671 billion parameters and rivals industry leaders like GPT-4. DeepSeek&#8217;s rapid progress and commitment to open-sourcing its models have positioned it as a disruptive force in the global AI landscape.</p><h5><strong>Why DeepSeek-V3 Matters</strong></h5><p>DeepSeek-V3 is more than just an AI model; it&#8217;s a statement about the future of open-source AI. By addressing both performance and cost barriers, it has the potential to reshape AI adoption across industries.</p><div><hr></div><h3><strong>2. Architectural Innovations</strong></h3><h5><strong>Mixture-of-Experts (MoE) Framework</strong></h5><p>At the heart of DeepSeek-V3 lies its Mixture-of-Experts (MoE) architecture. With 671 billion parameters, this model activates only 37 billion parameters per token. This selective activation ensures a balance between computational efficiency and model depth, making it one of the most advanced architectures in AI.</p><h5><strong>Multi-head Latent Attention (MLA)</strong></h5><p>The introduction of MLA optimizes attention mechanisms, allowing the model to infer faster while maintaining accuracy. This innovation ensures that even complex tasks are processed with remarkable speed and precision.</p><h5><strong>Auxiliary-Loss-Free Load Balancing</strong></h5><p>Traditional load balancing relies heavily on auxiliary losses, which can increase training complexity. DeepSeek-V3&#8217;s novel approach eliminates this dependency, streamlining operations and improving performance.</p><div><hr></div><h3><strong>3. Training Methodology</strong></h3><h5><strong>Data Scale and Quality</strong></h5><p>DeepSeekV3 was trained on an extensive dataset comprising 14.8 trillion tokens, sourced from diverse, high-quality domains, including curated web content, academic papers, and proprietary datasets. The company prioritized filtering and preprocessing to ensure data quality, reducing noise and improving contextual relevance. DeepSeek leveraged partnerships and open-source contributions to access a wide variety of training data while adhering to ethical data usage practices.</p><h5><strong>FP8 Mixed Precision Training</strong></h5><p>Using FP8 mixed precision significantly enhanced the training efficiency of DeepSeek V3 by reducing computational overhead and memory consumption without compromising model accuracy. FP8 (8-bit floating point) mixed precision allowed for faster matrix computations and optimized GPU utilization, enabling the training to scale effectively across massive datasets and complex architectures. This precision format also minimized energy costs and reduced hardware strain, contributing to the cost-efficient training of DeepSeek V3.</p><h5><strong>HAI-LLM Framework</strong></h5><p>The HAI-LLM Framework is a cutting-edge training system that combines hardware-aware strategies with algorithmic innovations, it ensures efficient and stable training across diverse environments. Key features include tailored hardware optimizations for NVIDIA H800 GPUs, support for FP8 mixed precision to reduce memory requirements, and advanced gradient stability techniques to prevent training interruptions. Additionally, its robust data pipeline minimizes bottlenecks, enabling seamless handling of the massive 14.8 trillion-token dataset used for DeepSeek-V3. This framework reduced training costs and ensured scalability and reliability, cementing its role in delivering state-of-the-art AI performance.</p><h5><strong>Post training distillation</strong>&nbsp;</h5><p>DeepSeek-V3&#8217;s advanced reasoning capabilities are a result of a specialized post-training process. By distilling reasoning skills from its DeepSeek-R1 series models, the company has incorporated verification and reflection patterns into the V3 model. This enhances the model&#8217;s ability to perform complex reasoning tasks while maintaining precise control over output style and length. These post-training innovations ensure that DeepSeek-V3 not only excels in benchmarks but also delivers practical value in real-world applications requiring high-level reasoning.</p><div><hr></div><h3><strong>4. Performance and Benchmarking</strong></h3><h5><strong>Unmatched Inference Speed</strong></h5><p>Generating 60 tokens per second, DeepSeek-V3 delivers three times the speed of its predecessor, making it an efficient choice for real-time applications.</p><h5>Industry Benchmarks</h5><p>DeepSeek-V3 has redefined the benchmarks for open-source AI, outperforming all its open-source competitors such as Llama 3.1 405B, Qwen, and Mistral. Its exceptional performance places it on par with industry titans like OpenAI&#8217;s GPT-4o and Claude 3.5 Sonnet. Below, you can find a detailed comparison of benchmark performances that illustrate its dominance in the field.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ERcU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5612b63-d965-42d6-a010-f8477523a837_1836x1174.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ERcU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5612b63-d965-42d6-a010-f8477523a837_1836x1174.png 424w, https://substackcdn.com/image/fetch/$s_!ERcU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5612b63-d965-42d6-a010-f8477523a837_1836x1174.png 848w, https://substackcdn.com/image/fetch/$s_!ERcU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5612b63-d965-42d6-a010-f8477523a837_1836x1174.png 1272w, https://substackcdn.com/image/fetch/$s_!ERcU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5612b63-d965-42d6-a010-f8477523a837_1836x1174.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ERcU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5612b63-d965-42d6-a010-f8477523a837_1836x1174.png" width="1836" height="1174" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e5612b63-d965-42d6-a010-f8477523a837_1836x1174.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1174,&quot;width&quot;:1836,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;DeepSeek-V3: The Pinnacle of Open-Source AI&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="DeepSeek-V3: The Pinnacle of Open-Source AI" title="DeepSeek-V3: The Pinnacle of Open-Source AI" srcset="https://substackcdn.com/image/fetch/$s_!ERcU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5612b63-d965-42d6-a010-f8477523a837_1836x1174.png 424w, https://substackcdn.com/image/fetch/$s_!ERcU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5612b63-d965-42d6-a010-f8477523a837_1836x1174.png 848w, https://substackcdn.com/image/fetch/$s_!ERcU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5612b63-d965-42d6-a010-f8477523a837_1836x1174.png 1272w, https://substackcdn.com/image/fetch/$s_!ERcU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5612b63-d965-42d6-a010-f8477523a837_1836x1174.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><div><hr></div><h2><strong>5. Efficiency</strong></h2><h5><strong>Optimized Training Resources</strong></h5><p>DeepSeek V3, trained using 2.788 million H800 GPU hours, demonstrates remarkable efficiency compared to many leading large language models (LLMs). Meta&#8217;s Llama 3.1, for instance, required approximately 31 million GPU hours on H100-80GB GPUs, significantly outpacing DeepSeek in computational demands. Similarly, NVIDIA&#8217;s Nemotron-4 utilized 6,144 H100 GPUs over six months, processing a similar scale of data but at a far greater cost and resource intensity. Even OpenAI&#8217;s GPT-3, despite being an older model, required over 1 million GPU hours, with the newer GPT versions demanding exponentially more, though exact figures remain undisclosed. DeepSeek&#8217;s cost-effective training, achieved at $5.576 million, showcases its highly optimized processes, including FP8 mixed precision and the HAI-LLM framework, making it both resource-efficient and high-performing. While other models like DBRX and Mistral have notable achievements, they lack the demonstrated balance of efficiency and performance seen in DeepSeek V3. These comparisons highlight DeepSeek&#8217;s ability to achieve state-of-the-art performance with fewer resources, positioning it as a leader in advancing LLM development.</p><h5><strong>Competitive API Pricing and Hosting</strong></h5><p>Currently, DeepSeek is offering promotional pricing until February 8, 2025, with rates set at $0.1 per million input tokens (cache hits), $1 per million input tokens (cache misses), and $2 per million output tokens.</p><p>After the promotional period, the pricing will adjust to $0.5 per million input tokens (cache hits), $2 per million input tokens (cache misses), and $8 per million output tokens.</p><p>Compared to other large language model (LLM) APIs, DeepSeek V3's pricing is competitive. For instance, OpenAI's GPT-4o is priced at $2.5 per million input tokens and $10 per million output tokens, while Anthropic's Claude 3.5 Sonnet is offered at $3 per million input tokens and $15 per million output tokens.</p><div><hr></div><h3>6. Features of DeepSeek-V3&nbsp;</h3><h5><strong>Advanced Reasoning and Deep Thinking</strong></h5><p>DeepSeek-V3 excels in complex reasoning tasks, thanks to its post-training enhancements that integrate verification and reflection techniques. This allows the model to solve intricate problems in mathematics, logic, and programming with exceptional precision. Whether you're debugging code or solving a logic puzzle, DeepSeek-V3 consistently delivers structured and reliable solutions, making it a strong contender against ChatGPT in technical and analytical domains.</p><h5><strong>Search-Enhanced Responses</strong></h5><p>DeepSeek-V3&#8217;s built-in search capabilities provide real-time, context-aware answers by fetching and synthesizing information from external sources. Unlike static models, it can validate data, ensuring the accuracy of responses. This feature is particularly useful for fact-checking, generating up-to-date content, or tackling domain-specific queries, offering a functionality that extends beyond ChatGPT's standard outputs.</p><h5><strong>Multi-Modal Input Support</strong></h5><p>DeepSeek-V3 supports multi-modal inputs, enabling users to interact with the model using text, images, or diagrams. For example, you can upload a chart or a photo, and the model will analyze the visual data to extract meaningful insights or summarize patterns. While ChatGPT&#8217;s multi-modal capabilities are available in its Pro version, DeepSeek-V3 provides a more comprehensive approach to interpreting and responding to visual content.</p><h5><strong>128k Token Context Window</strong></h5><p>With a massive 128k token context window, DeepSeek-V3 can process lengthy and complex documents without losing coherence. This feature is ideal for tasks like summarizing books, analyzing contracts, or handling multi-turn conversations. While ChatGPT offers extended context windows in its higher-tier models, DeepSeek-V3 democratizes this capability with its open-source accessibility.</p><h5><strong>Coding and Data Analysis</strong></h5><p>DeepSeek V3 is purpose-built to excel in tasks requiring precision and intelligence, such as coding and data analysis. Leveraging its advanced pre-trained capabilities, developers can seamlessly debug complex code, generate optimized database queries, and interpret intricate algorithms with clarity and reliability.</p><div><hr></div><h3><strong>7. Examples</strong></h3><h5>Search Example</h5><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ntmD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fdb7337-ad0f-4a23-9670-c763ad3334a3_1762x1040.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ntmD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fdb7337-ad0f-4a23-9670-c763ad3334a3_1762x1040.png 424w, https://substackcdn.com/image/fetch/$s_!ntmD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fdb7337-ad0f-4a23-9670-c763ad3334a3_1762x1040.png 848w, https://substackcdn.com/image/fetch/$s_!ntmD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fdb7337-ad0f-4a23-9670-c763ad3334a3_1762x1040.png 1272w, https://substackcdn.com/image/fetch/$s_!ntmD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fdb7337-ad0f-4a23-9670-c763ad3334a3_1762x1040.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ntmD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fdb7337-ad0f-4a23-9670-c763ad3334a3_1762x1040.png" width="1762" height="1040" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9fdb7337-ad0f-4a23-9670-c763ad3334a3_1762x1040.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1040,&quot;width&quot;:1762,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;DeepSeek-V3: The Pinnacle of Open-Source AI&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="DeepSeek-V3: The Pinnacle of Open-Source AI" title="DeepSeek-V3: The Pinnacle of Open-Source AI" srcset="https://substackcdn.com/image/fetch/$s_!ntmD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fdb7337-ad0f-4a23-9670-c763ad3334a3_1762x1040.png 424w, https://substackcdn.com/image/fetch/$s_!ntmD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fdb7337-ad0f-4a23-9670-c763ad3334a3_1762x1040.png 848w, https://substackcdn.com/image/fetch/$s_!ntmD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fdb7337-ad0f-4a23-9670-c763ad3334a3_1762x1040.png 1272w, https://substackcdn.com/image/fetch/$s_!ntmD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fdb7337-ad0f-4a23-9670-c763ad3334a3_1762x1040.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><h5>Creative Writing Example</h5><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LZmQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2018d8f9-6d42-4ada-9a1f-af0c4df1e12c_1520x974.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LZmQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2018d8f9-6d42-4ada-9a1f-af0c4df1e12c_1520x974.png 424w, https://substackcdn.com/image/fetch/$s_!LZmQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2018d8f9-6d42-4ada-9a1f-af0c4df1e12c_1520x974.png 848w, https://substackcdn.com/image/fetch/$s_!LZmQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2018d8f9-6d42-4ada-9a1f-af0c4df1e12c_1520x974.png 1272w, https://substackcdn.com/image/fetch/$s_!LZmQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2018d8f9-6d42-4ada-9a1f-af0c4df1e12c_1520x974.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LZmQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2018d8f9-6d42-4ada-9a1f-af0c4df1e12c_1520x974.png" width="1520" height="974" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2018d8f9-6d42-4ada-9a1f-af0c4df1e12c_1520x974.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:974,&quot;width&quot;:1520,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;DeepSeek-V3: The Pinnacle of Open-Source AI&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="DeepSeek-V3: The Pinnacle of Open-Source AI" title="DeepSeek-V3: The Pinnacle of Open-Source AI" srcset="https://substackcdn.com/image/fetch/$s_!LZmQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2018d8f9-6d42-4ada-9a1f-af0c4df1e12c_1520x974.png 424w, https://substackcdn.com/image/fetch/$s_!LZmQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2018d8f9-6d42-4ada-9a1f-af0c4df1e12c_1520x974.png 848w, https://substackcdn.com/image/fetch/$s_!LZmQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2018d8f9-6d42-4ada-9a1f-af0c4df1e12c_1520x974.png 1272w, https://substackcdn.com/image/fetch/$s_!LZmQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2018d8f9-6d42-4ada-9a1f-af0c4df1e12c_1520x974.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><h5>Coding Example</h5><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SvR2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d63f3ae-bf33-427f-816e-cb1f92ce9977_980x1220.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SvR2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d63f3ae-bf33-427f-816e-cb1f92ce9977_980x1220.png 424w, https://substackcdn.com/image/fetch/$s_!SvR2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d63f3ae-bf33-427f-816e-cb1f92ce9977_980x1220.png 848w, https://substackcdn.com/image/fetch/$s_!SvR2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d63f3ae-bf33-427f-816e-cb1f92ce9977_980x1220.png 1272w, https://substackcdn.com/image/fetch/$s_!SvR2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d63f3ae-bf33-427f-816e-cb1f92ce9977_980x1220.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SvR2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d63f3ae-bf33-427f-816e-cb1f92ce9977_980x1220.png" width="980" height="1220" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5d63f3ae-bf33-427f-816e-cb1f92ce9977_980x1220.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1220,&quot;width&quot;:980,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;DeepSeek-V3: The Pinnacle of Open-Source AI&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="DeepSeek-V3: The Pinnacle of Open-Source AI" title="DeepSeek-V3: The Pinnacle of Open-Source AI" srcset="https://substackcdn.com/image/fetch/$s_!SvR2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d63f3ae-bf33-427f-816e-cb1f92ce9977_980x1220.png 424w, https://substackcdn.com/image/fetch/$s_!SvR2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d63f3ae-bf33-427f-816e-cb1f92ce9977_980x1220.png 848w, https://substackcdn.com/image/fetch/$s_!SvR2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d63f3ae-bf33-427f-816e-cb1f92ce9977_980x1220.png 1272w, https://substackcdn.com/image/fetch/$s_!SvR2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d63f3ae-bf33-427f-816e-cb1f92ce9977_980x1220.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><h5>Reasoning Example</h5><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5Bii!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60af0c3d-1f33-4d5e-a435-8d3b1be0f2bf_1570x962.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5Bii!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60af0c3d-1f33-4d5e-a435-8d3b1be0f2bf_1570x962.png 424w, https://substackcdn.com/image/fetch/$s_!5Bii!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60af0c3d-1f33-4d5e-a435-8d3b1be0f2bf_1570x962.png 848w, https://substackcdn.com/image/fetch/$s_!5Bii!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60af0c3d-1f33-4d5e-a435-8d3b1be0f2bf_1570x962.png 1272w, https://substackcdn.com/image/fetch/$s_!5Bii!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60af0c3d-1f33-4d5e-a435-8d3b1be0f2bf_1570x962.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5Bii!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60af0c3d-1f33-4d5e-a435-8d3b1be0f2bf_1570x962.png" width="1570" height="962" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/60af0c3d-1f33-4d5e-a435-8d3b1be0f2bf_1570x962.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:962,&quot;width&quot;:1570,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;DeepSeek-V3: The Pinnacle of Open-Source AI&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="DeepSeek-V3: The Pinnacle of Open-Source AI" title="DeepSeek-V3: The Pinnacle of Open-Source AI" srcset="https://substackcdn.com/image/fetch/$s_!5Bii!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60af0c3d-1f33-4d5e-a435-8d3b1be0f2bf_1570x962.png 424w, https://substackcdn.com/image/fetch/$s_!5Bii!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60af0c3d-1f33-4d5e-a435-8d3b1be0f2bf_1570x962.png 848w, https://substackcdn.com/image/fetch/$s_!5Bii!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60af0c3d-1f33-4d5e-a435-8d3b1be0f2bf_1570x962.png 1272w, https://substackcdn.com/image/fetch/$s_!5Bii!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60af0c3d-1f33-4d5e-a435-8d3b1be0f2bf_1570x962.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><div><hr></div><h3><strong>8. Open-Source Commitment</strong></h3><p>DeepSeek-V3 exemplifies a balanced approach to open-source innovation by providing accessibility while ensuring responsible usage through its licensing arrangements. The model and its accompanying codebase are distributed under two distinct licenses:</p><h5><strong>Model License</strong></h5><p>The model is provided under DeepSeek's proprietary Model License, which permits use, reproduction, and distribution, including for commercial purposes, subject to specific terms and conditions. These terms include use-based restrictions to promote ethical and responsible AI deployment.</p><h5><strong>Code License</strong></h5><p>The accompanying codebase is released under the MIT License, a permissive open-source license that allows for extensive reuse with minimal restrictions, fostering broad adoption and adaptation by the developer community.</p><p>By combining these licensing strategies, DeepSeek-V3 ensures open access while addressing ethical considerations in AI development. This dual licensing model not only accelerates innovation but also empowers organizations to leverage state-of-the-art AI responsibly. True to its open-source ethos, DeepSeek-V3 fosters a spirit of collaboration, enabling developers and organizations to build on its robust foundation and drive advancements across industries.</p><div><hr></div><h3><strong>9. Conclusion</strong></h3><p>DeepSeek-V3 stands out as a versatile and powerful tool, offering unmatched reasoning and mathematical capabilities that redefine expectations for open-source AI. Its advanced post-training enhancements make it excel in tasks requiring complex problem-solving and logic, outshining models like GPT-4o and rivaling closed-source leaders such as Claude 3.5 Sonnet. While Claude 3.5 Sonnet may hold an edge in creative writing and coding finesse, DeepSeek-V3&#8217;s strengths in reasoning and mathematics firmly establish its dominance in analytical and technical domains. Additionally, its open-weight nature allows organizations to host the model themselves, ensuring greater flexibility and control&#8212;a distinct advantage for developers building custom applications on top of LLMs. For those seeking a cost-effective, high-performance model capable of delivering state-of-the-art results, DeepSeek-V3 is an unparalleled choice.</p>]]></content:encoded></item><item><title><![CDATA[Understanding Agentic AI Architecture]]></title><description><![CDATA[A Comprehensive Guide for Beginners to Experts]]></description><link>https://www.srajdev.com/p/understanding-agentic-ai-architecture</link><guid isPermaLink="false">https://www.srajdev.com/p/understanding-agentic-ai-architecture</guid><dc:creator><![CDATA[Swapan]]></dc:creator><pubDate>Tue, 26 Nov 2024 06:32:27 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/b80b265c-0092-46f1-b7c6-e0257376dee5_2000x1509.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DJX0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8cee2652-d401-433c-8b29-0b49c13ce27f_2000x1509.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DJX0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8cee2652-d401-433c-8b29-0b49c13ce27f_2000x1509.png 424w, https://substackcdn.com/image/fetch/$s_!DJX0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8cee2652-d401-433c-8b29-0b49c13ce27f_2000x1509.png 848w, https://substackcdn.com/image/fetch/$s_!DJX0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8cee2652-d401-433c-8b29-0b49c13ce27f_2000x1509.png 1272w, https://substackcdn.com/image/fetch/$s_!DJX0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8cee2652-d401-433c-8b29-0b49c13ce27f_2000x1509.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DJX0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8cee2652-d401-433c-8b29-0b49c13ce27f_2000x1509.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8cee2652-d401-433c-8b29-0b49c13ce27f_2000x1509.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Understanding Agentic AI Architecture&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="Understanding Agentic AI Architecture" title="Understanding Agentic AI Architecture" srcset="https://substackcdn.com/image/fetch/$s_!DJX0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8cee2652-d401-433c-8b29-0b49c13ce27f_2000x1509.png 424w, https://substackcdn.com/image/fetch/$s_!DJX0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8cee2652-d401-433c-8b29-0b49c13ce27f_2000x1509.png 848w, https://substackcdn.com/image/fetch/$s_!DJX0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8cee2652-d401-433c-8b29-0b49c13ce27f_2000x1509.png 1272w, https://substackcdn.com/image/fetch/$s_!DJX0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8cee2652-d401-433c-8b29-0b49c13ce27f_2000x1509.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a></figure></div><p>A Comprehensive Guide for Beginners to Experts</p><h2><strong>Introduction</strong></h2><p>Agentic AI represents a fascinating and complex frontier in the development of artificial intelligence. Unlike traditional machine learning models that passively receive inputs and produce outputs, agentic AI involves entities, called agents, that can make decisions, interact with their environment, and achieve specific goals. These agents utilize components such as reasoning, memory, and planning to perform tasks autonomously, even collaborating with other agents to solve larger problems. This paper provides a detailed exploration of agentic AI, covering concepts from beginner to expert level, while offering practical examples and applications to illustrate these concepts effectively.</p><h2>What is Agentic AI</h2><p>Agentic AI refers to AI systems that demonstrate autonomous behavior, actively working to achieve goals with minimal direct human intervention. An agentic AI system is capable of understanding its environment, reasoning about available options, planning its actions, executing tasks, and learning from its experiences. The term "agentic" suggests that these systems can take initiative, make decisions, and even communicate with other agents to achieve complex tasks.</p><p><strong>Examples</strong></p><ul><li><p><strong>Customer Support Agents</strong>: Customer support agents use agentic AI to interact with customers, answer queries, and escalate issues when needed. These agents can provide round-the-clock support, adapt to the customer's needs, and learn from previous interactions to improve their responses.</p></li><li><p><strong>Marketing Agents</strong>: Marketing agents are designed to autonomously manage marketing campaigns, including segmenting audiences, scheduling posts, and optimizing ads based on real-time performance data. They help businesses achieve better outreach with minimal human intervention.</p></li><li><p><strong>Coding Agent</strong>: Coding agents are designed to autonomously generate code, scripts, or perform debugging tasks. These agents are useful for automating repetitive coding tasks, generating boilerplate code, or creating custom functions as needed. They can operate within an integrated development environment (IDE) to execute specific commands, optimizing the software development lifecycle.</p></li><li><p><strong>Virtual Assistants</strong>: Personal assistants like Alexa or Google Assistant use agentic AI to respond to user requests, set reminders, make recommendations, and control smart devices, adapting to users' preferences.</p></li><li><p><strong>Financial Trading Bots</strong>: Automated trading agents are capable of making trading decisions in real time, based on market conditions, predefined rules, and evolving strategies.</p></li></ul><h2>Agents and System 1 vs. System 2 Thinking</h2><p>In the book <em>Thinking, Fast and Slow</em> by Daniel Kahneman, human cognition is described in terms of two systems: <strong>System 1</strong> and <strong>System 2</strong>. System 1 thinking is fast, intuitive, and automatic, while System 2 thinking is slower, more deliberate, and logical. This concept can be applied to understanding the operation of agentic AI.</p><ul><li><p><strong>System 1 Agents</strong>: These agents are designed to make rapid decisions and respond to simple, routine tasks. They operate in a way similar to System 1 thinking&#8212;quickly and efficiently. For example, a customer support agent that gives instant responses based on predefined rules or patterns is akin to System 1 thinking, where speed and immediacy are prioritized.</p></li><li><p><strong>System 2 Agents</strong>: These agents handle more complex tasks requiring careful reasoning, planning, and evaluation. They embody System 2 thinking, which involves a deeper, more thoughtful approach to decision-making. Agents like the Planning agent are meant to exhibit System 2 behavior, where multiple layers of analysis, planning, and evaluation come into play before a decision is made.</p></li></ul><p>Agentic AI often blends these two modes of operation&#8212;rapid, instinctual responses for well-defined tasks (System 1) and more comprehensive, deliberate actions for complex decision-making (System 2). Understanding this distinction helps to design agents that can leverage both approaches effectively, depending on the nature of the task at hand.</p><h2>Agentic AI Architecture and Components</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!H5DY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd8c13f6-55ac-4b77-82f3-f2c2bfffecbc_2000x1509.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!H5DY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd8c13f6-55ac-4b77-82f3-f2c2bfffecbc_2000x1509.png 424w, https://substackcdn.com/image/fetch/$s_!H5DY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd8c13f6-55ac-4b77-82f3-f2c2bfffecbc_2000x1509.png 848w, https://substackcdn.com/image/fetch/$s_!H5DY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd8c13f6-55ac-4b77-82f3-f2c2bfffecbc_2000x1509.png 1272w, https://substackcdn.com/image/fetch/$s_!H5DY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd8c13f6-55ac-4b77-82f3-f2c2bfffecbc_2000x1509.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!H5DY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd8c13f6-55ac-4b77-82f3-f2c2bfffecbc_2000x1509.png" width="2000" height="1509" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dd8c13f6-55ac-4b77-82f3-f2c2bfffecbc_2000x1509.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1509,&quot;width&quot;:2000,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Understanding Agentic AI Architecture&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="Understanding Agentic AI Architecture" title="Understanding Agentic AI Architecture" srcset="https://substackcdn.com/image/fetch/$s_!H5DY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd8c13f6-55ac-4b77-82f3-f2c2bfffecbc_2000x1509.png 424w, https://substackcdn.com/image/fetch/$s_!H5DY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd8c13f6-55ac-4b77-82f3-f2c2bfffecbc_2000x1509.png 848w, https://substackcdn.com/image/fetch/$s_!H5DY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd8c13f6-55ac-4b77-82f3-f2c2bfffecbc_2000x1509.png 1272w, https://substackcdn.com/image/fetch/$s_!H5DY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd8c13f6-55ac-4b77-82f3-f2c2bfffecbc_2000x1509.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">Agentic AI Framework Architecture</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!L3Kf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05624d5d-cf1c-4157-8f31-e5e307502e62_2000x424.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!L3Kf!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05624d5d-cf1c-4157-8f31-e5e307502e62_2000x424.png 424w, https://substackcdn.com/image/fetch/$s_!L3Kf!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05624d5d-cf1c-4157-8f31-e5e307502e62_2000x424.png 848w, https://substackcdn.com/image/fetch/$s_!L3Kf!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05624d5d-cf1c-4157-8f31-e5e307502e62_2000x424.png 1272w, https://substackcdn.com/image/fetch/$s_!L3Kf!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05624d5d-cf1c-4157-8f31-e5e307502e62_2000x424.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!L3Kf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05624d5d-cf1c-4157-8f31-e5e307502e62_2000x424.png" width="2000" height="424" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/05624d5d-cf1c-4157-8f31-e5e307502e62_2000x424.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:424,&quot;width&quot;:2000,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Understanding Agentic AI Architecture&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="Understanding Agentic AI Architecture" title="Understanding Agentic AI Architecture" srcset="https://substackcdn.com/image/fetch/$s_!L3Kf!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05624d5d-cf1c-4157-8f31-e5e307502e62_2000x424.png 424w, https://substackcdn.com/image/fetch/$s_!L3Kf!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05624d5d-cf1c-4157-8f31-e5e307502e62_2000x424.png 848w, https://substackcdn.com/image/fetch/$s_!L3Kf!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05624d5d-cf1c-4157-8f31-e5e307502e62_2000x424.png 1272w, https://substackcdn.com/image/fetch/$s_!L3Kf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05624d5d-cf1c-4157-8f31-e5e307502e62_2000x424.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Agent Component Architecture</figcaption></figure></div><p>Above is a diagram depicting the components of an agentic framework.</p><p><strong>Triggering Mechanisms</strong></p><p>Any agentic system can be initiated by a user interacting with it or by another system triggering an action, either through a webhook or a frequency timer.</p><p><strong>LLM</strong></p><p>Every agentic framework is dependent on a language model (LLM). Each component can access the same or different LLM to complete its goal, providing flexibility and scalability in handling various tasks.</p><p><strong>Planning Agent</strong></p><p>The planning agent serves as the orchestration component, which includes reasoning, planning, and task decomposition. This agent knows all other agents and, through proper planning, reasoning, and task decomposition, decides which agents to execute and in what order. LLMs with reasoning capabilities (such as OpenAI&#8217;s o1-preview) are best suited for such agents but should be used carefully to balance other considerations of an agentic system.</p><p><strong>Agents</strong></p><p>Agents encapsulate a set of instructions and tools to achieve a given task.:</p><ul><li><p><strong>Prompts</strong>: Commands given to a language model along with the tools it has access to.</p></li><li><p><strong>Tools</strong>: Execution blocks that perform actions, such as simple code blocks, API calls, or integrations with other systems.</p></li><li><p><strong>Environments</strong>: Tools may also have environments associated with them to execute specific tasks, such as IDEs or general computer use.</p></li><li><p><strong>Complex Agents</strong>: Agents can also be entire architectures, such as Retrieval-Augmented Generation (RAG), which include embeddings and vector databases.</p></li><li><p><strong>Memory: </strong>Memory in agentic AI allows agents to store information and recall it in future interactions. Memory is available to all components at all times and can include different types:</p></li><li><p><strong>User Profile</strong>: User-specific information that helps agents create personalized experiences.</p></li><li><p><strong>Chat History</strong>: The history of conversations, allowing agents to pull context from past interactions.</p></li><li><p><strong>Chat State</strong>: Tracking the workflows that have been executed to avoid duplicating tasks.</p></li></ul><p><strong>Guardrails</strong></p><p>Guardrails are safety mechanisms that prevent harmful behaviors while ensuring robustness in handling unforeseen inputs or scenarios. Rules such as &#8220;Ensure there is no mention of competitors in the reply&#8221;, &#8220;Avoid discussing religion or politics&#8221; are a few such examples that should exist at a framework level. These constraints are crucial for deploying agents in dynamic environments, providing default safety checks that can be edited if needed.</p><p><strong>Agent Observability</strong></p><p>Observability allows developers and users to understand what an agent is doing and why. Providing transparency in agent behavior helps diagnose issues, optimize performance, and ensure that the agent's decisions are aligned with the desired outcomes.</p><p><strong>Adaptation and Learning</strong></p><p>Adaptation involves an agent's ability to modify its behavior based on feedback from the environment. This includes reinforcement learning or other adaptive techniques that enable agents to optimize their decision-making over time. For example, a marketing agent may adapt its strategy based on changing customer preferences.</p><h2>AI Agents Ecosystem</h2><p>The agent AI infrastructure has evolved tremendously over the last year and is expected to continue evolving rapidly. This growth has brought many new tools and components that facilitate building agentic AI systems.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nANo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d69b731-2fc5-4631-80d3-5d24ccf2f7b3_866x1280.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nANo!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d69b731-2fc5-4631-80d3-5d24ccf2f7b3_866x1280.jpeg 424w, https://substackcdn.com/image/fetch/$s_!nANo!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d69b731-2fc5-4631-80d3-5d24ccf2f7b3_866x1280.jpeg 848w, https://substackcdn.com/image/fetch/$s_!nANo!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d69b731-2fc5-4631-80d3-5d24ccf2f7b3_866x1280.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!nANo!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d69b731-2fc5-4631-80d3-5d24ccf2f7b3_866x1280.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nANo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d69b731-2fc5-4631-80d3-5d24ccf2f7b3_866x1280.jpeg" width="866" height="1280" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5d69b731-2fc5-4631-80d3-5d24ccf2f7b3_866x1280.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1280,&quot;width&quot;:866,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Understanding Agentic AI Architecture&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="Understanding Agentic AI Architecture" title="Understanding Agentic AI Architecture" srcset="https://substackcdn.com/image/fetch/$s_!nANo!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d69b731-2fc5-4631-80d3-5d24ccf2f7b3_866x1280.jpeg 424w, https://substackcdn.com/image/fetch/$s_!nANo!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d69b731-2fc5-4631-80d3-5d24ccf2f7b3_866x1280.jpeg 848w, https://substackcdn.com/image/fetch/$s_!nANo!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d69b731-2fc5-4631-80d3-5d24ccf2f7b3_866x1280.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!nANo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d69b731-2fc5-4631-80d3-5d24ccf2f7b3_866x1280.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><figcaption class="image-caption">Agentic AI Infrastructure</figcaption></figure></div><p>The diagram provided by <a href="https://www.madrona.com/the-rise-of-ai-agent-infrastructure/?ref=srajdev.com">Madrona</a> showcases the different parts of the ecosystem, including components such as agent hosting, orchestration, memory, platform tools, and more.</p><p><strong>Pros</strong></p><ul><li><p><strong>Diverse Tooling</strong>: There are numerous good tools available for every part of building agentic AI. This diversity allows developers to pick specialized tools for their specific requirements.</p></li><li><p><strong>Designed for simplicity</strong>: Many of these tools are designed with user-friendly interfaces or straightforward APIs, making it easy to get started and develop prototypes quickly in each area.</p></li></ul><p><strong>Cons</strong></p><ul><li><p><strong>Fragmented Ecosystem</strong>: The large number of specialized tools results in a highly fragmented ecosystem, which requires a lot of effort to stitch together. Developers often spend more time integrating and managing multiple tools than on core development.</p></li><li><p><strong>Integration Complexity</strong>: Ensuring compatibility and efficient communication between different tools can be complex and time-consuming, adding significant overhead to projects.</p></li></ul><p>While this diversity in tooling enables a high degree of customization and specialization, it also presents a significant challenge for developers, who must figure out how to integrate them seamlessly into their frameworks.</p><p>This fragmentation often makes development cumbersome and time-consuming, especially as developers have to manage multiple tools that may or may not work well together. As the ecosystem continues to grow, consolidation into unified frameworks or more comprehensive tools will be key to simplifying the development process. Such consolidation would make it easier for developers to implement agentic AI systems without constantly dealing with integration issues and compatibility challenges.</p><p>Ultimately, while the pace of evolution in agentic AI infrastructure is encouraging, the need for cohesive and consolidated tools is crucial to ensuring that development remains accessible, efficient, and scalable for a wide range of use cases.</p><h2>Example: Hedge Fund Agent</h2><p>To evaluate the above frameworks, we use an example of a hedge fund agent that does different analyses to give a summary and decision about a public company stock</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5QFO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F321fbe47-8e9a-4fd0-8532-ad1dab979ea1_2000x1120.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5QFO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F321fbe47-8e9a-4fd0-8532-ad1dab979ea1_2000x1120.png 424w, https://substackcdn.com/image/fetch/$s_!5QFO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F321fbe47-8e9a-4fd0-8532-ad1dab979ea1_2000x1120.png 848w, https://substackcdn.com/image/fetch/$s_!5QFO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F321fbe47-8e9a-4fd0-8532-ad1dab979ea1_2000x1120.png 1272w, https://substackcdn.com/image/fetch/$s_!5QFO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F321fbe47-8e9a-4fd0-8532-ad1dab979ea1_2000x1120.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5QFO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F321fbe47-8e9a-4fd0-8532-ad1dab979ea1_2000x1120.png" width="2000" height="1120" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/321fbe47-8e9a-4fd0-8532-ad1dab979ea1_2000x1120.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1120,&quot;width&quot;:2000,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Understanding Agentic AI Architecture&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="Understanding Agentic AI Architecture" title="Understanding Agentic AI Architecture" srcset="https://substackcdn.com/image/fetch/$s_!5QFO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F321fbe47-8e9a-4fd0-8532-ad1dab979ea1_2000x1120.png 424w, https://substackcdn.com/image/fetch/$s_!5QFO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F321fbe47-8e9a-4fd0-8532-ad1dab979ea1_2000x1120.png 848w, https://substackcdn.com/image/fetch/$s_!5QFO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F321fbe47-8e9a-4fd0-8532-ad1dab979ea1_2000x1120.png 1272w, https://substackcdn.com/image/fetch/$s_!5QFO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F321fbe47-8e9a-4fd0-8532-ad1dab979ea1_2000x1120.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">Hedge Fund Agent Architecture</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2twk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2ed6a25-8363-4706-9cd6-1dc2848238b5_2000x646.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2twk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2ed6a25-8363-4706-9cd6-1dc2848238b5_2000x646.png 424w, https://substackcdn.com/image/fetch/$s_!2twk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2ed6a25-8363-4706-9cd6-1dc2848238b5_2000x646.png 848w, https://substackcdn.com/image/fetch/$s_!2twk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2ed6a25-8363-4706-9cd6-1dc2848238b5_2000x646.png 1272w, https://substackcdn.com/image/fetch/$s_!2twk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2ed6a25-8363-4706-9cd6-1dc2848238b5_2000x646.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2twk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2ed6a25-8363-4706-9cd6-1dc2848238b5_2000x646.png" width="2000" height="646" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e2ed6a25-8363-4706-9cd6-1dc2848238b5_2000x646.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:646,&quot;width&quot;:2000,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Understanding Agentic AI Architecture&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="Understanding Agentic AI Architecture" title="Understanding Agentic AI Architecture" srcset="https://substackcdn.com/image/fetch/$s_!2twk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2ed6a25-8363-4706-9cd6-1dc2848238b5_2000x646.png 424w, https://substackcdn.com/image/fetch/$s_!2twk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2ed6a25-8363-4706-9cd6-1dc2848238b5_2000x646.png 848w, https://substackcdn.com/image/fetch/$s_!2twk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2ed6a25-8363-4706-9cd6-1dc2848238b5_2000x646.png 1272w, https://substackcdn.com/image/fetch/$s_!2twk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2ed6a25-8363-4706-9cd6-1dc2848238b5_2000x646.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">Analyst Agent Architecture</figcaption></figure></div><p>The above is the architecture of a hedge fund team of analysts **</p><ul><li><p><strong>Portfolio Manager</strong>: Acts as a planning agent, orchestrating the overall decision-making process by deciding which agents to call and in what order.</p></li><li><p><strong>Fundamental Analyst</strong>: Performs fundamental analysis of a stock, evaluating financial statements, revenue, profitability, and other indicators.</p></li><li><p><strong>Technical Analyst</strong>: Conducts technical analysis using historical market data, price trends, and chart patterns.</p></li><li><p><strong>Sentiment Analyst</strong>: Focuses on news articles, social media, and other public sentiment sources to gauge market emotions.</p></li><li><p><strong>Summary Analyst</strong>: Takes inputs from other analysts and decides whether the stock should be a <strong>Buy</strong>, <strong>Hold</strong>, or <strong>Sell</strong>.</p></li><li><p><strong>User-Asking Analyst</strong>: Reaches out to the user when additional information is required to proceed with further analysis.</p></li></ul><h2>Frameworks</h2><p>Various frameworks exist to make it easy to build agents. Below is a quick evaluation of all the frameworks having implemented them in most of the frameworks below:</p><div id="datawrapper-iframe" class="datawrapper-wrap outer" data-attrs="{&quot;url&quot;:&quot;https://datawrapper.dwcdn.net/M67Nf/1/&quot;,&quot;thumbnail_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a7ac75ed-9a42-4b94-b28a-685b39785eee_1260x660.png&quot;,&quot;thumbnail_url_full&quot;:&quot;&quot;,&quot;height&quot;:630,&quot;title&quot;:&quot;Frameworks&quot;,&quot;description&quot;:&quot;&quot;}" data-component-name="DatawrapperToDOM"><iframe id="iframe-datawrapper" class="datawrapper-iframe" src="https://datawrapper.dwcdn.net/M67Nf/1/" width="730" height="630" frameborder="0" scrolling="no"></iframe><script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();</script></div><p><strong>Framework Notes</strong></p><p>Most of the frameworks have most of the functionality and differ in implementation detail rather than functionality.</p><ul><li><p><strong>Langchain</strong>: Easy to get started but hard to build complex flows. Best used alongside LangGraph.</p></li><li><p><strong>LangGraph</strong>: Along with Langchain, Langgraph is a very powerful tool. Takes a little getting used to, and visualizing the graph is hard, making it challenging for someone to understand the flow without deep exploration.</p></li><li><p><strong>CrewAI</strong>: Overall a great framework that allows all functionality. Also has a Saas platform to make it easier to use. Allows hierarchical flows, but more complex flows are still on the roadmap.</p></li><li><p><strong>Swarm</strong>: Primarily an educational framework and not yet ready for production. It has most functionalities, but combining them to build complex flows seems limited.</p></li><li><p><strong>Microsoft AutoGen</strong>: To be evaluated soon.</p></li></ul><p><strong>Observations</strong></p><ul><li><p>No one has a way to build guardrails on a framework level. There is a framework by NVIDIA called <a href="https://github.com/NVIDIA/NeMo-Guardrails?tab=readme-ov-file&amp;ref=srajdev.com">NeMo Guardrails</a> that can allow plug-in programmable guardrails but must be plugged in separately.</p></li><li><p>Memory for most is done using states and context variables. All of this needs to be managed manually</p></li><li><p>Planning is possible via regular agents, but state handling needs to be done manually</p></li><li><p>Dynamic workflows are done using handoffs, but langgraph and crewAI make it easier to build graphs.</p></li></ul><h2>Evaluation of Agents</h2><p>Evaluating agentic AI is crucial for ensuring reliability, performance, and safety. Due to the need for fast iteration and the subjective nature of evaluating agents, there is often insufficient focus on testing and evaluation. Below, we discuss insights and best practices for effective testing of agentic AI systems.</p><p><strong>Unit Evaluation</strong></p><p>Ideally, each agent should have its own evaluations, akin to unit testing in software engineering. Unit evaluation ensures that individual agents behave as expected, meeting their functional requirements. Agents should be tested across different scenarios to validate their reasoning, planning, and execution accuracy. It is beneficial to keep the output structured for each agent, as structured output makes validation easier.</p><p><strong>Integration Evaluation</strong></p><p>The entire system should also undergo evaluations, akin to integration testing. Integration evaluation examines how well agents work together as a complete system, verifying that the interactions between agents lead to correct outcomes. This type of testing is crucial for identifying issues that arise from communication failures or unexpected dependencies among agents.</p><p><strong>Runtime Verification</strong></p><p>Runtime verification involves assessing the agents' outputs in real time to improve their adaptation and learning capabilities. There are 2 ways to do this, by having a human in the loop which can only be done on small amounts of data or by using larger models. Using larger models as runtime verifiers can help ensure that agents make decisions aligned with their intended goals. However, this can be computationally expensive. To mitigate costs, batched runtime verification or selective runtime verification (e.g., based on user feedback or critical events) can be employed. These verification methods help maintain system quality while adapting to new data over time.</p><p><strong>Red Teaming</strong></p><p>Red teaming is a critical component of evaluating agentic frameworks, especially for identifying vulnerabilities and ensuring robustness. This type of evaluation involves simulating adversarial conditions to determine how well the system can handle unexpected or potentially harmful inputs.</p><p>Red team testing helps expose weaknesses in agents' reasoning, memory handling, and interaction strategies. It is essential for understanding how an agent may fail under adversarial conditions and for building better safety measures. Incorporating red team testing into the evaluation process ensures that agents are resilient to attacks and can operate safely in diverse environments.</p><p><strong>Best Practices</strong></p><ul><li><p><strong>Structured Outputs</strong>: Ensure each agent's output is well-structured. Structured output makes it easier to validate correctness and promptly identify issues.</p></li><li><p><strong>Testing at Scale</strong>: Use larger language models to test final outcomes to ensure scalability. Larger models can simulate a variety of user behaviors, which helps stress-test the system effectively.</p></li><li><p><strong>Iterative Evaluation</strong>: Agents should be evaluated iteratively, allowing developers to identify weaknesses early and make improvements swiftly. Each iteration helps refine agents and contributes to more stable outcomes over time.</p></li></ul><p>By incorporating these testing practices, developers can enhance the reliability, adaptability, and robustness of agentic AI systems.</p><h2>Considerations in Developing Agentic AI</h2><p>Despite the potential, agentic AI systems face several limitations that restrict their applicability.</p><p><strong>Accuracy of function calling</strong></p><p>While LLMs can determine which tools to call, the accuracy of these decisions is still not great. According to the <a href="https://gorilla.cs.berkeley.edu/leaderboard.html?ref=srajdev.com">UC Berkeley Function-Calling Leaderboard</a>, the best-in-class LLM has an accuracy of 68.9%, with a high measure of hallucinations. This limitation makes LLMs less reliable for high-risk use cases.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bro7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48cadea2-5bf3-4628-b122-86517ff89fb1_1428x1036.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bro7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48cadea2-5bf3-4628-b122-86517ff89fb1_1428x1036.png 424w, https://substackcdn.com/image/fetch/$s_!bro7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48cadea2-5bf3-4628-b122-86517ff89fb1_1428x1036.png 848w, https://substackcdn.com/image/fetch/$s_!bro7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48cadea2-5bf3-4628-b122-86517ff89fb1_1428x1036.png 1272w, https://substackcdn.com/image/fetch/$s_!bro7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48cadea2-5bf3-4628-b122-86517ff89fb1_1428x1036.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bro7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48cadea2-5bf3-4628-b122-86517ff89fb1_1428x1036.png" width="1428" height="1036" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/48cadea2-5bf3-4628-b122-86517ff89fb1_1428x1036.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1036,&quot;width&quot;:1428,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Understanding Agentic AI Architecture&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="Understanding Agentic AI Architecture" title="Understanding Agentic AI Architecture" srcset="https://substackcdn.com/image/fetch/$s_!bro7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48cadea2-5bf3-4628-b122-86517ff89fb1_1428x1036.png 424w, https://substackcdn.com/image/fetch/$s_!bro7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48cadea2-5bf3-4628-b122-86517ff89fb1_1428x1036.png 848w, https://substackcdn.com/image/fetch/$s_!bro7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48cadea2-5bf3-4628-b122-86517ff89fb1_1428x1036.png 1272w, https://substackcdn.com/image/fetch/$s_!bro7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48cadea2-5bf3-4628-b122-86517ff89fb1_1428x1036.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">Function calling accuracy</figcaption></figure></div><p>Best Practices for Improving Accuracy</p><ul><li><p><strong>Limit the Tools</strong>: Limit the number of tools to 4-5 per prompt. Beyond this, hallucinations increase, and accuracy decreases significantly.</p></li><li><p><strong>Specific Prompts with Examples</strong>: Make the prompt very specific and try to provide examples of when to call which tool. This can help the LLM better understand the context, reducing errors and improving decision accuracy.</p></li><li><p><strong>Good Evaluations for Tool Calling</strong>: Having thorough evaluations for tool calling is essential, as it helps measure and improve accuracy. This is achievable since the output can be structured, making it easier to validate if the correct tools were used effectively.</p></li></ul><p><strong>Cost</strong></p><p>Running agentic AI can be expensive, especially given the number of language model (LLM) calls and the involvement of multiple agents. Managing memory, reasoning, and tool usage adds to computational overhead, making the operation costly. However, there are several strategies that can help mitigate these costs:</p><ul><li><p><strong>Pricing Dynamics</strong>: while agentic AI might be expensive today, the pricing trend is expected to decrease significantly over time (<a href="https://a16z.com/llmflation-llm-inference-cost/?ref=srajdev.com">10x every year</a>). Advances in model optimization and increasing competition among providers are leading to lower costs, making agentic AI more feasible in the near future.</p></li><li><p><strong>LLM Selection</strong>: Each agent can use a different type of LLM that is best suited for its purpose. For instance, a planning agent may require a more powerful LLM capable of complex reasoning, while simpler agents can rely on lightweight LLMs that are less expensive. This selective usage can help control costs while maintaining overall system efficiency.</p></li><li><p><strong>Hybrid Models</strong>: Utilizing a combination of LLMs and smaller, specialized models (such as rule-based systems) for tasks that do not require complex language understanding can also help reduce the reliance on costly LLM calls. Agents can offload simpler tasks to non-LLM models, thereby reducing the frequency of expensive operations.</p></li><li><p><strong>Optimized Token Usage</strong>: Using tokens and prompts wisely can significantly reduce costs. For example, sending summaries or only the relevant portions of a code base can help reduce the token count, thereby minimizing LLM usage expenses.</p></li><li><p><strong>Batch Processing and Shared Resources</strong>: Agents can be designed to share resources when possible. For instance, memory and intermediate results can be cached and reused by multiple agents, reducing redundant computations and LLM calls. This type of optimization helps cut down on both computational and financial costs.</p></li></ul><p><strong>Latency</strong></p><p>Agentic AI often involves multi-step reasoning and interactions, which can introduce significant latency, especially when agents communicate or make calls to external tools. Below are some best practices for reducing latency:</p><ul><li><p><strong>Streaming Last Layer</strong>: For user-facing agents, making the last layer of the LLM streaming can significantly reduce the perceived latency. Streaming the output allows the system to provide tokens as they are generated, creating a faster response time for the end-user and improving the overall user experience.</p></li><li><p><strong>Prompt Optimization</strong>: Prompts and results can often be identical across different users. To reduce latency, prompt caching can be employed to reuse previously computed results whenever possible. By caching common prompts, agents can bypass unnecessary recomputation, delivering faster responses.</p></li><li><p><strong>Specialized LLMs</strong>: Not every agent requires the use of a large, complex LLM. By utilizing simpler LLMs for straightforward tasks and reserving the more resource-intensive models for complex reasoning, latency can be effectively minimized.</p></li><li><p><strong>Parallel Execution</strong>: When possible, agents should run in parallel rather than sequentially. For example, a sentiment analysis and a technical analysis could be conducted simultaneously, reducing the total processing time for a task.</p></li><li><p><strong>Efficient Runtime Strategies</strong>: Using batched or selective runtime verification can also reduce latency. Instead of verifying every output, only critical outputs or random samples may be checked, saving processing time and resources.</p></li></ul><p><strong>Alignment</strong></p><p>Ensuring that agents are aligned with human values and objectives is an ongoing challenge in the development of agentic AI systems. Misaligned agents may make decisions that, while logical from their perspective, could be harmful or undesirable for users. Below, we explore best practices and approaches for improving alignment:</p><ul><li><p><strong>Fine-Tuning for Task-Specific Goals</strong>: Fine-tuning language models to specific tasks helps improve the alignment of agents with desired outcomes. By training on task-specific data, agents can better understand and meet the expectations of particular applications, ensuring their behavior is more predictable and aligned with user goals.</p></li><li><p><strong>Reinforcement Learning from Human Feedback (RLHF)</strong>: Reinforcement Learning from Human Feedback can be used to fine-tune agents based on user preferences and values. RLHF enables agents to iteratively improve their behavior by learning from user feedback, making them more attuned to nuanced requirements and avoiding undesired behaviors.</p></li><li><p><strong>Consistency Checks</strong>: Regular consistency checks should be performed to ensure agents are making decisions in line with expected behavior. Consistency checks can include comparing agent outputs against a set of pre-defined acceptable responses, which helps identify misalignment early on.</p></li><li><p><strong>Explainability for Better Alignment</strong>: Agents that can explain their reasoning are easier to align with human expectations. Explainable AI enables users to understand why an agent made a particular decision, providing transparency and making it easier to detect when an agent is deviating from its intended purpose.</p></li><li><p><strong>Human-in-the-Loop Oversight</strong>: For critical applications, incorporating human-in-the-loop oversight is crucial. This allows for real-time intervention when agents make decisions that deviate from intended goals, ensuring safety and alignment with human values. Human oversight is especially important in high-risk scenarios where autonomous decision-making could have significant consequences.</p></li></ul><h2>Conclusion</h2><p>In this comprehensive guide, we have explored the fundamental concepts and components of agentic AI, including their architecture, various examples, and frameworks. Agentic AI represents a unique approach to building autonomous systems capable of reasoning, planning, and adapting to achieve specific goals. We discussed how agents can operate like System 1 and System 2 thinking, blending fast, intuitive actions with deliberate and complex decision-making processes. Furthermore, we analyzed different frameworks that enable the implementation of agentic systems and shared insights on best practices for testing and evaluation.</p><p>While there are successful case studies, such as <a href="https://developer.nvidia.com/blog/amdocs-accelerates-generative-ai-performance-and-lowers-costs-with-nvidia-nim/?ref=srajdev.com">Amdocs using Nvidia NIM</a> and <a href="https://www.salesforce.com/customer-stories/wiley/?ref=srajdev.com">Wiley working with Salesforce</a>, challenges remain in making agents fully autonomous. Trust and scalable runtime verifiability are still significant obstacles, as is the question of how best to architect agents to achieve optimal results. Developing robust frameworks can play a key role in overcoming these challenges, and ongoing improvements in testing, including runtime verification and red team testing, will help ensure agents perform reliably and safely.</p><p>Stay updated with the latest insights on Agentic AI.&nbsp;Subscribe to our newsletter below.</p><h2>References and Links</h2><ul><li><p>** Taken from <a href="https://x.com/virattt?ref=srajdev.com">@virattt</a> &#8216;s github repository of an AI hedge fund team. Can be found <a href="https://gist.github.com/virattt/0e4c7740472177a327b61449c9af721d?ref=srajdev.com">here</a>.</p></li><li><p><a href="https://a16z.com/llmflation-llm-inference-cost/?ref=srajdev.com">https://a16z.com/llmflation-llm-inference-cost/</a></p></li><li><p><a href="https://gorilla.cs.berkeley.edu/leaderboard.html?ref=srajdev.com">https://gorilla.cs.berkeley.edu/leaderboard.html</a></p></li><li><p><a href="https://github.com/NVIDIA/NeMo-Guardrails?tab=readme-ov-file&amp;ref=srajdev.com">https://github.com/NVIDIA/NeMo-Guardrails?tab=readme-ov-file</a></p></li><li><p><a href="https://www.madrona.com/the-rise-of-ai-agent-infrastructure/?ref=srajdev.com">https://www.madrona.com/the-rise-of-ai-agent-infrastructure/</a></p></li><li><p><a href="https://www.langchain.com/?ref=srajdev.com">https://www.langchain.com/</a></p></li><li><p><a href="https://www.langchain.com/langgraph?ref=srajdev.com">https://www.langchain.com/langgraph</a></p></li><li><p><a href="https://www.crewai.com/?ref=srajdev.com">https://www.crewai.com/</a></p></li><li><p><a href="https://github.com/openai/swarm?ref=srajdev.com">https://github.com/openai/swarm</a></p></li><li><p><a href="https://github.com/microsoft/autogen?ref=srajdev.com">https://github.com/microsoft/autogen</a></p></li><li><p><a href="https://www.llamaindex.ai/?ref=srajdev.com">https://www.llamaindex.ai/</a></p></li><li><p><a href="https://en.wikipedia.org/wiki/Thinking,_Fast_and_Slow?ref=srajdev.com">https://en.wikipedia.org/wiki/Thinking,_Fast_and_Slow</a></p></li><li><p><a href="https://developer.nvidia.com/blog/amdocs-accelerates-generative-ai-performance-and-lowers-costs-with-nvidia-nim/?ref=srajdev.com">https://developer.nvidia.com/blog/amdocs-accelerates-generative-ai-performance-and-lowers-costs-with-nvidia-nim/</a></p></li><li><p><a href="https://www.salesforce.com/customer-stories/wiley/?ref=srajdev.com">https://www.salesforce.com/customer-stories/wiley/</a></p></li></ul>]]></content:encoded></item></channel></rss>