<?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[AI Architect's Playbook]]></title><description><![CDATA[For experienced engineers moving into AI technical leadership. Lessons from 10 years building AI at IBM.]]></description><link>https://aiarchitectplaybook.com</link><image><url>https://substackcdn.com/image/fetch/$s_!m0sw!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3c2ce20-b709-409e-a4ce-83a2829ece8e_1024x1024.png</url><title>AI Architect&apos;s Playbook</title><link>https://aiarchitectplaybook.com</link></image><generator>Substack</generator><lastBuildDate>Sun, 29 Nov 2026 04:34:22 GMT</lastBuildDate><atom:link href="https://aiarchitectplaybook.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Shaikh Quader]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[aiarchplaybook@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[aiarchplaybook@substack.com]]></itunes:email><itunes:name><![CDATA[Shaikh Quader]]></itunes:name></itunes:owner><itunes:author><![CDATA[Shaikh Quader]]></itunes:author><googleplay:owner><![CDATA[aiarchplaybook@substack.com]]></googleplay:owner><googleplay:email><![CDATA[aiarchplaybook@substack.com]]></googleplay:email><googleplay:author><![CDATA[Shaikh Quader]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[The internship advice I gave two students studying AI]]></title><description><![CDATA[Machine learning fundamentals, coding agents, a portfolio built from your own problem, and why you should post what you learn]]></description><link>https://aiarchitectplaybook.com/p/the-internship-advice-i-gave-two</link><guid isPermaLink="false">https://aiarchitectplaybook.com/p/the-internship-advice-i-gave-two</guid><dc:creator><![CDATA[Shaikh Quader]]></dc:creator><pubDate>Wed, 25 Nov 2026 13:43:52 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/a8df907e-e2f4-41ca-a007-10db42441660_1456x816.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>&#8220;Where do you think my next step is? What is the first thing, the first few things I should start, and then maybe what&#8217;s next?&#8221;</p><p>Ahmed asked me that about halfway through our session. He and his brother Mohamed are third-year students in the Bachelor of Artificial Intelligence program at Durham College. In October, the three of us sat down for about an hour to talk about their careers.</p><p>Before I give anyone advice, I want to know where they stand. So I started with questions. Which courses have you taken? What projects did you build? Which machine learning algorithms did you practice with?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Oazn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20bfbb85-4879-422a-b33d-29597ab392cc_1456x816.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Oazn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20bfbb85-4879-422a-b33d-29597ab392cc_1456x816.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Oazn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20bfbb85-4879-422a-b33d-29597ab392cc_1456x816.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Oazn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20bfbb85-4879-422a-b33d-29597ab392cc_1456x816.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Oazn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20bfbb85-4879-422a-b33d-29597ab392cc_1456x816.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Oazn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20bfbb85-4879-422a-b33d-29597ab392cc_1456x816.jpeg" width="1456" height="816" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/20bfbb85-4879-422a-b33d-29597ab392cc_1456x816.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:816,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:358880,&quot;alt&quot;:&quot;Shaikh Quader standing between Ahmed and Muhammad outdoors after their mentoring session.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://aiarchitectplaybook.com/i/226504378?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20bfbb85-4879-422a-b33d-29597ab392cc_1456x816.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Shaikh Quader standing between Ahmed and Muhammad outdoors after their mentoring session." title="Shaikh Quader standing between Ahmed and Muhammad outdoors after their mentoring session." srcset="https://substackcdn.com/image/fetch/$s_!Oazn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20bfbb85-4879-422a-b33d-29597ab392cc_1456x816.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Oazn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20bfbb85-4879-422a-b33d-29597ab392cc_1456x816.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Oazn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20bfbb85-4879-422a-b33d-29597ab392cc_1456x816.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Oazn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20bfbb85-4879-422a-b33d-29597ab392cc_1456x816.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><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">With Ahmed and Mohamed after our session.</figcaption></figure></div><h2>The problem they brought</h2><p>Next summer, both of them need an internship. In their program it is mandatory. If they don&#8217;t get a placement, they don&#8217;t graduate.</p><p>They had done the coursework: programming in several languages, databases, an introduction to machine learning, then a course on regression and another on classification. They had done exploratory data analysis. Mohamed had already built a resume and a portfolio with three projects aimed at the kind of job he wants.</p><p>But when I asked them to name the main machine learning algorithms, they could not. Ahmed told me he couldn&#8217;t remember the names off the top of his head.</p><p>Mohamed was honest about it. &#8220;As you can see, the background information is non-existent right now,&#8221; he said. &#8220;That&#8217;s exactly what would happen if we got an interview right now. Like we&#8217;d be lost.&#8221;</p><p>Ahmed put it another way. &#8220;We were aware that we were unaware.&#8221;</p><p>So I told them how I work with mentees. I will always be direct. I want my mentees to grow, so I will not sugarcoat. Here is where you stand, and here is what you need to fix. If I have to be nice all the time, I&#8217;m not really helping you.</p><p>&#8220;Just tell us,&#8221; Ahmed said. Here is what I suggested.</p><h2>1. Know the main algorithms well enough to explain them without notes</h2><p>If someone asks you to name the main machine learning algorithms, you need to answer off the top of your head. Linear regression. Logistic regression. Decision tree. Random forest. XGBoost. Support vector machine. Neural networks.</p><p>Then you need an intuition for how each one works. You don&#8217;t need to explain it at a very deep level. I don&#8217;t think anyone will ask you for that. But you need a mental model.</p><p>Take a decision tree. You build a tree that branches out. When you give it an input, which is a collection of features, it follows the branches until it reaches a decision.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!a0Xx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90630833-e907-4330-a877-2f5bec5a1e50_1456x700.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!a0Xx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90630833-e907-4330-a877-2f5bec5a1e50_1456x700.png 424w, https://substackcdn.com/image/fetch/$s_!a0Xx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90630833-e907-4330-a877-2f5bec5a1e50_1456x700.png 848w, https://substackcdn.com/image/fetch/$s_!a0Xx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90630833-e907-4330-a877-2f5bec5a1e50_1456x700.png 1272w, https://substackcdn.com/image/fetch/$s_!a0Xx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90630833-e907-4330-a877-2f5bec5a1e50_1456x700.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!a0Xx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90630833-e907-4330-a877-2f5bec5a1e50_1456x700.png" width="1456" height="700" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/90630833-e907-4330-a877-2f5bec5a1e50_1456x700.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:700,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:78796,&quot;alt&quot;:&quot;Diagram of a decision tree: an input row of features goes through yes or no questions until it reaches a decision.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://aiarchitectplaybook.com/i/226504378?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90630833-e907-4330-a877-2f5bec5a1e50_1456x700.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Diagram of a decision tree: an input row of features goes through yes or no questions until it reaches a decision." title="Diagram of a decision tree: an input row of features goes through yes or no questions until it reaches a decision." srcset="https://substackcdn.com/image/fetch/$s_!a0Xx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90630833-e907-4330-a877-2f5bec5a1e50_1456x700.png 424w, https://substackcdn.com/image/fetch/$s_!a0Xx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90630833-e907-4330-a877-2f5bec5a1e50_1456x700.png 848w, https://substackcdn.com/image/fetch/$s_!a0Xx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90630833-e907-4330-a877-2f5bec5a1e50_1456x700.png 1272w, https://substackcdn.com/image/fetch/$s_!a0Xx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90630833-e907-4330-a877-2f5bec5a1e50_1456x700.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><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">A decision tree follows the branches until it reaches a decision.</figcaption></figure></div><p>XGBoost is not a single tree. It is many trees, and their outputs are combined into the final prediction.</p><p>That is the level you are expected to know. After that come the lower-level details, such as the specific hyperparameters and how to tune them. You need those as well. But first, the algorithms and how they work.</p><p>Know the categories too. In supervised learning, you give the algorithm inputs with their outputs, and it learns the mapping, like a function. Show it a picture of an object and it tells you which predefined category the object belongs to. In unsupervised learning, you give no clue about the output. Hand the algorithm a collection of objects and it finds its own way to group them: by colour, by size, or by how people use them.</p><h2>2. Learn two skills every AI role now needs: coding agents and production RAG</h2><p>Next I asked them about large language models. Had they built anything with retrieval augmented generation? Had they used a coding agent to generate code?</p><p>Start with coding agents. Claude, Codex and others. Everyone is using them. You need to learn how to use them well.</p><p>Generating code is cheap now. Anyone can write a prompt and get thousands of lines of code in a few minutes. The hard part is planning the generation: what exactly do you want the agent to build? Many developers skip the plan. They give a prompt, generate the code, and move on, without enough verification.</p><p>Think of the agent as a worker, and yourself as the team lead. You supervise the whole process. You go in iterations until the code is high quality. Then it moves on to QA and integration testing. No matter what role you pick in AI or software engineering, this skill is fundamental.</p><p>The second skill is retrieval augmented generation, or RAG. Not the basic version. Anyone can build the basic one. Learn what it takes to move a RAG system to production. That means you can deploy it, your employer can start using it, and you know how to monitor and measure it.</p><h2>3. Be able to explain your system from the inside</h2><p>Mohamed pulled up his portfolio and described one project, Ask Local. He runs it from Visual Studio: he types a prompt, and the app opens as a website. It runs fully on your own machine. You upload your files, ask a chatbot questions, and it answers from those files.</p><p>I stopped him there.</p><p>Any system you build has two views. One is the external, user-facing view. How does a user use it? What problem does it solve? You ask a question, and the system gives a response.</p><p>The other is the internal view. How did you build it, step by step? Which models did you pick? What design decisions did you make?</p><p>In an interview, you&#8217;ll be expected to explain the internals. Mohamed said he had notes on all of it. You cannot look at notes. You need to describe at least the main parts yourself. And if the interviewer asks why you picked this LLM and not another one, you need to have thought through that choice: how you made the pieces work together, and what your thought process was. That is your engineering intuition.</p><p>Mohamed was honest again. &#8220;Right now I&#8217;m not ready,&#8221; he said. &#8220;I&#8217;m not at the point where I can explain anything. I know that. I have all the information I need to study in order to be able to do that.&#8221;</p><p>That is a good point. Many students are not even there. He has a good start.</p><h2>4. Work backward from the internship you want</h2><p>Then I came back to Ahmed&#8217;s question about his next step.</p><p>I don&#8217;t tell my mentees to do open-ended learning. There are so many model types, use cases and platforms, and new articles every day. If you soak up everything you see on LinkedIn, you will be lost.</p><p>So for any goal, I work backward. The idea comes from Amazon. Before Amazon builds a product, the team first designs what the finished product will look like. Then they ask what they need to do right now to get there.</p><p>Here is how I suggested Ahmed and Mohamed apply it.</p><p>Find a few job postings for the kind of internship you want next summer. You can find them today, even if you are not applying yet. Look especially at postings from big companies. Read what they ask for.</p><p>Then go to LinkedIn and find students who already got those internships. Look at ten or fifteen of them, maybe more. Not everyone got there because of a strong portfolio; connections and other reasons play a part. So look broadly, then shortlist the profiles that really stand out.</p><p>Now you have two sets of data points: what employers ask for, and what the students one step ahead of you did. Then make a plan for what it will take to reach their position.</p><p>I did not give Ahmed and Mohamed twenty things to do. With twenty things and no feedback, they would be lost. A small step at a time works better. In a few months, they will be in a much stronger position.</p><h2>5. Build one project from your own problem</h2><p>Resumes still matter. You need a good one to apply. But a resume alone is not enough anymore. You need a strong online presence: a LinkedIn profile with activity, and a GitHub that shows your work.</p><p>If your LinkedIn profile, your posts, and your GitHub look like everyone else&#8217;s, you&#8217;ll be treated like everyone else. If you want a different outcome from an employer, you need to be different.</p><p>&#8220;What does it mean to be different?&#8221; Ahmed asked.</p><p>Many students clone someone else&#8217;s project from GitHub, make a few minor tweaks, and call it a portfolio project.</p><p>I believe a strong portfolio project comes from solving your own problem, with your own data set and your own implementation. Anyone can clone a popular repo or ask an LLM for a project idea. But if the problem, the data and the implementation are yours, no one can copy you.</p><p>I told them how I built one of mine a few months ago. I wanted an AI-powered search application for my demos at work. So I looked for a broken search experience in the things I do every day.</p><p>I have listened to audiobooks for 15 years. I have 92 books in my collection. The only way my audiobook app lets me find a book is with a specific keyword from its title. I cannot say, show me the books on public speaking. It is an old style of keyword search, with no support for natural language queries.</p><p>So I decided to fix it. I pulled the metadata for all my audiobooks. Then I built a search on vector embeddings, a modern AI-based representation that lets you find content with natural language queries. The search became much better.</p><p>When I present the app at conference talks and webinars, I start with the broken search, show my own data, and compare the two searches side by side. Then I go under the hood: the components, the models I chose, and how I put them together. Others could copy my project. But I am not copying anyone else&#8217;s.</p><p>When the project is yours, you get excited about it. That excitement reaches the interviewer. They can tell the work is coming from you.</p><p>Compare that with what I often hear when I ask a student about their portfolio. They built a RAG in a university course and loaded some PDFs. Then I ask them to explain the pipeline, and they say they have to look at it. That tells the interviewer the student does not know what they built.</p><p>So instead of ten portfolio projects, pick one very solid one. Keep improving it, and write about each iteration. Systems are built in iterations. Showing yours shows your thinking, and shows the project getting closer to production readiness.</p><h2>6. Post what resonated with you, in your own words</h2><p>Before we wrapped up, I gave them homework.</p><p>Pick the few points from our discussion that really resonated with you: something you did not know, or something you knew but did not see as important. Then write a LinkedIn post about those points, and say what you are going to act on. I asked each of them to do it separately, without discussing it with each other.</p><p>Here is why. I have hired many interns over my 20 years at IBM. Say I get ten resumes and open each student&#8217;s LinkedIn profile. Nine have no posts in the last ten months, and maybe a cloned second-brain project on GitHub. That does not impress me.</p><p>The tenth student is being mentored by someone from a big company and posts every week or so. <em>I had a session with my mentor. Here is what I learned. Here is what I&#8217;m going to do.</em> A week later: <em>here is my progress.</em> That gives me confidence the student has a growth mindset. That is the one who stands out.</p><p>Posting also helps you remember what you learned, and it makes a social commitment.</p><p>Keep it conversational. Imagine your dad asks you tonight what you learned today, and write what you would tell him. You can use an LLM for minor edits, but the words should be yours.</p><p>&#8220;I like that a lot,&#8221; Ahmed said. &#8220;It&#8217;s creating that documentation that we need for the recruiters to see.&#8221;</p><p>Over the next few months, I&#8217;d like them to go further, with blog posts and short videos about their projects.</p><h2>What they chose to do first</h2><p>Both of them agreed on the next step: find the internship postings, study the profiles of students who got those internships, and write the LinkedIn post.</p><p>Ahmed added something I did not expect. &#8220;When you were asking me questions, I found it really helpful,&#8221; he said. &#8220;It kind of gauged my knowledge. I know those things, but because you called me out on it, it opened my eyes to, okay, maybe I&#8217;m a little more arrogant than I thought.&#8221; He wants to go back, learn the algorithms properly, and have me ask him the same questions next time.</p><p>I also offered them mock interviews. Take me through your portfolio project, and I&#8217;ll ask the questions an interviewer would ask about your engineering decisions.</p><p>We don&#8217;t need to meet every week. Mentorship is a two-way relationship. We meet when they have made progress and have specific questions. Between two conversations, take a step. Then come back, and we look at it together.</p><p>Thank you, Ahmed and Mohamed, for your honesty, and for letting me share our conversation.</p><div><hr></div><p>If you hire interns, what makes a student&#8217;s profile stand out to you? And if you are a student, which of these would you start with? Tell me in the comments.</p>]]></content:encoded></item><item><title><![CDATA[Understanding NVIDIA Auto Ontology, Part 2: How it builds an ontology]]></title><description><![CDATA[How NVIDIA Auto Ontology builds an ontology, what each model does, and how its agent answers a question without and with an ontology.]]></description><link>https://aiarchitectplaybook.com/p/understanding-nvidia-auto-ontology-926</link><guid isPermaLink="false">https://aiarchitectplaybook.com/p/understanding-nvidia-auto-ontology-926</guid><dc:creator><![CDATA[Shaikh Quader]]></dc:creator><pubDate>Mon, 23 Nov 2026 06:25:12 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/6174d46c-57e6-4d06-8b8c-576675f99577_1456x816.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In <a href="https://aiarchitectplaybook.com/p/understanding-nvidia-auto-ontology">Part 1</a>, I covered what an ontology is, why AI agents need one to query relational databases accurately, and what NVIDIA Auto Ontology is. This part looks at how Auto Ontology builds an ontology, what each model does, and how its agent answers a question. The examples use the same sample database, Microsoft&#8217;s Wide World Importers.</p><h2>How Auto Ontology builds an ontology</h2><p>Auto Ontology works like a new analyst exploring an unfamiliar database with nobody to ask. It reads what&#8217;s there, looks at the data, and writes down what it thinks things mean. Experts can then check its work.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!S7xN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c0ecce3-969c-4dac-b643-54a83a3cf0d5_1456x560.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!S7xN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c0ecce3-969c-4dac-b643-54a83a3cf0d5_1456x560.png 424w, https://substackcdn.com/image/fetch/$s_!S7xN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c0ecce3-969c-4dac-b643-54a83a3cf0d5_1456x560.png 848w, https://substackcdn.com/image/fetch/$s_!S7xN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c0ecce3-969c-4dac-b643-54a83a3cf0d5_1456x560.png 1272w, https://substackcdn.com/image/fetch/$s_!S7xN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c0ecce3-969c-4dac-b643-54a83a3cf0d5_1456x560.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!S7xN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c0ecce3-969c-4dac-b643-54a83a3cf0d5_1456x560.png" width="1456" height="560" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3c0ecce3-969c-4dac-b643-54a83a3cf0d5_1456x560.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:560,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:93120,&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://aiarchitectplaybook.com/i/226121116?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c0ecce3-969c-4dac-b643-54a83a3cf0d5_1456x560.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_!S7xN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c0ecce3-969c-4dac-b643-54a83a3cf0d5_1456x560.png 424w, https://substackcdn.com/image/fetch/$s_!S7xN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c0ecce3-969c-4dac-b643-54a83a3cf0d5_1456x560.png 848w, https://substackcdn.com/image/fetch/$s_!S7xN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c0ecce3-969c-4dac-b643-54a83a3cf0d5_1456x560.png 1272w, https://substackcdn.com/image/fetch/$s_!S7xN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c0ecce3-969c-4dac-b643-54a83a3cf0d5_1456x560.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><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">Stages 1 to 5 run automatically. Stage 6 is optional.</figcaption></figure></div><h3>Stage 1: Extract metadata</h3><p>NVIDIA calls this stage <em>catalog ingest</em>. Auto Ontology reads the database&#8217;s tables, columns, data types, keys and views, and indexes the tables and columns for search with an embedding model. No interpretation yet.</p><h3>Stage 2: Profile the data</h3><p>Plain SQL samples up to 1,000 rows per table and records the most common values, distinct values and date formats. No LLM is involved.</p><h3>Stage 3: Interpret each table</h3><p>An LLM (by default NVIDIA&#8217;s hosted reasoning model, <code>nvidia/nemotron-3.5-lightning-30b-a3b</code>) reads the name, data type and most common sample values of each column that isn&#8217;t a foreign key, and writes a one-sentence business description of the column. The LLM is told to stay factual: <em>&#8220;no speculation&#8221;</em>. The LLM then names a business entity for the table (usually one per table, such as <em>Invoice Line</em>) and gives each column a friendly label. This stage is where the meaning comes from: the LLM&#8217;s interpretation, not a person&#8217;s. A later pass writes a second description of each column, with its relationships in view.</p><h3>Stage 4: Connect the tables</h3><p>Keys the database declares are used as-is. For a column that looks like a reference but has no declared key, the LLM proposes the key column that the reference column links to, and Auto Ontology keeps the proposed link only if joining on the two columns actually returns data.</p><h3>Stage 5: Draft ontology</h3><p>The draft is stored in Auto Ontology&#8217;s own Postgres database. This internal database is separate from the database the ontology describes, which can be Postgres or another engine, such as Snowflake or MySQL. In NVIDIA&#8217;s quickstart, the two are separate databases on the same Postgres server. Agents can answer questions from the draft immediately, before any review. Nothing is flagged as uncertain: every generated item starts as <em>Pending Approval</em>, whether the model was confident or not.</p><h3>Stage 6: Expert review (optional)</h3><p>Subject matter experts test the draft with real questions, correct terms, descriptions and calculations, and <em>certify</em> the parts that are right. Corrections change answers right away and are kept when the ontology is rebuilt, except the choice of default join between two tables, which is re-chosen on every rebuild. Certifying only adds a label that tells people a part was reviewed. The agent doesn&#8217;t use this label when it searches. Experts can also contribute outside these stages: by importing an existing ontology before the build, or by adding glossary definitions, which the agent uses when answering questions.</p><p>NVIDIA calls a concept a <em>term</em>, and a metric a <em>SQL attribute</em>.</p><p>Concepts, mappings, relationships and lineage are generated automatically. <strong>Metrics are the part least likely to appear:</strong> Auto Ontology suggests metrics mainly from past queries, where the database exposes its query history, and for bridge tables.</p><h2>Model view</h2><p>Three models build the ontology, and each does a different kind of work:</p><ul><li><p>an embedding model</p></li><li><p>a reasoning LLM</p></li><li><p>a reranker</p></li></ul><p>The <strong>embedding model</strong> (by default <code>nvidia/nemotron-3.5-embed-1b</code>) is the index. It turns names and descriptions into vectors where similar meanings sit close together, so they can be searched by meaning. A search for &#8220;buyers&#8221; can find the <em>Customer</em> entity, though no name contains &#8220;buyer&#8221;.</p><p>The <strong>reasoning LLM</strong> (by default <code>nvidia/nemotron-3.5-lightning-30b-a3b</code>) is the analyst. It reads names and sample values, and writes what things mean. Given <code>isundersupplybackordered (boolean), samples: true</code>, it writes a one-sentence description of the column. It names the table <code>sales.invoicelines</code> <em>Invoice Line</em>.</p><p>The <strong>reranker</strong> (by default <code>nvidia/nemotron-3.5-rerank-8b</code>) is the tie-breaker. It has one job. For a bridge table such as <code>order_products(order_id, product_id)</code>, Auto Ontology writes the join as ready-made SQL, and the reranker decides whether that SQL is filed under <em>Order</em> or <em>Product</em>. The reranker picks the entity whose definition best matches the SQL&#8217;s description.</p><p>The examples are illustrations, not logged output.</p><p>The models work toward one goal: producing a business vocabulary for a database that an agent can use to turn a natural-language question into SQL. The diagram below numbers the model steps 1 to 6; these are not the same as the six stages above. Each row shows what a step&#8217;s model receives and returns.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Qyzi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60ffddb5-2e4b-4588-a024-4a40930c6d1e_1456x1029.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Qyzi!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60ffddb5-2e4b-4588-a024-4a40930c6d1e_1456x1029.png 424w, https://substackcdn.com/image/fetch/$s_!Qyzi!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60ffddb5-2e4b-4588-a024-4a40930c6d1e_1456x1029.png 848w, https://substackcdn.com/image/fetch/$s_!Qyzi!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60ffddb5-2e4b-4588-a024-4a40930c6d1e_1456x1029.png 1272w, https://substackcdn.com/image/fetch/$s_!Qyzi!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60ffddb5-2e4b-4588-a024-4a40930c6d1e_1456x1029.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Qyzi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60ffddb5-2e4b-4588-a024-4a40930c6d1e_1456x1029.png" width="1456" height="1029" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/60ffddb5-2e4b-4588-a024-4a40930c6d1e_1456x1029.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1029,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:304609,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://aiarchitectplaybook.com/i/226121116?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60ffddb5-2e4b-4588-a024-4a40930c6d1e_1456x1029.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_!Qyzi!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60ffddb5-2e4b-4588-a024-4a40930c6d1e_1456x1029.png 424w, https://substackcdn.com/image/fetch/$s_!Qyzi!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60ffddb5-2e4b-4588-a024-4a40930c6d1e_1456x1029.png 848w, https://substackcdn.com/image/fetch/$s_!Qyzi!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60ffddb5-2e4b-4588-a024-4a40930c6d1e_1456x1029.png 1272w, https://substackcdn.com/image/fetch/$s_!Qyzi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60ffddb5-2e4b-4588-a024-4a40930c6d1e_1456x1029.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><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">What each model receives and returns, from raw names and types to an ontology an agent can use.</figcaption></figure></div><p>In step 1, the raw structure becomes <strong>searchable</strong>: one vector per table and per column, from text built from names and data types. A table&#8217;s text includes its list of columns, and each column also gets a text of its own. Before the ontology exists, this index, plus a search by name, is all the agent can search.</p><p>In step 2A, the columns get <strong>business meaning</strong>: one sentence each. The LLM works on one table at a time. That table&#8217;s columns, excluding foreign keys, are sent in batches of up to 15 columns per call, so every column in a call comes from the same table, and a table with more columns gets several calls, one after another. Each column carries its 5 most common values from the 1,000-row sample. If a text column shows fewer than 5 distinct values in that sample, it is likely a category column, such as a status, and the sample may have missed its rare values. Auto Ontology then looks up the column&#8217;s full list of distinct values and adds them, as long as there are 25 or fewer.</p><p>In step 2B, each table becomes an <strong>entity</strong>, such as <em>Invoice Line</em>, with a definition and a label for each column. Step 2B makes one call per table, showing the LLM the table name and up to 40 of its columns, excluding foreign keys, each with its one-sentence description from step 2A.</p><p>In step 3, the business vocabulary from steps 2A and 2B becomes searchable. This vocabulary is the entities, with their names and definitions from step 2B, and their columns, with the labels from step 2B and the descriptions from step 2A. Step 1&#8217;s index knows only the database&#8217;s raw names and types; step 3 builds a second index of this vocabulary, so a question that says &#8220;customers&#8221; or &#8220;invoice lines&#8221; lands on the right entity. The embedding model receives one text per entity and one text per column. An entity&#8217;s text has only the entity&#8217;s name and definition. A column&#8217;s text has the column&#8217;s label, the name of its entity, its description and its sample values. The texts for one entity and its columns are sent together in one batch, and the model returns one vector per text: one for the entity and one for each of its columns.</p><p>In step 4, the entities become <strong>connected</strong>. Earlier, the LLM flags columns that likely refer to another table, such as <code>customer_id</code>. For a flagged column with no declared foreign key, step 4 searches the step 3 vectors for the key column that the flagged column refers to, and the LLM picks one. Auto Ontology keeps the link only if most of the column&#8217;s values are found in that key and a join on the two columns returns data. Declared foreign keys are copied from the schema and skip this step.</p><p>In step 5A, the LLM writes a bridge-table join. A bridge table is an existing table with two or more columns, every one of which links to another table&#8217;s key, so the table links entities many-to-many. Each link can be a declared foreign key or one inferred in step 4. The LLM receives the table and its links, and writes the many-to-many relationship as <strong>ready-made SQL</strong>, with a name and description, so an agent doesn&#8217;t have to work out the join through the bridge.</p><p>In step 5B, the reranker files the join SQL from step 5A under one of the entities the bridge table connects, because the bridge table has no entity of its own. The agent then finds the join through that entity. Nothing is written to your database.</p><p>In step 6, each column gets a glossary sentence written <strong>in context</strong>. By now, step 4 has added the inferred links, so every link between tables is known: the declared foreign keys from the schema and the links inferred in step 4. For each column of an entity, the LLM sees the entity, the table, the column&#8217;s description from step 2A, its sample values and its links, and writes one business-glossary sentence of at most 30 words. Step 2A described each column on its own; step 6 describes the column as part of the whole model, for example as &#8220;identifies the customer who placed the order&#8221;.</p><p>The step-6 sentence is for <strong>understanding</strong> a column, not for finding it. Search uses the step 3 vectors, which include the step 2A descriptions. Once the agent has found a column, the step-6 sentence helps the agent understand that column in two cases. First, when someone asks what the data means, the agent answers from these sentences. Second, step 2A skips foreign keys, so when the agent writes SQL that uses a linked foreign key, the agent sees the step-6 sentence of the column the foreign key links to.</p><p>In short, the embedding model makes things findable, the reasoning LLM supplies the meaning and the judgment, and the reranker chooses the entity that each bridge-table join is filed under.</p><blockquote><p><strong>My interpretation:</strong> the reranker plays a minor role. In step 5B it only decides which of the connected entities a bridge-table join is filed under. The reranker doesn&#8217;t change the join, the relationship stays visible from both entities, and the SQL can still be found by searching. The reranker runs only for tables made entirely of foreign keys, and never when answering questions, so it isn&#8217;t used for the sample database. Filing the join under every entity the join connects would be a reasonable alternative.</p></blockquote><p>The fourth model role, the non-reasoning LLM, isn&#8217;t used to build the ontology; it helps when answering questions.</p><h2>How a question is answered, without and with an ontology</h2><p>The Auto Ontology agent turns a natural-language question into a SQL statement. The agent can do this with or without an ontology. Without an ontology, the agent&#8217;s search gives it only the structure of the data: table and column names, data types and keys. When an ontology is available, the search gives the agent more context: the business meaning of the data, through the entities, their columns and their descriptions.</p><p>The agent works in a loop. In each step, the LLM decides which of the three tools below to call, and it can call the same tool many times. Auto Ontology&#8217;s backend runs each tool call and returns the result to the LLM. Each time the LLM decides, it has the question and every earlier tool call and result in front of it.</p><ul><li><p><strong>Search</strong> takes a short query that the LLM writes from the user&#8217;s question, such as &#8220;customers with backorders&#8221; or an exact column name, and finds the tables and columns that match, by meaning (using the step 3 vectors) and by name. The results include each table&#8217;s and column&#8217;s description, stored values and links, and how the tables found so far join together.</p></li><li><p><strong>Run a query</strong> lets the LLM test SQL before giving an answer, for example to see the distinct values in a status column or to try a draft query. Before running the query, the backend checks that every table and column name exists and suggests the closest real name for any that doesn&#8217;t. The backend then runs the query without changing any data and returns up to the first 100 rows.</p></li><li><p><strong>Submit</strong> hands in the final query. The backend runs the same name checks and then runs the query. If the query runs without errors, the result is the answer. If not, the error goes back to the LLM to fix.</p></li></ul><p>The loop ends when a submitted query passes the backend&#8217;s checks and runs without errors. To keep the loop from running forever, the agent has a limit of 24 tool calls by default. When the limit is reached, the LLM gets one final call, which can only submit a query. If that query also fails, the agent reports that it couldn&#8217;t answer the question.</p><p>For <em>&#8220;How many customers had backorders?&#8221;</em>, here is how the SQL typically gets written.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!x4BD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ec3e26-e0a8-4d7e-815d-533ae861e8b6_1456x793.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!x4BD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ec3e26-e0a8-4d7e-815d-533ae861e8b6_1456x793.png 424w, https://substackcdn.com/image/fetch/$s_!x4BD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ec3e26-e0a8-4d7e-815d-533ae861e8b6_1456x793.png 848w, https://substackcdn.com/image/fetch/$s_!x4BD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ec3e26-e0a8-4d7e-815d-533ae861e8b6_1456x793.png 1272w, https://substackcdn.com/image/fetch/$s_!x4BD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ec3e26-e0a8-4d7e-815d-533ae861e8b6_1456x793.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!x4BD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ec3e26-e0a8-4d7e-815d-533ae861e8b6_1456x793.png" width="1456" height="793" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/33ec3e26-e0a8-4d7e-815d-533ae861e8b6_1456x793.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:793,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:151849,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://aiarchitectplaybook.com/i/226121116?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ec3e26-e0a8-4d7e-815d-533ae861e8b6_1456x793.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_!x4BD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ec3e26-e0a8-4d7e-815d-533ae861e8b6_1456x793.png 424w, https://substackcdn.com/image/fetch/$s_!x4BD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ec3e26-e0a8-4d7e-815d-533ae861e8b6_1456x793.png 848w, https://substackcdn.com/image/fetch/$s_!x4BD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ec3e26-e0a8-4d7e-815d-533ae861e8b6_1456x793.png 1272w, https://substackcdn.com/image/fetch/$s_!x4BD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ec3e26-e0a8-4d7e-815d-533ae861e8b6_1456x793.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><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">The same question, without and with an ontology.</figcaption></figure></div><p>Without an ontology, the search returns no descriptions and no sample values, because both are produced while the ontology is built. The LLM must infer from the names <code>isundersupplybackordered</code> and <code>backorderorderid</code> which one means &#8220;had a backorder&#8221;, or spend tool calls looking at the data.</p><p>With an ontology, the same search also returns a description and stored sample values for each of those columns, so the LLM can pick the column by its meaning.</p><p>In both cases the search also returns how the tables it found join together. Without an ontology, this join information comes only from declared foreign keys; with an ontology, it also includes links the LLM inferred and the data confirmed.</p><p>The ontology adds information, but the LLM still makes the choices, and an LLM wrote much of that information: the descriptions, the entities and the glossary sentences. The draft doesn&#8217;t flag which parts might be wrong, so the agent&#8217;s answers are only as good as those descriptions. That is why the expert review in stage 6 matters: each correction a person makes changes the agent&#8217;s answers right away.</p><p>With an LLM writing the draft, Auto Ontology cuts down the manual work of building an ontology. Experts then correct and certify that draft. Together, the two give the agent an ontology it can rely on, which increases the chance that a natural-language question turns into accurate SQL.</p><div><hr></div><p><em>This series is independent and not affiliated with NVIDIA. Auto Ontology is NVIDIA&#8217;s, licensed under Apache-2.0. Wide World Importers is Microsoft&#8217;s sample database, licensed under MIT. The descriptions of how Auto Ontology works come from NVIDIA&#8217;s <a href="https://github.com/NVIDIA/auto-ontology/blob/778ccdef75536bee5653306f8ded655924e4ada8/README.md">README</a>, its <a href="https://github.com/NVIDIA/auto-ontology/tree/778ccdef75536bee5653306f8ded655924e4ada8/docs">documentation</a> and its <a href="https://github.com/NVIDIA/auto-ontology/tree/778ccdef75536bee5653306f8ded655924e4ada8/auto_ontology">source code</a>, at a pinned commit.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://aiarchitectplaybook.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://aiarchitectplaybook.com/subscribe?"><span>Subscribe now</span></a></p>]]></content:encoded></item><item><title><![CDATA[From intent to spec: starting a new project with a coding agent]]></title><description><![CDATA[What we set up with IBM Bob before writing any code: the intent, AGENTS.md, and the spec.]]></description><link>https://aiarchitectplaybook.com/p/from-intent-to-spec-starting-a-new</link><guid isPermaLink="false">https://aiarchitectplaybook.com/p/from-intent-to-spec-starting-a-new</guid><dc:creator><![CDATA[Shaikh Quader]]></dc:creator><pubDate>Sat, 21 Nov 2026 00:51:16 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/c1673884-b688-400b-806d-d1dde4378a9b_1456x816.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>An empty project folder, one Markdown file, and nothing else. That is how we started this project with a coding agent.</p><p>We will not be writing a lot of code by hand in this series. The coding agent is our development partner. We use IBM Bob, IBM&#8217;s coding agent. Marhaba has been using Bob for more than a year, and her method has improved with every project, so this series follows the way she works now.</p><p>In this first part, we set up three files:</p><ul><li><p><strong>intent.md</strong>: the problem we are solving</p></li><li><p><strong>AGENTS.md</strong>: the onboarding document for the coding agent</p></li><li><p><strong>spec.md</strong>: the technical design, generated from the intent</p></li></ul><p>In the next part, we start building from the spec. The full session is in the video below.</p><div id="youtube2-cBVHLI2yFqQ" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;cBVHLI2yFqQ&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/cBVHLI2yFqQ?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><h2>The project</h2><p>We kept the use case simple so we could focus on the project setup and on how to work with a coding agent.</p><p>The project is called AssetHub. Enterprise IT departments struggle to track corporate hardware like laptops and monitors: which employee has which laptop, and what needs to come back. AssetHub is a lightweight REST API for assigning, tracking, and reclaiming hardware. It uses Node.js and TypeScript, with IBM Db2 as the database.</p><p>We follow Marhaba&#8217;s flow: intent, then spec, then code, then testing, then deployment. This post covers the first two steps.</p><h2>1. Start with the intent, not the code</h2><p>Everything begins with one file: intent.md. It describes the vision, the problem statement, the personas, and the user stories. For AssetHub, the personas are the IT asset manager who assigns, tracks, and reclaims hardware, the department lead who checks the team&#8217;s assets, and an auditor who verifies asset history.</p><p>In a real team, the intent comes from your product owner. It has little technical detail. It describes the problem and the desired solution.</p><p>When we started, the project had one folder with this one file in it. That is all a greenfield project needs.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!eXtQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3da19ecb-a5e7-487e-a993-9234d798c01d_1628x608.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!eXtQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3da19ecb-a5e7-487e-a993-9234d798c01d_1628x608.png 424w, https://substackcdn.com/image/fetch/$s_!eXtQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3da19ecb-a5e7-487e-a993-9234d798c01d_1628x608.png 848w, https://substackcdn.com/image/fetch/$s_!eXtQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3da19ecb-a5e7-487e-a993-9234d798c01d_1628x608.png 1272w, https://substackcdn.com/image/fetch/$s_!eXtQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3da19ecb-a5e7-487e-a993-9234d798c01d_1628x608.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!eXtQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3da19ecb-a5e7-487e-a993-9234d798c01d_1628x608.png" width="1456" height="544" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3da19ecb-a5e7-487e-a993-9234d798c01d_1628x608.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:544,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&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="" srcset="https://substackcdn.com/image/fetch/$s_!eXtQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3da19ecb-a5e7-487e-a993-9234d798c01d_1628x608.png 424w, https://substackcdn.com/image/fetch/$s_!eXtQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3da19ecb-a5e7-487e-a993-9234d798c01d_1628x608.png 848w, https://substackcdn.com/image/fetch/$s_!eXtQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3da19ecb-a5e7-487e-a993-9234d798c01d_1628x608.png 1272w, https://substackcdn.com/image/fetch/$s_!eXtQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3da19ecb-a5e7-487e-a993-9234d798c01d_1628x608.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><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">intent.md was the only file in the project when we started.</figcaption></figure></div><h2>2. Know whether your project is greenfield or brownfield</h2><p>Greenfield means you have no code. You start with a problem statement and go from a problem to a product. You make the technical decisions as you go.</p><p>Brownfield means a code base already exists. It could be a mature product, or the next version you are working on. You have prior documents, prior methodology, and prior decisions, and you need to make your coding agent aware of them.</p><p>How you set up your coding agent depends on whether your project is greenfield or brownfield.</p><p>Our plan is to build an MVP first, just the core of AssetHub, as greenfield development. Then we will come back to it as a brownfield project and add features.</p><h2>3. Give the coding agent an onboarding document</h2><p>The next step is an AGENTS.md file. It works like an onboarding document for the coding agent. It is concise, with only the relevant information: the stack you are using, where the documents are, and what the agent needs to get started.</p><p>In Bob, the init command creates AGENTS.md for you. Bob reads the project, including any prototype or source code you already have, to understand what the project is. It also creates a .bob directory inside the project for Bob&#8217;s own configuration. Our project had only the intent, so Bob wrote AGENTS.md from intent.md.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jPsP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1eae008-657c-4735-a3b7-68ee5cfabf69_1000x744.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jPsP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1eae008-657c-4735-a3b7-68ee5cfabf69_1000x744.png 424w, https://substackcdn.com/image/fetch/$s_!jPsP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1eae008-657c-4735-a3b7-68ee5cfabf69_1000x744.png 848w, https://substackcdn.com/image/fetch/$s_!jPsP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1eae008-657c-4735-a3b7-68ee5cfabf69_1000x744.png 1272w, https://substackcdn.com/image/fetch/$s_!jPsP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1eae008-657c-4735-a3b7-68ee5cfabf69_1000x744.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!jPsP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1eae008-657c-4735-a3b7-68ee5cfabf69_1000x744.png" width="1000" height="744" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b1eae008-657c-4735-a3b7-68ee5cfabf69_1000x744.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:744,&quot;width&quot;:1000,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&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="" srcset="https://substackcdn.com/image/fetch/$s_!jPsP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1eae008-657c-4735-a3b7-68ee5cfabf69_1000x744.png 424w, https://substackcdn.com/image/fetch/$s_!jPsP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1eae008-657c-4735-a3b7-68ee5cfabf69_1000x744.png 848w, https://substackcdn.com/image/fetch/$s_!jPsP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1eae008-657c-4735-a3b7-68ee5cfabf69_1000x744.png 1272w, https://substackcdn.com/image/fetch/$s_!jPsP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1eae008-657c-4735-a3b7-68ee5cfabf69_1000x744.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><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">Bob&#8217;s init found only a docs folder and treated intent.md as the source of truth.</figcaption></figure></div><p>AGENTS.md is not a one-time file. As your project evolves, update AGENTS.md with it.</p><h2>4. Link to your documents instead of repeating them</h2><p>AGENTS.md should not repeat what is already in intent.md, so it links to intent.md. If the coding agent needs more information about the use case, it loads intent.md then. This is called progressive disclosure.</p><p>The reason is the context window. AGENTS.md is included in the context window with every prompt. If it carries a lot of information every time, it floods the context window, and the output you get from the coding agent is not that good.</p><p>The first AGENTS.md Bob generated was a bit long for Marhaba&#8217;s liking, so she asked Bob to make it concise. The same idea applies to architecture. Instead of putting all the architecture details in AGENTS.md, point to a separate file that has them.</p><h2>5. Read what the agent generated, and change what you don&#8217;t need</h2><p>We then went through the sections of the concise AGENTS.md.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!s8Ao!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9c21fda-06d0-4067-a99c-c98eee7d5b83_1658x1296.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!s8Ao!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9c21fda-06d0-4067-a99c-c98eee7d5b83_1658x1296.png 424w, https://substackcdn.com/image/fetch/$s_!s8Ao!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9c21fda-06d0-4067-a99c-c98eee7d5b83_1658x1296.png 848w, https://substackcdn.com/image/fetch/$s_!s8Ao!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9c21fda-06d0-4067-a99c-c98eee7d5b83_1658x1296.png 1272w, https://substackcdn.com/image/fetch/$s_!s8Ao!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9c21fda-06d0-4067-a99c-c98eee7d5b83_1658x1296.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!s8Ao!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9c21fda-06d0-4067-a99c-c98eee7d5b83_1658x1296.png" width="1456" height="1138" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e9c21fda-06d0-4067-a99c-c98eee7d5b83_1658x1296.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1138,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&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="" srcset="https://substackcdn.com/image/fetch/$s_!s8Ao!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9c21fda-06d0-4067-a99c-c98eee7d5b83_1658x1296.png 424w, https://substackcdn.com/image/fetch/$s_!s8Ao!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9c21fda-06d0-4067-a99c-c98eee7d5b83_1658x1296.png 848w, https://substackcdn.com/image/fetch/$s_!s8Ao!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9c21fda-06d0-4067-a99c-c98eee7d5b83_1658x1296.png 1272w, https://substackcdn.com/image/fetch/$s_!s8Ao!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9c21fda-06d0-4067-a99c-c98eee7d5b83_1658x1296.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><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">The concise AGENTS.md. The stack line links to intent.md instead of repeating it.</figcaption></figure></div><p><strong>Stack.</strong> The technology the project will use. Marhaba had written in the intent that she wanted Node.js and TypeScript, so that is what Bob put there.</p><p><strong>Commands.</strong> Node.js commands to build the project and run tests. Bob chose them because the stack is Node.js. With Python in the stack, Bob would have come up with Python commands. Marhaba says you don&#8217;t need this section yet.</p><p><strong>Architecture.</strong> A placeholder for an application of this kind: a controller, the business rules, then the database. This section will evolve as we go from intent to spec.</p><p><strong>Critical Db2 rules.</strong> What to do and what not to do with the database, so the agent works efficiently and doesn&#8217;t take steps that hurt the project. One example: never open and close a connection per request. This section also points to the local Db2 container we use for development.</p><p><strong>Business rules.</strong> These came from the use case in intent.md.</p><p>None of this is fixed. AGENTS.md has no set structure, and it can vary from project to project. Bob generated this one, but you don&#8217;t have to accept it as is. You can change it, add rules, and remove sections you don&#8217;t need.</p><h2>6. Keep a different AGENTS.md for each task</h2><p>For this small greenfield project, Marhaba let Bob generate AGENTS.md with init. In her day-to-day work, she writes her own AGENTS.md for the task she is working on, not only for the project.</p><p>Some projects are huge. They have their own design and their own testing plan. Fixing a bug in a mature code base and adding a new feature need different context, even in the same project. In Marhaba&#8217;s words:</p><blockquote><p>&#8220;Same project, different task, I will have a different AGENTS.md.&#8221;</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!x6wV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69645792-5f62-495a-bbcd-bb5e967e263b_1456x780.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!x6wV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69645792-5f62-495a-bbcd-bb5e967e263b_1456x780.png 424w, https://substackcdn.com/image/fetch/$s_!x6wV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69645792-5f62-495a-bbcd-bb5e967e263b_1456x780.png 848w, https://substackcdn.com/image/fetch/$s_!x6wV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69645792-5f62-495a-bbcd-bb5e967e263b_1456x780.png 1272w, https://substackcdn.com/image/fetch/$s_!x6wV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69645792-5f62-495a-bbcd-bb5e967e263b_1456x780.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!x6wV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69645792-5f62-495a-bbcd-bb5e967e263b_1456x780.png" width="1456" height="780" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/69645792-5f62-495a-bbcd-bb5e967e263b_1456x780.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:780,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&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="" srcset="https://substackcdn.com/image/fetch/$s_!x6wV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69645792-5f62-495a-bbcd-bb5e967e263b_1456x780.png 424w, https://substackcdn.com/image/fetch/$s_!x6wV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69645792-5f62-495a-bbcd-bb5e967e263b_1456x780.png 848w, https://substackcdn.com/image/fetch/$s_!x6wV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69645792-5f62-495a-bbcd-bb5e967e263b_1456x780.png 1272w, https://substackcdn.com/image/fetch/$s_!x6wV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69645792-5f62-495a-bbcd-bb5e967e263b_1456x780.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><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"></figcaption></figure></div><p>One AGENTS.md for all the tasks in a project does not work well. Keep it specific to the task, concise, and to the point.</p><h2>7. Generate the spec from the intent</h2><p>With AGENTS.md in place, the next file is spec.md.</p><p>Marhaba&#8217;s prompt to Bob was simple: read intent.md and generate the spec. Prompts get simpler as the project files build up. You don&#8217;t have to keep repeating yourself, because you can point to the files, and Bob knows where to look. She didn&#8217;t even mention AGENTS.md in the prompt. Bob already includes AGENTS.md with every prompt.</p><p>The spec Bob generated links back to intent.md. It covers:</p><ul><li><p><strong>Overview and MVP scope:</strong> asset management and the employee registry</p></li><li><p><strong>Requirements:</strong> functional and non-functional</p></li><li><p><strong>API design:</strong> the methods, the paths, and examples for assets, employees, and assignments</p></li><li><p><strong>Data model:</strong> the database tables and indexes</p></li><li><p><strong>TypeScript DTOs:</strong> the data objects used throughout the code base, which map to the database tables</p></li><li><p><strong>Architecture:</strong> Express for the REST API controllers, then services, then a repository for the database</p></li><li><p><strong>Project structure:</strong> starting from app.ts</p></li><li><p><strong>Transaction pattern:</strong> for Db2</p></li><li><p><strong>Error handling:</strong> an asset not found, an employee not found, a duplicate asset tag</p></li><li><p><strong>Testing:</strong> a mock repository as a starting point</p></li><li><p><strong>Local development setup:</strong> a Db2 container image and the dependencies to install</p></li></ul><p>Bob derived the whole spec from our intent and the stack we chose. It turns the problem statement into a technical design we can make decisions from when we start coding. Marhaba plans to come back to the testing section and add more testing strategy.</p><p>The spec is a nearly complete design. We can review it and change it before any code exists.</p><h2>What comes next</h2><p>So far, we have an intent file, an AGENTS.md that onboards Bob to the project, and a spec that turns the intent into a design. No code yet.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1Je5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ad551f0-85a8-4dfb-b243-12ab6ed3e81a_1456x832.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1Je5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ad551f0-85a8-4dfb-b243-12ab6ed3e81a_1456x832.png 424w, https://substackcdn.com/image/fetch/$s_!1Je5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ad551f0-85a8-4dfb-b243-12ab6ed3e81a_1456x832.png 848w, https://substackcdn.com/image/fetch/$s_!1Je5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ad551f0-85a8-4dfb-b243-12ab6ed3e81a_1456x832.png 1272w, https://substackcdn.com/image/fetch/$s_!1Je5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ad551f0-85a8-4dfb-b243-12ab6ed3e81a_1456x832.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!1Je5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ad551f0-85a8-4dfb-b243-12ab6ed3e81a_1456x832.png" width="1456" height="832" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9ad551f0-85a8-4dfb-b243-12ab6ed3e81a_1456x832.png&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;:null,&quot;alt&quot;:null,&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="" srcset="https://substackcdn.com/image/fetch/$s_!1Je5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ad551f0-85a8-4dfb-b243-12ab6ed3e81a_1456x832.png 424w, https://substackcdn.com/image/fetch/$s_!1Je5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ad551f0-85a8-4dfb-b243-12ab6ed3e81a_1456x832.png 848w, https://substackcdn.com/image/fetch/$s_!1Je5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ad551f0-85a8-4dfb-b243-12ab6ed3e81a_1456x832.png 1272w, https://substackcdn.com/image/fetch/$s_!1Je5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ad551f0-85a8-4dfb-b243-12ab6ed3e81a_1456x832.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><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"></figcaption></figure></div><p>In the next part, we start using the spec. Bob will scaffold the project: the source code structure, the package.json, and the rest of the setup, using the files from this part.</p><p>If you want to try these steps on your own project before Part 2, IBM Bob has a <a href="https://bob.ibm.com/trial">free 30-day trial</a>.</p><div><hr></div><p>If you set up your coding agent differently for a new project, we would like to hear how. Tell us in the comments.</p>]]></content:encoded></item><item><title><![CDATA[Understanding NVIDIA Auto Ontology, Part 1: What an ontology is, and why AI agents need one]]></title><description><![CDATA[What an ontology is, why AI agents need one to query relational databases accurately, and what NVIDIA Auto Ontology is.]]></description><link>https://aiarchitectplaybook.com/p/understanding-nvidia-auto-ontology</link><guid isPermaLink="false">https://aiarchitectplaybook.com/p/understanding-nvidia-auto-ontology</guid><dc:creator><![CDATA[Shaikh Quader]]></dc:creator><pubDate>Thu, 19 Nov 2026 19:29:45 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/6bd84fd9-b5ef-4ba2-991b-1d65b290a6d6_1456x816.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>People who query a relational database day to day can write accurate SQL because they understand the data: what each table holds, what its columns mean, and how the tables relate. They either designed the schema themselves, or learned it from the people and documentation that describe it. Much of this understanding is <em>tacit knowledge</em>: it lives in people&#8217;s heads, or in documents outside the database.</p><p>An AI agent that autonomously translates a natural-language question into SQL has none of that understanding. All it has is the raw schema and the data, with no one and nothing telling it what they mean. Its LLM knows what a word like &#8220;backorder&#8221; usually means, but not what the word means in this business, or which column holds that information. So when the LLM maps a question to SQL, it often comes up with a query that runs but is wrong.</p><h2>A real example</h2><p>The example database used throughout this series, Microsoft&#8217;s Wide World Importers, has an orders table with two backorder columns.</p><p><code>isundersupplybackordered</code> sounds like &#8220;this order was backordered&#8221;. Microsoft&#8217;s documentation describes it as <em>&#8220;If items cannot be supplied are they backordered?&#8221;</em>: a setting, not an event. In the data, it is <code>true</code> on all 73,595 orders.</p><p><code>backorderorderid</code> sounds like a link to a backorder. Microsoft&#8217;s documentation says <em>&#8220;If this order is a backorder, this column holds the original order number&#8221;</em>. In the data, it is set on 7,538 orders.</p><p>Ask &#8220;How many customers had backorders?&#8221; and an LLM going by names may well filter on the flag. Filtering on the flag counts every customer in the database (663), not the customers whose orders were actually involved in a backorder (660). The two numbers happen to be close here, but the first number answers a different question. Microsoft wrote descriptions for almost every column in the original database, but the copy used in this series carries none of those descriptions, so an agent querying this copy never sees them.</p><h2>What is an ontology?</h2><p>An ontology closes that gap. An ontology captures people&#8217;s understanding of the data (what the entities in the schema mean, how they relate, and what the content represents) and writes that understanding down so that agents and LLMs can use it.</p><p><strong>An ontology is a shared description of the entities in a business (such as </strong><em><strong>Customer</strong></em><strong> or </strong><em><strong>Order</strong></em><strong>), their attributes, and the relationships between them, written in a form that both people and software can understand.</strong></p><p>Ontologies are used well beyond databases: to describe web content (<a href="https://schema.org">schema.org</a>), to standardize terms in healthcare and finance, and to organize knowledge graphs and information extracted from documents. <strong>This series is about ontologies for relational databases</strong>, where the ontology is also grounded in the database: each entity and attribute is mapped to the tables and columns that hold it, and key business metrics are defined as calculations.</p><p>The term comes from knowledge engineering. Stanford&#8217;s widely used guide, <em><a href="https://protege.stanford.edu/publications/ontology_development/ontology101-noy-mcguinness.html">Ontology Development 101</a></em>, describes an ontology as defining <em>&#8220;a common vocabulary&#8221;</em> for a domain, with <em>&#8220;machine-interpretable definitions of basic concepts in the domain and relations among them.&#8221;</em></p><h2>How it differs from a schema</h2><p>A schema defines how data is stored: tables, columns, data types, and the keys that say which columns join. It rarely explains what the data means, what each connection represents in business terms, or how the people who own the data use it to answer questions. An ontology captures that business understanding, including how measures are calculated. If you&#8217;ve worked with a business glossary, a data dictionary or a semantic layer, an ontology covers the same ground in one model.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!EAuG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcdecefb-abfd-410d-a0cc-11e0faf08b3a_1456x604.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!EAuG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcdecefb-abfd-410d-a0cc-11e0faf08b3a_1456x604.png 424w, https://substackcdn.com/image/fetch/$s_!EAuG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcdecefb-abfd-410d-a0cc-11e0faf08b3a_1456x604.png 848w, https://substackcdn.com/image/fetch/$s_!EAuG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcdecefb-abfd-410d-a0cc-11e0faf08b3a_1456x604.png 1272w, https://substackcdn.com/image/fetch/$s_!EAuG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcdecefb-abfd-410d-a0cc-11e0faf08b3a_1456x604.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!EAuG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcdecefb-abfd-410d-a0cc-11e0faf08b3a_1456x604.png" width="1456" height="604" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dcdecefb-abfd-410d-a0cc-11e0faf08b3a_1456x604.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:604,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:118641,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://aiarchitectplaybook.com/i/225697737?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcdecefb-abfd-410d-a0cc-11e0faf08b3a_1456x604.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_!EAuG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcdecefb-abfd-410d-a0cc-11e0faf08b3a_1456x604.png 424w, https://substackcdn.com/image/fetch/$s_!EAuG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcdecefb-abfd-410d-a0cc-11e0faf08b3a_1456x604.png 848w, https://substackcdn.com/image/fetch/$s_!EAuG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcdecefb-abfd-410d-a0cc-11e0faf08b3a_1456x604.png 1272w, https://substackcdn.com/image/fetch/$s_!EAuG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcdecefb-abfd-410d-a0cc-11e0faf08b3a_1456x604.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><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">The schema tells you what exists. The ontology tells you what it means.</figcaption></figure></div><h2>What&#8217;s in an ontology</h2><p>NVIDIA describes six parts, and this series uses that breakdown:</p><ul><li><p>A <em>concept</em> says what an entity is: <em>Customer</em>, with a description and synonyms.</p></li><li><p>A <em>mapping</em> says where it is stored. It is the link between a concept and its physical location: <em>Customer</em> maps to the table <code>sales.customers</code>, and each attribute to a column.</p></li><li><p>A <em>relationship</em> says how entities are related: an <em>Invoice</em> has a buying <em>Customer</em> and a billed <em>Customer</em>. Each relationship is implemented as a join.</p></li><li><p>A <em>metric</em> says how a measure is calculated: <em>Revenue</em> as a reviewed SQL expression, so every answer calculates it the same way.</p></li><li><p><em>Lineage</em> says where it comes from: each concept and attribute links to its source tables and columns.</p></li><li><p><em>Certification</em> says whether it can be trusted: an expert marks a definition as reviewed.</p></li></ul><h2>Text-to-SQL without and with an ontology</h2><p>In both cases an LLM receives a natural-language question and translates the question into SQL. What differs is the context the LLM receives alongside the question. The raw schema tells the LLM <strong>what exists</strong>; an ontology adds <strong>what the data means</strong>. Either way, the LLM does the interpreting.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!OiAC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01939022-fda3-4295-8ff3-5bc529d783a4_1456x1000.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!OiAC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01939022-fda3-4295-8ff3-5bc529d783a4_1456x1000.png 424w, https://substackcdn.com/image/fetch/$s_!OiAC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01939022-fda3-4295-8ff3-5bc529d783a4_1456x1000.png 848w, https://substackcdn.com/image/fetch/$s_!OiAC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01939022-fda3-4295-8ff3-5bc529d783a4_1456x1000.png 1272w, https://substackcdn.com/image/fetch/$s_!OiAC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01939022-fda3-4295-8ff3-5bc529d783a4_1456x1000.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!OiAC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01939022-fda3-4295-8ff3-5bc529d783a4_1456x1000.png" width="1456" height="1000" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/01939022-fda3-4295-8ff3-5bc529d783a4_1456x1000.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1000,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:159795,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://aiarchitectplaybook.com/i/225697737?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01939022-fda3-4295-8ff3-5bc529d783a4_1456x1000.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_!OiAC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01939022-fda3-4295-8ff3-5bc529d783a4_1456x1000.png 424w, https://substackcdn.com/image/fetch/$s_!OiAC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01939022-fda3-4295-8ff3-5bc529d783a4_1456x1000.png 848w, https://substackcdn.com/image/fetch/$s_!OiAC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01939022-fda3-4295-8ff3-5bc529d783a4_1456x1000.png 1272w, https://substackcdn.com/image/fetch/$s_!OiAC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01939022-fda3-4295-8ff3-5bc529d783a4_1456x1000.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><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">The ontology entry shown is illustrative, based on Microsoft&#8217;s documentation.</figcaption></figure></div><p>An ontology <strong>increases the chance</strong> that the generated query is accurate, but doesn&#8217;t guarantee accuracy. The ontology&#8217;s descriptions can be wrong, and the LLM can still make mistakes.</p><h2>NVIDIA Auto Ontology</h2><p>NVIDIA Auto Ontology is an open-source Python framework from NVIDIA, licensed under Apache-2.0. NVIDIA describes it as a framework for building semantic, graph-based reasoning layers over data, with the aim of more deterministic query generation, better context retrieval and more explainable AI in LLM and agent workflows. In practice, it builds an ontology automatically from a database&#8217;s metadata and sampled data, and makes that ontology available to agents through MCP, a command-line interface and an API.</p><h3>Why it exists</h3><p>Creating and maintaining an ontology by hand is expensive. Subject matter experts and data engineers have to describe every entity, attribute, relationship and metric, and keep those descriptions up to date as the data changes. NVIDIA Auto Ontology aims to cut that human effort. It generates an ontology in three high-level steps:</p><ol><li><p><strong>Generate the ontology draft.</strong> An LLM reads the database&#8217;s table and column names, data types, declared keys and sampled values. From these, it writes column descriptions, names the entities, and proposes relationships between tables.</p></li><li><p><strong>Confirm inferred relationships in the draft.</strong> Relationships the database already declares as foreign keys are used as they are. For a relationship the LLM proposed, Auto Ontology joins the two columns in SQL and keeps the relationship only if the join returns data. Descriptions and names get no such check.</p></li><li><p><strong>Human experts review and certify the ontology draft (optional).</strong> Reviewers check individual entries, such as an entity&#8217;s name, a column description or a calculation. They correct what is wrong and mark each correct entry as certified. Agents can use the draft before any review.</p></li></ol><p>In Part 2 of this series, I will break these three steps into six detailed stages.</p><p>Auto Ontology also includes its own agent: a text-to-SQL agent, built by NVIDIA, that answers questions from the ontology and shows the SQL behind each answer. You reach it through the web app&#8217;s Chat, a REST API, or the <code>ask_question</code> tool on Auto Ontology&#8217;s MCP server. Other agents can also read the ontology directly through that MCP server.</p><h3>Which models it uses</h3><p>The models are not fixed. Auto Ontology uses four model roles, each set separately in Auto Ontology&#8217;s <code>.env</code> file. By default, all four are NVIDIA models, hosted on NVIDIA&#8217;s servers.</p><p>The reasoning role, <code>nvidia/nemotron-3.5-lightning-30b-a3b</code>, builds the ontology and answers questions. The non-reasoning role uses the same model, to rewrite follow-up questions and plan charts. The embedding role, <code>nvidia/nemotron-3.5-embed-1b</code>, does search by meaning. The reranking role, <code>nvidia/nemotron-3.5-rerank-8b</code>, is used in one ontology-building step, for bridge tables.</p><p>Any role can point to a self-hosted NVIDIA model or to any OpenAI-compatible endpoint, through its <code>&lt;ROLE&gt;_ENDPOINT</code>, <code>&lt;ROLE&gt;_API_KEY</code> and <code>&lt;ROLE&gt;_MODEL</code> settings. NVIDIA&#8217;s requirements: the model must support structured output, and the embedding model must stay the same for building the ontology and for answering questions.</p><h3>When an ontology is worth it</h3><p>An ontology is likely a good fit when the questions are varied and open-ended, so an agent must interpret each new one. It also fits when the data is spread across many sources, where the same thing, such as a customer, is stored differently or defined in conflicting ways, and when definitions are shared across teams or agents, such as one agreed meaning of revenue.</p><p>An ontology may not be needed when the questions are fixed and known in advance, such as the queries behind a dashboard, so someone can write the SQL once by hand. The same goes for data in one well-designed database, and for definitions used by one team, in one place.</p><p>This follows NVIDIA&#8217;s guidance: with one well-modelled database and a fixed set of questions, direct SQL may be enough.</p><div><hr></div><p>Raw schema provides the structural context. Ontology provides the semantics. Together, they give the LLM both, and increase the chance of generating accurate SQL that answers the user&#8217;s natural language query.</p><p>In Part 2, I walk through how NVIDIA Auto Ontology builds an ontology, what each model does, and how its agent answers a question without and with an ontology.</p><p><em>This series is independent and not affiliated with NVIDIA.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://aiarchitectplaybook.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://aiarchitectplaybook.com/subscribe?"><span>Subscribe now</span></a></p>]]></content:encoded></item><item><title><![CDATA[Being an excellent coder is not enough]]></title><description><![CDATA[What I told a new engineer about understanding old code, building real prototypes, and working with his leadership]]></description><link>https://aiarchitectplaybook.com/p/being-an-excellent-coder-is-not-enough</link><guid isPermaLink="false">https://aiarchitectplaybook.com/p/being-an-excellent-coder-is-not-enough</guid><dc:creator><![CDATA[Shaikh Quader]]></dc:creator><pubDate>Wed, 18 Nov 2026 04:46:48 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/bc03f242-e35e-419e-b79e-7d510c4064d4_1456x816.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>&#8220;How do you prepare a prototype and propose it to the company?&#8221;</p><p>Abhinav asked me that near the end of our call. He is a software engineer, less than a year out of university. He came to my session at TechXchange, then reached out afterwards and asked if we could talk about his career.</p><p>I said yes. But before I give anyone career advice, I ask a few questions first. What is your background? What are you working on? Where do you want to be a couple of years down the road? General advice is easy to give. Most of it is cookie cutter, and it may not fit the person in front of you.</p><p>So we started there.</p><div id="youtube2-GYNNt4hrA54" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;GYNNt4hrA54&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/GYNNt4hrA54?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><h2>The problem he brought</h2><p>Abhinav finished his computer science degree last December. He did three years in India and his final year in the US. Along the way he picked up some part-time data engineering work with Snowflake and Power BI.</p><p>Today he works in application support for a bank. The core banking application runs on IBM i, the platform many people still call AS/400. His team keeps it running. Millions of transactions every day. Tens of thousands of jobs. No downtime.</p><p>Much of the logic lives in RPG and CL code written decades ago. I had to ask him what RPG was. I work at IBM, but on Db2 for Linux, and IBM is a big company with many platforms. He explained it patiently. RPG is a language built for that platform. CL, Control Language, is how you issue commands on it.</p><p>Then he told me the real problem.</p><p>&#8220;All the people who wrote that code at that time already retired,&#8221; he said. &#8220;We cannot contact them anymore.&#8221;</p><p>The bank&#8217;s business rules sit inside that code. Nobody left can explain them. His plan was to learn the code well enough to master those rules, and become more valuable to his team.</p><p>That is a good plan. Here is what I suggested.</p><h2>1. Read the codebase the way you read a nonfiction book</h2><p>I&#8217;m big on improving my reading. I have invested quite a bit of time in it over the years. Along the way I came across <em>How to Read a Book</em> by Mortimer Adler, first published in 1940. I recommend it to almost everyone I talk to about careers.</p><p>One idea from that book changed how I read. You do not read a nonfiction book cover to cover. You preview it first. Read the preface. Look at the short summary on the back. Study the table of contents. Then pick the chapters that matter to you and read those in depth.</p><p>I borrow the same idea to understand a codebase.</p><p>When I open a repository for the first time, I point a coding agent at it and ask it to preview. Not every part. Not every file. I start with one question: what does the user give this program, and what do they get back?</p><p>Think of a vending machine. You make a choice, you insert a coin, you get something out. Before you get lost in how the machine works inside, you should know what it is for.</p><p>So my prompts go in this order:</p><ul><li><p>Tell me what input the user provides and what output they get. Do not give me the architecture yet.</p></li><li><p>Tell me what problem this program solves. Why was it written? What business problem does it serve?</p></li><li><p>Now preview the repository and give me an architecture diagram. What are the main parts, and how are they connected? What is the workflow? Still, do not go to the file level.</p></li></ul><p>A repository can have hundreds of files. I don&#8217;t care about them yet. I want an intuition for the design first. Once I have that picture, I decide what I need to learn next.</p><p>One more habit. I ask the agent to keep documenting everything in a markdown file as we go. If you come back to it a few weeks later, that chat might be gone. The notes will not.</p><p>I suggested Abhinav try this with IBM Bob, IBM&#8217;s coding agent. He had already used the 30-day trial. My advice was simple: pick one application, point Bob at it, and run the preview. If it helps, show your manager. The team already runs on IBM technology, so hopefully they will support it.</p><p>I wrote more about this way of reading in <a href="https://aiarchitectplaybook.com/p/read-like-a-mapmaker-my-4-step-method">Read like a mapmaker</a>.</p><h2>2. Test your understanding without looking at the screen</h2><p>This is the step most people skip.</p><p>Once the agent has explained the code, turn away from it. Then describe, from memory, what you understood. Say it out loud into a voice recorder or whatever transcription tool your company allows. Or type it. Or write it by hand.</p><p>As you describe it, you will notice questions coming up. What is this part? Why does it do that? Capture those questions. They show you exactly where your understanding has gaps.</p><p>Take those questions back to the agent and ask it to fill the missing pieces. Then turn away and describe it again.</p><p>After a few rounds, half an hour or an hour, you will have a clearer and more complete picture. Now write your own summary, in your own voice. Save it in a Git repo you can go back to any time.</p><p>The agent&#8217;s report is not your understanding. Your summary is.</p><p>Abhinav said something here that I keep thinking about.</p><p>&#8220;When we get into the career as newbies, we keep thinking about complex stuff. We make things complicated ourselves. I was doing that all the time.&#8221;</p><p>I see this often. The basics are not the beginner level. The basics are what experienced people keep coming back to. What goes in. What comes out. What problem it solves.</p><h2>3. Build something real, not a PowerPoint</h2><p>Then Abhinav asked the question at the top of this post. How do you prepare a prototype and propose it?</p><p>It starts before the prototype. You need an idea worth solving, and you need a very clear understanding of what problem it solves for the business.</p><p>I represent the interests of AI developers who use Db2. So I study their needs, use cases, and pain points. I read blogs, follow their conversations, and watch industry trends. I look at what we have already shipped. From there I pick the next feature worth building.</p><p>Then comes the hard part. Db2 has millions of lines of code. Shipping a new built-in function takes real development time and has to wait for a release cycle.</p><p>So I don&#8217;t start there. I build the idea with what already exists. Anyone can write a user-defined function or a stored procedure on the current Db2 release, today. It will not be optimized. It runs outside the engine. But it works, and I can show it.</p><p>That is the whole idea. My prototype is not slides. It is live, working code that shows the experience and the problem it solves. Then the conversation moves from &#8220;should we?&#8221; to &#8220;here is how it looks today, now let&#8217;s figure out how to build it properly.&#8221;</p><p>Your prototype does not need to live inside your product either. You can build it outside, just to show the concept. Be clear on three things:</p><ul><li><p>What problem does it solve?</p></li><li><p>Who is the target persona, and why would they care?</p></li><li><p>How does it tie to business value?</p></li></ul><p>Talk to some people from that persona before you build too much. We cannot just build something because we feel it is good. Everything we do in business comes back to protecting revenue, saving cost, or earning new revenue. Know how your idea connects to that before you walk in.</p><h2>4. Be a thinker, not just a doer</h2><p>Abhinav&#8217;s last question was the biggest one. If I were in his position today, with everything I know now, where would I put my energy?</p><p>I would not start with a technology. I would start with my industry and my specific role. I&#8217;d read blogs and publications to find the high-value use cases others are exploring, especially with AI, that I had not considered.</p><p>Then I would build a direct line to my leadership. My manager. My second line. The people who define strategy for the organization.</p><p>I&#8217;d go to them with ideas and see what they are thinking. If they have something else in mind, I&#8217;d research it and come back with findings. That way I&#8217;m helping shape the strategy, not only waiting for the spec.</p><p>We need excellent coders who say, &#8220;Give me the spec, I&#8217;m going to write the code.&#8221; But if you want to grow your career, that alone is not sufficient. Leaders need to see that you are thinking, contributing, and bringing ideas they are not considering. When they say, &#8220;Abhinav, I&#8217;d like you to look into this,&#8221; you do your research quickly and go back. That is how you build trust. And trust is how your value grows in the company.</p><p>I did this from early in my own career at IBM. I always had one-on-ones with my first line manager, from the very beginning. Periodically I had one-on-ones with my second line, my boss&#8217;s boss. Occasionally with my third line, a director or program director, depending on where I was. They knew me, and I shared my work with them. Having conversations across multiple levels of leadership is healthy. It helped me.</p><p>You can start small. But keep doing it on a regular basis.</p><h2>Which one would you try first?</h2><p>Before we wrapped up, I asked Abhinav a question. I shared several ideas. Which one would you apply first?</p><p>He picked the one-on-ones with leadership. &#8220;In the current situation I&#8217;m in, that resonates a lot with me,&#8221; he said.</p><p>One is enough to start.</p><p>I also told him the expectation I set with anyone I mentor. Between two conversations, try something. Come back and tell me what worked and what didn&#8217;t. We can always make tweaks. Talking is good for socializing. But for career growth, conversation alone is not going to cook the meal.</p><p>He said he would come back with results. I&#8217;m looking forward to hearing them.</p><p>Thank you, Abhinav, for reaching out, for teaching me about RPG, and for letting me share our conversation.</p><div><hr></div><p>If you are early in your career, which of these four would you try first? Tell me in the comments. And if you are further along, what would you add?</p>]]></content:encoded></item><item><title><![CDATA[Calibrating your AI judge in 4 steps]]></title><description><![CDATA[When your AI judge says 0.9, is it right 90% of the time? How to check, and how to fix it when it isn&#8217;t.]]></description><link>https://aiarchitectplaybook.com/p/calibrating-your-ai-judge-in-4-steps</link><guid isPermaLink="false">https://aiarchitectplaybook.com/p/calibrating-your-ai-judge-in-4-steps</guid><dc:creator><![CDATA[Shaikh Quader]]></dc:creator><pubDate>Mon, 16 Nov 2026 21:14:29 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!gQF2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe610a23-84f0-408a-8233-c3fdb6cf7417_1080x1350.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_!gQF2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe610a23-84f0-408a-8233-c3fdb6cf7417_1080x1350.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gQF2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe610a23-84f0-408a-8233-c3fdb6cf7417_1080x1350.png 424w, https://substackcdn.com/image/fetch/$s_!gQF2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe610a23-84f0-408a-8233-c3fdb6cf7417_1080x1350.png 848w, https://substackcdn.com/image/fetch/$s_!gQF2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe610a23-84f0-408a-8233-c3fdb6cf7417_1080x1350.png 1272w, https://substackcdn.com/image/fetch/$s_!gQF2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe610a23-84f0-408a-8233-c3fdb6cf7417_1080x1350.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gQF2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe610a23-84f0-408a-8233-c3fdb6cf7417_1080x1350.png" width="1080" height="1350" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fe610a23-84f0-408a-8233-c3fdb6cf7417_1080x1350.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1350,&quot;width&quot;:1080,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:225072,&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://aiarchitectplaybook.com/i/225256017?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe610a23-84f0-408a-8233-c3fdb6cf7417_1080x1350.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_!gQF2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe610a23-84f0-408a-8233-c3fdb6cf7417_1080x1350.png 424w, https://substackcdn.com/image/fetch/$s_!gQF2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe610a23-84f0-408a-8233-c3fdb6cf7417_1080x1350.png 848w, https://substackcdn.com/image/fetch/$s_!gQF2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe610a23-84f0-408a-8233-c3fdb6cf7417_1080x1350.png 1272w, https://substackcdn.com/image/fetch/$s_!gQF2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe610a23-84f0-408a-8233-c3fdb6cf7417_1080x1350.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><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>The four steps in one picture.</em></p><p>In my first hands-on exercise with Jev, I gave an LLM judge and Jev the same RAG answers. For each answer, both judges returned a probability that the answer was backed by its context. I applied a 0.5 cutoff to both and compared their decisions.</p><p>What I did not check was whether those probabilities meant what they said. If a judge says 0.9, is the answer backed 9 times out of 10? That question has a name: calibration.</p><p>Now that decision models like Jev have got attention, we keep hearing terms like calibration, recalibration, and reliability diagram. This newsletter is for engineers who use a model as a judge and want to know when to trust its numbers. I&#8217;ll walk through four terms in the order you use them, run one example through all four, and end with a short checklist.</p><h2>What the judge gives you</h2><p>A judge is a model you use to evaluate another model&#8217;s output. It can be an LLM or a decision model like Jev. Instead of a plain yes or no, it can give you a probability.</p><p>In RAG, a common question for the judge is: is this answer backed by the retrieved context? The judge&#8217;s probability is the chance that the answer is backed. A 0.9 means the judge thinks the answer is very likely backed. A 0.2 means it thinks the answer is likely not backed.</p><p>To check a judge, you need a second thing for each answer: a label from a person who read the answer and the context. So for every answer you hold two values. The judge&#8217;s probability, which is a guess. And the human label, which is the truth. <strong>Every term below compares these two.</strong></p><h2>Four terms, in order</h2><p>The first term is the goal. The next two measure how far you are from it. The last one fixes the gap.</p><h3>Step 1: Calibration</h3><p>A judge is calibrated when its probabilities match reality. Of all the answers the judge scores around 0.8, about 80% should actually be backed by the context.</p><p>Think of a weather forecaster. Look back at every day the forecaster said &#8220;70% chance of rain.&#8221; If it rained on about 70% of those days, you can plan around the forecaster&#8217;s numbers. If it rained on 12% of them, you can&#8217;t take the number at face value.</p><p><strong>Calibration is about a group of answers, not one answer.</strong> A 0.8 does not promise that a particular answer is backed. It says that about 8 in 10 answers scored like it are backed.</p><h3>Step 2: Reliability curve</h3><p>The reliability curve, also called a reliability diagram, shows whether a judge is calibrated. Group the answers into buckets by the judge&#8217;s probability: 0.0 to 0.1, 0.1 to 0.2, and so on. For each bucket, plot the average probability against the share of answers in that bucket that are actually backed.</p><p>A calibrated judge sits on the diagonal line. A point below the line means the judge is overconfident in that range. A point above it means the judge is underconfident.</p><h3>Step 3: Expected calibration error (ECE)</h3><p>ECE turns the reliability curve into one number. It is the average gap between each bucket and the diagonal, weighted by how many answers fall in that bucket. A crowded bucket counts more than a nearly empty one. Zero is perfect.</p><p>The reliability curve and ECE are diagnostic tools. They tell you how well a judge is calibrated, but they do not change the judge&#8217;s probabilities.</p><h3>Step 4: Recalibration</h3><p>Recalibration is the fix. You fit a correction on labeled data so the judge&#8217;s probabilities match reality. Common methods are Platt scaling, isotonic regression, and temperature scaling.</p><p>Fit the correction on one part of your labeled data and check it on another part. If you check on the same answers you fit on, the result usually looks better than it really is.</p><h2>One example, all four steps</h2><p>The numbers here are made up to show the method.</p><p>Say you have 200 RAG answers. People have labeled each one as backed by the retrieved context or not backed: 89 are backed and 111 are not. You give the judge each answer with its question and context, but not the label. The judge returns a probability that the answer is backed.</p><p>Now group the answers by the judge&#8217;s probability and count the labels in each group.</p><ul><li><p><strong>0.85 or higher:</strong> 80 answers. Average probability 0.9. 56 actually backed, so 70%. Gap 0.2.</p></li><li><p><strong>0.5 to 0.85:</strong> 70 answers. Average probability 0.6. 28 actually backed, so 40%. Gap 0.2.</p></li><li><p><strong>Below 0.5:</strong> 50 answers. Average probability 0.3. 5 actually backed, so 10%. Gap 0.2.</p></li></ul><p><strong>Reliability curve.</strong> Plot each group: average probability on one axis, share backed on the other. All three points sit 0.2 below the diagonal. The judge is overconfident in all three buckets.</p><p><strong>ECE.</strong> Every bucket is off by 0.2, so the weighted average is 0.2.</p><p><strong>The decision this changes.</strong> Say your rule is to auto-accept any answer the judge scores 0.85 or higher. You expect about 9 in 10 accepted answers to be backed. The reliability curve shows the real number is 7 in 10. <strong>So 3 in every 10 answers you accept without review are not backed by the context.</strong></p><p><strong>Recalibration.</strong> You fit a correction on 100 of the labeled answers and test it on the other 100. After the correction, a 0.9 becomes about 0.7, and ECE on the test answers drops to, say, 0.03.</p><p>Now the judge&#8217;s 0.7 means about 70%, and you can decide with real numbers. Is 70% good enough to skip review? If not, these answers go to a person.</p><h2>Calibration is not your threshold</h2><p>These two get mixed up, so go back to the example. Before recalibration, the judge&#8217;s 0.9 means about 70% backed. Say you raise your auto-accept cutoff from 0.85 to 0.95. You now accept fewer answers. But the judge&#8217;s scores have not changed, so a 0.9 still means about 70%. A threshold decides where you draw the line. It does not change what the numbers mean.</p><p>Recalibration is what changes the numbers. After it, the same answers score about 0.7, and 0.7 means about 70%. <strong>Calibrate first, so the numbers are honest. Pick the threshold last, based on what each kind of mistake costs you.</strong></p><p>Recalibration also has a limit. Platt scaling, isotonic regression, and temperature scaling do not reverse the order of the judge&#8217;s scores. So recalibration does not make the judge better at telling backed answers from the rest. It makes the judge&#8217;s probabilities mean what they say, so the rules you build on them work as you expect.</p><p>One more source of confusion: when engineers say they &#8220;calibrated the judge,&#8221; they often mean they tuned its prompt or rubric until its verdicts agreed with human labels. That is agreement. A judge can agree with people most of the time and still give badly calibrated probabilities.</p><h2>Before you trust a judge&#8217;s score</h2><ol><li><p>Collect a few hundred answers from your real task, labeled by people.</p></li><li><p>Run the judge and keep its raw probability for each answer.</p></li><li><p>Plot the reliability curve and compute ECE. Look at where the judge is over- or underconfident.</p></li><li><p>If the probabilities are off, recalibrate on part of the data and check again on the rest.</p></li><li><p>Set your threshold last, based on what each kind of mistake costs.</p></li><li><p>Check again after any change to the model, the prompt, or the kind of inputs you send.</p></li></ol><p>Adding a judge to your pipeline is the easy part. Before you build rules on its numbers, check what they mean.</p><p>Have you checked a judge&#8217;s probabilities against human labels? I&#8217;d like to hear what you found.</p><p>If you know someone setting up their first judge, send this to them.</p><h2>Further reading</h2><ul><li><p><a href="https://proceedings.mlr.press/v70/guo17a.html">On Calibration of Modern Neural Networks</a>, Guo, Pleiss, Sun and Weinberger, ICML 2017. A widely cited paper on calibration, reliability diagrams, ECE, and temperature scaling.</p></li><li><p><a href="https://doi.org/10.1007/s10994-023-06336-7">Classifier calibration: a survey on how to assess and improve predicted class probabilities</a>, Silva Filho et al., Machine Learning, 2023. A broader survey of how to measure and fix calibration.</p></li><li><p><a href="https://www.linkedin.com/feed/update/urn:li:activity:7518355470206590976">How To Use Decision Models For Evals</a>, Hamel Husain, October 2026. On choosing a decision model and tuning its threshold.</p></li></ul>]]></content:encoded></item><item><title><![CDATA[Machine learning is only needed when we do not know the exact formula]]></title><description><![CDATA[A mentoring session on the core ideas of supervised machine learning, in 7 minutes.]]></description><link>https://aiarchitectplaybook.com/p/machine-learning-is-only-needed-when</link><guid isPermaLink="false">https://aiarchitectplaybook.com/p/machine-learning-is-only-needed-when</guid><dc:creator><![CDATA[Shaikh Quader]]></dc:creator><pubDate>Sat, 14 Nov 2026 18:04:38 GMT</pubDate><enclosure url="https://substackcdn.com/image/youtube/w_728,c_limit/1JZeRLjSM-k" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A calculator does not need machine learning. Two plus two is always four.</p><p>Machine learning is only needed when we do not know the exact formula. That was the main idea in my mentoring session yesterday with Peddinti Bharadwaj.</p><h3>The session</h3><p>Peddinti is a QA engineer who is beginning with ML foundations. Since our previous call a week earlier, he had reviewed the concepts behind supervised machine learning: models, estimators, and how inputs map to an output.</p><p>I had pointed him to <em><a href="https://www.statlearning.com">An Introduction to Statistical Learning</a></em>, by Gareth James, Daniela Witten, Trevor Hastie, and Robert Tibshirani. The authors make the book free to download at statlearning.com. Peddinti read from it and asked an AI chat to add real world scenarios.</p><p>I recorded our session and cut the key ideas into a 7-minute video.</p><div id="youtube2-1JZeRLjSM-k" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;1JZeRLjSM-k&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/1JZeRLjSM-k?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><p>Below are the same ideas in writing, in the order I explained them to Peddinti.</p><h3>1. Observations: inputs and an output</h3><p>Supervised machine learning starts with observations. Each observation is a set of inputs and an output.</p><p>I used my own example. Each day I record my activities: hours worked, steps, calories, and sleep. The next morning, I measure my weight. My activities are the inputs. My weight is the output.</p><h3>2. The perfect equation, F</h3><p>Now assume there is a perfect equation, F, that maps all the inputs to the output with 100% accuracy.</p><p>If we had complete knowledge of all the inputs, we would not need a learning algorithm. We could write a program, like a calculator. Two plus two, always four.</p><h3>3. F hat, the estimator</h3><p>In the real world, we do not know F. So from observations, we model the relationship between input and output. This model is F hat, an estimator, closer to the real F.</p><p>F hat will never be 100% accurate. If we could get 100% accuracy, &#8220;that&#8217;s not a learning problem anymore.&#8221;</p><p>Every learning task has some form of this estimation, including LLMs.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dP3R!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9640961-51b6-4456-b98c-8625a21faa27_2000x1150.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dP3R!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9640961-51b6-4456-b98c-8625a21faa27_2000x1150.png 424w, https://substackcdn.com/image/fetch/$s_!dP3R!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9640961-51b6-4456-b98c-8625a21faa27_2000x1150.png 848w, https://substackcdn.com/image/fetch/$s_!dP3R!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9640961-51b6-4456-b98c-8625a21faa27_2000x1150.png 1272w, https://substackcdn.com/image/fetch/$s_!dP3R!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9640961-51b6-4456-b98c-8625a21faa27_2000x1150.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!dP3R!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9640961-51b6-4456-b98c-8625a21faa27_2000x1150.png" width="1456" height="837" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d9640961-51b6-4456-b98c-8625a21faa27_2000x1150.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:837,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:116798,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://aiarchitectplaybook.com/i/224915666?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9640961-51b6-4456-b98c-8625a21faa27_2000x1150.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_!dP3R!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9640961-51b6-4456-b98c-8625a21faa27_2000x1150.png 424w, https://substackcdn.com/image/fetch/$s_!dP3R!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9640961-51b6-4456-b98c-8625a21faa27_2000x1150.png 848w, https://substackcdn.com/image/fetch/$s_!dP3R!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9640961-51b6-4456-b98c-8625a21faa27_2000x1150.png 1272w, https://substackcdn.com/image/fetch/$s_!dP3R!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9640961-51b6-4456-b98c-8625a21faa27_2000x1150.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><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><h3>4. &#8220;How do we estimate?&#8221;</h3><p>This was Peddinti&#8217;s question. He added, &#8220;This is where I&#8217;m getting a lot of confusion.&#8221;</p><p>The first step is data collection. Without data, we cannot learn the relationship between input and output.</p><p>With the data in hand, we try different learning algorithms. The type of output tells you the type of problem. Predicting a number is a regression problem. Predicting a label, such as whether an email is fraud, is a classification problem. Experiment to see which algorithm does a better job on your data set. An AI coding agent can set up experiments that compare the algorithms.</p><h3>5. A continuous learning loop</h3><p>Once you pick a model, keep checking it. As new observations become available, check whether last week&#8217;s model is still doing a good job or its accuracy is dropping. If accuracy drops, update the model.</p><h3>Peddinti&#8217;s next step</h3><p>These ideas stick better when you apply them to a problem you care about. So I asked Peddinti to find a use case from his personal or work life that he can write about publicly. Nothing sensitive or confidential.</p><p>The output should be something he can measure. Energy level, for example, would be a guess.</p><p>He had an idea during our call: the petrol consumption of his bike against the traffic at each junction on his way to the office. I told him to brainstorm with an AI chat and ask it to interview him about whether he has the data.</p><h3>Why your own data</h3><p>I do the same with my own data. I log my food, calories, macro breakdown, protein, water, and step count, and I measure my weight every morning. I have this data from the last few years, so I can build these models on it.</p><p>That is what I want for Peddinti, and for you if you are starting with machine learning: your own data, your own problem, your own learning task.</p>]]></content:encoded></item><item><title><![CDATA[New grads in AI: your ML foundations are not gone]]></title><description><![CDATA[Building a career in AI as a new grad: what to focus on. From a mentoring session with my mentee, Arham Mohammed, ML Intern at IBM.]]></description><link>https://aiarchitectplaybook.com/p/career-in-ai-new-grad-what-to-focus-on</link><guid isPermaLink="false">https://aiarchitectplaybook.com/p/career-in-ai-new-grad-what-to-focus-on</guid><dc:creator><![CDATA[Shaikh Quader]]></dc:creator><pubDate>Fri, 06 Nov 2026 03:14:13 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/607dd6f1-060d-43cf-b65f-515f2b2261c8_2400x1260.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Arham started his journey with ML fundamentals. Linear regression, the tree models, then deep learning, CNNs, LSTMs, transformers, and RAG. Then he looked at where the field is going, and he told me:</p><blockquote><p>&#8220;I spent like two years of my life completely learning each and every mathematical formulas behind every neural network... But coming to the future, what I could see is like people are just prompting out things. I was in the doubt.&#8221;</p></blockquote><p>His question was simple. Everything is evolving so fast. What should a new grad focus on? Go deep on one topic, or have knowledge of every topic?</p><p>We recorded the full session. It runs 12:56.</p><div id="youtube2-a6EzrzoEo4A" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;a6EzrzoEo4A&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/a6EzrzoEo4A?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><p>My answer, to Arham and to any software engineering or computer science new grad who wants to build a career in AI: do not feel lost on your effort in learning core machine learning techniques. Those are not gone. I like to see this in three layers.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GWrz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17015346-1604-4d93-aa83-77580e76b2e7_2912x1646.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GWrz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17015346-1604-4d93-aa83-77580e76b2e7_2912x1646.png 424w, https://substackcdn.com/image/fetch/$s_!GWrz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17015346-1604-4d93-aa83-77580e76b2e7_2912x1646.png 848w, https://substackcdn.com/image/fetch/$s_!GWrz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17015346-1604-4d93-aa83-77580e76b2e7_2912x1646.png 1272w, https://substackcdn.com/image/fetch/$s_!GWrz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17015346-1604-4d93-aa83-77580e76b2e7_2912x1646.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GWrz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17015346-1604-4d93-aa83-77580e76b2e7_2912x1646.png" width="1456" height="823" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/17015346-1604-4d93-aa83-77580e76b2e7_2912x1646.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:823,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:459019,&quot;alt&quot;:&quot;Three layers to focus on: the AI/ML foundation, application architecture patterns, and agentic coding.&quot;,&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://aiarchitectplaybook.com/i/223713734?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17015346-1604-4d93-aa83-77580e76b2e7_2912x1646.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Three layers to focus on: the AI/ML foundation, application architecture patterns, and agentic coding." title="Three layers to focus on: the AI/ML foundation, application architecture patterns, and agentic coding." srcset="https://substackcdn.com/image/fetch/$s_!GWrz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17015346-1604-4d93-aa83-77580e76b2e7_2912x1646.png 424w, https://substackcdn.com/image/fetch/$s_!GWrz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17015346-1604-4d93-aa83-77580e76b2e7_2912x1646.png 848w, https://substackcdn.com/image/fetch/$s_!GWrz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17015346-1604-4d93-aa83-77580e76b2e7_2912x1646.png 1272w, https://substackcdn.com/image/fetch/$s_!GWrz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17015346-1604-4d93-aa83-77580e76b2e7_2912x1646.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><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>Layer 1: The AI/ML foundation</h2><p>This are the learning algorithms, how machine learns, and how to evaluate them. I would strongly encourage you not to skip that foundation.</p><p>Even though you could easily generate a classification model or a regression model with a prompt, understand those foundations. Have a strong intuition of how different algorithms work, how boosting trees like XGBoost work. Have this mental model, this intuition, and know how to evaluate them.</p><p>The ML evaluation part is the one I find very relevant even with current AI evals. How we evaluate classification models. Confusion matrix, recall, precision. How we construct ground truth. You will find those fundamentals everywhere, even in all the AI evals we keep hearing about and in RAG evaluation. Some of these are coined using different terms, maybe a golden eval set. But you keep seeing the old discipline of how ML systems are evaluated. It is very much part of the latest AI system evaluation.</p><h2>Layer 2: Application architecture patterns</h2><p>Keep watching the application architecture patterns. RAG is one. Agentic systems are another. There will be more.</p><p>You may not need to be the expert on everything, but try to have a high-level understanding of each. Then go deep on the one relevant to your work. If you are working with RAG, try to see how to make RAG work, how to build a RAG system that works in production, and how to evaluate it. Try to understand all aspects of it.</p><p>Soon something else will come up, some other architecture pattern. You will see many of the things you learned are relatable.</p><h2>Layer 3: Agentic coding</h2><p>Use coding agents for building high quality software. It is not just coming up with a prompt and generating thousands of lines of code. It is bringing your knowledge of software engineering, then iteratively planning, generating code, and doing verification.</p><p>Code generation is now very cheap. But producing high quality code with a coding agent is really tough.</p><p>Practitioners are putting together processes for this. Loop engineering was introduced several months ago. There has been graph engineering. Software factory is another one. Keep using them and trying them. Learning and mastering this software engineering process, using AI coding agents effectively, is very important.</p><p>Whatever you are doing, do it in the best possible way. Quality is non-negotiable. There is no quick fix that skips the quality part.</p><p>Compared to those who are jumping straight to building AI applications without foundations in AI or machine learning and software engineering, you will be ahead of them. Do not skip those foundations.</p><h2>Write it in your own words</h2><p>I gave Arham one more piece of advice. Keep writing about the core ML concepts you have learned. Not with an LLM prompt. You can use it for polishing your draft. But share your own understanding in writing. Once you have this first pass writing, you can always edit and proofread using an LLM. Bring your own understanding and share this knowledge. That is what we need more of.</p><h2>Where we started: is RAG still needed?</h2><p>Our conversation actually started with RAG. Arham had seen a new model come into the market with one trillion parameters. He asked:</p><blockquote><p>&#8220;Do you think RAG will still be required or we can just directly dump the whole documents to the LLM and it can be able to get the answers for us?&#8221;</p></blockquote><p>Dumping a very large document to the LLM has some limitations. When you are asking a question, the entire document is not the answer. If your document has 500 pages, maybe some paragraph or some part of it is where the answer is. LLM still need to do some search and find which part of that large document has your answer.</p><p>The first problem is cost. If you are going to a commercial LLM running on the cloud, you will be paying for a lot of tokens unnecessarily. There are some caching capabilities as well, but there will still be cost.</p><p>The second is noise. You are giving the LLM a lot more information than what it needs. Say it is a book of ten chapters, and your answer is in one chapter, in some paragraphs. It is information overload. The LLM might be able to find the right context, but it is going to require some computation, and it will also get noise.</p><p>The cleaner approach is a pipeline that extracts the right context and gives it to the LLM. You are not giving the noise. You are giving the signal.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mYLa!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30f09f1e-94fa-4783-948b-6d3d7e01ea24_2912x1336.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mYLa!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30f09f1e-94fa-4783-948b-6d3d7e01ea24_2912x1336.png 424w, https://substackcdn.com/image/fetch/$s_!mYLa!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30f09f1e-94fa-4783-948b-6d3d7e01ea24_2912x1336.png 848w, https://substackcdn.com/image/fetch/$s_!mYLa!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30f09f1e-94fa-4783-948b-6d3d7e01ea24_2912x1336.png 1272w, https://substackcdn.com/image/fetch/$s_!mYLa!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30f09f1e-94fa-4783-948b-6d3d7e01ea24_2912x1336.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!mYLa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30f09f1e-94fa-4783-948b-6d3d7e01ea24_2912x1336.png" width="1456" height="668" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/30f09f1e-94fa-4783-948b-6d3d7e01ea24_2912x1336.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:668,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:373260,&quot;alt&quot;:&quot;Sending the whole 500-page document to the LLM versus a retrieval pipeline that extracts the right context.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://aiarchitectplaybook.com/i/223713734?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30f09f1e-94fa-4783-948b-6d3d7e01ea24_2912x1336.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Sending the whole 500-page document to the LLM versus a retrieval pipeline that extracts the right context." title="Sending the whole 500-page document to the LLM versus a retrieval pipeline that extracts the right context." srcset="https://substackcdn.com/image/fetch/$s_!mYLa!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30f09f1e-94fa-4783-948b-6d3d7e01ea24_2912x1336.png 424w, https://substackcdn.com/image/fetch/$s_!mYLa!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30f09f1e-94fa-4783-948b-6d3d7e01ea24_2912x1336.png 848w, https://substackcdn.com/image/fetch/$s_!mYLa!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30f09f1e-94fa-4783-948b-6d3d7e01ea24_2912x1336.png 1272w, https://substackcdn.com/image/fetch/$s_!mYLa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30f09f1e-94fa-4783-948b-6d3d7e01ea24_2912x1336.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><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>RAG is still one of the high value LLM use cases out there. LLMs have frozen knowledge. Whatever they learned during training is not updated. RAG is an architecture fix to bring in this knowledge, a mechanism to ground the LLM on a company&#8217;s own knowledge.</p><p>We are already seeing a lot of progress is improving the RAG workflow:</p><ul><li><p><strong>Hybrid search.</strong> Combining lexical search with vector search.</p></li><li><p><strong>Multi-vector representations.</strong> A standard vectorization turns a paragraph of, say, 100 words or tokens into a single numeric representation. In that process you lose a lot of the low-level details. A multi-vector representation looks into all the tokens and keeps one vector for each token. It is more granular, and computationally more expensive, but it is a richer representation.</p></li><li><p><strong>Rerankers.</strong> The reranker is stage two. The first stage is retrieval with vector search and keyword search, which gives you broader search results. You pass those to a reranker model, which does further post-processing and gives you a more accurate answer.</p></li></ul><p>A lot of improvements are happening, and many companies will continue to use RAG.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8EKs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5178562-98db-4a23-ba20-2fff6df6f0e2_2912x1464.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8EKs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5178562-98db-4a23-ba20-2fff6df6f0e2_2912x1464.png 424w, https://substackcdn.com/image/fetch/$s_!8EKs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5178562-98db-4a23-ba20-2fff6df6f0e2_2912x1464.png 848w, https://substackcdn.com/image/fetch/$s_!8EKs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5178562-98db-4a23-ba20-2fff6df6f0e2_2912x1464.png 1272w, https://substackcdn.com/image/fetch/$s_!8EKs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5178562-98db-4a23-ba20-2fff6df6f0e2_2912x1464.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!8EKs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5178562-98db-4a23-ba20-2fff6df6f0e2_2912x1464.png" width="1456" height="732" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b5178562-98db-4a23-ba20-2fff6df6f0e2_2912x1464.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:732,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:450239,&quot;alt&quot;:&quot;Hybrid search, multi-vector representations, and the reranker as stage two.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://aiarchitectplaybook.com/i/223713734?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5178562-98db-4a23-ba20-2fff6df6f0e2_2912x1464.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Hybrid search, multi-vector representations, and the reranker as stage two." title="Hybrid search, multi-vector representations, and the reranker as stage two." srcset="https://substackcdn.com/image/fetch/$s_!8EKs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5178562-98db-4a23-ba20-2fff6df6f0e2_2912x1464.png 424w, https://substackcdn.com/image/fetch/$s_!8EKs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5178562-98db-4a23-ba20-2fff6df6f0e2_2912x1464.png 848w, https://substackcdn.com/image/fetch/$s_!8EKs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5178562-98db-4a23-ba20-2fff6df6f0e2_2912x1464.png 1272w, https://substackcdn.com/image/fetch/$s_!8EKs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5178562-98db-4a23-ba20-2fff6df6f0e2_2912x1464.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><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>Watch the session</h2><p>The video at the top of this post is the full mentoring session with Arham. It covers everything here, plus the diagrams for hybrid search, multi-vector representations and rerankers.</p><p>Watch it on YouTube: </p><div id="youtube2-a6EzrzoEo4A" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;a6EzrzoEo4A&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/a6EzrzoEo4A?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div>]]></content:encoded></item><item><title><![CDATA[Evaluating a classifier when you only have 31 rows]]></title><description><![CDATA[Cross-validation, signal leakage, and why a train/test split fails on a small dataset]]></description><link>https://aiarchitectplaybook.com/p/evaluating-a-classifier-when-you</link><guid isPermaLink="false">https://aiarchitectplaybook.com/p/evaluating-a-classifier-when-you</guid><dc:creator><![CDATA[Shaikh Quader]]></dc:creator><pubDate>Fri, 23 Oct 2026 16:30:23 GMT</pubDate><enclosure url="https://substackcdn.com/image/youtube/w_728,c_limit/zy7jdcNKMq0" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Ahmed built a multi-class classification model that predicts his sleep quality for a given night. Three class labels: good, okay, bad. Thirty-one days of data on his sleep. He also did feature engineering, and a few things in it show good thinking.</p><p>He recognized that 31 examples is a very small dataset. With a traditional 80/20 train-test split, you train on about 25 examples and test on six. That is not that good. So I asked him how many folds of cross-validation he used. That question opened up the rest of our session.</p><h3>The mentoring session</h3><p>This is a recorded mentoring session with Ahmed Barakat, a 3rd year student of AI at the Durham College in Ontario. We went through the evaluation of his model: separating features from the label, why a train/test split falls short at 31 examples, cross-validation step by step, simplifying to binary classification, the metrics to understand (precision, recall, F1 and the confusion matrix), and tracking experiments. We close on why I asked him not to rush to the next learning topic.</p><div id="youtube2-zy7jdcNKMq0" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;zy7jdcNKMq0&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/zy7jdcNKMq0?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><h3>A good instinct: separating features from the label</h3><p>He used the data from each day. The features come from his activities during the day, and the label, whether he had a good night of sleep or not, is an event that happened later. </p><p>I am not sure if he consciously made this decision, but it is a good practice to have this time series division. In the timeline of events, his sleep is the very last event that happened. He has a series of activities, so his features are happening earlier in the timeline. </p><p>One thing I have seen people do, and I made those mistakes earlier myself: say I am predicting my energy level during the day, and then I include some features from something I am doing at the very end of the day. That means I am predicting something based on features that may not be available at that time, or that may be happening at the same time.</p><h2>Signal leakage</h2><p>This is called signal leakage. Signal leakage means you cannot have the ML algorithm cheating, which means it has knowledge of the future when it is making the prediction. It is cheating.</p><p>It is like writing an exam when you have some of the exam questions in your hand.</p><p>So we need to have a strict time partition between the feature space and the labels, because the label is the outcome. The features are the input. The input needs to be completed before the outcome happens.</p><p>Whether he did it intentionally or just by chance, either way it is a good thing to remember: signal leakage.</p><h2>Why a train/test split falls short with 31 examples</h2><p>The other thing I liked is that Ahmed recognized he had a very small dataset, 31 examples.</p><p>He told me what that did to him. At first he wanted to do just seven days of examples, but it was not enough. There was not really much to go on, and he did not even have all three showing up. It was all good and then maybe one bad night of sleep. So he added more days data, and he thought around a month is a good number.</p><h2>Cross-validation step by step</h2><p>In cross-validation he is not training a single model. He is training many models. Each time he takes a slice of the entire dataset for model training, and uses another slice for model evaluation. Then in each training run he shifts the training partition and shifts the test partition. </p><p>An extreme scenario is leave-one-out. With 31 training examples he could train 31 models. He gives a number to each training example, one through 31, each with an ID. He takes the first 30 examples for model training. Using this trained model, he predicts the sleep quality for night 31. He records this, then shifts. Night 31, which was the single test example, now becomes part of the training set, and he picks another example from the previous training set and makes it the test. He keeps looping this 31 times. Each time there are exactly 30 training examples and one test example. Then he takes the average. </p><p>There are other cross-validation setups. He could also do 10-fold cross-validation, which means making 10 equal partitions. With 31 examples, each partition will have roughly three. Now he trains the model 10 times. Each time he takes nine partitions, combines them, and this becomes the training set. He trains the model and uses one of the 10 partitions for evaluation. He keeps repeating, and in each training run a different partition becomes the test. Then he has the scores, and he averages them. </p><p>He used three-fold cross-validation. </p><p>Understanding cross-validation matters because he makes the most of his examples for both training and evaluation, and gets a more robust and more accurate measure of model performance.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!O97J!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf4c6bc8-aa65-454d-a121-d204fa80c3ba_1080x1350.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!O97J!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf4c6bc8-aa65-454d-a121-d204fa80c3ba_1080x1350.png 424w, https://substackcdn.com/image/fetch/$s_!O97J!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf4c6bc8-aa65-454d-a121-d204fa80c3ba_1080x1350.png 848w, https://substackcdn.com/image/fetch/$s_!O97J!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf4c6bc8-aa65-454d-a121-d204fa80c3ba_1080x1350.png 1272w, https://substackcdn.com/image/fetch/$s_!O97J!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf4c6bc8-aa65-454d-a121-d204fa80c3ba_1080x1350.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!O97J!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf4c6bc8-aa65-454d-a121-d204fa80c3ba_1080x1350.png" width="1080" height="1350" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/af4c6bc8-aa65-454d-a121-d204fa80c3ba_1080x1350.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1350,&quot;width&quot;:1080,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:122564,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://aiarchitectplaybook.com/i/221801637?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf4c6bc8-aa65-454d-a121-d204fa80c3ba_1080x1350.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_!O97J!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf4c6bc8-aa65-454d-a121-d204fa80c3ba_1080x1350.png 424w, https://substackcdn.com/image/fetch/$s_!O97J!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf4c6bc8-aa65-454d-a121-d204fa80c3ba_1080x1350.png 848w, https://substackcdn.com/image/fetch/$s_!O97J!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf4c6bc8-aa65-454d-a121-d204fa80c3ba_1080x1350.png 1272w, https://substackcdn.com/image/fetch/$s_!O97J!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf4c6bc8-aa65-454d-a121-d204fa80c3ba_1080x1350.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><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>Compare algorithms with a fixed evaluation setup</h2><p>Once the model evaluation steps are hardened, meaning the cross-validation, the next thing I asked him to try is a few different algorithms, such as XGBoost and logistic regression. He can try a bunch of algorithms. It is easy. </p><p>For each algorithm, he keeps the evaluation pipeline fixed, but switches the algorithms. He also keeps recording the model's performance: accuracy, precision, recall. In a three-class classification task there are numbers for each of these classes.</p><h2>Simplify to binary classification</h2><p>For the sake of simplicity, I asked him to simplify his classification task to binary classification: did he have a good night of sleep or a bad one? He can combine the okay class with either one. He can take the okay labels to be part of good. </p><p>He already created the dataset, so all I am suggesting is that he re-label all the nights where he had okay sleep. He could relabel them as good, or make them bad, either way. If he has very few bad, he can take the okay to be bad. It does not matter during learning. I just want to keep the classification task a bit simpler so that he can spend more time on model evaluation and learn those things. </p><p>So he keeps the dataset and the learning task relatively simple, which means he only focuses on binary classification. His sleep is good or bad. </p><h2>Homework: precision, recall, F1, confusion matrix</h2><ul><li><p>Convert the current dataset into two classes, so all the sleeps are either good or bad.</p></li><li><p>Spend more time understanding accuracy, precision, recall. Compute those scores and understand them.</p></li><li><p>Look into cross-validation and the confusion matrix, and calculate all these numbers so that you understand them.</p></li><li><p>F1 is a good one too. Understand these performance metrics.</p></li></ul><h2>Hyperparameters and experiment tracking</h2><p>Keeping this simpler setup, he tries other learning algorithms. For each algorithm, he starts with a simple hyperparameter configuration. For XGBoost, for example, he can start with fewer trees, maybe 100. Then he tries other variations: increasing the number of trees, tuning some of the hyperparameters, and seeing if the model's evaluation metrics jump or change. This is very important, so that he knows which tweaks are improving his model's performance. </p><p>More importantly, he keeps track of these experiments. For this particular model configuration and these hyperparameters, here is the accuracy he got. Then he made some changes, and here is the improvement he got. There are experiment tracking tools like MLflow. He can search, or ask Claude or another coding agent. It can come up with recommendations and actually set up his experiment tracker. </p><p>Otherwise, if he keeps changing a single notebook, he has no history to go back to. He cannot compare which hyperparameter configuration gave him which number. He has nothing to compare against. So he should not keep changing the code in the same notebook. He could have multiple notebooks, or there are better ways of tracking experiments. </p><p>If he gives the prompt to a coding agent, it will help him with this. He does not have to do many of these things by hand. </p><h2>Master the basics first</h2><p>There is no need to rush. I asked him master the model evaluation really well, because this will keep coming back to him often. We want a good foundation here before we move to other things. </p><p>I am not asking him to finish all of this before our next call. He should just make some progress and ping me, and then we&#8217;ll have our next chat. </p>]]></content:encoded></item><item><title><![CDATA[Software Factory: What It Is and What It Is Not]]></title><description><![CDATA[What changes when agents take the software engineering work and human engineers keep the judgment.]]></description><link>https://aiarchitectplaybook.com/p/software-factory-what-it-is-and-what</link><guid isPermaLink="false">https://aiarchitectplaybook.com/p/software-factory-what-it-is-and-what</guid><dc:creator><![CDATA[Shaikh Quader]]></dc:creator><pubDate>Tue, 22 Sep 2026 03:19:15 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/0c8c462b-cbd4-4c94-b994-ddf1c59709c0_1200x630.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When I recently started seeing Software Factory pop up on social media, I was not sure what it was about. I knew it had to do with agentic coding. I had thought that it was a fully automated software development process without a human in the loop. I was mostly wrong.</p><p>I came across a <a href="https://vercel.com/blog/building-a-software-factory-for-ai-sdk">Vercel blog post</a> on how they implemented their homegrown software factory for the AI SDK. It clarified how people have started putting the software factory into practice. What I found wasn&#8217;t a way to remove the human. It was a way to stop routing every single change through one human&#8217;s attention.</p><p>Let me put together a definition of software factory in my own words. </p><blockquote><p>Software Factory is a multi-agent system deployed across the software engineering process, from the very first step (creating issues, bug reports, or feature requests) all the way to shipping the code. In other words, the requirements and fixes that go into the next iteration of software. And it applies to new software too, not just existing code.</p></blockquote><p>In a traditional software engineering process, the release of a new feature or a fix goes through many steps, such as:</p><ul><li><p>If it&#8217;s a new feature request, putting together a design.</p></li><li><p>Initial implementation, which needs to be evaluated, improved, and validated against the initial requirement.</p></li><li><p>Quality checking (QA).</p></li><li><p>Performance testing, and if it meets the bar, it goes out to production.</p></li><li><p>Feature documentation on how the feature works.</p></li></ul><p>Every one of these steps used to take human efforts. That&#8217;s the part that changes.</p><p>All these steps, before agentic coding became a thing, were done by human engineers. Now that we have scaled up the production of software artifacts with AI coding agents, we have more code and more requirements coming up at a speed that is hard for human engineers to handle end to end by hand.</p><p>The idea is that for each software engineering step, whether building a new feature or fixing a bug, there is a specialized agent. At Vercel, that means a separate agent for each step in the pipeline, not one agent doing everything. Each agent gets its own prompts, context, and evals. It is refined for its task and measured on its performance.</p><p>Then the human engineers assume the role of reviewers, not doers, looking at what the army of agents is producing. They are the final gatekeepers to ensure that what gets delivered meets the quality bar.</p><p>This is how Vercel implemented it for the AI SDK. The AI SDK is a big open-source project, over 20 million npm downloads a week, and the repo has more than 26,000 stars. Keeping a codebase like that healthy means watching four things move at the same time: the model providers, the UI frameworks, the sandboxes the agents run in, and the harnesses. After a few years of growth, the repo was getting 100+ new issues every month. When Anthropic&#8217;s Opus 4.6 model came out, the pull requests hit an inflection point. By late June, they had over 1,000 open issues and almost 800 pull requests sitting there.</p><p>And this is the part that matters: you cannot fix that backlog by hiring more maintainers or asking the ones you have to work harder. Because generating code is cheap now, the pile only gets bigger. So instead of trying to scale themselves, they built a software factory. Four weeks in, it authors between 25 and 35% of the PRs they merge and closes 70 to 80% of their issues.</p><p>They started with an agent that classifies incoming issues as a bug, a feature request, or a documentation update. Once that agent achieved a high level of accuracy, they moved on to the next step.</p><p>For example, if it&#8217;s a bug report, another agent sets up an isolated environment and works on reproducing the bug. Another agent fixes it, and another reviews the PR. There are also agents for feature analysis, feature implementation, documentation updates, and backports to older versions. Each agent hands off to the next, and some of these runs go in parallel. Each agent is evaluated and improved in isolation.</p><p>It&#8217;s not one monolithic agent doing everything from beginning to end. If some agent is not reaching the bar, it can be isolated and improved on its own through better prompts, better context, or new eval cases.</p><p>The repo is open source, so anyone can open an issue or leave a comment, and the factory has to treat all of it as untrusted input.</p><h4><strong>How I would put this into practice</strong> </h4><p>I would give an agent a responsibility only once it achieves a certain, measured level of performance on that task. So I went looking for how others are thinking about this. I found two posts that say the same thing. <a href="https://www.port.io/blog/ai-software-factory">Port</a> suggests having a human approve every step at first, and then taking the human out of the steps you trust, one at a time. <a href="https://www.augmentcode.com/blog/beyond-ai-coding-agents-how-we-built-augments-software-factory">Augment Code</a> found that their teams needed time to look at what an agent was producing and correct it before trusting it with longer tasks. Both are saying the same thing I am saying. You do not hand over everything at once. You hand over one step at a time.</p><p>I think of Software Factory like teamwork, where a team lead distributes tasks among the developers in the team. If some of the developers are falling a little behind, the team lead spends more time with them. In the same way, if some tasks are not done well by an agent, the human can spend more time reviewing that part. The team lead is responsible for overseeing the work produced by team members in isolation and in coordination.</p><p>It&#8217;s a human in the loop, not a human removed from the loop.</p><p>So here is where I landed. A software factory is not a way to take the human out of software engineering. It is a way to move the human to the end of the line, where the judgment actually matters. The agent does the work. The human decides what ships.</p><p>If you are building or thinking about Software Factory, the real question is not which agents to build first. It is which steps you are willing to hand over, and which you want to keep your eyes on. Start with the ones you can measure, and hand them over one at a time.</p><p>I have only read a few posts on Software Factory so far. As I come across more, I will keep sharing.</p><div><hr></div><h2>References</h2><ul><li><p>Vercel, &#8220;Building a software factory for AI SDK&#8221;: https://vercel.com/blog/building-a-software-factory-for-ai-sdk</p></li><li><p>Port, &#8220;AI software factory&#8221;: https://www.port.io/blog/ai-software-factory</p></li><li><p>Augment Code, &#8220;Beyond AI coding agents: how we built Augment&#8217;s software factory&#8221;: https://www.augmentcode.com/blog/beyond-ai-coding-agents-how-we-built-augments-software-factory</p></li></ul><p><em>The numbers in the Vercel section are theirs: open issues, pull requests, npm downloads, stars, and the share of merged PRs and closed issues. The teamwork analogy, the reviewer framing, and everything under &#8220;How I would put this into practice&#8221; are my own thinking.</em></p>]]></content:encoded></item><item><title><![CDATA[Read like a mapmaker: my 4-step method for understanding hard concepts]]></title><description><![CDATA[Guess it, skim it, read only what you need, then write it down from memory.]]></description><link>https://aiarchitectplaybook.com/p/read-like-a-mapmaker-my-4-step-method</link><guid isPermaLink="false">https://aiarchitectplaybook.com/p/read-like-a-mapmaker-my-4-step-method</guid><dc:creator><![CDATA[Shaikh Quader]]></dc:creator><pubDate>Sun, 06 Sep 2026 20:41:26 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/62128cfb-50ff-4b04-a74a-a70c19ffcff6_2400x1260.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I used to read hard things front to back. Every page, no shortcuts. I almost never finished. The material wasn&#8217;t always too dense. The order I read them in was wrong.</p><p>This method is for nonfiction. It is for the papers, chapters, and manuals that you read because you need to understand a new concept or a skill. It is not for stories. You do not want to &#8220;skim&#8221; a novel and ruin the ending. But when you are learning a difficult concept, reading front to back is a trap.</p><p>People compare learning a tough subject to solving a puzzle. The comparison misses a hard part. With a puzzle, every piece is already on the table. You just figure out which one goes where. With a difficult concept, the pieces aren&#8217;t handed to you. You have to decide which ones matter, and then work out how they fit.</p><p>Reading front to back assumes all the pieces matter, in the order the author stacked them. That is how you end up with a bookshelf of half-read chapters and a head full of the first few pages or paragraphs of other people&#8217;s arguments.</p><p>The way I read now looks like mapmaking. You don&#8217;t understand a city by walking every street in number order. You guess what the territory is, you fly over it to see its shape, you hike only the parts relevant to where you&#8217;re going, and then you draw the map from memory so it&#8217;s yours.</p><p>Here are the four moves. I use them on papers, chapters, manuals, and anything dense enough to be scary.</p><h2>Step 1: Guess the territory</h2><p>Before reading anything, look at the title and guess what the material is about. Write the guess down. A few lines are enough.</p><p>Then write the questions you&#8217;d want answered if your guess is right. These first questions are anchors: they catch the first wave of information while your understanding is still shallow. As you read, you refine them, and those refined questions are where the real learning happens.</p><p>A wrong guess is still better than no guess. You corrected your model, and you learned exactly where it broke. That&#8217;s faster than drifting through a chapter with no model at all.</p><h2>Step 2: Fly over the landscape</h2><p>Now preview the whole thing, quickly. Don&#8217;t read. Skim. Grab the landmarks: title, abstract, introduction, conclusion. Pictures, captions, and section headings. You&#8217;re looking for the shape of the piece and the parts that matter for what you need.</p><p>Think of it as looking at a city from altitude. You don&#8217;t study individual houses. You see where the main roads run and which neighborhoods you actually need to visit.</p><p>This is also when I draw my mindmap. A blank sheet of paper, turned sideways so it&#8217;s wider than it is tall. One question at the center, like &#8220;What is this paper about?&#8221; As I skim, I write keywords and short phrases around it. By the end of the preview, I have a skeleton of the material in my own words.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!w0ab!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4710507b-4354-4db6-b302-c9845fce5e93_700x536.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!w0ab!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4710507b-4354-4db6-b302-c9845fce5e93_700x536.jpeg 424w, https://substackcdn.com/image/fetch/$s_!w0ab!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4710507b-4354-4db6-b302-c9845fce5e93_700x536.jpeg 848w, https://substackcdn.com/image/fetch/$s_!w0ab!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4710507b-4354-4db6-b302-c9845fce5e93_700x536.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!w0ab!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4710507b-4354-4db6-b302-c9845fce5e93_700x536.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!w0ab!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4710507b-4354-4db6-b302-c9845fce5e93_700x536.jpeg" width="700" height="536" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4710507b-4354-4db6-b302-c9845fce5e93_700x536.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:536,&quot;width&quot;:700,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&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="" srcset="https://substackcdn.com/image/fetch/$s_!w0ab!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4710507b-4354-4db6-b302-c9845fce5e93_700x536.jpeg 424w, https://substackcdn.com/image/fetch/$s_!w0ab!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4710507b-4354-4db6-b302-c9845fce5e93_700x536.jpeg 848w, https://substackcdn.com/image/fetch/$s_!w0ab!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4710507b-4354-4db6-b302-c9845fce5e93_700x536.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!w0ab!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4710507b-4354-4db6-b302-c9845fce5e93_700x536.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><h2>Step 3: Hike the peaks</h2><p>From the satellite view, you know which sections deserve your time. Go straight to them. Read with a specific question, or better, a project you&#8217;re actually working on. Once you find the answer you&#8217;re looking for, highlight it and stop. The parts of the material that aren&#8217;t useful to you right now are simply off your route.</p><p>I used to read with no purpose at all, hoping it would stick. My schedule is too tight for that now. Reading everything is the slowest way to learn. Reading what answers your question is how you finish things.</p><p>When a section fights back, don&#8217;t reread it harder. Try these instead:</p><ul><li><p><strong>Copy the difficult lines word for word.</strong> Writing them out forces your brain to actually see the structure.</p></li><li><p><strong>Redraw figures in different colors.</strong> The act of drawing pushes your eye through every detail.</p></li><li><p><strong>Color-code diagrams.</strong> Use red for parts you don&#8217;t understand, and write your questions right next to them.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!q4Sz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F904882f8-4041-464a-9730-e4265ccd6537_700x425.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!q4Sz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F904882f8-4041-464a-9730-e4265ccd6537_700x425.jpeg 424w, https://substackcdn.com/image/fetch/$s_!q4Sz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F904882f8-4041-464a-9730-e4265ccd6537_700x425.jpeg 848w, https://substackcdn.com/image/fetch/$s_!q4Sz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F904882f8-4041-464a-9730-e4265ccd6537_700x425.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!q4Sz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F904882f8-4041-464a-9730-e4265ccd6537_700x425.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!q4Sz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F904882f8-4041-464a-9730-e4265ccd6537_700x425.jpeg" width="700" height="425" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/904882f8-4041-464a-9730-e4265ccd6537_700x425.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:425,&quot;width&quot;:700,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&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="" srcset="https://substackcdn.com/image/fetch/$s_!q4Sz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F904882f8-4041-464a-9730-e4265ccd6537_700x425.jpeg 424w, https://substackcdn.com/image/fetch/$s_!q4Sz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F904882f8-4041-464a-9730-e4265ccd6537_700x425.jpeg 848w, https://substackcdn.com/image/fetch/$s_!q4Sz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F904882f8-4041-464a-9730-e4265ccd6537_700x425.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!q4Sz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F904882f8-4041-464a-9730-e4265ccd6537_700x425.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><h2>Step 4: Draw the map from memory</h2><p>The final move is the one many skip, and the one that tests you. Put the material away. Close the tab. Now write the summary from memory, in your own words.</p><p>If you can&#8217;t write it, you haven&#8217;t learned it. The parts you can&#8217;t reconstruct are the gaps in your map.</p><p>I write my summaries with three pens. Blue for the summary, red for questions, purple for new ideas. When a question or an idea pops up, I switch pens, capture it, and switch back. I don&#8217;t chase answers while writing. I just mark the spot on the map so I can come back to it later without breaking my flow.</p><h2>Reading is selection</h2><p>In a knowledge economy, your career runs on learning difficult things quickly. Time is short, so the whole game is selection: choosing the material that deserves your attention, then making sure it stays with you.</p><p>Guess the territory. Fly over the landscape. Hike the peaks you need. Draw the map from memory so the understanding belongs to you.</p><p>Try it on one thing this week. A paper, a chapter, or a manual you&#8217;ve been avoiding. Then reply and tell me which move felt different.</p>]]></content:encoded></item><item><title><![CDATA[LLMs Are Not All You Need]]></title><description><![CDATA[Understanding the AI model families that solve the problems LLMs can't]]></description><link>https://aiarchitectplaybook.com/p/the-ai-toolbox-why-llms-are-not-a</link><guid isPermaLink="false">https://aiarchitectplaybook.com/p/the-ai-toolbox-why-llms-are-not-a</guid><dc:creator><![CDATA[Shaikh Quader]]></dc:creator><pubDate>Wed, 02 Sep 2026 23:16:14 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/94a2c4a0-0f6e-41fa-97e2-070caef3d3a5_1200x630.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A few weeks ago I was in S&#227;o Paulo, Brazil. I went to a local grocery store and picked up some chocolates. The ingredients list was in Portuguese, a language I do not know. I took a picture, sent it to an LLM, and said: translate this. Five seconds later, done.</p><p>Recently I was revising slides for a patent disclosure. I had a list of changes that would have taken hours to make manually. I prompted the LLM with what I needed, went through a few iterations, and finished before my coffee got cold.</p><p>The point is not that I am clever. The point is that LLMs have become a commodity. We all use them for dozens of things every day.</p><p>But here is what I actually want to tell you.</p><p>When you have a business problem. When you need to get deep analytics from your data. When someone asks you to build something that will run in production and make decisions that matter. Is an LLM always the right tool?</p><p>The answer is no. And treating an LLM like a Swiss Army knife, something you reach for by default no matter the task, is the fastest way to build something that breaks.</p><h2>The IKEA toolbox</h2><p>About 12 years ago I walked into an IKEA in Canada and bought a toolbox. It had a hammer, a set of screwdrivers, pliers, the usual. One box, many tools.</p><p>Here is the thing about that toolbox. You do not use the hammer for everything. If you need to unscrew something and you grab the hammer, it is not going to do the job. It is going to push it in harder. You need a screwdriver.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hiod!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11131a0e-ff27-46eb-b979-5d815e0bad3f_1600x540.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hiod!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11131a0e-ff27-46eb-b979-5d815e0bad3f_1600x540.png 424w, https://substackcdn.com/image/fetch/$s_!hiod!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11131a0e-ff27-46eb-b979-5d815e0bad3f_1600x540.png 848w, https://substackcdn.com/image/fetch/$s_!hiod!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11131a0e-ff27-46eb-b979-5d815e0bad3f_1600x540.png 1272w, https://substackcdn.com/image/fetch/$s_!hiod!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11131a0e-ff27-46eb-b979-5d815e0bad3f_1600x540.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!hiod!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11131a0e-ff27-46eb-b979-5d815e0bad3f_1600x540.png" width="1456" height="491" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/11131a0e-ff27-46eb-b979-5d815e0bad3f_1600x540.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:491,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:30765,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://aiarchitectplaybook.com/i/213932624?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11131a0e-ff27-46eb-b979-5d815e0bad3f_1600x540.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_!hiod!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11131a0e-ff27-46eb-b979-5d815e0bad3f_1600x540.png 424w, https://substackcdn.com/image/fetch/$s_!hiod!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11131a0e-ff27-46eb-b979-5d815e0bad3f_1600x540.png 848w, https://substackcdn.com/image/fetch/$s_!hiod!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11131a0e-ff27-46eb-b979-5d815e0bad3f_1600x540.png 1272w, https://substackcdn.com/image/fetch/$s_!hiod!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11131a0e-ff27-46eb-b979-5d815e0bad3f_1600x540.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><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>That is how a lot of people are using LLMs right now. They have a problem, they know LLMs are powerful, so they reach for the LLM. Sometimes it works. Sometimes it kind of works but takes ten times the effort it should. And sometimes it fails in ways they do not even notice because the output sounds confident enough.</p><p>An LLM is one tool. A powerful one. But it is not the only tool, and it is not always the right one for the task in front of you.</p><p>The real skill is knowing what set of tools you have access to, and which one is likely to be the best fit. Then making a judgment call and starting there.</p><h2>What is a model, anyway?</h2><p>Most of the AI models in use today are created from data. You collect data. You run it through a learning algorithm, of which there are many. The algorithm, paired with the data, produces a model. That model becomes a reusable tool. You feed it new data and it gives you output.</p><p>If the training data changes, you retrain or refresh the model. Simple enough.</p><p>The models I want to walk through today fall into two broad camps. The dividing line is what kind of data you are dealing with.</p><h2>The two data worlds</h2><p>The data around us can be split into two categories.</p><p><strong>Structured data.</strong> This is the kind you store in a database like Db2. It has a fixed schema. Rows and columns. You know exactly what each column holds: employee name, employee age, department, hire date. It can also live in a CSV file or a spreadsheet. But the shape is defined and consistent.</p><p><strong>Unstructured data.</strong> PDFs, emails, web articles, videos, images. No fixed schema. You can store a PDF in a database column, sure. But you are just storing it. You cannot query into it. You cannot ask the database to find the paragraph that answers a specific question. The data has no shape the database can reason about.</p><p>Different data, different models.</p><p>For structured data, there are well established model families. Classification. Regression. Clustering. These have been around for decades. </p><p>For unstructured data, we lean on pre-trained models. These are the ones big tech companies have spent millions of dollars training on massive volumes of internet data. Some live behind paywalls, like the models from Anthropic or OpenAI. Many others are available on Hugging Face. You can download them, run them locally, build on top of them.</p><p>And because these pre-trained language models are so powerful and freely available, they are starting to blur some lines. We are seeing applications of these models even for structured data problems. You will see an example of that in a minute.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!aSYO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc2d9e2d-7f80-4d5f-aea6-57d48e2cb2c2_1600x640.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!aSYO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc2d9e2d-7f80-4d5f-aea6-57d48e2cb2c2_1600x640.png 424w, https://substackcdn.com/image/fetch/$s_!aSYO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc2d9e2d-7f80-4d5f-aea6-57d48e2cb2c2_1600x640.png 848w, https://substackcdn.com/image/fetch/$s_!aSYO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc2d9e2d-7f80-4d5f-aea6-57d48e2cb2c2_1600x640.png 1272w, https://substackcdn.com/image/fetch/$s_!aSYO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc2d9e2d-7f80-4d5f-aea6-57d48e2cb2c2_1600x640.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!aSYO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc2d9e2d-7f80-4d5f-aea6-57d48e2cb2c2_1600x640.png" width="1456" height="582" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cc2d9e2d-7f80-4d5f-aea6-57d48e2cb2c2_1600x640.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:582,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:40808,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://aiarchitectplaybook.com/i/213932624?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc2d9e2d-7f80-4d5f-aea6-57d48e2cb2c2_1600x640.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_!aSYO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc2d9e2d-7f80-4d5f-aea6-57d48e2cb2c2_1600x640.png 424w, https://substackcdn.com/image/fetch/$s_!aSYO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc2d9e2d-7f80-4d5f-aea6-57d48e2cb2c2_1600x640.png 848w, https://substackcdn.com/image/fetch/$s_!aSYO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc2d9e2d-7f80-4d5f-aea6-57d48e2cb2c2_1600x640.png 1272w, https://substackcdn.com/image/fetch/$s_!aSYO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc2d9e2d-7f80-4d5f-aea6-57d48e2cb2c2_1600x640.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><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 structured data toolbox</h2><p>If your data lives in rows and columns, three model families cover most of the problems you will face.</p><p><strong>Classification.</strong> You have data coming in, and you want to put it in the right bucket. Your email inbox does this every day. Incoming emails get classified as spam or not spam. A customer list gets split into tiers. High risk of churn versus low risk. Classification works when there is a predefined set of categories and your job is to assign each row to the right one.</p><p><strong>Regression.</strong> You want to predict a number. House prices. Stock prices. How much a customer is likely to spend on their next visit. You have a set of features about each record and you want to predict a numerical value.</p><p><strong>Clustering.</strong> What if you have the features but no labels? Nobody has told you what the categories are. You just want to know if there are natural groupings in the data. Maybe you have a stack of books and you are deciding how to organize them. By topic? By publication year? By technical versus non-technical? There is no single correct answer. </p><p>Classification and regression are both supervised learning. You give the model inputs and the known outputs, and it learns to produce more accurate outputs over time. Clustering is unsupervised. You give it only the inputs and ask it to find the patterns.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Fq_j!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b7c4004-2771-407e-8911-af67428e98e6_1600x560.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Fq_j!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b7c4004-2771-407e-8911-af67428e98e6_1600x560.png 424w, https://substackcdn.com/image/fetch/$s_!Fq_j!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b7c4004-2771-407e-8911-af67428e98e6_1600x560.png 848w, https://substackcdn.com/image/fetch/$s_!Fq_j!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b7c4004-2771-407e-8911-af67428e98e6_1600x560.png 1272w, https://substackcdn.com/image/fetch/$s_!Fq_j!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b7c4004-2771-407e-8911-af67428e98e6_1600x560.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Fq_j!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b7c4004-2771-407e-8911-af67428e98e6_1600x560.png" width="1456" height="510" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7b7c4004-2771-407e-8911-af67428e98e6_1600x560.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:510,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:31416,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://aiarchitectplaybook.com/i/213932624?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b7c4004-2771-407e-8911-af67428e98e6_1600x560.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_!Fq_j!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b7c4004-2771-407e-8911-af67428e98e6_1600x560.png 424w, https://substackcdn.com/image/fetch/$s_!Fq_j!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b7c4004-2771-407e-8911-af67428e98e6_1600x560.png 848w, https://substackcdn.com/image/fetch/$s_!Fq_j!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b7c4004-2771-407e-8911-af67428e98e6_1600x560.png 1272w, https://substackcdn.com/image/fetch/$s_!Fq_j!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b7c4004-2771-407e-8911-af67428e98e6_1600x560.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><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>An example regression model </h2><p>Let me make this concrete.</p><p>A few weeks ago I built a demo for a talk. I had a table of 48,000 customer records. For each customer, I had some attributes: age, gender, a few other details. And for a large subset of those customers, I also had their spending amount.</p><p>The goal was simple. Train a model that could predict how much a customer would spend, given only their attributes.</p><p>I did the entire thing inside Db2. Create a table. Call six stored procedures. That is it. The model trained, evaluated itself against a held-out portion of the data, and gave me an accuracy of about 92%. It was off by roughly $10 in either direction.</p><p>Watch this demo of a regression model I built using SQL. </p><div id="youtube2-yFExU5oEMoo" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;yFExU5oEMoo&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/yFExU5oEMoo?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><h2>When keywords are not enough</h2><p>Let me shift to unstructured data, because this is where things get interesting.</p><p>Imagine you are back in university. You walk into an exam. The professor hands you a ten-page article, maybe 50 paragraphs total, and a list of questions. It is an open-book exam and you have tight time. What do you do?</p><p>You read each question. You pick out some keywords. You hit Control-F and search the document for those keywords. You find the matching passages, read them, and write your answer.</p><p>That is how text retrieval has worked for decades. Keyword search. It is precise. It can do exact matching, synonym expansion, all of that. But it has a fundamental limitation: it sees parts, not the whole. It is looking at individual words and phrases. It does not understand what a paragraph is about overall.</p><p>Now imagine the questions use words that do not appear in any of the paragraphs. Yet the answers are definitely in there. Keyword search fails completely. You would have to read every paragraph, make sense of each one, and find the answer yourself. That takes real thinking.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!357O!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F100f40f3-b185-405b-9a5c-55764c23cf5d_1600x660.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!357O!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F100f40f3-b185-405b-9a5c-55764c23cf5d_1600x660.png 424w, https://substackcdn.com/image/fetch/$s_!357O!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F100f40f3-b185-405b-9a5c-55764c23cf5d_1600x660.png 848w, https://substackcdn.com/image/fetch/$s_!357O!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F100f40f3-b185-405b-9a5c-55764c23cf5d_1600x660.png 1272w, https://substackcdn.com/image/fetch/$s_!357O!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F100f40f3-b185-405b-9a5c-55764c23cf5d_1600x660.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!357O!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F100f40f3-b185-405b-9a5c-55764c23cf5d_1600x660.png" width="1456" height="601" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/100f40f3-b185-405b-9a5c-55764c23cf5d_1600x660.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:601,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:35713,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://aiarchitectplaybook.com/i/213932624?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F100f40f3-b185-405b-9a5c-55764c23cf5d_1600x660.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_!357O!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F100f40f3-b185-405b-9a5c-55764c23cf5d_1600x660.png 424w, https://substackcdn.com/image/fetch/$s_!357O!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F100f40f3-b185-405b-9a5c-55764c23cf5d_1600x660.png 848w, https://substackcdn.com/image/fetch/$s_!357O!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F100f40f3-b185-405b-9a5c-55764c23cf5d_1600x660.png 1272w, https://substackcdn.com/image/fetch/$s_!357O!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F100f40f3-b185-405b-9a5c-55764c23cf5d_1600x660.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This is where embedding models come in.</p><h2>How embeddings see the whole paragraph</h2><p>An embedding model is a language model that has been trained on a massive volume of text. Its job is different from an LLM. Instead of generating a response, it converts text into numbers. A numerical fingerprint.</p><p>What it does is take an entire paragraph, as an example, look at it as a whole, and compress all the information it can into a fixed set of numbers. That numerical fingerprint captures the overall meaning of the paragraph. The topic, the theme, the concept. Not the individual words. The global sense of it.</p><p>Now take your exam question. Feed it to the same embedding model. It maps the question into the same numerical space. Then you do some vector math. In that vector space, which of the paragraph vectors is closest to your question vector? That is likely where your answer lives.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!o1m4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85b83b30-3356-4458-a7a0-990c705659d2_1600x600.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!o1m4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85b83b30-3356-4458-a7a0-990c705659d2_1600x600.png 424w, https://substackcdn.com/image/fetch/$s_!o1m4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85b83b30-3356-4458-a7a0-990c705659d2_1600x600.png 848w, https://substackcdn.com/image/fetch/$s_!o1m4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85b83b30-3356-4458-a7a0-990c705659d2_1600x600.png 1272w, https://substackcdn.com/image/fetch/$s_!o1m4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85b83b30-3356-4458-a7a0-990c705659d2_1600x600.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!o1m4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85b83b30-3356-4458-a7a0-990c705659d2_1600x600.png" width="1456" height="546" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/85b83b30-3356-4458-a7a0-990c705659d2_1600x600.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:546,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:36419,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://aiarchitectplaybook.com/i/213932624?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85b83b30-3356-4458-a7a0-990c705659d2_1600x600.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_!o1m4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85b83b30-3356-4458-a7a0-990c705659d2_1600x600.png 424w, https://substackcdn.com/image/fetch/$s_!o1m4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85b83b30-3356-4458-a7a0-990c705659d2_1600x600.png 848w, https://substackcdn.com/image/fetch/$s_!o1m4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85b83b30-3356-4458-a7a0-990c705659d2_1600x600.png 1272w, https://substackcdn.com/image/fetch/$s_!o1m4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85b83b30-3356-4458-a7a0-990c705659d2_1600x600.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><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>Think of the embedding model as an interpreter. When I travel and do not speak the local language, I use Google Translate. It takes what I say and projects it into a space the other person can understand. The embedding model does the same thing. It projects paragraphs and questions into a shared numerical space and looks for matches.</p><p>Here is the tradeoff. Keyword search sees parts but not the whole. Embeddings see the whole but not the parts. The real power comes when you combine both. Do a keyword search for precision, do a vector search for semantic understanding, and merge the results. That is what modern search applications do.</p><h2>Product recommendations with vectors and SQL</h2><p>This blurring I mentioned earlier, where pre-trained language models start solving structured data problems. Here is an example.</p><p>Say you have a database table of shoes. Each row has attributes: material, color, style, a few other details. You want to build a recommendation engine. When a customer looks at a particular shoe, show them similar ones.</p><p>The traditional approach would take a data science team months. They would need to design a specialized model, figure out the right formula, tune it, test it.</p><p>But now we have access to pre-trained language models. You can take all the attributes of a shoe, combine them into a single text description, and send it to an embedding model. The model gives you back a vector for that shoe. Do that for every shoe in your catalog. Store the vectors alongside the relational data. Now, when someone looks at a shoe, you search for other shoes whose vectors are closest to it.</p><p>The beautiful part is you can also apply relational filters before you search. Only show me shoes available in a specific store. Only show me shoes in a particular size. Filter first, then search the vectors. That is the advantage of doing this inside a relational database.</p><div id="youtube2-aVeXu8ahTzk" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;aVeXu8ahTzk&quot;,&quot;startTime&quot;:&quot;31&quot;,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/aVeXu8ahTzk?start=31&amp;rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><h2>Which model when?</h2><p>You do not need to memorize a taxonomy. You need a simple decision process.</p><p>If your question is about individual rows and columns and you want to find a category: start with classification.</p><p>If you want to predict a numerical value from a row: start with regression.</p><p>If you have rows of data and you want to find natural groupings, with no predefined labels: start with clustering.</p><p>If you are dealing with text or images and you want to find similarity matches: try embeddings.</p><p>If you have text and you want to generate content: that is where text generation models, the LLMs we all know, come in.</p><p>These are starting points. Not rigid rules. As you dig into a problem, you might find that combining techniques works better. But this framework gives you a place to begin.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kKbL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc79d5c10-eb24-441a-b293-4662b338f761_1600x720.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kKbL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc79d5c10-eb24-441a-b293-4662b338f761_1600x720.png 424w, https://substackcdn.com/image/fetch/$s_!kKbL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc79d5c10-eb24-441a-b293-4662b338f761_1600x720.png 848w, https://substackcdn.com/image/fetch/$s_!kKbL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc79d5c10-eb24-441a-b293-4662b338f761_1600x720.png 1272w, https://substackcdn.com/image/fetch/$s_!kKbL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc79d5c10-eb24-441a-b293-4662b338f761_1600x720.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!kKbL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc79d5c10-eb24-441a-b293-4662b338f761_1600x720.png" width="1456" height="655" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c79d5c10-eb24-441a-b293-4662b338f761_1600x720.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:655,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:37928,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://aiarchitectplaybook.com/i/213932624?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc79d5c10-eb24-441a-b293-4662b338f761_1600x720.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_!kKbL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc79d5c10-eb24-441a-b293-4662b338f761_1600x720.png 424w, https://substackcdn.com/image/fetch/$s_!kKbL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc79d5c10-eb24-441a-b293-4662b338f761_1600x720.png 848w, https://substackcdn.com/image/fetch/$s_!kKbL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc79d5c10-eb24-441a-b293-4662b338f761_1600x720.png 1272w, https://substackcdn.com/image/fetch/$s_!kKbL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc79d5c10-eb24-441a-b293-4662b338f761_1600x720.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><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 skill is knowing the toolbox</h2><p>LLMs are one tool. A powerful tool. I use them every day, and you do too.</p><p>But the skill is not about knowing one tool really well. The skill is understanding the full set of tools you have, and making a judgment call about which one fits the problem in front of you.</p><p>The next time someone tells you to solve a problem with an LLM, ask yourself: am I holding a hammer when I need a screwdriver?</p><p>Start with the data. Look at what kind of answer you need. Then pick the model family that matches.</p>]]></content:encoded></item><item><title><![CDATA[A Student Asked Me About a Career in Product Management. I Changed His Question.]]></title><description><![CDATA[The real conversation about understanding customers, choosing a niche, and why technical depth matters more than a role title.]]></description><link>https://aiarchitectplaybook.com/p/a-student-asked-me-about-a-career</link><guid isPermaLink="false">https://aiarchitectplaybook.com/p/a-student-asked-me-about-a-career</guid><dc:creator><![CDATA[Shaikh Quader]]></dc:creator><pubDate>Wed, 02 Sep 2026 04:00:10 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/cff6bb88-d710-4b71-ac72-f8d55535918f_3434x2216.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A second-year student named <a href="https://www.linkedin.com/in/afnanahmedd/">Afnan Ahmed</a> reached out to me recently. He had done his homework. Knew my background, had questions prepared, was clear about his goal. He wanted to get into product management.</p><p>We connected over the call, exchanged warm salams, and he got straight to it. His first real question was about understanding customers. But I could tell he was asking something else underneath. He wanted validation for a role he had already chosen. The conversation that followed changed what he was looking for.</p><h2>The Setup</h2><p>Afnan is 20 years old, finishing his second year, doing an internship at OPG. He is working through a double degree in computer science and business. He has shadowed product managers, researched the field, and decided this is where he wants to go.</p><p>He asked me several questions. How do I understand customer needs? What separates effective product managers from average ones? Where should he position himself in the next few years?</p><p>But when I asked him why he wanted product management, his answer was telling.</p><p>He said he liked solving technical problems. He liked finding solutions when someone had a need. He liked the cross-combination across different teams and seeing the difference he could make.</p><p>I listened. And then I told him something he did not expect.</p><h2>The Pivot</h2><p>I should be clear: <strong>I am not a product manager.</strong></p><p>My background is in engineering, research, and strategy. However, I work closely with product management teams every day. I sit between the code and the customer. I see the business strategy, and I see the technical implementation. I answered Afnan&#8217;s questions based on that intersection (what I&#8217;ve observed from effective PMs and what I know from my own experience working directly with customers).</p><p>I started by asking him a question: &#8220;Do you want to stay technical, non-technical, or a combination?&#8221;</p><p>He said combination. Product management felt like the sweet spot.</p><p>Then I asked again. &#8220;So you enjoy solving technical problems. Working with customers. Helping them find solutions. Is that right?&#8221;</p><p>He said yes.</p><p>&#8220;That would not probably be too much on the product manager&#8217;s role, though.&#8221;</p><p>Product management, as I have seen it, lives mostly on the business side. Working with customers, industry analysts, strategy. The business ownership of a product. It is not that you cannot bring technical work into the role, but the core of it is not solving technical problems directly. It is defining what to build, why to build it, and for whom.</p><p>If you really enjoy working with customers in solving a technical problem, then most likely a consulting role would be more appropriate. Or there are forward deployment engineers, client engineering teams (different companies call them differently), but the common thread is the same. You are hands-on with customers, solving technical problems.</p><p>I was not trying to talk him out of product management. I was trying to get him to ask a better question.</p><p>Find the alignment between your aspiration (what you actually enjoy doing) and the role. Do not fix a particular role title first and then try to make yourself fit. See if that role is going to get you where you want to go.</p><h2>The Framework</h2><p>Then we got to the real question. The one he came to ask.</p><p>&#8220;How do you understand the customer needs?&#8221;</p><p>The first layer is obvious. You need to connect with customers. Talk to them. Understand their use cases. Anyone can tell you this, and you can figure it out yourself. You need to talk to people.</p><p>But the nuanced part is that oftentimes you will not hear directly from the customers what they need. You have to put yourself in the customer&#8217;s shoes. You have to think beyond what they are asking.</p><p>So how do you figure this out?</p><p>One thing is to target a specific persona or use case category. You cannot target everyone. I learned this the hard way.</p><p>My role is focused on building capabilities inside Db2 that will help customers use Db2 as a database for their AI applications. When I talk to customers, many of them are not yet building AI applications. They are thinking about it. Some of them are still not putting active thought into it. Maybe it is somewhere in their future.</p><p>So you have to look beyond what customers are asking. You look at the industry broadly. Go outside your customer base and see what the needs are. And you need to be more hands-on.</p><p>I am also a AI practitioner. Those use cases I want to support in Db2 with my team, I build them myself. I look at the industry patterns. For example, if you look at the implementation of AI use cases (I do not have exact numbers), but roughly 80% of the use cases are not getting into production. Only about 20% make it.</p><p>So what pushes things to production? Think of the completeness of the AI stack. That is the question that drives what I build.</p><p>Then you have to give a vision to the customer. Show them what you are building, what you are considering building. Get them excited. Give them those possibilities.</p><p>Show them the path. Hold their hand. Take them through the journey.</p><p>It is a combination of educating them, showing them new angles, and then building a solution that works for them. It is a journey with your customers.</p><h2>The Strategy</h2><p>Then I told him something more specific. Something I made a conscious decision about a few years ago.</p><p>In the customer base for Db2, there are database administrators. There are business leaders. There are application developers building applications with Db2. Even within application developers, there is a subcategory: AI application developers.</p><p>I made a decision that I was not going to target every single persona. Because then my message would be cluttered. It would not land.</p><p>I picked one. AI application developers.</p><p>Then I went deeper. I looked at their use case patterns. What are they trying to build? What is stopping them? How can we support this?</p><p>I started creating tutorials. First, a lot of beginner-friendly tutorials. I still do those. Then I focused on more advanced tutorials. What it takes to push things to production. The pain points. The gaps.</p><p>Then I reverse-engineered from there. To support those kinds of use cases and production deployments, what do we need to bring into the database? What capabilities are missing?</p><p>Once you build this, you have a vision. Then when you talk to customers, they recognize that this is coming. Even if they are not actively building it yet, they see the path to get to the finish line. To production.</p><p>You have to think the entire journey.</p><h2>The Advice</h2><p>By the end of the conversation, Afnan was reconsidering things. Not in a bad way. He was thinking.</p><p>I told him: if your ultimate goal is to contribute technically, maybe spend some years early in your career focused on hands-on building. Less travel, less non-technical work. You learn more, you are more hands-on, you build a solid technical edge. Then you can always add product management or move toward it later.</p><p>A strong technical base is going to pay you off long term.</p><p>He said: &#8220;I&#8217;m going to kind of deepen my understanding. Maybe I have the wrong alignment on what product management is and the consulting side. I&#8217;m just going to put some thought into everything you told me.&#8221;</p><p>Then he asked if we could talk again in a few weeks.</p><p>That is all I could ask for. Not a fixed answer. A better question to sit with.</p><div><hr></div><p>If you are early in your career, ask yourself what work you actually enjoy. Not what title sounds good. Find the alignment first. Everything else follows from there.</p>]]></content:encoded></item><item><title><![CDATA[How I write short-form technical posts]]></title><description><![CDATA[A three-step writing process that keeps my voice, not an AI template]]></description><link>https://aiarchitectplaybook.com/p/how-i-write-short-form-technical</link><guid isPermaLink="false">https://aiarchitectplaybook.com/p/how-i-write-short-form-technical</guid><dc:creator><![CDATA[Shaikh Quader]]></dc:creator><pubDate>Mon, 31 Aug 2026 14:13:07 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/bee474aa-8382-435d-8737-89a93ac127b6_3236x2116.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I have been writing short-form technical posts on LinkedIn regularly for the last 18 months. Over that time, my followers grew from 1,800 to 4,274. Here is a breakdown of my short-form writing process.</p><p>My writing process has three steps.</p><p><strong>Step 1: Finding an idea.</strong> I pick an idea that is fresh in my mind, something I worked on or learned within the last day or two. I don&#8217;t go too far back. Reconstructing my memory takes time that I don&#8217;t have. The freshness gives me extra excitement because the details are still vivid and I want to share them right away. If I wait too long, I forget the details and the emotional attachment weakens.</p><p>For example, yesterday I published a post after finishing a chapter from <em>AI-Powered Search</em>. Last week I published a post on calling an LLM from Db2 using SQL, written the same day as the tutorial on a Git repo. Both were fresh in my mind.</p><p>If there are multiple candidate ideas, I trust my intuition and go with the one I feel a strong pull for.</p><p><strong>Step 2: Developing the idea.</strong> I have two methods for coming up with the first draft: dictation and writing by hand. Which one I use depends on how heavy the idea is.</p><p>For lighter content, I use dictation. This includes announcing a tutorial, reposting someone else&#8217;s post with my own brief thoughts, or sharing a lighter non-technical topic like a productivity tip. In all these cases, the actual content is already developed and published, either in a Git repo or by someone else, or it&#8217;s light. Dictation saves time, and it is still my own voice, my own language, my own tone. It becomes a conversation.</p><p>For deeper technical content, I brainstorm quite a bit. For example, last week I published a post on multi-vector representation. That is a complex topic and something new I came across. I ask myself: what is the concept I want to convey? I drew a mind map of the concepts, then I wrote the post by hand. I don&#8217;t type it on the computer. I take a screenshot of my handwritten notes, give it to AI, and ask it to transcribe them into a digital note. Then I work with it digitally for editing.</p><p><strong>Step 3: Editing.</strong> I keep drafting and editing as two separate steps. I do not edit while I am writing the first draft. My goal is a messy first draft with all the grammatical mistakes, spelling errors, and missing ideas. I do not pause to edit.</p><p>Once I have the draft in digital form, I go through the editing phase in multiple passes.</p><ol><li><p>I ask Claude to check for grammatical mistakes, fix them, and put every fix in bold. For each fix, I ask it to add an explanation in italic, following the fix, so I can review all the fixes along with its explanation. I review each grammar fix and the explanation, and either accept or reject.</p></li><li><p>Then a redundancy check. I ask Claude to identify the redundancies in my draft and put a comment next to each one in italics. If I agree, I accept the cuts.</p></li><li><p>Then a clutter check, following William Zinsser&#8217;s editing principles from <em>On Writing Well</em>. Same strategy: keep the changes in bold, show the explanation in italics.</p></li><li><p>Finally, I ask it to identify and fix any ambiguity. For example, if there is a pronoun and it is not clear what it points to, I ask it to be more specific.</p></li></ol><p>After these passes, I have a final draft. I read it out loud from beginning to end. If any part doesn&#8217;t sound like my voice, i.e., the AI editing has taken away my tone, style, or language, I speak it out loud to the AI and say: use my version, what I just dictated, instead of that line in the draft. </p><p>Then I read it again from beginning to end. If it sounds like my own voice, I add line breaks so it is readable on LinkedIn, paste it in, and read it one more time to make sure nothing was lost or broken during copying. If it all looks good, I click post.</p>]]></content:encoded></item><item><title><![CDATA[I built my own yardstick for evaluating AI search]]></title><description><![CDATA[I built an evaluation workbench that uses real human queries, not synthetic ones from an LLM, for evaluating hybrid search]]></description><link>https://aiarchitectplaybook.com/p/i-built-my-own-yardstick-for-evaluating</link><guid isPermaLink="false">https://aiarchitectplaybook.com/p/i-built-my-own-yardstick-for-evaluating</guid><dc:creator><![CDATA[Shaikh Quader]]></dc:creator><pubDate>Sun, 02 Aug 2026 21:10:51 GMT</pubDate><enclosure url="https://api.substack.com/feed/podcast/209545438/825ee9862aef14b64d4bc1dee14b47f8.mp3" length="0" type="audio/mpeg"/><content:encoded><![CDATA[<p>I finished creating an evaluation workbench for my AI search app yesterday.</p><p>After building this hybrid search app, I initially used an AI coding agent to generate synthetic test queries and evaluate the results. I was not happy with that approach. Using an LLM to generate test queries, and then using the  LLM to judge the results, felt like grading my own homework. So, I built this evaluation workbench.</p><p>In information retrieval, the standard practice is to use queries from real human users to evaluate search quality, and to have those same users judge the relevancy of the results.</p><p>In my evaluation workbench, I can construct a set of test queries, and collect relevancy judgments from human users. </p><p>Here&#8217;s how it works:</p><p>1. I click a button to start a new test query set and give it a name.</p><p>2. I type a query into the test query set.</p><p>3. The workbench runs searches against the lexical index and the vector index, pulling the top 10 results from each.</p><p>4. It combines both lists, removes duplicates, and discards the relevancy rankings from the individual indices.</p><p>5. I go through that combined list of results.</p><p>6. I give my own relevancy judgment on each result.</p><p>7. I use a three-point relevancy scale: Highly Relevant, Relevant, or Not Relevant.</p><p>At the end of this process, for each test query I have 15 to 20 result documents, and for each document I have a relevancy judgment. I repeat this process for whatever number of queries I want in a test set. Initially I am aiming for 15 to 20 test queries per set.</p><p>Once I have a test set, I go to the Evaluate tab, pick it from a dropdown, and run the evaluation.</p><p>Using this evaluation framework, I can now create my own yardstick for evaluating the performance of my app, not using synthetic queries coming from an LLM and the relevancy judgment decided by an LLM.</p><p>The accompanying video walks you through the workbench UI, creating a sample test query, and assessing the relevancy of the result documents.</p><p>If you are building AI search (RAG, vector search, hybrid search), how are you evaluating the quality of your retriever? Are you using synthetic queries from an LLM, or something else?</p>]]></content:encoded></item><item><title><![CDATA[Going Back to Bytes]]></title><description><![CDATA[An AI architect refreshes the basics, 25 years later]]></description><link>https://aiarchitectplaybook.com/p/going-back-to-bytes</link><guid isPermaLink="false">https://aiarchitectplaybook.com/p/going-back-to-bytes</guid><dc:creator><![CDATA[Shaikh Quader]]></dc:creator><pubDate>Sat, 13 Jun 2026 03:49:58 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/58b3a341-6758-4829-8467-3d9eecc7d968_1200x630.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The last time I learned how a computer stores the letter &#8220;A,&#8221; I was an undergraduate at North South University in Bangladesh. It was 2000. I had a notebook full of binary arithmetic and a working sense of what a byte was.</p><p>Then life happened. Advanced courses. A career. A move into AI architecture. The fundamentals didn&#8217;t go anywhere; they got covered over by everything I learned after them. Twenty-five years is a long time to let a foundation sit unused.</p><p>Most days, that doesn&#8217;t matter. I&#8217;m thinking about embeddings, retrieval pipelines, system architecture. I almost never think about the byte. But I&#8217;m currently designing a RAG solution, and as I worked through the design, I ran into a fact I had been quietly assuming away: not all the source data is in English. Some of it sits in databases built for other languages, encoded in ways that aren&#8217;t UTF-8 and aren&#8217;t always obvious from the outside. That raised a set of questions I couldn&#8217;t answer cleanly: how is the text actually encoded in the source database? What does it look like at the byte level? What happens when something downstream assumes one thing and the source provides another?</p><p>So today I went back. I opened a chat with an AI and asked the simplest questions I could think of, one after another, until the rust came off. <em>How does a computer store the letter A? Where do bytes enter the story? How does it know where one string ends and the next begins?</em> The concepts I had filed away in 2000 came back, slowly, just as clear as the first time.</p><p>This post is that refresher.</p><h2>What you&#8217;ll get</h2><p>If you took CS courses once and haven&#8217;t touched this material in years, I want this post to do one thing: rebuild your mental model of how English text lives in a computer. From the keystroke to the disk. By the end, you&#8217;ll see the bytes under your strings, and you&#8217;ll notice when an assumption you&#8217;ve made for years quietly stops holding.</p><p>The scope is narrow. <strong>English only.</strong> Not Unicode. Not multi-byte encodings. The moment text from other languages enters the picture, a lot of these assumptions break, but that&#8217;s a separate conversation. This post is the foundation everything else sits on.</p><h2>1. Characters are numbers</h2><p>A computer doesn&#8217;t know what &#8220;A&#8221; is. It only stores numbers. So someone had to decide: when you press A, what number gets saved?</p><p>That decision lives in a table called <strong>ASCII</strong>:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CIkO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F341ae69c-2740-4605-a938-90466240dede_881x345.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CIkO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F341ae69c-2740-4605-a938-90466240dede_881x345.png 424w, https://substackcdn.com/image/fetch/$s_!CIkO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F341ae69c-2740-4605-a938-90466240dede_881x345.png 848w, https://substackcdn.com/image/fetch/$s_!CIkO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F341ae69c-2740-4605-a938-90466240dede_881x345.png 1272w, https://substackcdn.com/image/fetch/$s_!CIkO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F341ae69c-2740-4605-a938-90466240dede_881x345.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!CIkO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F341ae69c-2740-4605-a938-90466240dede_881x345.png" width="881" height="345" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/341ae69c-2740-4605-a938-90466240dede_881x345.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:345,&quot;width&quot;:881,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:22145,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://aiarchitectplaybook.com/i/201824846?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F341ae69c-2740-4605-a938-90466240dede_881x345.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_!CIkO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F341ae69c-2740-4605-a938-90466240dede_881x345.png 424w, https://substackcdn.com/image/fetch/$s_!CIkO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F341ae69c-2740-4605-a938-90466240dede_881x345.png 848w, https://substackcdn.com/image/fetch/$s_!CIkO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F341ae69c-2740-4605-a938-90466240dede_881x345.png 1272w, https://substackcdn.com/image/fetch/$s_!CIkO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F341ae69c-2740-4605-a938-90466240dede_881x345.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><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>Press A. The system translates that to 65. The computer stores 65.</p><p>The table isn&#8217;t stored alongside the data. It&#8217;s an agreement between whoever wrote the bytes and whoever reads them. The byte on disk is only a number. The byte becomes &#8220;A&#8221; only because the program reading it agrees to interpret it that way.</p><h2>2. Bytes: the container</h2><p>A byte is 8 bits. A bit is a 0 or a 1. Eight switches in a row give you 2&#8312; = <strong>256 values</strong> (0 through 255).</p><p>Here&#8217;s 65 in bits:</p><pre><code><code>0 1 0 0 0 0 0 1</code></code></pre><p>Each position is a power of 2: 128, 64, 32, 16, 8, 4, 2, 1. Add the 1-bits: 64 + 1 = 65. That&#8217;s the letter A as it actually exists on disk.</p><p>ASCII was originally a 7-bit code, defining 128 characters: enough for English letters, digits, punctuation, and a handful of control codes. When 8-bit bytes became the standard, the upper 128 values opened up. Different countries filled those slots with their own characters. Japanese and Chinese have far more than 256 characters in total, so those languages can&#8217;t fit in a single byte at all. They have to use multiple bytes per character.</p><p>For English, one byte per character is enough. Every English-only system quietly leans on that assumption.</p><h2>3. Everything is bytes</h2><p>Bytes have no type. Photos, audio, integers, structs, ML model weights, all of it is just sequences of bytes. The byte itself is dumb. It holds a number from 0 to 255 and nothing else.</p><p>What changes from one kind of data to another is two things: how many bytes you use, and what rulebook you read them with.</p><ul><li><p>One English letter: 1 byte</p></li><li><p>A 32-bit integer: 4 bytes</p></li><li><p>A model weight tensor: gigabytes</p></li></ul><p>Across all of those, the bytes look identical. The program reading them brings the meaning. Same bits, different agreement, different interpretation.</p><p>This is why production bugs happen. A file opens with the wrong parser. A packet is misaligned. A text column gets handed binary data. The bytes were fine. The agreement broke.</p><h2>4. From one character to a string</h2><p>If &#8220;A&#8221; is one byte, &#8220;Hello&#8221; is five bytes in a row:</p><pre><code><code>H     e     l     l     o
72    101   108   108   111</code></code></pre><p>Five numbers. That&#8217;s the whole string. The computer sees a row of bytes and treats them as text because the program told it to.</p><p>Spaces, tabs, and newlines are characters too. They have ASCII numbers and take up bytes, exactly like letters do.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!AOc0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff79dafc9-e1d9-46df-8163-de26718286dd_877x255.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!AOc0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff79dafc9-e1d9-46df-8163-de26718286dd_877x255.png 424w, https://substackcdn.com/image/fetch/$s_!AOc0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff79dafc9-e1d9-46df-8163-de26718286dd_877x255.png 848w, https://substackcdn.com/image/fetch/$s_!AOc0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff79dafc9-e1d9-46df-8163-de26718286dd_877x255.png 1272w, https://substackcdn.com/image/fetch/$s_!AOc0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff79dafc9-e1d9-46df-8163-de26718286dd_877x255.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!AOc0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff79dafc9-e1d9-46df-8163-de26718286dd_877x255.png" width="877" height="255" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f79dafc9-e1d9-46df-8163-de26718286dd_877x255.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:255,&quot;width&quot;:877,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:47309,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://aiarchitectplaybook.com/i/201824846?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff79dafc9-e1d9-46df-8163-de26718286dd_877x255.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_!AOc0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff79dafc9-e1d9-46df-8163-de26718286dd_877x255.png 424w, https://substackcdn.com/image/fetch/$s_!AOc0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff79dafc9-e1d9-46df-8163-de26718286dd_877x255.png 848w, https://substackcdn.com/image/fetch/$s_!AOc0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff79dafc9-e1d9-46df-8163-de26718286dd_877x255.png 1272w, https://substackcdn.com/image/fetch/$s_!AOc0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff79dafc9-e1d9-46df-8163-de26718286dd_877x255.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><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>"Hello World" is 11 bytes, not 10. The space counts. "Hello\n" is 6 bytes, not 5. The newline counts. They're characters, with byte values like everything else.</p><p>We treat these as structure. Underneath, they&#8217;re content.</p><h2>5. Where does a string end?</h2><p>Two strings sit next to each other on disk: &#8220;Hello&#8221; and &#8220;World.&#8221;</p><pre><code><code>72 101 108 108 111 87 111 114 108 100</code></code></pre><p>How does the computer know &#8220;Hello&#8221; ends after the fifth byte? There&#8217;s no fence. No separator. Just numbers in a row.</p><p>Computer science settled on two answers.</p><h3>Strategy 1: Length-prefixed</h3><p>Store the length first, then the content:</p><pre><code><code>[5] 72 101 108 108 111   [5] 87 111 114 108 100
 &#8593;                        &#8593;
 "next 5 bytes            "next 5 bytes
  are one string"          are one string"</code></code></pre><p>The reading program, called the reader, sees 5, counts off 5 bytes, knows the string is done. Any byte value, including 0, can sit inside the string.</p><p>This is what modern systems use. Databases. Network protocols. The string types built into modern programming languages.</p><h3>Strategy 2: Null-terminated</h3><p>Pick a special byte to mean &#8220;end.&#8221; Traditionally, the byte 0, the null byte.</p><pre><code><code>72 101 108 108 111 [0]   87 111 114 108 100 [0]
                    &#8593;                        &#8593;
                  "stop"                   "stop"</code></code></pre><p>The reader scans until it hits 0. This is how C represents strings.</p><p>The serious limitation: you cannot store the byte 0 inside the string. The moment the reader sees 0, it thinks the string ended. Text never contains a byte 0, so this works for strings. Binary files like images and archives are full of zeros, so it doesn&#8217;t.</p><p>That&#8217;s why modern systems went length-prefixed. You spend a couple of bytes on the length. In exchange, any byte value can live in the string, and you don&#8217;t have to scan to find the end.</p><h2>6. Bytes don't tell you what they are</h2><p>In a length-prefixed string, the length byte and the content bytes look identical. The byte 5 (<code>00000101</code>) and a content byte holding the value 5 are the same eight bits. So how does the computer know byte 1 is a length and not a letter?</p><p>The computer doesn't know from the bytes. It knows from position.</p><p>The rule &#8220;byte 1 is a length&#8221; doesn&#8217;t live in the data. It lives in the code reading the data. The format spec, the database engine, the protocol definition told the program: &#8220;byte 1 is a length.&#8221; That&#8217;s the agreement.</p><p>Lose the agreement and you have noise. Open a JPEG as a Word document. The bytes are valid. Word is reading them under the wrong format.</p><p>This is why file formats are specifications. PNG starts with a specific 8-byte signature. Database row layouts are defined down to the byte. The bytes are always just bytes. The format is the contract.</p><p>Tokenizers are agreements about how to split byte sequences into tokens. AI model weight files are bytes interpreted under a fixed schema. When the agreement between writer and reader breaks, you get bugs that don't show up in unit tests, because the bytes themselves are valid.</p><h2>7. What I took away</h2><p>English is the easy case by design, not by accident. ASCII was built for English in 1963, and a single byte is more than enough to hold any ASCII character. So in English, one character is one byte. Counting characters and counting bytes give the same answer. English-only systems never have to think about this.</p><p>That property stops holding the moment text from other languages enters the system. In other languages, characters often take more than one byte. Character boundaries stop being obvious. Assumptions about length, indexing, and splitting that worked for decades suddenly don&#8217;t.</p><p>Where this goes from here is harder: multi-byte encodings, Unicode, the point where bytes and characters stop being the same thing. That&#8217;s what I&#8217;m still working through.</p>]]></content:encoded></item><item><title><![CDATA[Why Your RAG Pipeline Needs a Re-Ranker]]></title><description><![CDATA[If your RAG pipeline returns chunks that are close to your question but not quite right, a re-ranker is probably the fix.]]></description><link>https://aiarchitectplaybook.com/p/why-your-rag-pipeline-needs-a-re</link><guid isPermaLink="false">https://aiarchitectplaybook.com/p/why-your-rag-pipeline-needs-a-re</guid><dc:creator><![CDATA[Shaikh Quader]]></dc:creator><pubDate>Sat, 23 May 2026 12:01:06 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Pdmt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9a8357a-c086-4336-828a-35af01bd59fe_2752x1536.jpeg" 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_!Pdmt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9a8357a-c086-4336-828a-35af01bd59fe_2752x1536.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Pdmt!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9a8357a-c086-4336-828a-35af01bd59fe_2752x1536.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Pdmt!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9a8357a-c086-4336-828a-35af01bd59fe_2752x1536.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Pdmt!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9a8357a-c086-4336-828a-35af01bd59fe_2752x1536.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Pdmt!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9a8357a-c086-4336-828a-35af01bd59fe_2752x1536.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Pdmt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9a8357a-c086-4336-828a-35af01bd59fe_2752x1536.jpeg" width="1456" height="813" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b9a8357a-c086-4336-828a-35af01bd59fe_2752x1536.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:813,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:3579188,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://aiarchplaybook.substack.com/i/198788395?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9a8357a-c086-4336-828a-35af01bd59fe_2752x1536.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Pdmt!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9a8357a-c086-4336-828a-35af01bd59fe_2752x1536.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Pdmt!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9a8357a-c086-4336-828a-35af01bd59fe_2752x1536.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Pdmt!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9a8357a-c086-4336-828a-35af01bd59fe_2752x1536.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Pdmt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9a8357a-c086-4336-828a-35af01bd59fe_2752x1536.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><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>If you&#8217;ve built a basic RAG pipeline, you&#8217;ve done this: chunk your documents, embed them with a model like <code>text-embedding-3-small</code>, store the vectors, and at query time embed the user&#8217;s question and pull back the top-k most similar chunks.</p><p>It works. Sort of. Then one day a user asks a reasonable question, and your pipeline returns chunks that are <em>about</em> the right topic but don&#8217;t answer the question.</p><p>Sometimes worse. The user asks &#8220;Is ibuprofen safe to take during late pregnancy?&#8221; The pipeline returns this chunk as the top match:</p><blockquote><p><em>&#8220;Ibuprofen is widely used and considered safe for general pain relief.&#8221;</em></p></blockquote><p>The chunk that actually answers the question sits two ranks below:</p><blockquote><p><em>&#8220;Ibuprofen is not recommended after 20 weeks of pregnancy due to fetal kidney risks.&#8221;</em></p></blockquote><p>Both chunks are about ibuprofen safety, so vector search ranks both highly. But only one answers the question the user asked. The pipeline can&#8217;t tell the difference, and confidently hands back the wrong chunk.</p><p>This post explains why that happens, and how re-rankers fix it.</p><p>I published a companion GitHub <a href="http://github.com/shaikhq/rag-reranker-demo">repo</a> with a runnable notebook that demonstrates three common ways vector search fails (negation, missed constraints, topic-over-answer) and shows the re-ranker fixing them.</p><h2>The Library Analogy</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jhRv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24177875-a890-4f29-a1f7-7081101ed330_1024x434.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jhRv!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24177875-a890-4f29-a1f7-7081101ed330_1024x434.png 424w, https://substackcdn.com/image/fetch/$s_!jhRv!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24177875-a890-4f29-a1f7-7081101ed330_1024x434.png 848w, https://substackcdn.com/image/fetch/$s_!jhRv!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24177875-a890-4f29-a1f7-7081101ed330_1024x434.png 1272w, https://substackcdn.com/image/fetch/$s_!jhRv!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24177875-a890-4f29-a1f7-7081101ed330_1024x434.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!jhRv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24177875-a890-4f29-a1f7-7081101ed330_1024x434.png" width="1024" height="434" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/24177875-a890-4f29-a1f7-7081101ed330_1024x434.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:434,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:739442,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://aiarchplaybook.substack.com/i/198788395?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24177875-a890-4f29-a1f7-7081101ed330_1024x434.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_!jhRv!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24177875-a890-4f29-a1f7-7081101ed330_1024x434.png 424w, https://substackcdn.com/image/fetch/$s_!jhRv!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24177875-a890-4f29-a1f7-7081101ed330_1024x434.png 848w, https://substackcdn.com/image/fetch/$s_!jhRv!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24177875-a890-4f29-a1f7-7081101ed330_1024x434.png 1272w, https://substackcdn.com/image/fetch/$s_!jhRv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24177875-a890-4f29-a1f7-7081101ed330_1024x434.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><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>A giant library. Every book has many sections, each holding facts, claims, definitions, maybe answers to questions someone will ask one day.</p><p>You need to make it searchable. So you hire a librarian to summarize every section on a small card. The catch: she writes the cards before any reader walks in, with no idea what readers will ask.</p><p>What&#8217;s the best she can do? Write a high-level summary. &#8220;This section discusses the causes of type 2 diabetes.&#8221; &#8220;This section covers lithium-ion battery thermal runaway.&#8221;</p><p>These cards capture the topic. They don&#8217;t capture every fact, every constraint, every nuance. A one-line summary loses detail by definition.</p><p>That&#8217;s what an embedding model does. Feed it a chunk of text and you get back a vector: a list of numbers, usually between 384 and 1536 long, depending on the model. The vector is the digital summary card. It captures roughly what the chunk is about, written before any question is asked.</p><p>A reader walks in with a question. She writes that on a card too. The librarian compares the question card against every section card and hands back the closest matches.</p><p>That&#8217;s vector search. Embed the question, compute similarity against the pre-computed chunk vectors, return the top matches.</p><h2>How Embedding Models Work, and Where They Break</h2><p>An embedding model is a transformer <strong>encoder</strong>, a model that reads text and produces numbers that represent it. In vector search, the encoder runs twice: once on each chunk (ahead of time, to build the index) and once on each query (at search time). The two outputs (vectors) are then compared by a similarity score computed outside the model.</p><p>This architecture is called a <strong>bi-encoder</strong>. The model never sees the query and chunk together.</p><div class="captioned-image-container"><figure><div class="image-link image2" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!M0k5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02dd0a85-c58a-4b16-9d0b-a3322ca3ae1c_1707x420.png 424w, https://substackcdn.com/image/fetch/$s_!M0k5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02dd0a85-c58a-4b16-9d0b-a3322ca3ae1c_1707x420.png 848w, https://substackcdn.com/image/fetch/$s_!M0k5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02dd0a85-c58a-4b16-9d0b-a3322ca3ae1c_1707x420.png 1272w, https://substackcdn.com/image/fetch/$s_!M0k5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02dd0a85-c58a-4b16-9d0b-a3322ca3ae1c_1707x420.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!M0k5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02dd0a85-c58a-4b16-9d0b-a3322ca3ae1c_1707x420.png" width="1456" height="358" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/02dd0a85-c58a-4b16-9d0b-a3322ca3ae1c_1707x420.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:358,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:56768,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://aiarchplaybook.substack.com/i/198788395?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02dd0a85-c58a-4b16-9d0b-a3322ca3ae1c_1707x420.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_!M0k5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02dd0a85-c58a-4b16-9d0b-a3322ca3ae1c_1707x420.png 424w, https://substackcdn.com/image/fetch/$s_!M0k5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02dd0a85-c58a-4b16-9d0b-a3322ca3ae1c_1707x420.png 848w, https://substackcdn.com/image/fetch/$s_!M0k5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02dd0a85-c58a-4b16-9d0b-a3322ca3ae1c_1707x420.png 1272w, https://substackcdn.com/image/fetch/$s_!M0k5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02dd0a85-c58a-4b16-9d0b-a3322ca3ae1c_1707x420.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div></div></div></div></figure></div><p>The bi-encoder design is what makes vector search fast. You pre-compute every chunk vector once, store them in an index, and reuse them for every future query. At query time, you embed the question once and search across millions of vectors in milliseconds.</p><p>The architecture has two compressions, both lossy:</p><p><strong>Chunks get compressed before anyone asks a question.</strong> A chunk holds several facts, possibly answers to several questions, plus context and noise. All of it squashes into one vector: roughly the aggregate of everything in the chunk, in the model&#8217;s coordinate space (often called &#8220;semantic space&#8221; because chunks with similar meanings land near each other). No fact gets its own representation. The model doesn&#8217;t know which fact will matter for a future question, so it can&#8217;t favor any.</p><p><strong>Questions get compressed without knowing which document they&#8217;ll meet.</strong> Same problem on the question side. Intent, constraints, framing: all reduced to one topical fingerprint. When you embed &#8220;What was Apple&#8217;s revenue in Q3 2024?&#8221;, the vector mostly represents &#8220;Apple revenue recent quarter.&#8221; &#8220;Q3 2024&#8221; barely registers.</p><p>You&#8217;re comparing two lossy fingerprints. Nothing in your pipeline ever looks at the raw question alongside the raw chunk.</p><h2>Three Common Ways Vector Search Fails</h2><p>These are three canonical failure modes the <a href="https://github.com/shaikhq/rag-reranker-demo">companion repo</a> shows. Each maps to a query in the demo notebook.</p><p><strong>Negation gets lost.</strong></p><ul><li><p>Question: &#8220;Is ibuprofen recommended late in pregnancy?&#8221;</p></li><li><p>Chunk A: &#8220;Ibuprofen is widely used for general pain relief.&#8221;</p></li><li><p>Chunk B: &#8220;Ibuprofen is <em>not</em> recommended after 20 weeks of pregnancy due to fetal kidney risks.&#8221;</p></li></ul><p>Both chunks share the same vocabulary about ibuprofen, so vector search ranks them similarly. But only Chunk B answers the question about late pregnancy; Chunk A answers a different question, about general pain relief. The model can&#8217;t tell the difference.</p><p><strong>Constraints get washed out.</strong></p><ul><li><p>Question: &#8220;What was Apple&#8217;s revenue in Q3 2024?&#8221;</p></li><li><p>Chunk A: &#8220;Apple&#8217;s Q2 2023 revenue grew significantly, reflecting strong iPhone sales.&#8221;</p></li><li><p>Chunk B: &#8220;Apple reported Q3 2024 revenue of $85.8 billion.&#8221;</p></li></ul><p>Both chunks share the same vocabulary about Apple and quarterly revenue, so vector search ranks them similarly. But only Chunk B answers the question about Q3 2024; Chunk A answers a different question, about Q2 2023. The exact quarter barely registers in either vector.</p><p><strong>Topic match beats answer match.</strong></p><ul><li><p>Question: &#8220;How do I reset my password?&#8221;</p></li><li><p>Chunk A: &#8220;Password security is critical. Use strong passwords, enable 2FA, never share passwords...&#8221;</p></li><li><p>Chunk B: &#8220;To reset your password, click &#8216;Forgot Password&#8217; on the login page...&#8221;</p></li></ul><p>Both chunks share the same vocabulary about passwords, so vector search ranks them similarly. But only Chunk B answers the question about resetting a password; Chunk A answers a different question, about password security best practices.</p><p>Every failure traces back to one source: vector search ranks chunks by topical overlap, but topical overlap doesn&#8217;t tell you which question each chunk actually answers. The fix is in the architecture.</p><h2>The Re-Ranker</h2><p>The architectural fix is to bring the question and the chunk <em>inside</em> the same model. Instead of comparing two vectors outside the model, a re-ranker reads the question and a candidate chunk together in one forward pass, and scores how well the chunk answers that question. It compares them word by word.</p><p>This architecture is called a <strong>cross-encoder</strong>, because the query and passage attend across each other inside the model. A re-ranker is the API around it: you send a query and a list of candidates, and the service pairs the query with each candidate internally, runs the cross-encoder on every pair, and returns the sorted list.</p><div class="captioned-image-container"><figure><div class="image-link image2" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YpyL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4ab221a-bc63-4fb1-ac2f-c4c670668f96_1648x348.png 424w, https://substackcdn.com/image/fetch/$s_!YpyL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4ab221a-bc63-4fb1-ac2f-c4c670668f96_1648x348.png 848w, https://substackcdn.com/image/fetch/$s_!YpyL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4ab221a-bc63-4fb1-ac2f-c4c670668f96_1648x348.png 1272w, https://substackcdn.com/image/fetch/$s_!YpyL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4ab221a-bc63-4fb1-ac2f-c4c670668f96_1648x348.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!YpyL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4ab221a-bc63-4fb1-ac2f-c4c670668f96_1648x348.png" width="1456" height="307" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f4ab221a-bc63-4fb1-ac2f-c4c670668f96_1648x348.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:307,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:36892,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://aiarchplaybook.substack.com/i/198788395?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4ab221a-bc63-4fb1-ac2f-c4c670668f96_1648x348.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_!YpyL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4ab221a-bc63-4fb1-ac2f-c4c670668f96_1648x348.png 424w, https://substackcdn.com/image/fetch/$s_!YpyL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4ab221a-bc63-4fb1-ac2f-c4c670668f96_1648x348.png 848w, https://substackcdn.com/image/fetch/$s_!YpyL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4ab221a-bc63-4fb1-ac2f-c4c670668f96_1648x348.png 1272w, https://substackcdn.com/image/fetch/$s_!YpyL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4ab221a-bc63-4fb1-ac2f-c4c670668f96_1648x348.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div></div></div></div></figure></div><p>The cross-encoder sees which chunk answers the asked question, even when several chunks share the same vocabulary: late-pregnancy safety vs. general use, Q3 2024 vs. Q2 2023, password-reset instructions vs. password best practices. It returns a relevance score for every pair: higher means more relevant.</p><p>If you were searching by hand, you&#8217;d do the same thing. You wouldn&#8217;t write summary cards in advance. You&#8217;d grab a stack of candidate books, sit down with the question in front of you, and read each passage with the question in mind. Then you&#8217;d rank them.</p><h3>Why joint processing works</h3><p>The cross-encoder&#8217;s joint processing, reading the query and passage in one forward pass, works because of the transformer&#8217;s attention mechanism. At every layer, each token weights its relationship to every other token in the input. With the question and chunk in the same input, the model can match &#8220;Q3 2024&#8221; in the question against &#8220;Q3 2024&#8221; in one chunk and &#8220;Q2 2023&#8221; in another, and tell which one the question is asking about.</p><p>A bi-encoder runs two separate forward passes. The model has no chance to compare words across them. The comparison happens at the end, between two finished vectors, after the word-level details have been compressed away.</p><p>Joint processing means more information flowing through the same computation.</p><h3>How does the model know which words are query and which are passage (answer chunk)?</h3><p>If both texts share one input, how does the model tell query from passage?</p><p>Two special tokens. <code>[CLS]</code> marks the start of the input. <code>[SEP]</code> marks the boundary between query and passage. The combined input looks like this:</p><pre><code><code>[CLS] is ibuprofen safe during late pregnancy ? [SEP] ibuprofen is not recommended after 20 weeks . [SEP]</code></code></pre><p>The model processes both texts together, but always knows which words came from the query and which came from the passage.</p><h3>Input and output</h3><p>A re-ranker typically takes 10 to 100 candidate passages per query. It returns a relevance score per passage. Some models return values between 0 and 1; others return unbounded numbers, often in the -10 to +10 range, where higher means more relevant. Most also return a sorted index list so you know which score belongs to which passage.</p><p>You sort by score and keep the top N for your LLM.</p><p>One constraint: most cross-encoders cap input at 512 tokens for the combined query plus passage. If your chunks are long, the end gets truncated, which quietly degrades quality. Keep chunks under about 400 tokens, or pick a longer-context re-ranker like <code>bge-reranker-v2-m3</code>, which supports inputs up to 8192 tokens (though it&#8217;s fine-tuned at 1024, so very long inputs see diminishing returns).</p><h3>Bi-encoder and cross-encoder, side by side</h3><p>The bi-encoder and the cross-encoder are built on the same transformer encoder, used differently. The bi-encoder runs it twice and compares vectors outside the model; the cross-encoder runs it once and judges relevance inside.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PQSj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8db78a71-a6e4-41e3-952f-8eae000379bd_821x575.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PQSj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8db78a71-a6e4-41e3-952f-8eae000379bd_821x575.png 424w, https://substackcdn.com/image/fetch/$s_!PQSj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8db78a71-a6e4-41e3-952f-8eae000379bd_821x575.png 848w, https://substackcdn.com/image/fetch/$s_!PQSj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8db78a71-a6e4-41e3-952f-8eae000379bd_821x575.png 1272w, https://substackcdn.com/image/fetch/$s_!PQSj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8db78a71-a6e4-41e3-952f-8eae000379bd_821x575.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!PQSj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8db78a71-a6e4-41e3-952f-8eae000379bd_821x575.png" width="821" height="575" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8db78a71-a6e4-41e3-952f-8eae000379bd_821x575.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:575,&quot;width&quot;:821,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:210337,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://aiarchplaybook.substack.com/i/198788395?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8db78a71-a6e4-41e3-952f-8eae000379bd_821x575.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_!PQSj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8db78a71-a6e4-41e3-952f-8eae000379bd_821x575.png 424w, https://substackcdn.com/image/fetch/$s_!PQSj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8db78a71-a6e4-41e3-952f-8eae000379bd_821x575.png 848w, https://substackcdn.com/image/fetch/$s_!PQSj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8db78a71-a6e4-41e3-952f-8eae000379bd_821x575.png 1272w, https://substackcdn.com/image/fetch/$s_!PQSj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8db78a71-a6e4-41e3-952f-8eae000379bd_821x575.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><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 bi-encoder gives up precision to search at scale. The cross-encoder gives up scale to score with precision. Each makes up for the other&#8217;s weakness, which is why production RAG pipelines use both, in that order.</p><p>In your pipeline, the re-ranker call sits between vector search and the LLM:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!A407!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F259bc94f-f9b0-45c3-b632-b537158e303e_834x297.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!A407!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F259bc94f-f9b0-45c3-b632-b537158e303e_834x297.png 424w, https://substackcdn.com/image/fetch/$s_!A407!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F259bc94f-f9b0-45c3-b632-b537158e303e_834x297.png 848w, https://substackcdn.com/image/fetch/$s_!A407!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F259bc94f-f9b0-45c3-b632-b537158e303e_834x297.png 1272w, https://substackcdn.com/image/fetch/$s_!A407!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F259bc94f-f9b0-45c3-b632-b537158e303e_834x297.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!A407!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F259bc94f-f9b0-45c3-b632-b537158e303e_834x297.png" width="834" height="297" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/259bc94f-f9b0-45c3-b632-b537158e303e_834x297.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:297,&quot;width&quot;:834,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:37356,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://aiarchplaybook.substack.com/i/198788395?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F259bc94f-f9b0-45c3-b632-b537158e303e_834x297.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_!A407!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F259bc94f-f9b0-45c3-b632-b537158e303e_834x297.png 424w, https://substackcdn.com/image/fetch/$s_!A407!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F259bc94f-f9b0-45c3-b632-b537158e303e_834x297.png 848w, https://substackcdn.com/image/fetch/$s_!A407!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F259bc94f-f9b0-45c3-b632-b537158e303e_834x297.png 1272w, https://substackcdn.com/image/fetch/$s_!A407!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F259bc94f-f9b0-45c3-b632-b537158e303e_834x297.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><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 Not Use Re-Rankers for Everything?</h2><p>A bi-encoder lets you pre-compute every chunk&#8217;s vector once and index it. At query time, you embed the question once and search across millions of vectors in milliseconds.</p><p>A re-ranker can&#8217;t be pre-computed. Every (query, passage) pair runs through the full model at query time. Re-ranking a million chunks per query would take hours.</p><p>So you combine them:</p><ol><li><p><strong>Retrieval</strong> with a bi-encoder. Pull 50 to 100 candidates from the full corpus. Cast a wide net. The goal is recall: make sure the right chunks sit <em>somewhere</em> in those 100. (Recall measures how often the right answer appears in your results at all; precision measures how often the top result is right.)</p></li><li><p><strong>Re-ranking</strong> with a cross-encoder. Score each of the 50 to 100 candidates against the question. Sort. Keep the top 5 or 10 for the LLM.</p></li></ol><p>Speed at the recall stage, precision at the ranking stage. The two-stage approach mirrors the human librarian: narrow with rough signals, then read closely to pick the winners.</p><h2>Why Not Just Let the LLM Filter for Relevance?</h2><p>A reasonable question: why add a re-ranker at all? Why not send the top 50 chunks from vector search straight to the LLM and ask it to use only the relevant ones?</p><p>You can. It loses on accuracy, cost, and latency.</p><p><strong>Accuracy.</strong> LLMs are bad at picking the most relevant chunks when many candidates sit in the same context window. The &#8220;Lost in the Middle&#8221; paper (Liu et al., 2023) showed that across GPT-3.5 and several other models, accuracy is highest when the relevant chunk sits at the very start or end of the context, and drops 20 to 30 percentage points when it sits in the middle. Follow-up work has confirmed the same pattern on GPT-4, Claude, and Gemini, even as their context windows grew past 100K tokens. A cross-encoder scores each (query, chunk) pair on its own. Position in a list never enters the math.</p><p><strong>Cost.</strong> Sending 50 chunks (about 25,000 tokens) to a frontier LLM on every query runs roughly 10x the input-token cost of re-ranking first and sending only the top 5 (about 2,500 tokens). At 10,000 queries a day, the gap adds up.</p><p><strong>Latency.</strong> Two stages are usually faster than one. A re-rank pass takes 100 to 300ms. Sending 25,000 tokens to a frontier LLM typically takes several seconds for the first token; 2,500 tokens takes one or two. Re-ranker plus a smaller LLM call ends up noticeably faster end to end.</p><p>A re-ranker is small, fast, and trained on millions of (query, doc, relevance) pairs to do one job. An LLM is trained to write fluent answers. Asking it to also act as a precise relevance classifier inside the same call moves the work to a slower, costlier, less accurate component.</p><p>The exception is small candidate sets. With only 3 to 5 chunks, position bias is mild and re-ranking adds little. Skip it. Past about 10 candidates, the gap opens fast.</p><h2>When a Re-Ranker Isn&#8217;t Worth It</h2><p>Re-rankers have their cost. Before you add one, check whether the cost is justified:</p><ul><li><p><strong>Tight latency budgets.</strong> Re-ranking adds 100 to 500ms per query. If your end-to-end budget is under a second, that hurts.</p></li><li><p><strong>Mostly exact-keyword lookups.</strong> For product SKUs, error codes, and literal strings, BM25 (a keyword algorithm that scores documents by term frequency and rarity, used by most search engines before embeddings) often beats vector search on its own.</p></li><li><p><strong>High query volume.</strong> API re-rankers charge per call. At millions of queries per day, costs add up. Self-host an open-source re-ranker if volume is high.</p></li></ul><p>If none of these apply, and your current pipeline returns &#8220;close but not quite&#8221; results, a re-ranker is worth exploring.</p><h2>Re-Ranker Options</h2><p>A short list of re-rankers in active use. They fall into two buckets: hosted APIs (call an endpoint, pay per query) and open-weights models (download and run yourself).</p><p><strong>API-based:</strong></p><ul><li><p><strong>IBM watsonx.ai Rerank.</strong> Hosts several cross-encoder models.</p></li><li><p><strong>Cohere Rerank.</strong> Current models include <code>rerank-v3.5</code> (4096-token context) and <code>rerank-v4.0</code>.</p></li><li><p><strong>Jina Reranker.</strong> Available as API or self-hosted.</p></li><li><p><strong>Voyage Rerank.</strong> API-based; current models include <code>rerank-2</code> and <code>rerank-2.5</code>.</p></li></ul><p><strong>Open weights, self-host:</strong></p><ul><li><p><code>BAAI/bge-reranker-v2-m3</code><strong>.</strong> Multilingual; supports inputs up to 8192 tokens.</p></li><li><p><code>mixedbread-ai/mxbai-rerank-large-v2</code><strong>.</strong> Supports inputs up to 32K tokens.</p></li><li><p><code>cross-encoder/ms-marco-MiniLM-L-6-v2</code><strong>.</strong> 6-layer MiniLM cross-encoder trained on MS MARCO; commonly used as a starter model.</p></li></ul><h2>Summary</h2><p>Vector search compares fingerprints, not specifics. It compresses every chunk and every question into their vectors, then matches them by topical overlap. That works for &#8220;what is this about?&#8221; It fails when negations, exact constraints, or specific entities decide the answer.</p><p>A re-ranker reads the question and the chunk together, word by word, and scores how well one answers the other. Vector search narrows the corpus to about 50 candidates; the re-ranker picks the winners. <strong>Rough filtering, then careful reading.</strong></p><p>The payoff is concrete: a correct chunk ranked 30th by embedding similarity gets promoted to position 1 or 2 by the re-ranker. That&#8217;s the precision gap the cross-encoder recovers.</p><p>If your RAG pipeline returns &#8220;close but not quite&#8221; answers, try a re-ranker next.</p><h2>Try This</h2><ul><li><p>Clone the companion repo: <strong><a href="https://github.com/shaikhq/rag-reranker-demo">github.com/shaikhq/rag-reranker-demo</a></strong>. Run the notebook end to end, see the three failure modes, see them fixed.</p></li><li><p>Swap in your own PDF and rerun. The same lift usually shows up on real data.</p></li><li><p>Wire a re-ranker (watsonx.ai, Cohere, or a self-hosted BGE model) into your pipeline behind a feature flag.</p></li><li><p>Measure top-1 and top-5 accuracy on a small eval set, with and without re-ranking.</p></li><li><p>Tune the candidate count (50 vs 100 vs 200) and watch the precision-versus-latency curve.</p></li></ul>]]></content:encoded></item><item><title><![CDATA[How I Grew as a Technical Leader by Learning From My Mistakes Leading Major AI Projects at IBM Db2]]></title><description><![CDATA[The five lessons that came from leading AI projects from concept to delivery &#8212; and how they reshaped my technical leadership.]]></description><link>https://aiarchitectplaybook.com/p/how-i-grew-as-a-technical-leader</link><guid isPermaLink="false">https://aiarchitectplaybook.com/p/how-i-grew-as-a-technical-leader</guid><dc:creator><![CDATA[Shaikh Quader]]></dc:creator><pubDate>Thu, 30 Apr 2026 16:31:05 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!FLNj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d939664-5a5c-438c-8360-51c1c838ad02_2610x1864.jpeg" 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_!FLNj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d939664-5a5c-438c-8360-51c1c838ad02_2610x1864.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!FLNj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d939664-5a5c-438c-8360-51c1c838ad02_2610x1864.jpeg 424w, https://substackcdn.com/image/fetch/$s_!FLNj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d939664-5a5c-438c-8360-51c1c838ad02_2610x1864.jpeg 848w, https://substackcdn.com/image/fetch/$s_!FLNj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d939664-5a5c-438c-8360-51c1c838ad02_2610x1864.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!FLNj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d939664-5a5c-438c-8360-51c1c838ad02_2610x1864.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!FLNj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d939664-5a5c-438c-8360-51c1c838ad02_2610x1864.jpeg" width="1456" height="1040" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3d939664-5a5c-438c-8360-51c1c838ad02_2610x1864.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1040,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1573728,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://aiarchplaybook.substack.com/i/196006956?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d939664-5a5c-438c-8360-51c1c838ad02_2610x1864.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!FLNj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d939664-5a5c-438c-8360-51c1c838ad02_2610x1864.jpeg 424w, https://substackcdn.com/image/fetch/$s_!FLNj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d939664-5a5c-438c-8360-51c1c838ad02_2610x1864.jpeg 848w, https://substackcdn.com/image/fetch/$s_!FLNj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d939664-5a5c-438c-8360-51c1c838ad02_2610x1864.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!FLNj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d939664-5a5c-438c-8360-51c1c838ad02_2610x1864.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><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>I walked out of that meeting with a long list of gaps and one thought in my head: how am I going to pull all of this together?</p><p>I had just presented my plan for adding vector storage and search to Db2 at the Architecture Review Board, the committee of senior technical leaders who must approve every major new project before a line of code is written. I had walked in confident. I walked out humbled. The committee had found problem after problem in my plan that I had not considered. The list kept growing. Each item was a real use case that a customer would hit, and my plan had nothing to say about any of them.</p><p>I had spent nineteen years building software at IBM. I thought I knew what the job required.</p><p>I was wrong. Not about the technology. About what it actually takes to own a major AI project from concept to delivery inside a large, mature software product.</p><p><strong>My Two Recent AI Projects at Db2</strong></p><p>In the past two years I built and delivered two major AI projects at Db2.</p><p>The first was vector storage and similarity search, built directly into the database engine. This lets AI applications store collections of vector data inside the database and search through it to find similar items quickly. It is a core capability for modern AI use cases like recommendation engines and semantic search.</p><p>The second was connecting large language model APIs to Db2. This project lets application developers call these AI models directly from inside the database using standard SQL commands. Application developers no longer need to write separate code outside the database to do this.</p><p>These projects ran from the initial proposal to the final delivery under my technical ownership. More than twenty developers across multiple teams. Tight deadlines. Five Db2 platforms and many more deployment configurations. Db2 is a product used by companies for over thirty years, so a mistake is not just a bug report. It breaks the daily workflow of teams that have depended on it for decades.</p><p>The first project shipped to customers last year. The second has completed development and is scheduled to ship in the next few months.</p><p>These two projects taught me more about technical leadership than the previous nineteen years combined. Here are the five lessons I learned from leading these projects.</p><h2>Lesson 1: A new feature must work with everything the product already has and does.</h2><p>When we started building vector support, I thought the job was simple. Add something new. A new data type for storing vectors. A new way to search those stored vectors. Clean, contained work. Like building a new room in a house without touching the rest.</p><p>Users have built numerous business workflows around Db2&#8217;s existing features. There are tools for copying data out of the database to a file. There are tools for moving data from one database to another. There are SQL commands for every common task a user needs to do.</p><p>When we added the vector data type, users did not care about our internal design. They cared about their work. They expected the new vector type to work with all the same tools they already used every day with other data types. If the copy tool worked with varchar data type, they expected it to work with vectors too.</p><p>We were not just adding something new. We were taking on the responsibility of fitting into everything that already existed, without breaking the ecosystem. I had not understood that responsibility before I walked into the Architecture Review Board.</p><p>That is where the list of gaps I described in the opening came from. Each gap the committee found was a real use case that a customer would hit, and my plan had nothing to say about any of them.</p><p>I went straight to the senior architects and most experienced developers. We went through the list together, gap by gap. I asked for their guidance. We rewrote the plan several times until it was solid. A new shared plan, built together with the senior developers in my squad.</p><p>The method that came from those sessions: find the existing feature in Db2 most similar to the one you are adding. Search the entire codebase. Look at every place in the code that handles that existing feature, one by one, and decide whether your new feature needs to do the same thing. This gives you a map before you write a line of code. In a product built over many years, the people who built it will always find problems you missed. Bring them in before you think you are ready.</p><h2>Lesson 2: A good design does not coordinate teams. A leader does.</h2><p>The second project, integrating large language model APIs into Db2, made this lesson unavoidable. The feature required work from three component teams in sequence.</p><p>To add one of the new functions, we first needed new entries added to the database catalog, a central store that holds information about every object in the database. The catalog team had to finish their work before the query compiler team could start theirs. The query compiler team had to finish before the runtime team could finish theirs. Each team was waiting on the team before them. Like links in a chain.</p><p>If the catalog team finished one week late, the compiler team was stuck for a week doing nothing useful. If the compiler team was late, the runtime team was stuck too. The whole project fell behind.</p><p>I did not track these connections carefully at the start of the project. I assumed each team would manage their own work and speak up when stuck. They did not. Halfway through the project I could see that work was piling up in the wrong order. Teams were waiting on each other but not saying so out loud. Things were quietly falling apart.</p><p>I stopped the usual work and took charge of tracking every dependency myself. I asked each team one direct question: what do you need from another team before you can finish your work? I asked this at every standup meeting. If any work was not helping clear a dependency, I stopped it and pointed the team at what actually needed to happen next.</p><p>When a dependency could not be fixed in time, we found a workaround. The runtime team needed specific data from the catalog team, but the catalog work was still two weeks away. We hardcoded a temporary number as a stand-in. The runtime team used that number to keep building, completing 80 percent of their work without waiting. Once the catalog work was done, we swapped the hardcoded number for the real value. The team kept moving. The deadline held.</p><p>As a technical leader, you have to find the dependencies between teams, identify them clearly, write them down, and make sure every team can see what they are waiting for, and what other teams are waiting for from them. Do this early, or the project will slow down for reasons that are invisible until it is too late.</p><h2>Lesson 3: A squad is not formed by putting people on the same project. It is built.</h2><p>I formed my squad by pulling developers from different teams inside Db2. Some were experts in the runtime layer. Some worked on the catalog. Some worked on the query compiler. Every one of them was skilled and experienced in their own component.</p><p>What I did not expect was the resistance: not to the project itself, but to working outside their own component. Developers who spend years on one part of a codebase become very attached to that component. When asked to work in a different part, some resist. Not because they are difficult people, but because it is unfamiliar and they do not want to take responsibility for components owned by another team.</p><p>In a project where every layer of the product needs to work together, that reluctance causes real problems.</p><p>I had to build a new team culture through action, not words. I asked a runtime developer to write test cases for the query compiler section. I asked a compiler developer to write code for the catalog section. Every time someone stepped outside their usual area and helped another team, I called it out and thanked them. I wanted that behavior to feel normal, not unusual.</p><p>There was pushback. One situation stands out. The runtime team was waiting on a piece of work from the query compiler team. But the compiler team was in the middle of something that, if interrupted, would slow the whole project. Simply stopping their work was not the answer.</p><p>So we went deeper. We identified the specific code paths shared between the runtime and query compiler components, the intersection where both teams had a stake. Then we brought a runtime developer into that shared territory. They worked on the overlapping piece directly, consulting the compiler developer as needed and including them in the pull request review. Nobody had to abandon their current work. The dependency got cleared by finding where the two domains met and working from that common ground.</p><p>That became a pattern. Whenever two components had a dependency, I looked for the intersection, the code or interface they shared, and found a way to bring both developers to that point together. It was slower than simply assigning tasks. It was faster than waiting for one team to finish before the other could start.</p><p>I also made a point to listen. When someone had a concern about working outside their component, I heard them out and worked with them to find a way to contribute that felt manageable. People work better toward a shared goal when they feel heard.</p><p>Slowly the pushback faded. The squad started acting like a team. Once that happened, the speed of the work increased noticeably.</p><p>You cannot create a real team just by putting people on the same project. You build one by giving people a shared goal, listening to them, and reminding them, over and over, of what they are building together, until working as one team feels more natural than working apart.</p><h2>Lesson 4: Testing runs alongside development. Not after it.</h2><p>We wrote the code. We ran tests on our own development machines. Everything passed. We delivered the code to the release branch. I thought we were ready.</p><p>What I did not know was that Db2 has a central automated testing system. Think of it as a shared dashboard that runs thousands of tests on every piece of delivered code across all platforms and all deployment setups, automatically and continuously. Anyone can look at it and see which tests are passing and which are failing.</p><p>I had never looked at it. I did not fully understand what it showed.</p><p>Our QA lead, <a href="https://www.linkedin.com/in/darrin-woodard-b8b58911b/">Darrin Woodard</a>, showed it to us one day. The first time I saw the results for our delivered code, it was bad. Test failures everywhere. Red marks across every platform and every setup we needed to support.</p><p>Db2 runs on five different OS platforms: standard Linux, Linux on Power, Linux on Z, AIX, and Windows. Our code had to work correctly on all five. Db2 also runs in different deployment setups. Some installations spread across multiple nodes, others optimized for different types of workloads such as analytical or transactional. Every setup type can expose different bugs.</p><p>I had not thought carefully about any of this when planning the project. I underestimated how many test cases we needed to write. I underestimated how long it would take to investigate each failure and fix it.</p><p>The Db2 Chief Architect, <a href="https://www.linkedin.com/in/mike-springgay-2638a0a8/">Mike Springgay</a>, regularly reminded me of this throughout the project. He consistently brought up the importance of estimating the QA effort separately from the development effort. Eventually that lesson landed. I began to treat QA planning as its own work stream, not an afterthought.</p><p>After seeing the QA dashboard for the first time, I requested the QA lead to join our regular standup meetings. Twice a week, we opened the dashboard together and looked at every new test failure for the features we had delivered for vector support. Before the meeting ended, every failure had a name next to it: the developer in my squad responsible for investigating and fixing it.</p><p>Week by week, the failures went down. More green, less red. Then, before our internal delivery date, everything was green.</p><p>Writing code that works on your own development machine is only half the job. The other half is proving it works on every platform, in every deployment setup, in every situation a user might encounter. When it did land, it changed how I planned every subsequent release. QA was no longer something that happened after the work. It was part of the work.</p><p>Looking back, Lesson 1 and Lesson 4 are two sides of the same coin. Lesson 1 brought ecosystem awareness to the design phase. Lesson 4 confirmed that the implementation actually honored that ecosystem. One is about seeing clearly before you build. The other is about proving it after you do.</p><h2>Lesson 5: Writing code made me a better technical leader.</h2><p>For a long time I believed that leading a technical project meant staying at the level of architecture and direction, and that keeping my distance from the code made me more effective.</p><p>It did not. It kept me comfortable.</p><p>I was running design meetings. Writing technical proposals. Talking with directors, architects, and customers.</p><p>But all of it kept me away from writing code for the actual product features we were shipping. The developers on my team were writing code every day. I was managing, reviewing designs, making decisions, and representing the project to people outside the team. I understood the system at a high level: what it did, how the pieces fit together. I did not understand it at the level where the real problems live: inside the code.</p><p>I gave myself a coding assignment. Real product code: the kind that gets reviewed, approved, merged into the main codebase, and shipped to customers.</p><p>I started with a relatively simpler function: the vector dimension count function. This calculates the number of dimensions in an input vector. I had built an earlier version of this as a user-defined function, a separate script outside the database. Now I needed to build it properly as a native part of Db2 itself.</p><p>I wrote the SQL grammar rules that let users call the function. I wrote the code that actually runs the calculation. I built it the same way every developer on my team builds their features: design it, write it, test it, find the bugs, fix them, write more tests, repeat.</p><p>Implementing this first function took me nearly four weeks. I was not working on it full time. I was still doing everything else too. And I was learning this part of the codebase, much of it for the first time. I wrote notes about everything as I progressed: what I tried, what worked, what did not, what I learned. I kept a running log in the Git issue tracker. Screenshots. Code comments. A record of how the feature was built from nothing.</p><p>Then I sent the code for review. To a senior developer on my team, someone whose work I had been reviewing and approving for months.</p><p>He came back with more than fifteen things that needed to change.</p><p>I had thought the code was good. It ran. The tests passed on my machine. But &#8220;it runs&#8221; and &#8220;it is ready for shipping&#8221; are very different bars. A developer who has worked in this codebase for years sees things a newer person cannot see. I read every comment. I made every change. I sent it back. More comments. More changes. Several rounds. It was hard, not because the feedback was unfair, but because it was right.</p><p>Everything I wrote down during the first feature paid off on the second. The steps were similar. I had a working template for developing new features. Four weeks became two. On the third feature, more complex than the first two, I blocked time on my calendar and focused. I opened a pull request with complete, working code in just two days.</p><p>Not because the reviewers stopped looking carefully. Because the code I was writing was getting better.</p><p>I was no longer an outsider, a non-developer technical leader telling others what to build. I was one of them. One of the developers in the front line, co-creating the feature code. When I sat in design discussions, my questions were more specific, more tied to the actual code, more connected to how things would actually work. The team&#8217;s relationship with me changed too, not because of my job title, but because they had looked at my code line by line, told me what to fix, and watched me fix it the same way I asked them to fix their own work.</p><p>The day I stopped thinking of myself only as the leader and started being a developer again. That was the day I became a better leader.</p><h2>What I Know Now</h2><p>On any given day across these projects I was the architect, the project manager, the developer, the QA reviewer, the stakeholder manager, and the face of the project to customers and senior leadership. Sometimes all in the same day. That is what technical ownership of an AI project at this level actually looks like. It is not one job. It is many jobs, held together by a clear goal and the discipline to keep moving toward it.</p><p>These projects gave me something harder to build than technical knowledge: real confidence, strong working relationships across many teams, and the clarity to take on what comes next. I can now lead AI projects at a scale and complexity I could not have handled two years ago. There is more to build. I plan to build it.</p><p>When I walked out of that Architecture Review Board meeting with a long list of gaps, I did not have what I have now. I had nineteen years of experience and a plan that was not ready.</p><p>What I have now came from two years of doing the work, getting things wrong, and rebuilding my understanding one lesson at a time. It came from tracking dependencies no one else was tracking. From writing code that got sent back with fifteen things to fix. From saying the same thing to the same team dozens of times until it finally landed.</p><p>These are not lessons I read in a book or learned in a course. They are the kind that only come from doing the work, from standing in the middle of something hard and finding your way through it.</p><p>I shared them because I wish someone had shared them with me.</p>]]></content:encoded></item><item><title><![CDATA[I Spent One Hour Showing Engineering Students How to Use AI. This Is That Talk.]]></title><description><![CDATA[How I use AI to run a full-time role at IBM and a PhD at the same time, and the free AI tools every engineering student can start with today.]]></description><link>https://aiarchitectplaybook.com/p/i-spent-one-hour-showing-engineering</link><guid isPermaLink="false">https://aiarchitectplaybook.com/p/i-spent-one-hour-showing-engineering</guid><dc:creator><![CDATA[Shaikh Quader]]></dc:creator><pubDate>Tue, 14 Apr 2026 03:26:41 GMT</pubDate><enclosure url="https://api.substack.com/feed/podcast/194145457/52afbb262392caf6bf2471f1f2f8fb5b.mp3" length="0" type="audio/mpeg"/><content:encoded><![CDATA[<p>Fifteen years ago I was on a 24/7 on-call rotation at IBM, pager always within reach. When it went off past midnight, I opened my laptop and started reading logs. No AI. No assistant. Nobody else awake. That investigation ran for as long as it took, sometimes until mid morning.</p><p>Last week, I hit a bug in code I was writing for Db2. The same category of problem that once kept me up until mid morning. I shared the error with an AI coding agent. Root cause identified. Fix applied. Done. Under two minutes.That is not a small improvement. That is a different kind of work.</p><p>Last Saturday I shared both of those stories with 35 university students from India, most of them computer science majors, preparing for careers in AI engineering. Then I showed them exactly what sits between those two moments, the tools, the habits, and the mindset shifts that made the difference.</p><p>In the session we covered three things. First, how I currently hold a full-time role as AI Architect at IBM Db2 and complete a PhD in AI at the same time, using AI tools to run both tracks in parallel. Second, three prompting habits that immediately change what you get back from any AI tool, including how I use AI when reading something new. Third, two free tools you can open today: Claude and NotebookLM.</p><p>The session also opened up questions from the audience that made it richer. Someone in the audience asked how a student studying neuroscience, not computer science, can start using AI. We talked about how AI makes you a sharper learner, not just a faster coder. And we closed with three specific tasks you can act on this weekend.</p><p>If you are an engineering student preparing for a career in AI, this session was made for you.</p>]]></content:encoded></item><item><title><![CDATA[I Joined IBM With No Personal Operating System. So I Built One.]]></title><description><![CDATA[For students stepping into their first engineering role, this is the roadmap I wish I had on day one at IBM.]]></description><link>https://aiarchitectplaybook.com/p/i-joined-ibm-with-no-personal-operating</link><guid isPermaLink="false">https://aiarchitectplaybook.com/p/i-joined-ibm-with-no-personal-operating</guid><dc:creator><![CDATA[Shaikh Quader]]></dc:creator><pubDate>Tue, 07 Apr 2026 16:40:22 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!BFPq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7294b0a-9730-4f58-b544-fdf65f48c9d3_1456x1048.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_!BFPq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7294b0a-9730-4f58-b544-fdf65f48c9d3_1456x1048.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BFPq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7294b0a-9730-4f58-b544-fdf65f48c9d3_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!BFPq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7294b0a-9730-4f58-b544-fdf65f48c9d3_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!BFPq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7294b0a-9730-4f58-b544-fdf65f48c9d3_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!BFPq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7294b0a-9730-4f58-b544-fdf65f48c9d3_1456x1048.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!BFPq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7294b0a-9730-4f58-b544-fdf65f48c9d3_1456x1048.png" width="1456" height="1048" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b7294b0a-9730-4f58-b544-fdf65f48c9d3_1456x1048.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1048,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2156725,&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://aiarchplaybook.substack.com/i/193472725?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7294b0a-9730-4f58-b544-fdf65f48c9d3_1456x1048.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_!BFPq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7294b0a-9730-4f58-b544-fdf65f48c9d3_1456x1048.png 424w, https://substackcdn.com/image/fetch/$s_!BFPq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7294b0a-9730-4f58-b544-fdf65f48c9d3_1456x1048.png 848w, https://substackcdn.com/image/fetch/$s_!BFPq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7294b0a-9730-4f58-b544-fdf65f48c9d3_1456x1048.png 1272w, https://substackcdn.com/image/fetch/$s_!BFPq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7294b0a-9730-4f58-b544-fdf65f48c9d3_1456x1048.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><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>My first day at IBM was in 2005. I was a student intern, excited, prepared technically, and completely lost by the end of the day. Not lost in the code. Lost in everything around it. I joined full time shortly after graduating and the feeling did not go away. If anything it got sharper.</p><p>This is the post I wish had existed before I walked through those doors.</p><h2>Where this came from</h2><p>Before IBM I had done internships at smaller organizations in New Brunswick, a government office and a few small IT companies. Good experiences. But nothing that prepared me for what IBM actually was. A few friends had interned there before me but nobody told me what it was like on the inside. The only thing I thought I needed to prepare was my technical skills.</p><p>I was wrong.</p><p>Day one I was lost. Not after a few weeks of settling in. Day one. The scale of it, the complexity of it, the sheer number of things I did not understand hit me immediately. The people, the team dynamics, the processes, the unspoken expectations. Smart, experienced professionals all around me who seemed to know exactly how everything worked. I did not know how to navigate any of it. I did not know what was expected of me beyond the technical work. I did not know how to read the room, how to ask the right questions, or how to exist in that environment without feeling like I did not belong there.</p><p>The technology was never the problem. I could handle that.</p><p>What I couldn&#8217;t handle was everything else.</p><p>I struggled to communicate, really communicate. Listening in meetings without tuning out. Writing clearly under pressure. Speaking with any confidence in a room full of people who seemed to know exactly where they stood. Reading the room. Navigating across personalities. Knowing when to push and when to wait.</p><p>I didn&#8217;t know how to exist in that environment. I didn&#8217;t believe I belonged there.</p><p>I didn&#8217;t know the path forward. I just knew I was lost.</p><p>Three people changed that.</p><p>My supervisor <a href="https://www.linkedin.com/in/tahsinrouf/">Tahsin Rouf</a>, my first IBM manager Kent Klaas, and my second manager <a href="https://www.linkedin.com/in/ed-van-gennip-8964b11a/">Ed Van Gennip</a>. Their support in my early years at IBM was not incidental. It was foundational. The trajectory I have been able to build over the past 20 years, everything I have learned, taught, and contributed, sits on the base they helped me build. Tahsin saw something in me at exactly the right moment and offered guidance when I had no idea how to ask for it. Kent supported me consistently and introduced me to mind mapping, a thinking tool I still use today for planning and problem solving. Ed believed in me deeply and gave me the kind of continuous feedback, support, and direction that most early-career people never get. I want to name them here because people like this rarely get named. They should.</p><p>And I joined Toastmasters.</p><p>That decision opened something I did not expect. Not just better communication. A deep curiosity about the foundational skills nobody had ever taught me. How to learn better. How to think more critically. How to listen deeply, and build the kind of discipline that actually compounds over a career. I started taking IBM&#8217;s internal courses. I started building personal frameworks. I started testing things on myself.</p><p>Then came the moment that pulled everything together.</p><p>About a year or two into my time at IBM, I volunteered to run Think Friday. A weekly internal knowledge-sharing session for our team. I wanted to do it well, not just show up and lead it. So before I ran my first session I read a book called &#8220;<a href="https://www.amazon.ca/Not-Another-Meeting-Practical-Facilitating/dp/1555716326">Not Another Meeting</a>&#8221; by Frances A. Micale. That book gave me something specific: a method. How to prepare with a clear outcome in mind, how to structure the discussion, how to manage debate productively, how to take notes that were actually useful, and how to close with clear action items organized by topic and next step.</p><p>I ran Think Friday that way for two to three years.</p><p>Looking back, those sessions taught me more than I realized at the time. How to bring a group of people toward a common objective. How to hold a productive discussion without letting it drift. How to capture what actually matters and make it useful afterward. How to lead a room, not just occupy it.</p><p>That weekly meeting was a turning point. Not because it was high-stakes. Because it was consistent. I got the repetitions. And the confidence that came from those repetitions was real in a way that no single course or credential ever produced.</p><h2>What was missing</h2><p>Looking back, I was technically prepared and foundationally underprepared. Both things were true at the same time.</p><p>The technical skills got me hired. They kept me moving in the first few weeks. But the moment I needed to work across a team, recommend a clear solution, listen in a meeting without missing half of what was actually being said, or simply believe I had a right to be in the room, the technical skills went quiet. They had nothing to say.</p><p>Nobody had ever taught me those things. Not in school. Not in any course. Not in any internship prep session I had ever sat through.</p><p>I had to figure them out the hard way, mostly alone, mostly by making mistakes I did not understand until much later. The difference was that I eventually found people who believed in me, and I found a way to practice. Most students never find either.</p><h2>The framework, step by step</h2><p>After two decades of learning this myself and then teaching it to students, I have found the foundational skills fall into a small number of areas that show up again and again. These are not soft skills in the vague, resume-filler sense. They are specific and learnable.</p><ol><li><p><strong>Communication that actually works in a corporate environment.</strong> Not presentation polish. The ability to write a clear email, summarize a meeting, give feedback without creating defensiveness, and ask a question without sounding lost. This also includes thinking tools. Kent Klaas showed me mind mapping early in my career as a way to organize thinking before writing or speaking. It changed how I approach any problem that feels too big to tackle in a straight line. These skills are different from anything you practiced in school and they matter from day one.</p></li><li><p><strong>Learning how to learn on the job.</strong> School gives you structured problems with known answers. Work gives you ambiguous problems with moving targets. Building a personal system for learning new things fast, the way I built one by reading a single practical book before running my first meeting, is a skill in itself.</p></li><li><p><strong>Navigating the environment, not just the work.</strong> Understanding how decisions get made. Reading team dynamics. Knowing when to speak up and when to listen. This is not political in the negative sense. It is situational awareness, and it determines whether your technical work ever lands.</p></li><li><p><strong>Believing you belong there.</strong> This one sounds soft. It is not. Self-doubt is not a feeling to push through. It is a pattern that shapes every decision you make, who you ask for help, whether you volunteer for harder problems, how you handle feedback. The students who address it directly move faster than the ones who try to outwork it.</p></li><li><p><strong>Building discipline that compounds.</strong> The habits you build in your first year set the baseline for everything that follows. Not productivity hacks. The small consistent things: how you prepare for meetings, how you follow up, how you manage your own energy, how you stay curious when the work gets repetitive. Running Think Friday every week for two to three years was not glamorous. It was the repetition that built the skill.</p></li></ol><h2>The two assets most students skip</h2><p>Following this kind of framework produces two things that matter more than any project portfolio.</p><p>The first is self-awareness about where you actually are. Not where you think you are, not where you hope you are. A clear read on what is working and what is not, grounded in real situations from your actual job.</p><p>The second is a personal operating system. A small set of principles and habits you have tested on yourself and trust. Not borrowed from a book. Yours. Mine started with a practical meeting guide and a weekly Friday session. It grew from there.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fev6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff73037a0-17ed-407d-8792-055065e7ee95_1400x1152.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fev6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff73037a0-17ed-407d-8792-055065e7ee95_1400x1152.png 424w, https://substackcdn.com/image/fetch/$s_!fev6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff73037a0-17ed-407d-8792-055065e7ee95_1400x1152.png 848w, https://substackcdn.com/image/fetch/$s_!fev6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff73037a0-17ed-407d-8792-055065e7ee95_1400x1152.png 1272w, https://substackcdn.com/image/fetch/$s_!fev6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff73037a0-17ed-407d-8792-055065e7ee95_1400x1152.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!fev6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff73037a0-17ed-407d-8792-055065e7ee95_1400x1152.png" width="1400" height="1152" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f73037a0-17ed-407d-8792-055065e7ee95_1400x1152.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1152,&quot;width&quot;:1400,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:181187,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://aiarchplaybook.substack.com/i/193472725?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff73037a0-17ed-407d-8792-055065e7ee95_1400x1152.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_!fev6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff73037a0-17ed-407d-8792-055065e7ee95_1400x1152.png 424w, https://substackcdn.com/image/fetch/$s_!fev6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff73037a0-17ed-407d-8792-055065e7ee95_1400x1152.png 848w, https://substackcdn.com/image/fetch/$s_!fev6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff73037a0-17ed-407d-8792-055065e7ee95_1400x1152.png 1272w, https://substackcdn.com/image/fetch/$s_!fev6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff73037a0-17ed-407d-8792-055065e7ee95_1400x1152.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button class="pencraft pc-reset pencraft icon-container restack-image buttonBase-tqxFUX" tabindex="0" type="button"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 class="pencraft pc-reset pencraft icon-container view-image buttonBase-tqxFUX" tabindex="0" type="button"><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 icon-noB79L"><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 this works</h2><p>Corporate environments, and AI teams in particular, move fast and reward people who can operate with ambiguity, communicate clearly under pressure, and keep building without waiting to be told what to do next.</p><p>The students I have seen thrive earliest are not always the most technically brilliant. They are the ones who understood early that the job was bigger than the code. They put time into the foundational skills deliberately, not because someone told them to, but because they could see the gap and decided to close it.</p><p>That gap is real. It is common. And unlike a lot of things in your career, it is entirely within your control to work on.</p><p>After 20 years at IBM, mentoring and helping more than 100 students across undergrad, masters, and PhD programs, I still see the same gap show up in the same way. Not because students are underprepared. Because nobody told them it existed.</p><p>That is exactly why I am sharing this with you now.</p>]]></content:encoded></item></channel></rss>