<?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[The Computist Journal: Practice]]></title><description><![CDATA[How to actually use AI well, for working adults.]]></description><link>https://blog.apiad.net/s/practice</link><image><url>https://substackcdn.com/image/fetch/$s_!cjJH!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45cb08f7-6072-414b-a0ec-a0c57c53b74c_1024x1024.png</url><title>The Computist Journal: Practice</title><link>https://blog.apiad.net/s/practice</link></image><generator>Substack</generator><lastBuildDate>Fri, 30 Oct 2026 18:03:17 GMT</lastBuildDate><atom:link href="https://blog.apiad.net/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Alejandro Piad Morffis]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[apiad@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[apiad@substack.com]]></itunes:email><itunes:name><![CDATA[Alejandro Piad Morffis]]></itunes:name></itunes:owner><itunes:author><![CDATA[Alejandro Piad Morffis]]></itunes:author><googleplay:owner><![CDATA[apiad@substack.com]]></googleplay:owner><googleplay:email><![CDATA[apiad@substack.com]]></googleplay:email><googleplay:author><![CDATA[Alejandro Piad Morffis]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[AI is doing something weird to Science]]></title><description><![CDATA[In both good and bad ways, and it won't go away.]]></description><link>https://blog.apiad.net/p/ai-is-doing-something-weird-to-science</link><guid isPermaLink="false">https://blog.apiad.net/p/ai-is-doing-something-weird-to-science</guid><dc:creator><![CDATA[Alejandro Piad Morffis]]></dc:creator><pubDate>Mon, 25 May 2026 12:40:28 GMT</pubDate><enclosure url="https://images.unsplash.com/photo-1636466497217-26a8cbeaf0aa?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxOHx8c2NpZW5jZXxlbnwwfHx8fDE3Nzk1NjgyMzl8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" 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://images.unsplash.com/photo-1636466497217-26a8cbeaf0aa?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxOHx8c2NpZW5jZXxlbnwwfHx8fDE3Nzk1NjgyMzl8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://images.unsplash.com/photo-1636466497217-26a8cbeaf0aa?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxOHx8c2NpZW5jZXxlbnwwfHx8fDE3Nzk1NjgyMzl8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1636466497217-26a8cbeaf0aa?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxOHx8c2NpZW5jZXxlbnwwfHx8fDE3Nzk1NjgyMzl8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1636466497217-26a8cbeaf0aa?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxOHx8c2NpZW5jZXxlbnwwfHx8fDE3Nzk1NjgyMzl8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1636466497217-26a8cbeaf0aa?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxOHx8c2NpZW5jZXxlbnwwfHx8fDE3Nzk1NjgyMzl8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1456w" sizes="100vw"><img src="https://images.unsplash.com/photo-1636466497217-26a8cbeaf0aa?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxOHx8c2NpZW5jZXxlbnwwfHx8fDE3Nzk1NjgyMzl8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" width="4032" height="3024" data-attrs="{&quot;src&quot;:&quot;https://images.unsplash.com/photo-1636466497217-26a8cbeaf0aa?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxOHx8c2NpZW5jZXxlbnwwfHx8fDE3Nzk1NjgyMzl8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:3024,&quot;width&quot;:4032,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;a chalkboard with some writing on it&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="a chalkboard with some writing on it" title="a chalkboard with some writing on it" srcset="https://images.unsplash.com/photo-1636466497217-26a8cbeaf0aa?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxOHx8c2NpZW5jZXxlbnwwfHx8fDE3Nzk1NjgyMzl8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1636466497217-26a8cbeaf0aa?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxOHx8c2NpZW5jZXxlbnwwfHx8fDE3Nzk1NjgyMzl8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1636466497217-26a8cbeaf0aa?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxOHx8c2NpZW5jZXxlbnwwfHx8fDE3Nzk1NjgyMzl8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1636466497217-26a8cbeaf0aa?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxOHx8c2NpZW5jZXxlbnwwfHx8fDE3Nzk1NjgyMzl8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><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 tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><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">Photo by <a href="https://unsplash.com/@artturijalli">Artturi Jalli</a> on <a href="https://unsplash.com">Unsplash</a></figcaption></figure></div><p>Picture Donald Knuth. Eighty-eight years old, the man who wrote <em>The Art of Computer Programming</em> by hand in TeX, which he invented himself to be able to write his own books. The father of algorithmic analysis. The most laudeated living computer scientist. A legend, and a well-known AI skeptic. </p><p>Now picture him reading a printed chat log between a fellow colleague and <em>Claude Code</em>. Not skimming. Reading it in detail, because there is something genuinely baffling about it.</p><p>The log belongs to Filip Stappers, a mathematician who ran thirty-one coding explorations with Claude Opus 4.6, systematically probing a class of combinatorial objects Knuth had spent <em>decades</em> thinking about. Exploration 15 surfaced something unexpected: a structural pattern nobody had written down. </p><p>Knuth read it, judged it valid, proved it correct by hand, and wrote a paper about it. He called it &#8220;Claude&#8217;s Cycles.&#8221; Knuth noted, with his characteristic precision, that he&#8217;ll &#8220;have to revise his opinions about generative AI&#8221; one of these days.</p><p>Most accounts that open with this scene take one of two off-ramps.</p><p>The first off-ramp is the <strong>replacement narrative</strong>. AI is now the scientist. The model had the insight; Stappers just ran the prompts; Knuth read the output and judged it true. <em>Discovery has been automated</em>. We are, depending on your temperature, either liberated or obsolete.</p><p>The second off-ramp is the <strong>stochastic-parrot dismissal</strong>. It&#8217;s just a language model predicting tokens. It doesn&#8217;t understand combinatorics; it doesn&#8217;t understand anything. Stappers did the science; Claude shuffled plausible-sounding symbols. Attribute the discovery to the researcher, not the autocomplete.</p><p>Both off-ramps feel satisfying. Both are wrong. And they&#8217;re wrong in the same way: they&#8217;re answering the question &#8220;did AI do the science?&#8221; That&#8217;s the wrong question. The interesting object is not the agent. <em>It&#8217;s the loop.</em></p><p>The loop looks like this: a human poses a question; a model proposes candidates; a verifier filters the candidates; a human curates what survives. Round and round. What Stappers and Claude did is not fundamentally different in shape from what Tao and Lean are doing, or what the GNoME pipeline does in materials science, or what AlphaFold did for protein structure. The shape is the same. <em>The loop does the discovery.</em></p><p>I want to be clear about what that means, because it&#8217;s easy to hear it as either a compliment to AI or a dismissal. It is neither. It&#8217;s an empirical claim about where the causal action lives. Not in the model, not in the human, but in the <em>interaction structure</em> between them. Get that structure right and you get science. Get it wrong and you get confident nonsense at scale. The details of what &#8216;wrong&#8217; looks like are worth walking through carefully, and we&#8217;ll do that a couple of sections down.</p><p>But before we can dismiss either off-ramp, we need to walk four recent cases. Because in every one of them &#8212; Claude&#8217;s Cycles, Tao and Lean, AlphaFold, GNoME &#8212; the replacement narrative is not just philosophically confused. It is empirically wrong. The loop does the discovery.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.apiad.net/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Computist Journal! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h2>Four Cases, One Shape</h2><p>In each of the following cases, the loop does the discovery. I&#8217;m going to give you four of them across four domains, because I think the pattern only becomes undeniable when you see it that many times. Same shape, different materials.</p><h3>Claude&#8217;s Cycles</h3><p>You already have the scene. Stappers runs thirty-one explorations. Not one inspired conversation, thirty-one numbered, documented, methodical probes. Claude proposes. Stappers evaluates. Knuth reads the surviving logs, verifies the mathematical claims by hand, and writes. One human author. One credited co-explorer. The question was Stappers&#8217;; the verification was Knuth&#8217;s; the curation of which thirty-one explorations were worth pursuing was human throughout. The model was the proposer.</p><p>That word matters, and I want to be precise about it. <em>Proposer.</em> Not discoverer, not author, not scientist. The one that generates candidates fast enough that the verifier can find something in the haystack.</p><h3>Tao and Lean</h3><p>Terence Tao, Fields Medal, the current standard of living mathematical genius, has been publicly working through what it looks like to use LLMs for mathematical research. His account in the <em>Notices of the American Mathematical Society</em> in 2025 is careful and specific, and I appreciate the care because it&#8217;s easy to overread these things in both directions.</p><p>Here&#8217;s what you&#8217;re actually looking at: an LLM proposes proof steps, intermediate claims, candidate lemmas, reformulations of the problem. Lean&#8217;s type-checker is the verifier. And Lean&#8217;s type-checker cannot be fooled. It either accepts a proof term or it doesn&#8217;t. There&#8217;s no &#8220;plausible-sounding but wrong&#8221; in Lean. The system rejects garbage instantly and silently. What the human does &#8212; Tao, or anyone in his lab &#8212; is curate: which of the surviving proof steps are worth following, which directions are worth pursuing. The loop is tight. The proposer is creative and unreliable; the verifier is reliable and uncreative; the human operates between them.</p><p>I&#8217;d reframe that: the breakthrough isn&#8217;t that LLMs can now do mathematics. It&#8217;s that the loop can now run fast enough and cheaply enough to be useful.</p><h3>AlphaFold</h3><p>I want to include this one even though it&#8217;s older and better-known, because it&#8217;s the case where people most confidently say &#8220;AI solved the problem.&#8221; And that confidence is telling.</p><p>The problem was fifty years old. How does a protein fold? You have the amino acid sequence; you want the three-dimensional structure; that structure determines function; that function determines everything downstream in biology and drug design. AlphaFold 2 proposes structures. Experimental crystallography verifies them: X-ray diffraction, cryo-electron microscopy, techniques that require real equipment, real samples, real physics. You cannot hallucinate a crystal structure into being; the protein either folds the way the model says or it doesn&#8217;t, and the experimental method tells you which. AlphaFold 3 extended this to molecular complexes: DNA, RNA, small-molecule ligands binding to proteins.</p><p>I think this is worth sitting with: human researchers curated which structures were worth solving, which proteins mattered, which findings were publishable. AlphaFold proposed. Nature verified. Humans curated.</p><h3>GNoME and A-Lab</h3><p>This is the one I find most clarifying, because the verifier here is the most brutally physical. You can&#8217;t argue with a crystal.</p><p>GNoME &#8212; Google DeepMind&#8217;s Graph Networks for Materials Exploration, if you want the full name &#8212; generated 380,000 candidate stable crystal structures. That&#8217;s the proposal stage. Then A-Lab, UC Berkeley&#8217;s autonomous laboratory, took 58 of those candidates and actually tried to synthesize them. Robotically. With real chemicals, real furnaces, real diffraction equipment to check what came out. Forty-one novel materials were successfully synthesized in 17 days.</p><p>Think about the verifier in that loop. Not a type-checker, not a scoring function. A physical robot in a real lab mixing real compounds at real temperatures and asking whether the crystal forms. You cannot fake a crystal. If A-Lab says it synthesized a novel stable material, it synthesized a novel stable material. The model proposed; the physical world verified; human researchers curated which structures were interesting enough to attempt.</p><p>I want to be blunt here: the pattern is not subtle. In every case: model proposes, independent verifier filters, human curates. The model is never the verifier. The model is never the question-poser. The model occupies exactly one slot in the loop, and it&#8217;s the slot that benefits most from creativity, speed, and a high tolerance for being wrong.</p><p>The replacement narrative requires you to believe the model is doing all three jobs. It isn&#8217;t. Empirically, demonstrably, across four domains, it isn&#8217;t.</p><p>Before we anatomize what changed inside the loop, it is worth noting that this shape is fifty years old. Because that changes what we should find surprising.</p><h2>The Loop Has Is Older Than You Think</h2><p>The loop does the discovery today in the same way it did the discovery in 1976.</p><p>I want to be somewhat insistent about this, because I think the historical amnesia around computational assistance in science is part of what makes AI discourse so unmoored. This isn&#8217;t new. What&#8217;s new is narrower than you think, and understanding exactly what changed is the only way to correctly evaluate what it means.</p><h3>Appel and Haken, 1976</h3><p>You probably know this one: the four-color theorem says any map can be colored with four colors such that no adjacent regions share a color. Mathematicians had been trying to prove it since 1852. In 1976, Kenneth Appel and Wolfgang Haken proved it. Using a computer. Their proof involved reducing the problem to 1,482 configurations and verifying each one computationally. No human read every step. No human could. The proof was real; the verification was mechanical.</p><p>The mathematical community was genuinely unsettled. The theorem wasn&#8217;t wrong. But the proof didn&#8217;t fit the usual epistemological frame. You couldn&#8217;t follow it the way you follow a conventional proof. You had to trust the computer. That discomfort was the first serious confrontation with what I&#8217;m calling the loop: humans posed the problem, humans designed the reduction, a computer verified the 1,482 cases, humans accepted the surviving result.</p><p>Same shape. Fifty years earlier.</p><h3>Hales and Flyspeck, 1998&#8211;2014</h3><p>Thomas Hales proved Kepler&#8217;s sphere-packing conjecture in 1998. The conjecture: the way you&#8217;d intuitively stack cannonballs, face-centered cubic packing, is in fact the densest possible arrangement. The proof relied on computer enumeration so extensive that the referees couldn&#8217;t verify it. They were &#8220;99% confident&#8221; and said so, which is an unusual thing for mathematical referees to say.</p><p>Sixteen years later &#8212; <em>sixteen years</em> &#8212; the Flyspeck project completed a formal verification of the proof in HOL Light, a proof assistant. I want to dwell on that: sixteen years. The loop had a very slow verifier in the middle. It still worked. The result was real.</p><p>Sixteen years from claim to verified closure. I find that humbling. We talk about AI accelerating science as though &#8220;fast&#8221; is a new property of loops. The loop has always done the discovery. Sometimes slowly.</p><h3>AI Feynman, 2020</h3><p>You won&#8217;t usually see this one in the AI-in-science timelines, but it belongs here. Silviu-Marian Udrescu and Max Tegmark built a system called AI Feynman that uses symbolic regression (searching the space of mathematical expressions) to recover physics equations from data. Feed it measured relationships between physical quantities; it proposes the equation. Tested on 100 equations from the Feynman Lectures on Physics. Human scientists posed the problems; the system proposed expressions; formal mathematical checks filtered them.</p><p>This is 2020, two years before the moment people usually date as the AI-in-science inflection. I find it clarifying: the loop is the same.</p><h3>What 2022 Actually Changed</h3><p>Here&#8217;s what changed. One thing in the loop changed, and it&#8217;s the proposer slot.</p><p>Before roughly 2022, the proposer in loops like these was domain-specific, narrow, and hand-engineered. AlphaFold&#8217;s architecture was designed from the ground up for protein structure prediction. The Flyspeck enumeration was written for Kepler&#8217;s problem. AI Feynman&#8217;s symbolic regression engine was built for recovering physics equations. The verifiers were already strong: formal proof checkers, physical experiments, crystallography. The curators were already human. But building a proposer required significant domain-specific engineering effort for each new application.</p><p>What changed, and I think this is the key move, is that <em>the proposer slot is now increasingly occupiable by general-purpose large language models that can be directed with natural-language specifications</em>. </p><p>The same model that helps Stappers explore combinatorial objects can, with different prompts, propose protein structures, generate proof steps, suggest material candidates. It&#8217;s not that the model does these things well in some absolute sense. It does them well enough that a strong verifier can find the real results in the output. And FunSearch, DeepMind&#8217;s system for mathematical discovery, goes a step further: it uses LLMs to generate the search strategy itself. AlphaEvolve extends this to evolving the algorithms. The proposer writes the proposer.</p><p>I want to flag what didn&#8217;t change: verifier reliability, human curation, question-posing. Knuth still read the logs. Tao still decides which lemmas are worth pursuing. The IMO committee still wrote the problems. The physical world still decides whether a crystal forms.</p><p>So: what exactly is the loop, and what changed inside it? The proposer and verifier are different jobs &#8212; you can confuse them, and that confusion is the mistake that both off-ramps make.</p><h2>Anatomy of the Loop</h2><p>The loop does the discovery. But what is the loop, exactly? It has four roles: <em>poser</em>, <em>proposer</em>, <em>verifier</em>, <em>curator</em>. They are not interchangeable.</p><p>I want to be specific about each, because vagueness here is where confused takes come from. When someone says &#8220;AI did the science,&#8221; they&#8217;re usually collapsing all four roles into one and attributing them to the model. When someone says &#8220;it&#8217;s just a tool,&#8221; they&#8217;re usually denying that the proposer role is meaningfully distinct from, say, a search engine. Both collapses are wrong.</p><h3>The Proposer Role</h3><p>I want to define this carefully, because the proposer role is where most confusion lives. The proposer generates candidates. That&#8217;s it. It doesn&#8217;t need to know which candidates are correct; it doesn&#8217;t need to understand the domain at the level required to verify; it doesn&#8217;t need to bear accountability for wrong answers. It just needs to produce output that the verifier can evaluate. Fast. In large quantities. With enough breadth that interesting things appear in the distribution.</p><p>This is a real and important job. Generating candidates well, in a domain, at the right level of specificity, with the kind of variety that makes the verifier&#8217;s job tractable, is genuinely hard. What LLMs are good at is producing plausible candidates in natural-language-specified domains. That&#8217;s useful precisely because &#8220;plausible&#8221; is a different bar from &#8220;correct.&#8221; The proposer buys lottery tickets; the verifier checks which ones won.</p><h3>Galactica, or: What Happens Without a Verifier</h3><p>In November 2022, Meta released Galactica, a large language model trained on scientific literature. I remember when this dropped: the pitch was that it could reason about science, write papers, explain concepts, generate hypotheses. It was fluent. Confident. It had read more papers than any human alive.</p><p>It was retracted in three days.</p><p>Galactica produced plausible-sounding but fabricated citations. It generated chemistry that was wrong. It stated incorrect facts with the same calm certainty it used for correct ones. The model had no verifier. It had no external check against which its proposals were filtered. It was a proposer talking directly to readers who were treating it as a verifier.</p><p>That&#8217;s the failure mode. &#8220;LLMs are bad at science&#8221; is the wrong lesson. Galactica was a capable proposer deployed without a loop. Dump the proposer&#8217;s output directly into the world, skip the verifier, and you get confident nonsense. The problem wasn&#8217;t the model. The problem was the missing loop.</p><h3>The Verifier Role</h3><p>I want to be careful here, because this is where the asymmetry lives. The verifier is not creative. The verifier must be <em>right</em>. These are the two properties that matter.</p><p>Lean&#8217;s type-checker does not hallucinate. It processes a proof term and either accepts it or rejects it, and its answer is correct by construction: it&#8217;s checking against the formal rules of type theory, and it doesn&#8217;t have opinions or moods or bad days. A crystal either forms or it doesn&#8217;t. X-ray diffraction either confirms the predicted structure or it doesn&#8217;t. These verifiers are not AI systems. They&#8217;re physics, or mathematics, or formal logic.</p><p>Here&#8217;s a slogan worth keeping: <em>the verifier is the one that matters.</em> A loop with a weak proposer and a strong verifier still produces valid science &#8212; it&#8217;s just slow, because it needs more proposals before one survives &#8212; this is just what &#8220;normal science has been so far&#8221;, slow proposer, strong verifier. </p><p>A loop with a strong proposer and a weak verifier produces Galactica. The asymmetry is important. You can have crap proposals and still win, as long as the verifier is robust. You cannot have a weak verifier and still win, no matter how impressive the proposer.</p><h3>Tao&#8217;s Insight on Composability</h3><p>Tao articulated this in his 2025 <em>Notices</em> piece, and I think it&#8217;s genuinely the right way to think about it: the value of the LLM-plus-formal-verifier combination comes from combining complementary weaknesses. LLMs are creative but unreliable. Lean is reliable but cannot be creative; it needs to be told what to check. Individually, each is limited. Together, the loop covers both limitations: the LLM proposes, Lean certifies, and you get results that are both novel and guaranteed correct.</p><p>This is not a new insight in the philosophy of science or even in computational science. It&#8217;s the same structure as Appel-Haken: creative human mathematicians posed and structured the problem, mechanical verification checked the cases. What&#8217;s new is that the LLM makes the creative-but-unreliable proposer slot much cheaper and more general to fill. You don&#8217;t need a domain expert to hand-engineer each proposer; you need a prompt and a general-purpose model.</p><h3>What&#8217;s Genuinely New Since 2022</h3><p>Let me be specific, because this matters for evaluating claims. Three things changed:</p><p>First, <strong>open-ended program synthesis</strong>. The proposer can now write code, not just fill templates. FunSearch and AlphaEvolve don&#8217;t just suggest candidate solutions; they generate the search strategy itself, which then searches for solutions. The proposer proposes how to propose. That&#8217;s a qualitative shift.</p><p>Second, <strong>cross-domain transfer at useful fidelity</strong>. The same general-purpose model can propose protein structure candidates, proof steps, crystal candidates, combinatorial patterns, all with natural-language specification. You don&#8217;t need to rebuild the proposer for each domain. The moat that used to come from hand-engineering a domain-specific proposer is largely gone.</p><p>Third, <strong>tight LLM-to-formal-verifier loop latency</strong>. The Flyspeck project took sixteen years. The Lean loop that Tao describes closes in seconds. When the loop runs fast, you can iterate fast, which means you can attempt more ambitious problems and accumulate signal faster about which directions are productive.</p><p>What hasn&#8217;t changed: humans pose the problems; the verifier is still not an LLM; which questions are worth asking remains entirely human. Knuth read the logs. Tao decides which lemma is promising. The IMO committee wrote the problems. The GNoME team decided that stable crystal structures were the target. The question of <em>what to look for</em> has not been automated.</p><p>With the anatomy clear, we can finally steelman both off-ramps seriously. And explain precisely why they are both wrong.</p><h2>Why Both Extremes Are Wrong</h2><p>The loop does the discovery, but what does that mean for who gets the credit?</p><p>I want to take both positions seriously, because I think each is tracking something real. Dismissing either one without engagement is how you end up with a position that sounds crisp but falls apart in the edge cases.</p><h3>The Maximalist Steelman</h3><p>Knuth is eighty-eight years old. He has spent decades thinking about the class of combinatorial objects Stappers was exploring. He hadn&#8217;t found the pattern that surfaced at exploration 15. Stappers, presumably, hadn&#8217;t either, or there wouldn&#8217;t have been thirty-one explorations looking for it.</p><p>Here&#8217;s the maximalist claim: if <strong>surprise</strong> is constitutive of discovery, if discovery is the moment something genuinely unexpected becomes known, then the model contributed something essential. It&#8217;s not that the model was incidentally involved in a process humans could have completed. It&#8217;s that the specific result didn&#8217;t exist in any human mind before the model generated it. A system that reliably surfaces what experts miss is doing something scientists do. The fact that the model can&#8217;t feel pride or bear responsibility doesn&#8217;t settle whether it participated in discovery.</p><p>The maximalist is pointing at something real. The model wasn&#8217;t executing a search strategy that a human had pre-specified. It was navigating a space in ways that produced genuinely unexpected output. That matters.</p><h3>The Dismissive Steelman</h3><p>A hammer drives nails. We don&#8217;t say the hammer built the house. Excel executes arithmetic the analyst specified; we don&#8217;t credit Excel with the financial model. AlphaFold was trained on structural biology data that human researchers collected over decades; the training objective was designed by human engineers; the evaluation criteria were set by human scientists. The model is a sophisticated tool. Sophisticated tools don&#8217;t discover; they execute.</p><p>The dismissive case is not purely rhetorical. There&#8217;s a serious accountability point underneath it: when a model-generated finding turns out to be wrong (and some will), who is responsible? If you&#8217;ve attributed agency to the model, you&#8217;ve obscured the accountability chain. The human who deployed the loop without a strong verifier, who curated poorly, who published without checking: that human is responsible. Diffusing credit into the model diffuses accountability too, and that&#8217;s a practical problem, not just a philosophical one.</p><p>The dismissive steelman is also tracking something real. The model didn&#8217;t choose the question. It didn&#8217;t decide the result mattered. It didn&#8217;t design the verifier. It didn&#8217;t stake its reputation on the finding.</p><h3>The Verdict</h3><p>Both steelmans are right about something; both are wrong about the structure.</p><p>The maximalist is right that the model contributes something essential, something that wouldn&#8217;t have been there without it. Wrong that this constitutes independent discovery: you cannot have independent discovery without the ability to pose a question, which requires caring about the answer, which requires the kind of intentionality the model doesn&#8217;t have.</p><p>The dismissive is right that the model doesn&#8217;t choose questions, doesn&#8217;t bear accountability, and shouldn&#8217;t be treated as an author in the full sense. Wrong that this makes it a mere tool in the hammer-and-nail sense. AlphaTensor, DeepMind&#8217;s system that found faster matrix multiplication algorithms, didn&#8217;t just execute a search the engineers specified. It found an algorithm that reconfigured what experts believed was achievable. That&#8217;s not executing; it&#8217;s navigating a combinatorial space in a way that produces genuine surprise. The hammer never surprises you &#8212; except when you&#8217;re not looking and it hits your finger, which by the way, AI can also do, and with a louder bang.</p><p>The right frame is, I think, the <strong>AI lab member</strong>. Indispensable, capable, sometimes surprising. Not a hammer; not a principal investigator, not a replacement for another human. Just a genuinely, qualitatively new kind of entity. An entity that occupies the proposer slot in the loop and does it better than anything that occupied that slot before, but doesn&#8217;t touch the verifier, doesn&#8217;t pose the questions, and doesn&#8217;t bear the accountability that comes with authorship.</p><p>If AI is a lab member and not a scientist, what does that do to the publishable paper, and to the metrics we use to measure science?</p><h2>But What Happens to the Paper </h2><p>The loop does the discovery. But the paper still needs to be written, and the paper is what the institution counts.</p><p>This is where I get more pessimistic, or at least more cautious. The loop is good news for science-the-activity. It&#8217;s more complicated news for science-the-institution.</p><h3>Discovery and Paper Count Were Already Decoupled</h3><p>Park, Leahey, and Funk published in <em>Nature</em> in 2023 a careful empirical study of scientific disruption, measuring across decades of papers and patents how often new work <em>displaces</em> the prior literature versus <em>consolidates</em> it. Their finding: disruption has been declining since 1945. Not linearly, not dramatically, but consistently. Meanwhile, paper count has been exploding.</p><p>The interpretation I find most compelling: the processes that generate papers and the processes that generate genuine advances were already decoupled before AI. A lot of papers are small increments, confirmations, replications, applications of known methods to new datasets. That&#8217;s not waste; science needs that infrastructure. But it means paper count was already a noisy proxy for discovery rate.</p><p>What an AI proposer does to this: it makes generating candidate findings cheaper. Cheaper to generate means more candidates, means more papers. Discovery and paper count decouple further.</p><h3>Goodhart as Accelerant</h3><p>Goodhart&#8217;s Law: when a measure becomes a target, it ceases to be a good measure. Academic institutions have been targeting paper count, citation count, journal impact for decades. Paper mills, factories producing fake or low-quality research for pay-to-publish journals, were already a pre-AI problem. Ioannidis documented the replication crisis in 2005 and again in 2018; most published findings in some fields don&#8217;t replicate, and that was before AI made generating plausible-sounding results cheaper.</p><p>The AI proposer is an accelerant deployed into a system already optimizing for the wrong thing. It makes the Goodhart problem worse. A lot worse. If you can generate a thousand candidate papers in the time it used to take to generate ten, and the verifier in your loop is peer review (slow, inconsistent, and famously gameable), then you have a problem that is structurally different from the pre-AI problem in scale.</p><p>I want to be clear: this is not an argument against AI-in-science. It&#8217;s an argument that the institution of science has a verifier problem, and AI proposers make that verifier problem more urgent. The fix is not to slow the proposer. The fix is to build better verifiers.</p><h3>The Optimistic Edge</h3><p>Here&#8217;s where I land, and I&#8217;m genuinely somewhat optimistic about this: if generating candidates is cheap, the scarce skill shifts upstream.</p><p>The researchers who will matter most in this environment are not the ones who can generate the most proposals. They&#8217;re the ones who can pose the right questions, who can identify which problems are worth solving before they know the answer, and the ones who can build strong verifiers. Question-selection and verifier-design become the competitive moat. That&#8217;s a real and important skill. It&#8217;s harder to fake than generating a paper. And it&#8217;s the skill that the loop most depends on.</p><p>If I&#8217;m hiring for a lab in 2026, I&#8217;m not looking for &#8220;AI scientist&#8221; as a job description. I&#8217;m looking for people who can look at a domain and say: <em>here is what a correct answer would have to look like, and here is how I would know if I found it.</em> That&#8217;s what the verifier is. Building it is hard. It requires deep domain knowledge, epistemological clarity, and the kind of judgment that comes from years of thinking carefully about what you&#8217;re actually trying to know.</p><h3>A Diagnostic Heuristic</h3><p>Let me give you something practical. When you read an AI-in-science result, a press release, a paper, a breathless tweet thread, ask this: <strong>what was the verifier, and who built it?</strong></p><p>If the verifier is Lean, or a crystal, or experimental replication with pre-registered protocols, or a physical measurement with known error bars: trust the result. The proposer&#8217;s reliability doesn&#8217;t matter much; the verifier caught the garbage. The finding is real regardless of how the candidates were generated.</p><p>If the verifier is not named, if the paper says &#8220;we used GPT-4 to generate hypotheses and evaluated them with GPT-4 to assess plausibility,&#8221; you&#8217;re looking at Galactica with extra steps. The proposer and the verifier are the same system. The loop is not closed. Be skeptical.</p><p>That diagnostic question is the institutional choice this moment is forcing. What was the verifier, and who built it? Let&#8217;s land it.</p><h2>The Verifier Is the One That Matters</h2><p>&#8220;I&#8217;ll have to revise my opinions about generative AI one of these days.&#8221;</p><p>Knuth said that. Not &#8220;AI did the science,&#8221; not &#8220;it&#8217;s just autocomplete.&#8221; Something more specific: <em>I may have underestimated what this thing can do in the right loop.</em> The loop did the discovery. The human owned the question and the verifier. The model was the proposer. And the result was real.</p><h3>The Investment Gap</h3><p>Here&#8217;s the uncomfortable institutional reality: almost all current investment is in the proposer. Larger models, more parameters, cheaper inference, better fine-tuning, faster generation. The race to make the proposer better is well-funded, well-publicized, and moving fast.</p><p>The verifier is comparatively neglected.</p><p>Formal verification tools like Lean exist, but they&#8217;re hard to use, require significant expertise, and don&#8217;t cover most scientific domains. Physical verification (A-Lab-style robotic synthesis) is expensive and slow relative to the speed at which the proposer can generate candidates. Experimental replication is underfunded as a scientific activity; it&#8217;s less prestigious than novel claims. The referee system in academic publishing was designed for a world where <em>generating</em> candidates was the hard part. It was not designed for a world where a model can generate ten thousand plausible candidates in an afternoon.</p><p>Hiring &#8220;AI scientists&#8221; misframes the institutional need. The need is for researchers who can pose hard questions and build reliable verifiers. The &#8220;AI lab member&#8221; frame points to what needs managing: not the model, but the loop. And the loop&#8217;s bottleneck right now is the verifier.</p><p>I should mention that this piece is drawn from the science chapter of <em><a href="https://store.apiad.net/l/ai">Mostly Harmless AI</a></em>, a book I&#8217;m writing about what AI actually does versus what the headlines claim. If you&#8217;re finding this useful, the book is where the longer argument lives.</p><h3>What Comes Next</h3><p>Next week: AI in creative output. Art, literature, music. Where the verifier question changes shape entirely. Because in mathematics and materials science, you can at least define what &#8220;correct&#8221; means. In creative domains, the verifier problem is not just harder. It&#8217;s constitutively different. What does it even mean for a creative proposal to be <em>correct</em>? I have some thoughts, and I think they&#8217;re going to make the science case look straightforward by comparison.</p><p>Stay curious.</p><div><hr></div><p><em>P.S. There&#8217;s a Subscribe button somewhere below this. I&#8217;m told it does something useful. My understanding of subscription mechanics is below the level of a confident stochastic parrot. I believe it works, but I haven&#8217;t checked every step. Click it anyway. The verifier here is whether you keep showing up next Monday.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.apiad.net/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://blog.apiad.net/subscribe?"><span>Subscribe now</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[The 80% AI Reliability Horizon]]></title><description><![CDATA[The real number every AI engineer should be tracking]]></description><link>https://blog.apiad.net/p/the-80-ai-reliability-horizon</link><guid isPermaLink="false">https://blog.apiad.net/p/the-80-ai-reliability-horizon</guid><dc:creator><![CDATA[Alejandro Piad Morffis]]></dc:creator><pubDate>Thu, 21 May 2026 14:28:29 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!jhaA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F791d9975-e296-4f78-a682-e797785b86e8_1376x768.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_!jhaA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F791d9975-e296-4f78-a682-e797785b86e8_1376x768.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jhaA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F791d9975-e296-4f78-a682-e797785b86e8_1376x768.jpeg 424w, https://substackcdn.com/image/fetch/$s_!jhaA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F791d9975-e296-4f78-a682-e797785b86e8_1376x768.jpeg 848w, https://substackcdn.com/image/fetch/$s_!jhaA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F791d9975-e296-4f78-a682-e797785b86e8_1376x768.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!jhaA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F791d9975-e296-4f78-a682-e797785b86e8_1376x768.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jhaA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F791d9975-e296-4f78-a682-e797785b86e8_1376x768.jpeg" width="1376" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/791d9975-e296-4f78-a682-e797785b86e8_1376x768.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:674811,&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://blog.apiad.net/i/198700078?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F791d9975-e296-4f78-a682-e797785b86e8_1376x768.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_!jhaA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F791d9975-e296-4f78-a682-e797785b86e8_1376x768.jpeg 424w, https://substackcdn.com/image/fetch/$s_!jhaA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F791d9975-e296-4f78-a682-e797785b86e8_1376x768.jpeg 848w, https://substackcdn.com/image/fetch/$s_!jhaA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F791d9975-e296-4f78-a682-e797785b86e8_1376x768.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!jhaA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F791d9975-e296-4f78-a682-e797785b86e8_1376x768.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><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 tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><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"><em>Adapted from Friedrich, <a href="https://en.wikipedia.org/wiki/Wanderer_above_the_Sea_of_Fog">&#8220;Wanderer above the Sea of Fog&#8221;</a> (c. 1818), Kunsthalle Hamburg &#8212; the horizon you can see is not the horizon you get to stand on. Rendered with Nano Banana 3 via <a href="https://github.com/apiad/mosaico">mosaico</a>.</em></figcaption></figure></div><blockquote><p><em>Every post on the blog this month is on the theme of agent reliability, anchored on the second edition of <a href="https://apiad.gumroad.com/l/ai">Mostly Harmless AI</a> &#8212; 50% off during early access &#8212; where the Limitations chapter walks all seven failure modes that compound into the curve below. You can also <a href="https://books.apiad.net/books/mhai/">read the whole book online for free</a>. More at the end.</em></p></blockquote><p>The headline number you&#8217;ve seen on every AI-progress chart &#8212; &#8220;model X completes two-hour tasks half the time&#8221; &#8212; is the <strong>50% reliability horizon</strong>. That number is moving fast. Doubling every seven months, per METR&#8217;s time-horizon work. It&#8217;s the curve on every AI-progress chart, the one conference talks lean on, the one that lands in investor decks.</p><p>The number that decides whether you can actually deploy an agent is a different one.</p><p>The <strong>80% reliability horizon</strong> &#8212; the task length at which an agent finishes well enough that you would not feel the need to check &#8212; sits 70&#8211;80% below the 50% figure, and it moves up far more slowly. That gap is the difference between demo and deploy. The 50% is what passes the eval. The 80% is what survives the afternoon you weren&#8217;t watching. Not two hours. Thirty minutes you&#8217;d hand off.</p><p>I want to be precise about what I&#8217;m not arguing. I&#8217;m not arguing agents are broken or that AI progress isn&#8217;t real. It is real, and it&#8217;s fast. I&#8217;m making the narrower claim that the 50% and 80% horizons move at different speeds, and that the 80% is the one that matters when someone else&#8217;s data is on the line. This post is the math behind the gap, why it&#8217;s structural, and what you can do about it.</p><p>If you&#8217;re building on agents, you are building on the 80% horizon. The 50% number is for the marketing deck.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.apiad.net/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://blog.apiad.net/subscribe?"><span>Subscribe now</span></a></p><h2>Two horizons, two stories</h2><p>METR&#8217;s methodology is clean: take a population of tasks with measured human completion times, then find the longest task a given model clears at success rate X. Do that for X = 50%, and you get the 50% horizon. Do it for X = 80%, and you get a different curve. A different story.</p><p>The 50% horizon has been doubling roughly every seven months. Late 2025, it sat around a couple of hours for software tasks. That&#8217;s the curve that makes headlines. That&#8217;s the curve you&#8217;ve seen on every slide. Striking.</p><p>The 80% horizon sits roughly 70&#8211;80% below. The same agent that clears a two-hour task half the time clears a half-hour task four-times-in-five. Not two hours. Thirty minutes. And that gap doesn&#8217;t close at the same rate. It moves slowly, stubbornly, for reasons that are mathematical before they are engineering.</p><p>So you have two curves growing at different speeds. The 50% horizon is the curve of capability: what can this system do, under ideal conditions, at least sometimes. The 80% horizon is the curve of trust: what can this system do reliably enough that you&#8217;d hand it a production key and walk away.</p><p>They are not the same curve. And they do not close the same way.</p><p>The longer your task horizon, the wider the gap between can-do-it-sometimes and can-be-trusted-with-it. The mechanical reason is one piece of math.</p><h2>Probability arithmetic</h2><p>Here&#8217;s the setup. A language model you&#8217;re calling spends a fixed compute budget per output token. Each step in a multi-step process has some per-step success probability <em>p</em> that is strictly less than one. The model is stochastic, the world is noisy, context degrades.</p><p>String <em>n</em> steps together, and the probability that all of them succeed is roughly <em>p<sup>n</sup></em>. That&#8217;s it. That&#8217;s the math.</p><p>Here&#8217;s what that looks like with actual numbers. Suppose your agent is excellent: <em>p</em> = 0.99 per step. That&#8217;s a 99% success rate on any single action. Compound it over 100 steps: 0.99<sup>100</sup> &#8776; 0.37. You&#8217;ve gone from near-certain to worse-than-a-coin-flip without anyone making an error. Now drop to <em>p</em> = 0.95 (still quite good, still 95% per step). Over 100 steps: 0.95<sup>100</sup> &#8776; 0.006. Six in a thousand runs succeed.</p><p>This is not a gap you close with next year&#8217;s training run. It is the shape of any probabilistic process operating in sequence over time. The curve doesn&#8217;t change when you improve <em>p</em>; it just shifts outward.</p><p>Reasoning models &#8212; the o-series, R1, extended-thinking variants &#8212; are valuable here. They buy you a higher per-step <em>p</em>, and they let you spend more steps at that higher rate. Both matter. But they push the curve outward. They do not change its shape.</p><p>Two pieces of evidence you should hold next to that math. <em>GSM-Symbolic</em> (Apple, 2024): perturb a math problem the model has seen (swap a name, change a number) and accuracy collapses even when the reasoning path is identical. The model has memorized the route, not the reasoning. <em>Faith and Fate</em> (Microsoft, 2023): transformer accuracy degrades with computational-graph depth even when each individual sub-step is solvable in isolation. Depth itself is the failure axis. More steps means more surface for <em>p</em> &lt; 1 to accumulate.</p><p>Reasoning models buy you a higher per-step <em>p</em> and more steps to spend. They do not change the shape of the curve.</p><h2>Where the chain gets long</h2><p>Agents are exactly the setup that makes <em>p<sup>n</sup></em> painful.</p><p>Think through a typical agent run: read prompt, plan, call tool, read result, call tool again, critique output, adjust plan, call final tool, write response. Seven steps if you&#8217;re being generous. A real production agent reaches hundreds. Each step is one more <em>p</em> rolled. Each tool call is one more chance the orchestrator hands the tool the wrong arguments &#8212; garbage in, deduction out.</p><p>Self-critique doesn&#8217;t repair this &#8212; and you can verify the result yourself if you&#8217;ve tried it. Huang and colleagues (2024) showed that intrinsic self-correction without an external oracle signal actually degrades performance. The model talks itself out of correct answers as often as it talks itself in. The paradox is clean: if the model could recognize the error, it would not have made it. Asking it to introspect on failures is asking the broken compass to check itself.</p><p>So let&#8217;s put numbers on a real scenario. An agent that succeeds on each of five steps 95% of the time lands at 0.95<sup>5</sup> &#8776; 0.77. Decent. Not great, but workable. Now extend that same agent to a fifty-step trajectory: 0.95<sup>50</sup> &#8776; 0.08. Eight runs out of a hundred finish correctly.</p><p>The demo ran five steps. The deploy runs fifty. The demo and the deploy are two different machines.</p><p>That&#8217;s the 80% horizon you&#8217;ll actually feel in production. It&#8217;s not a philosophical concern about AI reliability in the abstract. It&#8217;s the arithmetic of what happens when you take a stochastic generator and ask it to maintain a chain of reasoning over a long enough trajectory that <em>p<sup>n</sup></em> has time to do its work.</p><h2>What you can actually do</h2><p>Three mitigations. Each one genuine, and each one with a ceiling you should know before you commit.</p><p><strong>Verifier-shaped tasks.</strong> Where the output can be checked deterministically (arithmetic, code that compiles and runs, SQL that parses, a formal proof), you can recover trust that the probabilistic generator alone cannot provide. A SAT solver beats an LLM on deductive closure every time. The architecture that wins here is LLM-proposes-candidate, deterministic-system-signs-off. The generator explores the space; the verifier approves the exit. This is, incidentally, the same pattern Monday&#8217;s post on the seventy-year argument named: a deterministic shell around a stochastic core, applied at the task level rather than the system level. The twist is that not every task has a fast verifier. Code that runs is checkable; code that runs <em>correctly for all future inputs</em> is not.</p><p><strong>Retrieval-augmented generation.</strong> If the fact your agent needs is no longer arbitrary recall but lives in a curated document the model is required to cite, then Kalai and Vempala&#8217;s 2024 lower bound on calibrated hallucination does not apply to that fact. Most agent failures upstream of a tool call are recall failures the agent doesn&#8217;t know it&#8217;s making; retrieval changes the error mode from confident confabulation to visible gap. RAG turns a free-running generator into a paraphrase-and-summarize system over a known corpus. The reach of the system is now bounded by the reach of the index. But anything outside that index is back to pure <em>p</em> &lt; 1 territory.</p><p><strong>Narrow the horizon.</strong> The cheapest move is the one nobody wants to make: don&#8217;t deploy your agent on a fifty-step trajectory. Cut it to five. Hand off to a human at the boundary. At five steps with <em>p</em> = 0.95 you&#8217;re at 0.77; at fifty steps you&#8217;re at 0.08. That&#8217;s not a small difference. That&#8217;s the difference between a tool that works and a demo that occasionally works. Now, this trades <em>autonomy</em> for <em>reliability</em>. That trade is worth making in most production contexts right now. Whether it&#8217;s worth making in your context is a product question, not a research question.</p><h2>Watching the right number</h2><p>The 50% number will keep doubling and you should track it. That is real progress and worth watching closely.</p><p>But it is not the number your users feel. The number your users feel is whether the agent finished their task well enough that they didn&#8217;t have to re-run it, check its work, or clean up after it. The difference between &#8220;I tried that AI agent thing and it was magic&#8221; and &#8220;I tried that AI agent thing and it broke my Friday&#8221; is roughly the distance between the 50% horizon and the 80% horizon at your task length.</p><p>The shape of the next several years of agent engineering is already visible in the mitigations you&#8217;ll be reaching for: deterministic verifiers around stochastic generators, retrieval around recall, short trajectories with human handoffs where the math demands it. Not because agents are weak. They&#8217;re remarkable. But the <em>p<sup>n</sup></em> curve doesn&#8217;t care about benchmark scores. It cares about chain length.</p><p>One number, slowly creeping upward, every quarter. Watch that one.</p><p>Until next time, <strong>stay curious</strong>.</p><div><hr></div><p><em>If the 80%-horizon framing landed, the second edition of <a href="https://apiad.gumroad.com/l/ai">Mostly Harmless AI</a> walks the seven failure modes that produce the curve &#8212; the calibrated-hallucination lower bound, the U-shaped attention curve, the reversal curse, the depth ceiling on deduction, the rest. <strong>50% off during early access.</strong> You can also <a href="https://books.apiad.net/books/mhai/">read the whole thing online for free</a> in a custom reader I built &#8212; dark mode, font controls, offline support, the works.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://store.apiad.net/l/mhai&quot;,&quot;text&quot;:&quot;Get Mostly Harmless AI - 50% off&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://store.apiad.net/l/mhai"><span>Get Mostly Harmless AI - 50% off</span></a></p><p><em>And if you want everything I&#8217;ve written, plus everything I&#8217;m going to write, that&#8217;s <a href="https://apiad.gumroad.com/l/compendium">the Compendium</a>. One purchase, in perpetuity.</em></p>]]></content:encoded></item><item><title><![CDATA[It's Tokens all the Way Down]]></title><description><![CDATA[How language models understand image, audio, and video.]]></description><link>https://blog.apiad.net/p/its-tokens-all-the-way-down</link><guid isPermaLink="false">https://blog.apiad.net/p/its-tokens-all-the-way-down</guid><dc:creator><![CDATA[Alejandro Piad Morffis]]></dc:creator><pubDate>Tue, 19 May 2026 10:26:38 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Gnl8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F213e8caa-6892-4379-a3da-13ce32828faa_1376x768.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_!Gnl8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F213e8caa-6892-4379-a3da-13ce32828faa_1376x768.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Gnl8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F213e8caa-6892-4379-a3da-13ce32828faa_1376x768.png 424w, https://substackcdn.com/image/fetch/$s_!Gnl8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F213e8caa-6892-4379-a3da-13ce32828faa_1376x768.png 848w, https://substackcdn.com/image/fetch/$s_!Gnl8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F213e8caa-6892-4379-a3da-13ce32828faa_1376x768.png 1272w, https://substackcdn.com/image/fetch/$s_!Gnl8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F213e8caa-6892-4379-a3da-13ce32828faa_1376x768.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Gnl8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F213e8caa-6892-4379-a3da-13ce32828faa_1376x768.png" width="1376" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/213e8caa-6892-4379-a3da-13ce32828faa_1376x768.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1907923,&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://blog.apiad.net/i/198385396?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F213e8caa-6892-4379-a3da-13ce32828faa_1376x768.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_!Gnl8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F213e8caa-6892-4379-a3da-13ce32828faa_1376x768.png 424w, https://substackcdn.com/image/fetch/$s_!Gnl8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F213e8caa-6892-4379-a3da-13ce32828faa_1376x768.png 848w, https://substackcdn.com/image/fetch/$s_!Gnl8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F213e8caa-6892-4379-a3da-13ce32828faa_1376x768.png 1272w, https://substackcdn.com/image/fetch/$s_!Gnl8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F213e8caa-6892-4379-a3da-13ce32828faa_1376x768.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><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 tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><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><blockquote><p><em>Part of the run-up to the second edition of <a href="https://apiad.gumroad.com/l/ai">Mostly Harmless AI</a> &#8212; 50% off during early access &#8212; where this is the spine of a new chapter on generative and multimodal AI. You can also <a href="https://books.apiad.net/books/mhai/">read the whole book online for free</a>. More at the end.</em></p></blockquote><p>One morning, not so long ago, perhaps you asked Claude (or Gemini, or ChatGPT) to do something for you, and decided it was easier to just give it a picture of it than explain the whole thing. Perhaps it was &#8220;how do I cook this thing?&#8221; or &#8220;what building is that?&#8221;  or &#8220;do this homework for me, please, please, my live depends on it&#8221;.  Then you uploaded the picture, and back came a textual response.</p><p>Not happy with what the bot understood, you decided a thorough explanation was owed. But, alas, since all we got is a couple fatty fingers for typing, you decided it was best if you explained it with your own voice. And again, uhms and ehms notwithstanding, you again got a full response back, this time with an audio voice over. </p><p>Ten years ago, this simple dance of back-and-forth multimodal information would have required four separate research fields, each with its own conferences, its own vocabulary, and its own priesthood. They have quietly become one single thing. It&#8217;s all tokens all the way down. Language has subsumed all modalities. This is how.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.apiad.net/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://blog.apiad.net/subscribe?"><span>Subscribe now</span></a></p><h2>The recipe never cared what it was eating</h2><p>Strip &#8220;generative AI&#8221; down to the one idea doing all the work and you get a single sentence: look at a big pile of examples, learn the distribution that produced them, then draw new samples from it. That is the whole trick. It is what a language model does, and it is the only thing a language model does. It is also what an image model does, and an audio model, and a video model.</p><p>The recipe is indifferent to what the examples are. Text is a one-dimensional run of symbols. An image is a two-dimensional field of colour. Audio is a pressure wave sampled tens of thousands of times a second. Video is all of that, plus time, which is why it is the hardest. Four different shapes of data, one identical question asked of each: <em>given what I have seen so far, what plausibly comes next?</em> The machinery that answers that question does not need to know whether &#8220;next&#8221; means a word, a patch of pixels, or a slice of waveform. It only needs the data turned into a sequence of countable things. </p><p><em>Tokens.</em></p><p>So the thing we have been calling a language model was never really about language. Or, put better, it was never about <em>written </em>language. It turns out, language is something far more powerful. </p><p>Ask any linguist, and they&#8217;ll say any set of sequences of distinct symbols (<em>tokens</em>) can be modelled as a language. It doesn&#8217;t matter what your symbols are&#8212;letters, words, patches of images, numbers in a math formula, whatever&#8212;language is just the structure around them, what makes some sequences valid and others nonsense. </p><p>This is the key idea. All else is (incredibly good) engineering.</p><h2>A decade of building the same machine, separately</h2><p>It did not look that way while it was happening. For about a decade every modality got its own bespoke contraption, and each one looked like its own discipline.</p><p>Image people had <strong>generative adversarial networks</strong>: a forger and a detective locked in a training duel, the forger getting better at faking until the detective could no longer tell. The beautiful idea buried in there &#8212; and the one that survived the technique itself &#8212; was the <em>latent space</em>: a compressed interior map of &#8220;all possible faces,&#8221; where walking in a straight line morphs one plausible face smoothly into another. GANs were temperamental, prone to collapsing into a single good fake and refusing to leave, and by the early 2020s they had lost the lead. The latent-space intuition outlived them and runs underneath everything that came after.</p><p>Then <strong>diffusion</strong> took over image generation with a trick that sounds like it shouldn&#8217;t work. Take a real photo, add a little static, add a little more, keep going until it is pure snow. Now train a network to undo one step of that. To make a new image, start from snow and run the undo, over and over, until something coherent surfaces. It is sculpture by removing noise instead of removing marble, and it is what powers essentially every image generator you have used.</p><p>Audio had its own separate lineage: speech-to-text built one way, text-to-speech another, music a third. Text had the large language models, off in their own enormous-budget corner of the field. Four communities, four sets of architectures, four sets of war stories. If you had asked, in 2021, whether the image people and the language people were building the same machine, both sides would have laughed.</p><h2>CLIP quietly knocks out the wall</h2><p>The crack in the wall came from a 2021 model whose job sounds almost too modest to matter: teach one system that the word <em>dog</em> and a photograph of a dog are talking about the same thing.</p><p>The way you do that is to train a text encoder and an image encoder <em>together</em>, on hundreds of millions of caption-and-picture pairs, with one instruction: put a picture and its true caption close together in a shared space, and shove mismatched pairs apart. What you get at the end is a single space where &#8220;a photo of a golden retriever&#8221; and an actual photo of a golden retriever land as neighbours. Text and pixels, in the same room, with the same coordinates.</p><p>That sounds like a party trick for image search. It was the hinge the whole field turned on. Once text and images live in one space, text can <em>steer</em> image generation &#8212; point the diffusion process at the region of the space that means &#8220;golden retriever in a spacesuit,&#8221; and let it denoise toward there. Every text-to-image system you have used is, under the paint, that move. And the deeper implication was harder to ignore than the application: if you can put two modalities in one space, the wall between them was never structural. It was just a wall nobody had walked through yet.</p><h2>Tokens all the way down</h2><p>Here is where it lands. By the mid-2020s the bespoke machines stopped being separate machines.</p><p>The move is almost embarrassingly direct. Tokenise everything. Text already broke into tokens. Cut an image into a grid of patches and treat each patch as a token. Run audio through a neural codec that emits discrete chunks, and those are tokens too. Now you do not have a text stream and an image stream and an audio stream. You have one stream of tokens that happen to have come from different alphabets, and you train a single model on the only objective that was ever in play: predict the next token, whatever kind it is.</p><p>A model trained that way reads and writes everything, because to it there is no &#8220;everything&#8221; &#8212; there is just the sequence and the next position in it. You have used these. The one that holds a spoken conversation with sub-second latency, looks at the photo you paste in, and writes you a paragraph back is not a language model bolted to an image model bolted to a speech model. It is one model that was never told these were different problems.</p><p>Which is why the question that organised the field for a decade &#8212; <em>is this a language model or an image model?</em> &#8212; has quietly stopped having an answer. It is the same machine. The only thing that ever changed between text and pixels and sound was the alphabet, and the transformer emitting the next token has never cared which alphabet it is spelling in. It is tokens all the way down. &#8220;Language modelling&#8221; was a local name for something with no allegiance to language at all: modelling sequences of anything we can count.</p><h2>The honest part</h2><p>It would be easy to end on the astonishment, and the astonishment is real. One model, every modality, falling out of one stubbornly simple objective applied to a wider and wider definition of &#8220;token&#8221; &#8212; that is one of the genuinely beautiful results of the decade, and the kind of unification that does not come along often.</p><p>But unification is not the same as understanding, and I am not going to let the elegance smuggle that past you. A system that can place &#8220;dog&#8221; next to a dog in its latent space has learned the statistics of how dogs are described and depicted. </p><p>Whether it has learned what a dog <em>is</em> is a different question, and the convergence story does not answer it. It just makes the question apply to every modality at once instead of only to text. The machine got more general. It did not get more grounded necessarily. Both of those are true at once, and the interesting work of the next few years lives in the gap between them.</p><p>Until next time, stay curious.</p><div><hr></div><p><em>This is the core argument of a new chapter in the second edition of <a href="https://apiad.gumroad.com/l/ai">Mostly Harmless AI</a> &#8212; the full chapter walks GANs, diffusion, CLIP, audio, and native multimodality with the scenes and citations this post had to cut, and it is 50% off during early access. The whole book is also <a href="https://books.apiad.net/books/mhai/">free to read online</a>. If you want the rest of the argument &#8212; how these systems are trained, where they break, and what to actually do about it &#8212; that is what the book is for.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://store.apiad.net/l/mhai/fiftyoff&quot;,&quot;text&quot;:&quot;Get it (50% off) for life&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://store.apiad.net/l/mhai/fiftyoff"><span>Get it (50% off) for life</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[How Large Languages Models Are Really Made]]></title><description><![CDATA[The full road from text data to reasoning models, explained visually with zero math or code.]]></description><link>https://blog.apiad.net/p/mhai-llms</link><guid isPermaLink="false">https://blog.apiad.net/p/mhai-llms</guid><dc:creator><![CDATA[Alejandro Piad Morffis]]></dc:creator><pubDate>Mon, 11 May 2026 15:51:34 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!gdqf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb83eb00a-2839-4312-8300-5fbf71095e63_1376x768.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_!gdqf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb83eb00a-2839-4312-8300-5fbf71095e63_1376x768.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gdqf!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb83eb00a-2839-4312-8300-5fbf71095e63_1376x768.jpeg 424w, https://substackcdn.com/image/fetch/$s_!gdqf!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb83eb00a-2839-4312-8300-5fbf71095e63_1376x768.jpeg 848w, https://substackcdn.com/image/fetch/$s_!gdqf!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb83eb00a-2839-4312-8300-5fbf71095e63_1376x768.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!gdqf!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb83eb00a-2839-4312-8300-5fbf71095e63_1376x768.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gdqf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb83eb00a-2839-4312-8300-5fbf71095e63_1376x768.jpeg" width="1376" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b83eb00a-2839-4312-8300-5fbf71095e63_1376x768.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1376,&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;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!gdqf!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb83eb00a-2839-4312-8300-5fbf71095e63_1376x768.jpeg 424w, https://substackcdn.com/image/fetch/$s_!gdqf!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb83eb00a-2839-4312-8300-5fbf71095e63_1376x768.jpeg 848w, https://substackcdn.com/image/fetch/$s_!gdqf!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb83eb00a-2839-4312-8300-5fbf71095e63_1376x768.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!gdqf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb83eb00a-2839-4312-8300-5fbf71095e63_1376x768.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><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 tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><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"><em>After Joseph Racknitz&#8217;s 1789 <a href="https://en.wikipedia.org/wiki/Mechanical_Turk">cutaway engraving</a> of Wolfgang von Kempelen&#8217;s Mechanical Turk; generated with Nano Banana 2.</em></figcaption></figure></div><p>You type a message to an AI assistant and it answers. The answer isn&#8217;t looked up. It isn&#8217;t scripted. The model generated it, character by character, guided by a single mathematical question: <em>what comes next?</em></p><p>That question is the foundation of every language model ever built. A <strong>language model</strong> is a probability distribution over text &#8212; a function that, given a sequence of words, assigns a probability to every possible continuation. &#8220;The cat sat on the mat&#8221; scores higher than &#8220;the mat sat on the cat&#8221; not because a language model understands what cats do, but because the first sequence appears in human text and the second doesn&#8217;t. The model has compressed the co-occurrence patterns of an enormous corpus into its weights, and that compression is what produces a score.</p><p>Generative: you give the model a prefix, it samples the highest-probability next token, appends it, samples again, and repeats until a stop token arrives. The multi-paragraph response you got from ChatGPT this morning was that loop running a few hundred times. No lookup table. No if-else tree. No pre-scripted answers. Just: <em>given all of this text, what is most likely to come next?</em></p><p>Here&#8217;s the thing I find quietly strange about this: it works. A procedure this simple &#8212; assign probabilities, sample the maximum &#8212; has produced the most influential technology of the last decade. What makes it work isn&#8217;t the procedure. It&#8217;s everything that goes into building a probability distribution that&#8217;s actually <em>good</em>. Good enough to write coherent paragraphs. Good enough to reason about code. Good enough to pass the bar exam and explain quantum mechanics in language your parents can follow.</p><p>Getting there took decades of compounding ideas. The arc is what this piece covers &#8212; from the crudest possible approximation of &#8220;probability over text&#8221; to the current frontier, where models are learning to think.</p><p>Each section of what follows is best understood as a response to the failure of the previous one. N-gram models worked until they didn&#8217;t. Neural embeddings fixed the part that broke. Pretraining scaled the fix to the size where it became genuinely impressive. Instruction tuning made the result useful for the first time. Preference learning fixed what instruction tuning couldn&#8217;t. Reasoning models added something nobody was sure was trainable at all.</p><p>Seven steps. One direction.</p><blockquote><p><em>Every post on the blog this month is on the theme of agent reliability, anchored on the second edition of <a href="https://apiad.gumroad.com/l/ai">Mostly Harmless AI</a>, where the engineering details that don&#8217;t fit a blog post live. You can also <a href="https://books.apiad.net/books/mhai/">read the whole book online for free</a> in a custom reader I built. More at the end.</em></p></blockquote><div><hr></div><blockquote><p>This post may be truncated in your email. <a href="https://blog.apiad.net/p/mhai-llms">Read it online</a> for the best experience.</p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.apiad.net/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://blog.apiad.net/subscribe?"><span>Subscribe now</span></a></p><h2>The n-gram intuition</h2><p>The simplest possible implementation of &#8220;probability over text&#8221; is a lookup table.</p><p>Take a large corpus &#8212; a hundred million words will do to start. For every three-word sequence (<strong>trigram</strong>) in that corpus, record which word follows it most often, and with what frequency. &#8220;The quick brown&#8221; &#8594; &#8220;fox,&#8221; nine times out of ten, because Project Gutenberg is full of that particular sentence. &#8220;The capital of&#8221; &#8594; &#8220;France&#8221; thirty percent of the time, &#8220;Germany&#8221; twelve, &#8220;England&#8221; eleven, and so on through the geography. For every trigram you&#8217;ve seen, you have a probability distribution over what comes next.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CQfE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60bf3e3f-4e4b-4115-9ccf-54ee5a394136_1600x1021.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CQfE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60bf3e3f-4e4b-4115-9ccf-54ee5a394136_1600x1021.png 424w, https://substackcdn.com/image/fetch/$s_!CQfE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60bf3e3f-4e4b-4115-9ccf-54ee5a394136_1600x1021.png 848w, https://substackcdn.com/image/fetch/$s_!CQfE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60bf3e3f-4e4b-4115-9ccf-54ee5a394136_1600x1021.png 1272w, https://substackcdn.com/image/fetch/$s_!CQfE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60bf3e3f-4e4b-4115-9ccf-54ee5a394136_1600x1021.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!CQfE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60bf3e3f-4e4b-4115-9ccf-54ee5a394136_1600x1021.png" width="1456" height="929" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/60bf3e3f-4e4b-4115-9ccf-54ee5a394136_1600x1021.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:929,&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_!CQfE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60bf3e3f-4e4b-4115-9ccf-54ee5a394136_1600x1021.png 424w, https://substackcdn.com/image/fetch/$s_!CQfE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60bf3e3f-4e4b-4115-9ccf-54ee5a394136_1600x1021.png 848w, https://substackcdn.com/image/fetch/$s_!CQfE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60bf3e3f-4e4b-4115-9ccf-54ee5a394136_1600x1021.png 1272w, https://substackcdn.com/image/fetch/$s_!CQfE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60bf3e3f-4e4b-4115-9ccf-54ee5a394136_1600x1021.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 tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><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 tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><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"><em>A trigram model is a frequency dictionary: each three-word context maps to a distribution over possible next words. The catch is that a 50,000-word vocabulary admits ~126 trillion possible trigrams, most of which never appear in any corpus. Made with <a href="https://github.com/apiad/tesserax">tesserax</a>.</em></figcaption></figure></div><p>Now generate text. Give the model &#8220;The quick brown&#8221; and it continues: &#8220;fox.&#8221; Give it &#8220;jumped over the&#8221; and it continues: &#8220;lazy.&#8221; Three words in and it&#8217;s generated &#8220;The quick brown fox jumped over the lazy&#8221; &#8212; and if you&#8217;re lucky, it lands &#8220;dog&#8221; and you&#8217;ve reproduced a famous sentence entirely from corpus statistics. Locally, it&#8217;s plausible. You could read a sentence of this and not immediately know you&#8217;re looking at a machine.</p><p>The problems start fast. By the third sentence, the model has no idea it was talking about a fox. It only remembers the last three words. You ask it to continue &#8220;The fox had been running from the&#8221; and it has no idea that a fox is involved, or that running happened, or that there&#8217;s a pursuit in progress. It just has three words and a lookup table. The output is <em>statistically English</em>. It is not coherent.</p><p>This is the <strong>Markov assumption</strong>: the next word depends only on the last N words, not on the full history of the text. For N=3, it&#8217;s a trigram model. You can increase N &#8212; five-gram models were standard in commercial speech recognition for years &#8212; but the table explodes. Fifty thousand words in the English vocabulary gives 50,000&#179; possible trigram contexts, roughly 125 trillion entries. At N=10, the number of possible sequences exceeds the estimated number of atoms in the observable universe. The table can never be complete enough to cover the distribution.</p><p>There&#8217;s a real engineering solution to the &#8220;we haven&#8217;t seen this exact trigram&#8221; problem: smoothing and interpolation. Estimate the probability of an unseen N-gram from shorter sub-sequences. <strong>Hidden Markov models</strong> formalised this in a probabilistic framework that, by the 1990s, had enough polish to power industrial speech recognition and early machine translation. I don&#8217;t want to undersell it &#8212; it worked. It was genuinely useful. It just topped out.</p><p>The wall is fundamental. Real language has dependencies that can be arbitrarily long. <em>&#8220;The man who sold the car that had been parked in front of the house where my grandmother lived was finally found.&#8221;</em> The subject of &#8220;was finally found&#8221; is seventeen words and three nested clauses back. No N-gram model reaches it. You need something that can condition on the full context &#8212; or at least compress the full context intelligently &#8212; rather than amnesiacally forget everything more than N words ago.</p><p>You need a model that generalises from sequences it has seen to sequences it hasn&#8217;t. A lookup table can only interpolate from what it&#8217;s seen before. What you need is something that has <em>understood the pattern</em> deeply enough to extrapolate.</p><p>N-gram models work until they don&#8217;t &#8212; and they don&#8217;t beyond a few words.</p><h2>Words as numbers</h2><p>Neural networks can learn the compression n-gram models can&#8217;t achieve. But they have a hard prerequisite: they operate on numbers. Words are symbols. Before a neural network can do anything useful with text, you need to represent words as vectors. The naive approach throws away everything that matters.</p><p>The obvious first attempt is <strong>one-hot encoding</strong>. Vocabulary of 50,000 words; each word is a vector of length 50,000 with a single 1 and 49,999 zeros. &#8220;Cat&#8221; is at position 4,312; &#8220;dog&#8221; is at position 17,846; &#8220;carburetor&#8221; is somewhere else entirely. The problem: nothing in this representation suggests that &#8220;cat&#8221; and &#8220;dog&#8221; are more similar to each other than either is to &#8220;carburetor.&#8221; The distance between every pair of one-hot vectors is identical. You&#8217;ve handed the network a symbol system with no structure, and it has to reconstruct the structure from scratch &#8212; spending enormous capacity learning that cats and dogs are both animals, that both appear near &#8220;fur&#8221; and &#8220;vet,&#8221; that &#8220;cat food&#8221; and &#8220;dog food&#8221; are structurally related &#8212; before it can learn anything about how language actually works.</p><p>The key insight that resolved this came from linguistics, not machine learning, and I think it&#8217;s underrated as an idea. J.R. Firth, writing in 1957: <em>&#8220;you shall know a word by the company it keeps.&#8221;</em> The <strong>distributional hypothesis</strong>. Words that appear in similar contexts &#8212; near similar neighbouring words, in similar grammatical positions &#8212; tend to have similar meanings. &#8220;Cat&#8221; and &#8220;dog&#8221; both appear near &#8220;pet,&#8221; &#8220;feed,&#8221; &#8220;vet,&#8221; &#8220;owner,&#8221; &#8220;fur,&#8221; &#8220;collar.&#8221; The context is a fingerprint of the meaning. Encode that fingerprint in a vector and you have a representation where similar words land close together in space.</p><p><strong>Word2Vec</strong> (<a href="https://arxiv.org/abs/1301.3781">Mikolov et al., 2013</a>) turned this into a training procedure. Train a shallow neural network to predict a word from its surrounding context words, or vice versa. Force each word&#8217;s representation down into a dense vector of, say, 300 floating-point numbers. Train on a billion words of text. The network learns that words appearing in similar contexts should have similar representations, because that&#8217;s what makes the prediction task cheaper. Words with similar distributional patterns end up with similar vectors &#8212; not because anyone programmed that, but because it follows from the objective.</p><p>The result that made people pay attention: <strong>vector arithmetic encodes semantic relationships</strong>. Take the vector for &#8220;king,&#8221; subtract the vector for &#8220;man,&#8221; add the vector for &#8220;woman.&#8221; The nearest vector in the resulting space is &#8220;queen.&#8221; Paris minus France plus Italy is approximately Rome. Try it yourself: it works because the structural relationship between &#8220;king&#8221; and &#8220;queen&#8221; is parallel to the relationship between &#8220;man&#8221; and &#8220;woman&#8221; in how the four words co-occur with everything around them. No one wrote these analogies in. The geometry of the space mirrors the structure of meaning, because both are implicit in how words appear together in natural language.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KXh1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe75fb3c1-35e7-49f9-915b-6bdd8334bef2_1600x1387.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KXh1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe75fb3c1-35e7-49f9-915b-6bdd8334bef2_1600x1387.png 424w, https://substackcdn.com/image/fetch/$s_!KXh1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe75fb3c1-35e7-49f9-915b-6bdd8334bef2_1600x1387.png 848w, https://substackcdn.com/image/fetch/$s_!KXh1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe75fb3c1-35e7-49f9-915b-6bdd8334bef2_1600x1387.png 1272w, https://substackcdn.com/image/fetch/$s_!KXh1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe75fb3c1-35e7-49f9-915b-6bdd8334bef2_1600x1387.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!KXh1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe75fb3c1-35e7-49f9-915b-6bdd8334bef2_1600x1387.png" width="458" height="396.97527472527474" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e75fb3c1-35e7-49f9-915b-6bdd8334bef2_1600x1387.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1262,&quot;width&quot;:1456,&quot;resizeWidth&quot;:458,&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_!KXh1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe75fb3c1-35e7-49f9-915b-6bdd8334bef2_1600x1387.png 424w, https://substackcdn.com/image/fetch/$s_!KXh1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe75fb3c1-35e7-49f9-915b-6bdd8334bef2_1600x1387.png 848w, https://substackcdn.com/image/fetch/$s_!KXh1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe75fb3c1-35e7-49f9-915b-6bdd8334bef2_1600x1387.png 1272w, https://substackcdn.com/image/fetch/$s_!KXh1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe75fb3c1-35e7-49f9-915b-6bdd8334bef2_1600x1387.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 tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><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 tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><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"><em>The relationship between</em> king <em>and</em> queen <em>is parallel to the one between</em> man <em>and</em> woman <em>&#8212; both fall out of how the four words co-occur with everything around them. Made with <a href="https://github.com/apiad/tesserax">tesserax</a>.</em></figcaption></figure></div><p>I find this genuinely strange, in the best possible way. You trained a network to do a simple word-guessing task on flat text, and the side effect was an algebra of concepts. The geometry was always latent in the co-occurrence patterns. Word2Vec just made it legible.</p><p>Modern language models don&#8217;t use Word2Vec as a separate preprocessing step &#8212; the embedding representations are learned jointly with the rest of the network during training on text. But Word2Vec&#8217;s intuition is <em>why</em> learned embeddings work at all. Once language is geometry, gradient descent has a surface to grip. You can compute distances, optimise them, stack arbitrarily deep networks on top, and train the whole thing end-to-end.</p><p>Embeddings are how we lie to neural networks in a useful way. We pretend words are points in space, so the math works out.</p><h2>Pretraining</h2><p>Now scale it.</p><p>Take a deep neural network &#8212; not the shallow two-layer thing in Word2Vec, but a transformer with dozens or hundreds of layers, billions of parameters, and an attention mechanism in every one of them. Feed it next-token prediction across the entire accessible internet: Wikipedia, GitHub, every book ever digitised, every forum thread, every research paper, every recipe, every political argument, every user manual for every piece of machinery ever manufactured. Same objective the n-gram model had: <em>given what came before, what comes next?</em> Except now the model has billions of parameters to compress the patterns into, the training signal is trillions of tokens, and the architecture is built to handle arbitrarily long context.</p><p>The architecture is what made everything else possible. The <strong>transformer</strong> (<a href="https://arxiv.org/abs/1706.03762">Vaswani et al., 2017</a>) uses <strong>self-attention</strong> as its core operation. For each token in the input, self-attention computes relevance weights over every other token in the sequence &#8212; learned weights, computed from the data, different for each token, different in each layer. A pronoun can attend strongly to the noun it refers to, twenty positions back. A closing argument can reach back to the premise from the opening paragraph. There is no fixed window; the model considers, in principle, the full context at every step.</p><p>This is what broke the n-gram scaling wall. Not a bigger lookup table. Not smarter interpolation. A learned, flexible attention mechanism that compresses long-range dependencies into the model&#8217;s weights rather than trying to enumerate every possible context sequence. The key property, and it&#8217;s the one I keep coming back to: <em>soft</em>. Self-attention doesn&#8217;t pick one relevant token; it blends all of them with learned weights. The whole sequence contributes to every prediction, with a learned notion of how much each part matters.</p><p>The other critical property is <strong>self-supervised learning</strong>. There are no human-provided labels anywhere in pretraining. The text itself is the training signal. Show the model &#8220;The capital of&#8221; and ask it to predict &#8220;France.&#8221; It&#8217;s wrong; the gradient flows; the weights update. Show it three trillion tokens; let the gradient flow three trillion times. The entire digitised corpus of human knowledge is your training set, with zero labelling cost, because the next token is always right there.</p><p><strong><a href="https://arxiv.org/abs/2001.08361">Kaplan et al., 2020</a></strong> measured loss as a function of model size, dataset size, and compute over seven orders of magnitude. The result: loss falls as a clean power law across all three dimensions. Double the parameters, get a predictable drop in loss. Double the training data, same. Scale is not a bet on something uncertain; it is a known return on investment, measured and re-measured across a staggering range.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-3Ei!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8adcc87d-c1ca-467b-b091-9e17e61cd52a_1600x944.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-3Ei!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8adcc87d-c1ca-467b-b091-9e17e61cd52a_1600x944.png 424w, https://substackcdn.com/image/fetch/$s_!-3Ei!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8adcc87d-c1ca-467b-b091-9e17e61cd52a_1600x944.png 848w, https://substackcdn.com/image/fetch/$s_!-3Ei!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8adcc87d-c1ca-467b-b091-9e17e61cd52a_1600x944.png 1272w, https://substackcdn.com/image/fetch/$s_!-3Ei!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8adcc87d-c1ca-467b-b091-9e17e61cd52a_1600x944.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!-3Ei!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8adcc87d-c1ca-467b-b091-9e17e61cd52a_1600x944.png" width="490" height="289.08653846153845" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8adcc87d-c1ca-467b-b091-9e17e61cd52a_1600x944.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:859,&quot;width&quot;:1456,&quot;resizeWidth&quot;:490,&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_!-3Ei!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8adcc87d-c1ca-467b-b091-9e17e61cd52a_1600x944.png 424w, https://substackcdn.com/image/fetch/$s_!-3Ei!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8adcc87d-c1ca-467b-b091-9e17e61cd52a_1600x944.png 848w, https://substackcdn.com/image/fetch/$s_!-3Ei!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8adcc87d-c1ca-467b-b091-9e17e61cd52a_1600x944.png 1272w, https://substackcdn.com/image/fetch/$s_!-3Ei!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8adcc87d-c1ca-467b-b091-9e17e61cd52a_1600x944.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 tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><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 tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><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"><em>Schematic of the Kaplan finding: loss vs. compute on log-log axes. The points fall on a clean line over eight decades of compute &#8212; scale isn&#8217;t a bet, it&#8217;s a known return. Made with <a href="https://github.com/apiad/tesserax">tesserax</a>.</em></figcaption></figure></div><p><strong><a href="https://arxiv.org/abs/2203.15556">Hoffmann et al., 2022</a></strong> &#8212; the Chinchilla paper &#8212; corrected a real error in how the field had been applying Kaplan&#8217;s result. Most large models of 2020-21 had been trained on far fewer tokens than their parameter count justified. The Kaplan result suggested scaling up models as fast as possible; Hoffmann&#8217;s finding was that you need to scale model size <em>and</em> training data together, roughly equally, for a given compute budget. A 70B-parameter model trained on 1.4 trillion tokens outperformed a 280B-parameter model trained on fewer tokens at the same total compute cost. Smaller model, more data, better result. Scale both dimensions together.</p><p>What do you get at the end of all this? A <strong>base model</strong>. And this is the part that surprises people who haven&#8217;t seen one.</p><p>Type &#8220;What is the capital of France?&#8221; into a raw pretrained model and it continues the text. Maybe it writes out a geography quiz &#8212; &#8220;What is the capital of France? What is the capital of Germany? What is the capital of Italy?&#8221; Maybe it generates a fake Wikipedia article. Maybe it starts a trivia show transcript. It has not answered your question. It has found the most probable continuation of your prompt, given everything it absorbed during training.</p><p>The base model has absorbed more text than any human could read in a thousand lifetimes. The co-occurrence patterns of the entire digitised corpus of human writing are in those weights. It knows facts, relationships, styles, concepts, code, chemistry, poetry, legal prose, and every other form in which humans have arranged words.</p><p>It was trained to <em>continue</em>, not to <em>respond</em>. Ask it a direct question and it treats the question as the opening line of some text pattern &#8212; one it will extend in whatever direction seems most probable. It has no concept of &#8220;you asked me something and I should answer it.&#8221;</p><p>Pretraining gives a model knowledge. It does not give it manners, opinions, or any idea what you want from it.</p><h2>Instruction tuning</h2><p>Step one of making a base model useful: show it what &#8220;useful&#8221; looks like.</p><p>Collect thousands of demonstration pairs. A human writer sits with a prompt &#8212; &#8220;Explain the difference between supervised and unsupervised learning in plain English,&#8221; &#8220;Write a polite email declining this meeting invitation,&#8221; &#8220;Debug this Python function&#8221; &#8212; and writes the ideal response. Then fine-tune the pretrained base model on these (prompt, response) pairs using the same next-token objective, now applied to curated demonstrations rather than the open web.</p><p>This is <strong>supervised fine-tuning</strong>, or SFT. It is plain supervised learning &#8212; the same paradigm that has been in the machine learning textbooks since the 1980s. What&#8217;s new is only what it&#8217;s being applied to.</p><p>The headline result from <a href="https://arxiv.org/abs/2203.02155">Ouyang et al., 2022</a> &#8212; the InstructGPT paper &#8212; is still worth stating plainly: a 1.3 billion-parameter model, fine-tuned on human-written instruction-following demonstrations, was <em>preferred</em> by human evaluators over a raw 175 billion-parameter GPT-3. One percent of the parameters. Preferred.</p><p>Sit with that. The quality of the training signal matters more than raw scale. A carefully curated set of demonstrations of what &#8220;helpful answering&#8221; looks like is worth more, for the specific goal of being helpful, than a hundred times more parameters trained on unstructured internet text. The base model knows more. The instruction-tuned model is more useful. These are different things.</p><p>SFT teaches the <em>shape</em> of a helpful answer: addressed to the question asked, reasonably structured, proportionate in length, appropriate in tone. These are learnable patterns. The base model already has all the relevant knowledge in its weights; SFT is teaching it to retrieve and present that knowledge in a particular format.</p><p>Here&#8217;s the failure mode, and it matters for understanding everything that comes next.</p><p>SFT shows the model what good answers look like. It gives no mechanism for the model to evaluate, <em>at generation time</em>, which of two candidate continuations is more accurate, more honest, or less likely to cause harm. The model learned to imitate the shape of correct answers; it did not learn to <em>prefer</em> correctness over fluency when the two conflict. A confidently phrased wrong answer and a confidently phrased right answer can look identical from a format standpoint. SFT cannot distinguish them.</p><p>Teaching consistent refusals is especially brittle. To get a model to reliably refuse a class of harmful requests via SFT, you need human-written refusals for every phrasing variant you can anticipate. You will miss variants. The model has no general theory of harm. It has only pattern-matching against the phrasings it saw. Change the phrasing, add a fictional framing, ask in a different language, and the refusal can fail.</p><p>The deep limitation is this: SFT can teach what a good answer looks like, but it cannot teach which of two candidate answers is <em>better</em>. For that, you need to know something about <em>better</em> that you didn&#8217;t encode in any single example. You need preferences.</p><p>SFT teaches the shape of a good answer. It has no way to choose between two good shapes.</p><h2>From demonstrations to preferences</h2><p>The move that follows from SFT&#8217;s failure: what humans can do <em>faster</em> than writing demonstrations is ranking them.</p><p>Show a rater two model responses to the same prompt &#8212; response A and response B &#8212; and ask which is better. They can answer in seconds. Writing a response from scratch takes minutes. This means you can collect preference labels at much higher volume than demonstrations, and the preference label contains a different kind of information: not &#8220;here is the target,&#8221; but &#8220;this is closer to the target than that.&#8221;</p><p>Scale up the preference collection. Collect hundreds of thousands of (prompt, response A, response B, human ranking) tuples. Train a small auxiliary model &#8212; the <strong>reward model</strong> &#8212; to predict the human rankings: given a prompt and a response, output a scalar score. Then use <strong>reinforcement learning</strong> (specifically PPO) to push the language model toward generating responses the reward model scores highly.</p><p>This is <strong>RLHF</strong> &#8212; reinforcement learning from human feedback. <a href="https://arxiv.org/abs/2203.02155">Ouyang et al., 2022</a> used it as the third stage of the InstructGPT pipeline: pretraining &#8594; SFT &#8594; RLHF. ChatGPT&#8217;s characteristic tone &#8212; helpful, reliably cautious about harmful requests, good at hedging uncertainty, consistent about refusals &#8212; comes almost entirely from this stage.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CtE_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c8d7d72-6a41-44dc-8429-be45acad45d1_1600x631.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CtE_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c8d7d72-6a41-44dc-8429-be45acad45d1_1600x631.png 424w, https://substackcdn.com/image/fetch/$s_!CtE_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c8d7d72-6a41-44dc-8429-be45acad45d1_1600x631.png 848w, https://substackcdn.com/image/fetch/$s_!CtE_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c8d7d72-6a41-44dc-8429-be45acad45d1_1600x631.png 1272w, https://substackcdn.com/image/fetch/$s_!CtE_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c8d7d72-6a41-44dc-8429-be45acad45d1_1600x631.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!CtE_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c8d7d72-6a41-44dc-8429-be45acad45d1_1600x631.png" width="1456" height="574" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1c8d7d72-6a41-44dc-8429-be45acad45d1_1600x631.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:574,&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_!CtE_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c8d7d72-6a41-44dc-8429-be45acad45d1_1600x631.png 424w, https://substackcdn.com/image/fetch/$s_!CtE_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c8d7d72-6a41-44dc-8429-be45acad45d1_1600x631.png 848w, https://substackcdn.com/image/fetch/$s_!CtE_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c8d7d72-6a41-44dc-8429-be45acad45d1_1600x631.png 1272w, https://substackcdn.com/image/fetch/$s_!CtE_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c8d7d72-6a41-44dc-8429-be45acad45d1_1600x631.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 tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><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 tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><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"><em>RLHF in five stages: the model samples two responses, a human ranks them, a reward model learns to predict the ranking, and PPO updates the policy to maximise that reward. DPO collapses the loop &#8212; the preference becomes a loss applied directly on the policy, skipping both the reward model and PPO. Made with <a href="https://github.com/apiad/tesserax">tesserax</a>.</em></figcaption></figure></div><p>The deepest shift over SFT: the model now has feedback about <em>direction</em>, not just target. SFT says &#8220;produce something like this example.&#8221; RLHF says &#8220;of the things you just produced, this kind is better than that kind &#8212; adjust accordingly.&#8221; A direction is a richer signal than a target. It can propagate to novel situations no demonstration ever covered.</p><p>The practical problem is that RLHF is a genuine engineering challenge. PPO is unstable. The reward model can be <strong>gamed</strong>: the policy learns to produce outputs that score highly on the reward model without actually being better, because the reward model is an imperfect proxy for true quality. Over long training runs, the policy finds exploitable features in the reward model and optimises for those rather than for what humans actually wanted. Balancing the RL update against the pretrained base (so the model doesn&#8217;t drift into incoherence while chasing reward) requires careful tuning. RLHF works, but it&#8217;s expensive, brittle, and hard to reproduce without a dedicated ML infrastructure team behind it.</p><p><a href="https://arxiv.org/abs/2305.18290">Rafailov et al., 2023</a> found something that, in retrospect, looks almost obvious: you can skip the reward model entirely.</p><p>The paper, &#8220;Direct Preference Optimization: Your Language Model is Secretly a Reward Model,&#8221; makes a mathematical observation. The preference-fitting problem that RLHF solves via a reward model + PPO can be reformulated as a classification loss directly on the language model policy. Given a preferred response and a dispreferred response to the same prompt, you want the model to be more likely to produce the preferred one. You don&#8217;t need a separate reward model to express that preference. You don&#8217;t need PPO to optimise it. The preference is a loss; the loss can be minimised directly on the policy.</p><p><strong>DPO</strong> is computationally lighter and far easier to get working. The abstract says it &#8220;eliminates the need for sampling from the LM during fine-tuning or performing significant hyperparameter tuning.&#8221; In practice, the gap between &#8220;has the resources of a frontier lab&#8221; and &#8220;fine-tuned a model that actually behaves well&#8221; narrowed substantially after DPO. Within a year of publication, it became the default alignment approach for most open-weight instruct models &#8212; the Llama family, Mistral, Qwen, and most of their derivatives. When you read that a model is &#8220;instruction-tuned&#8221; in 2024 or later, DPO or one of its descendants is almost always in the pipeline.</p><p>Both RLHF and DPO require human preference labels. In 2022-23, this was tractable. By 2024, at frontier scale, it was a real bottleneck. You need raters capable of judging quality on maths, code, medicine, science. You can&#8217;t hire enough such raters to keep pace with the rate at which models can generate candidate outputs.</p><p>The field&#8217;s response was predictable in retrospect: use the models themselves.</p><p><strong>RLAIF</strong> (<a href="https://arxiv.org/abs/2309.00267">Lee et al., 2023</a>) replaces human raters with a strong language model as the preference oracle. Head-to-head comparisons with RLHF showed that AI-generated preference labels are competitive with human ones on summarisation and dialogue. The reward model trained on AI labels performs comparably to the one trained on human labels. The human rater is no longer in the loop.</p><p><strong>Constitutional AI</strong> (<a href="https://arxiv.org/abs/2212.08073">Bai et al., 2022</a>, Anthropic) does something more principled. Write a list of principles &#8212; a constitution &#8212; stating what the model should and shouldn&#8217;t do. Ask the model to critique its own outputs against those principles and revise them. The critiques and revisions become training data. The RL stage uses the model&#8217;s own evaluations as the reward signal. Human preference labelling is replaced by explicit normative reasoning: the model has to argue about whether its outputs satisfy the stated principles, not just produce outputs that pattern-match to human-labelled examples.</p><p>The logic extends one step further. If models can generate reliable preference labels, can they generate <em>training data</em> directly? By 2024-25, the answer in a widening range of domains was yes. Maths problems with worked solutions. Code problems paired with passing test suites. Instruction-following demonstrations written by large models to train smaller ones &#8212; the distillation pipeline, where a 70B model generates training examples that improve a 7B model, and the better 7B model feeds the next iteration. By 2025, a substantial fraction of the data used to train frontier models isn&#8217;t scraped from the web. It&#8217;s generated by earlier versions of the models themselves.</p><p>Ilya Sutskever, speaking at <a href="https://www.youtube.com/watch?v=WGgDZOr1ph4">NeurIPS 2024</a>: <em>&#8220;Pre-training as we know it will end. Data is the fossil fuel of AI. We have but one internet.&#8221;</em> The scaling curve that had defined the field since Kaplan 2020 was visibly flattening. The field didn&#8217;t slow down. The growth frontier moved: from bigger pretraining to better post-training. The headline AI announcements of 2024 were not &#8220;we trained a bigger model on more of the internet.&#8221; They were &#8220;we trained a better model by using our previous models to generate, evaluate, and curate the training signal.&#8221;</p><p>The sharpest shift in AI in 2023-24 wasn&#8217;t a bigger model. It was figuring out how to use models to train better models.</p><h2>A new axis</h2><p>There is a 2024-25 discovery that changes the picture in a qualitatively different way. Not a refinement of post-training preference optimisation. Something new.</p><p>RL doesn&#8217;t just align models. It can teach them to <em>think</em>.</p><p>The observation that sets it up: language models already have scratch space. Their output is text; nothing prevents them from writing intermediate reasoning steps before writing a final answer. Chain-of-thought prompting &#8212; asking a model to &#8220;think step by step&#8221; &#8212; has been known since <a href="https://arxiv.org/abs/2201.11903">2022</a> to improve performance on reasoning tasks. The model writes out intermediate steps, and those steps help it arrive at a better final answer.</p><p>But chain-of-thought as a <em>prompting technique</em> has a persistent problem. The intermediate steps are generated by the same forward pass as the final answer. You can ask the model to think out loud, but you can&#8217;t verify that the scratchpad is doing reasoning work rather than <em>performing</em> reasoning for the reader. A model that writes plausible-sounding intermediate steps that happen to be wrong, then arrives at a wrong final answer, has not improved by being asked to show its work. The steps are decorative.</p><p>The <a href="https://openai.com/index/learning-to-reason-with-llms/">o-series models from OpenAI</a> in late 2024 made a conceptually simple training move: use RL where the reward is the correctness of the <em>final answer</em>, and leave the intermediate chain of thought entirely unsupervised. The model can write whatever it wants in the scratchpad. The only signal is whether the final answer is right.</p><p>What emerged from training was not what anyone programmed in. The model learned, without any explicit supervision of the intermediate steps, to <em>use</em> the scratchpad as actual working memory. Backtracking when an approach failed. Trying alternate formulations when one hit a wall. Verifying intermediate results before continuing. Restarting from scratch, several steps back, when it found an error in something it had already written. None of these behaviours appeared in labelled training examples. They fell out of the objective: over enough RL iterations, the training process found that careful scratchpad use led to more correct final answers, and it reinforced that.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gXIs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9da4f71b-6e76-41ad-93c4-9db3b062e8d3_1600x659.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gXIs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9da4f71b-6e76-41ad-93c4-9db3b062e8d3_1600x659.png 424w, https://substackcdn.com/image/fetch/$s_!gXIs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9da4f71b-6e76-41ad-93c4-9db3b062e8d3_1600x659.png 848w, https://substackcdn.com/image/fetch/$s_!gXIs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9da4f71b-6e76-41ad-93c4-9db3b062e8d3_1600x659.png 1272w, https://substackcdn.com/image/fetch/$s_!gXIs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9da4f71b-6e76-41ad-93c4-9db3b062e8d3_1600x659.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!gXIs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9da4f71b-6e76-41ad-93c4-9db3b062e8d3_1600x659.png" width="1456" height="600" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9da4f71b-6e76-41ad-93c4-9db3b062e8d3_1600x659.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:600,&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_!gXIs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9da4f71b-6e76-41ad-93c4-9db3b062e8d3_1600x659.png 424w, https://substackcdn.com/image/fetch/$s_!gXIs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9da4f71b-6e76-41ad-93c4-9db3b062e8d3_1600x659.png 848w, https://substackcdn.com/image/fetch/$s_!gXIs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9da4f71b-6e76-41ad-93c4-9db3b062e8d3_1600x659.png 1272w, https://substackcdn.com/image/fetch/$s_!gXIs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9da4f71b-6e76-41ad-93c4-9db3b062e8d3_1600x659.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 tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><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 tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><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"><em>Only the final answer receives reward. The scratchpad is entirely unsupervised &#8212; backtracking and verification fall out of the training loop, not from labelled examples of good reasoning. Made with <a href="https://github.com/apiad/tesserax">tesserax</a>.</em></figcaption></figure></div><p><strong>DeepSeek-R1</strong> (<a href="https://arxiv.org/abs/2501.12948">arXiv:2501.12948</a>, January 2025, open weights) replicated the result outside a closed lab. Pure RL on reasoning trajectories; no human-labelled chains required. The paper documents what they call the &#8220;aha moment&#8221; in training: a specific point where the model spontaneously began verifying its own intermediate steps and restarting when they failed. Not because the training data contained this behaviour as a pattern. Because the reward for correct final answers made careful intermediate reasoning instrumentally useful, and the RL training loop discovered it.</p><p>I think DeepSeek-R1 is the clearest published demonstration of something the field had suspected but hadn&#8217;t proven at scale: that reasoning, as a <em>behaviour</em>, is trainable from a simple outcome-based reward signal. You don&#8217;t need human annotations of good reasoning traces. You don&#8217;t need to supervise the scratchpad. You need to reward the right answer and run enough RL. The reasoning emerges.</p><p>Three things follow from this that are worth naming separately.</p><p><strong>Test-time compute</strong> is a new scaling axis. Pretraining scales with more data and more parameters &#8212; you pay at training time and get a more capable model. Reasoning models scale with more <em>inference compute</em> &#8212; you pay at generation time, by thinking longer, and get a better answer on the current problem. A smaller reasoning model that thinks for ten seconds can match or outperform a larger standard model answering in one pass. These axes are complementary, not competing. You can now trade training-time capability against inference-time deliberation, and that tradeoff is explicit and controllable in a way it wasn&#8217;t before.</p><p><strong>Diagnosability</strong> changes the failure mode. A standard model that gets a maths problem wrong gives you a wrong number. A reasoning model that gets it wrong gives you a chain of thought &#8212; readable, traceable, inspectable at every step. You can see exactly where the logic went off course: which intermediate claim was false, which inference was unwarranted, at what point the reasoning was solid and where it broke down. For systems where the reliability of the output matters &#8212; and in agent pipelines, it almost always does &#8212; this is the property that makes the difference. The failure is visible. Visible failures are debuggable. Black-box failures are not.</p><p>And the arc closes. The whole story of this piece &#8212; n-grams, embeddings, pretraining, instruction tuning, preference learning, and now reasoning &#8212; is one continuous story of making the training signal more specific. N-gram models encode raw co-occurrence statistics: this is what tends to follow that. Embeddings compress those statistics into geometry that neural networks can use. Pretraining scales that compression to the entire digitised corpus of human writing. Instruction tuning adds: here is what a helpful answer looks like. RLHF and DPO add: here is what <em>better</em> looks like, relative to what you just produced. RLAIF and synthetic data close the loop so models can teach each other. Reasoning models add the final turn: here is what <em>thinking carefully</em> looks like. Not by showing examples of good reasoning. By rewarding the right final answer, and letting the model figure out the rest.</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_!lsXL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb53cda4d-3a30-4026-b518-9c551c891af5_1600x296.png 424w, https://substackcdn.com/image/fetch/$s_!lsXL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb53cda4d-3a30-4026-b518-9c551c891af5_1600x296.png 848w, https://substackcdn.com/image/fetch/$s_!lsXL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb53cda4d-3a30-4026-b518-9c551c891af5_1600x296.png 1272w, https://substackcdn.com/image/fetch/$s_!lsXL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb53cda4d-3a30-4026-b518-9c551c891af5_1600x296.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!lsXL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb53cda4d-3a30-4026-b518-9c551c891af5_1600x296.png" width="1456" height="269" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b53cda4d-3a30-4026-b518-9c551c891af5_1600x296.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:269,&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_!lsXL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb53cda4d-3a30-4026-b518-9c551c891af5_1600x296.png 424w, https://substackcdn.com/image/fetch/$s_!lsXL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb53cda4d-3a30-4026-b518-9c551c891af5_1600x296.png 848w, https://substackcdn.com/image/fetch/$s_!lsXL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb53cda4d-3a30-4026-b518-9c551c891af5_1600x296.png 1272w, https://substackcdn.com/image/fetch/$s_!lsXL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb53cda4d-3a30-4026-b518-9c551c891af5_1600x296.png 1456w" sizes="auto, 100vw" loading="lazy"></picture><div></div></div></div><figcaption class="image-caption"><em>Seven paradigms, one direction. Each step exists because the previous step&#8217;s training signal wasn&#8217;t specific enough &#8212; and each one adds a kind of feedback the previous one couldn&#8217;t carry. Made with <a href="https://github.com/apiad/tesserax">tesserax</a>.</em></figcaption></figure></div><p>Reasoning models aren&#8217;t smarter than other models. They&#8217;re models that have learned to spend their intelligence more deliberately.</p><p>Each step in this story makes the feedback signal richer. Each step exists because the previous step&#8217;s signal wasn&#8217;t specific enough.</p><p>The direction is clear: we keep finding more precise ways to tell models what we want, and they keep using it.</p><p>Until next time, <strong>stay curious</strong>.</p><div><hr></div><p><em>The second edition of <a href="https://apiad.gumroad.com/l/ai">Mostly Harmless AI</a> goes deeper on what these training paradigms make possible in practice &#8212; why a reasoning model behaves differently as an agent core, what alignment actually means when you&#8217;re building a system rather than evaluating a benchmark, and the chapters that didn&#8217;t fit any blog post. The whole book is also available to <a href="https://books.apiad.net/books/mhai/">read online for free</a> in a reader I built and am rather fond of: dark mode, font controls, progress tracking, offline support, the works.</em></p><p><em>If you want everything I&#8217;ve written and everything I&#8217;m going to write, the <a href="https://apiad.gumroad.com/l/compendium">Compendium</a> bundles it all &#8212; one purchase, in perpetuity.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://store.apiad.net/l/compendiium&quot;,&quot;text&quot;:&quot;Check it out&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://store.apiad.net/l/compendiium"><span>Check it out</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[AI Coding Agents, Deconstructed]]></title><description><![CDATA[The four hidden layers that separate tools that help form tools that hinder]]></description><link>https://blog.apiad.net/p/the-anatomy-of-ai-coding-agents</link><guid isPermaLink="false">https://blog.apiad.net/p/the-anatomy-of-ai-coding-agents</guid><dc:creator><![CDATA[Alejandro Piad Morffis]]></dc:creator><pubDate>Thu, 02 Apr 2026 13:40:59 GMT</pubDate><enclosure url="https://images.unsplash.com/photo-1751494203533-a837d1b536b6?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw1MXx8bW9ua2V5JTIwdG95fGVufDB8fHx8MTc3NTEzNTg4Nnww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" 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://images.unsplash.com/photo-1751494203533-a837d1b536b6?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw1MXx8bW9ua2V5JTIwdG95fGVufDB8fHx8MTc3NTEzNTg4Nnww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://images.unsplash.com/photo-1751494203533-a837d1b536b6?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw1MXx8bW9ua2V5JTIwdG95fGVufDB8fHx8MTc3NTEzNTg4Nnww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1751494203533-a837d1b536b6?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw1MXx8bW9ua2V5JTIwdG95fGVufDB8fHx8MTc3NTEzNTg4Nnww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1751494203533-a837d1b536b6?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw1MXx8bW9ua2V5JTIwdG95fGVufDB8fHx8MTc3NTEzNTg4Nnww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1751494203533-a837d1b536b6?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw1MXx8bW9ua2V5JTIwdG95fGVufDB8fHx8MTc3NTEzNTg4Nnww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1456w" sizes="100vw"><img src="https://images.unsplash.com/photo-1751494203533-a837d1b536b6?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw1MXx8bW9ua2V5JTIwdG95fGVufDB8fHx8MTc3NTEzNTg4Nnww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" width="4925" height="3238" data-attrs="{&quot;src&quot;:&quot;https://images.unsplash.com/photo-1751494203533-a837d1b536b6?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw1MXx8bW9ua2V5JTIwdG95fGVufDB8fHx8MTc3NTEzNTg4Nnww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:3238,&quot;width&quot;:4925,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;A relaxed monkey enjoys a sunny day.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A relaxed monkey enjoys a sunny day." title="A relaxed monkey enjoys a sunny day." srcset="https://images.unsplash.com/photo-1751494203533-a837d1b536b6?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw1MXx8bW9ua2V5JTIwdG95fGVufDB8fHx8MTc3NTEzNTg4Nnww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1751494203533-a837d1b536b6?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw1MXx8bW9ua2V5JTIwdG95fGVufDB8fHx8MTc3NTEzNTg4Nnww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1751494203533-a837d1b536b6?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw1MXx8bW9ua2V5JTIwdG95fGVufDB8fHx8MTc3NTEzNTg4Nnww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1751494203533-a837d1b536b6?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw1MXx8bW9ua2V5JTIwdG95fGVufDB8fHx8MTc3NTEzNTg4Nnww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><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 tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><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"><em>I&#8217;m telling you, this is the future. AI agents will do aaaallll the work. </em>Photo by <a href="https://unsplash.com/@farzadfelfelian">Farzad Felfelian</a> on <a href="https://unsplash.com">Unsplash</a></figcaption></figure></div><p>You&#8217;ve been using AI coding agents for months. You&#8217;ve crafted elaborate system prompts. You&#8217;ve added a dozen skills. You&#8217;ve learned the dance of context window management. And somewhere around the third hour of work, something breaks. The agent starts forgetting things. Making wrong assumptions. Doing something close&#8212;but not quite&#8212;what you asked.</p><p>This isn&#8217;t a failure of the model. This is a failure of the system.</p><p>To be sure, better models make things easier. And models are getting better by the day. But no matter how good a model is, bad systems lead to bad outputs. Even the smartest people produce junk when fed with incorrect assumptions or given incomplete instructions.</p><p>In contrast, a good system with clear boundaries and explicit rules, that leaves the exact amount of flexibility necessary, makes creativity and productivity thrive.</p><p>You see this day and night in teams (of real humans) in every industry. It&#8217;s not often the smartest person in the room that solves the hard problem. It&#8217;s when you combine the right kinds of intelligence with the right kind of system that things click.</p><p>In this article, I want to make the case for a structured way to think about Large Language Model (LLM)-based agentic systems (mostly for coding, but also for knowledge work in general) that fixes some of the greatest pains I (and I sure most of you) have been facing when trying to scale AI-assisted workflows to professional levels.</p><p>It&#8217;s a system that puts the right constraints in the right places and leaves just enough space for creative exploration (or however you want to call what LLMs do when they hallucinate in your favor). It&#8217;s also a system that makes it clear you are in charge.</p><p>Everything an AI agent does happens inside a context window. System prompt, user input, tool results, skill injections&#8212;they all live there. The agent&#8217;s only mechanism for action is the ReAct (Reasoning + Acting) loop: think, call tools, observe results, repeat. Each cycle grows the context. Each skill activation injects more.</p><p>This creates a fundamental tension: context is power, but context is finite. Too little and the agent can&#8217;t connect the dots. Too much and the important stuff drowns. The gap between those two failure modes is narrow&#8212;and most agent frameworks ignore it entirely.</p><p>I&#8217;ll walk through why current systems fail, introduce a four-element framework for thinking about agentic architectures, show you how these principles apply across three domains, then present a vision for better AI harness engineering.</p><h2><strong>Part I - The Symptoms</strong></h2><p>To understand the problems we first need to understand how a standard agentic loop works. The typical architecture is what&#8217;s called a ReAct loop. The LLM runs in a loop that determines the next action given context, which can be read some files, ask the user, invoke a tool, inject a skill, etc. When the agent decides no more actions are necessary, the loop ends and the user is given control back to continue the prompt.</p><p>That&#8217;s it. All the seemingly supersmart behaviours of Claude Code, Gemini CLI, and Codex are, under the hood, some form of the basic ReAct loop. There are of course nuances. For example, most systems decide that if the agent calls the same tool with the same args three times, it must be stuck in a loop and stop the turn. There are perhaps hard limits on how many tool calls the agent can do in each turn.</p><p>Context is the bottleneck. Not the model. Not the prompt. Context.</p><p>The agent doesn&#8217;t have memory. It doesn&#8217;t have state. It has context. Everything it knows about your project, your preferences, your conventions, all of it lives in the context window. When you add a skill, you&#8217;re injecting more context. When you run a tool, the result goes into context. When you switch modes, you&#8217;re switching which system prompt is active, all still in context.</p><p>This means context engineering <em>is</em> AI agent engineering. The agent&#8217;s behavior isn&#8217;t determined by the model alone, or even primarily, but by what context you give it, and how you structure that context over time.</p><p>Most tools treat context as a solved problem. They stuff everything in and hope the model figures it out. In-context learning seems almost magical, but it has limits&#8212;and those limits become visible fast.</p><p>When context is thin, the agent simply doesn&#8217;t know enough about your project to make informed decisions. It relies on baked-in assumptions from training and falls back to consensus instead of following your style: it uses the common tools and practices it learned from pretraining. This often means it uses slightly old and outdated tools and practices.</p><p>So you do the sensible thing, and inject project-specific information into the context. But then if context grows too large, even if it doesn&#8217;t technically exceed the model&#8217;s capacity, things start to get lost in the middle. Moreover, failed tool calls, wrong assumptions the model had to correct, etc., start creeping up in context, not only taking up valuable space but also, and more importantly, <em>distracting</em> the model and biasing it towards mediocre decisions.</p><p>Then there is context compaction: when the context fills in to about 85%, most systems will invoke a special prompt to instruct the agent to summarize the current state. These prompts vary in detail, but often involve asking the agent what it is immediately doing, where is it stuck, what has failed, etc. Clever, but a hack nonetheless. This hard context reset means the agent will forget important nuances in the current conversation and will repeat past mistakes. It&#8217;s frustrating.</p><p>Let&#8217;s look at how these problems surface in specific symptoms that <em>all</em> LLM-based agents display at some point.</p><h2><strong>Symptom One: Unstated Assumptions</strong></h2><p>The first failure mode isn&#8217;t dramatic. It&#8217;s quiet. You ask the agent to write a test, and it writes a <code>unittest.TestCase</code> instead of a <code>pytest</code> function. You ask it to add a dependency, and it edits <code>requirements.txt</code> instead of running <code>uv add</code>. You ask it to deploy, and it pushes directly to main.</p><p>These aren&#8217;t model failures. They&#8217;re assumption mismatches. The agent doesn&#8217;t know how <em>your</em> team does things. There&#8217;s no guardrail for &#8220;in this project, we always use pytest, we always use uv, we never commit directly to main.&#8221; The agent improvises from general knowledge, and general knowledge is often wrong.</p><p>Skills are supposed to fix this. Add a skill document that says &#8220;use pytest&#8221; and the agent should know. But skills introduce a new problem.</p><p>You add a skill for code review. Then one for documentation. Then one for PR descriptions. Then three more for your company&#8217;s specific stack. Each skill seems small. A few hundred tokens each. But they pile up&#8212;always-on knowledge the agent carries but can&#8217;t prioritize.</p><p>The result is context bloat. The agent can&#8217;t tell what&#8217;s relevant in any given moment. So it blends everything together, and hallucinations increase. More skills made it worse&#8212;not better.</p><h2><strong>Symptom Two: Permission Leakage</strong></h2><p>Every agent framework implements the same plan then build pattern. The idea is sound: think first, plan second, execute third. In practice, the boundaries leak.</p><p>Plan mode is supposed to be read-only. Design the change, review the approach, lock in the scope. Build mode is supposed to execute. Write the code, run the tests, commit the result.</p><p>But &#8220;plan mode&#8221; in most tools is just a prompt. There&#8217;s no enforcement. The agent can write code in plan mode if it wants to. It can ignore the plan in build mode. It can skip straight to implementation if the prompt implies urgency. The modes are suggestions, not constraints.</p><p>This matters because a plan only works if it&#8217;s actually followed. If the agent can deviate mid-execution&#8212;if &#8220;plan mode&#8221; and &#8220;build mode&#8221; are just prompts with different names&#8212;the plan becomes advisory. And advisory plans get ignored.</p><p>The second problem is structural: there&#8217;s no artifact that passes from plan to build. The plan lives in the context. By the time build mode starts, the plan is mixed in with everything else the agent said. Which file was the plan? Which changes were approved? The agent has to re-read the conversation to remember. Context saturation accelerates.</p><h2><strong>Symptom Three: Context Saturation</strong></h2><p>After extended work, you see the same pattern: the agent makes 95% of the progress, then fails on the last 5%. It nails the architecture. The logic is sound. The core implementation works. Then it stumbles on a detail&#8212;because context has saturated. It forgot which environment it was in, which conventions still apply, which constraints matter.</p><p>But the deeper problem is internal noise. The agent keeps everything in context: all internal reasoning, all tool calls, all results. This is fine for minute-to-minute action. But after four failed attempts to solve something, the old tool calls are just noise. These were attempts that went nowhere, just add cost and accelerate saturation.</p><p>The supposed solution for this is context compaction. But this creates a lossy summary problem. The agent is supposed to leave a trail for its future self. After context compaction, it should be able to pick up where it left off. But if agents struggle with long contexts, how are they supposed to build a good trail? The compaction report is only as good as the agent&#8217;s ability to summarize. And summarization is lossy and injects back lots of unstated assumptions from pretraining.</p><p>The frustrating part: this wasn&#8217;t a hard problem. The agent had all the knowledge it needed. But context filled with noise, and the important bits got pushed out. More tokens in, less signal out.</p><p>The solution isn&#8217;t just better prompts or larger context windows. Yes, these help. But the symptoms are systemic, so the solution must be a system overhaul.</p><p>Let me show you how that system looks like.</p><h2><strong>Part II - The System</strong></h2><p>Now that we understand the problem, let&#8217;s look at how every agent system actually works. Every AI agent system addresses four concerns. When you conflate them, the system breaks. When you separate them, the system scales.</p><p>This taxonomy isn&#8217;t original to me. It&#8217;s a synthesis of how modern AI agentic systems work under the hood. Most explicitly, it&#8217;s implemented in the OpenCode CLI (opencode.ai), but all other tools follow a similar pattern, even if they use different names.</p><p>Here&#8217;s the breakdown. Every agent system you&#8217;ll encounter (explicitly or implicitly) is managing these four things:</p><p><strong>Mode &#8212; the who.</strong> A mode is the persona the AI adopts. It defines the thinking style, the permissions, the available tools. When you interact with a &#8220;code assistant,&#8221; you&#8217;re in a coding mode. When you switch to &#8220;creative writer,&#8221; you&#8217;re in a creative mode.</p><p>Modes are <em>explicit</em>. They&#8217;re top-level system prompts that define behavior and permissions. You tell the agent: &#8220;This is how you should think and behave. These are the tools you can use. These are the parts of the filesystem you can write to.&#8221;</p><p><strong>Skill &#8212; the knowledge.</strong> A skill is knowledge the agent can recall when necessary. It doesn&#8217;t get invoked explicitly, it gets applied <em>implicitly</em> when necessary. When you give an agent knowledge about SQL optimization, that skill is available whenever relevant. The agent doesn&#8217;t need to be told to use it. The ReAct cycle injects it when it deems suitable.</p><p>Unlike modes, skills can layer. An agent might have a SQL skill, a documentation skill, and a debugging skill, all active simultaneously, all contributing when relevant. Skills are implicit because the agent should just apply them naturally. They can also contradict or complement each other. In-context learning <em>should</em> be capable of using them in a combined manner.</p><p><strong>Command &#8212; the workflow.</strong> A command is a script. It tells the agent: do this, in this order, using these tools. &#8220;Refactor this function&#8221; is a command. &#8220;Run these tests and report results&#8221; is a command.</p><p>Commands are <em>explicit</em>: you invoke them. Under the hood, commands are just prompts. The difference is who injects them: the user. When you run <code>/build</code>, you&#8217;re injecting a workflow prompt into the agent&#8217;s context. That&#8217;s it. The command tells the agent: do this sequence of things. The complexity lives in the orchestration of the ReAct cycle, not the command itself.</p><p>Commands are intentionally simple. They don&#8217;t contain knowledge. That&#8217;s intentional separation of concerns. The command itself shouldn&#8217;t know <em>how</em> to build; it knows <em>when</em> to spawn subagents and which mode to use. This keeps commands thin and changeable without rewriting underlying knowledge.</p><p><strong>Subagent &#8212; the delegation.</strong> A subagent is a spawned agent for background or parallel tasks. It handles isolated work, returns summarized results, then disappears. It is instantiated with a system prompt and specific instructions (synthesized by the primary agent that called it), and runs for one full ReAct turn.</p><p>Subagents are ephemeral. Their internal reasoning stays private. The main agent only sees the synthesis. You spawn a subagent when you need parallel processing, isolation, or both. They are the way to <em>fork</em>, solve a specific subtask, and return a result, but keep context clean. Kind of like subroutines.</p><h3><strong>Why This Separation Matters</strong></h3><p>Understanding this distinction unlocks everything else. Once you see skills as implicit knowledge and commands as explicit scripts, the rest of the architecture clicks naturally. Most agent setups conflate these. They embed knowledge in commands. They make skills behave like workflows. They mix persona into everything else. And the massively underuse subagents.</p><p>When you separate these concerns&#8211;modes for persona, skills for knowledge, commands for orchestration, subagents for delegation&#8211;you get something that looks like good systems engineering. You can swap skills without touching commands. You can change modes without rewriting workflows. You can spawn subagents without the main agent knowing or caring how they work internally. The result is a system that works and adapts and <em>scales</em> like good software should do.</p><p>The system scales because the pieces are independent. Change one without breaking the others. Each component has a single job, and the boundaries between them are meaningful. When context shifts, when requirements evolve, when a new skill needs adding, the system adapts incrementally rather than collapsing under the weight of accumulated complexity.</p><h2><strong>Part III: The Practice</strong></h2><p>If so far this seems like abstract theory for you, in this section we will ground these concepts in actual practice. Let me show you how I&#8217;m using these ideas today to improve my AI-assisted coding practice. I&#8217;m using opencode.ai but I believe the following is easily adaptable to any agentic toolkit out there.</p><h3><strong>My Three Modes</strong></h3><p>Every agentic system needs boundaries, not social contracts, but enforced constraints. In my setup, those constraints come from three modes: analyze, design, and create.</p><p>Each of these modes defines a thinking style&#8212;a persona&#8212;and a set of constraints for tool use and filesystem access.</p><p><strong>Analyze mode</strong> is research and investigation. This mode reads your work and writes summaries to a knowledge base. It cannot touch production files. Not &#8220;should not&#8221; but <em>cannot</em>. The permissions are built into the mode itself, not enforced through prompts or warnings. The agent is incapable of writing outside of a <code>.playground</code> folder, and is incapable of doing anything that can harm the project or the system (more on how a bit later) but it is still capable of running arbitrary code, download anything from the internet, and play around as it needs.</p><p><strong>Design mode</strong> is architecture and planning. This mode bridges analysis and implementation. It can read your project and write design documents, architecture diagrams, and implementation plans, but still cannot touch production code. It cannot run shell scripts either, at all. It can look at git status and logs, read folder contents, etc., but it can only write to a space where plans and design documents go.</p><p><strong>Create mode</strong> is execution. Full read-write access. This is where production work happens. The agent can write code, create files, and modify the project directly. Again, it cannot do anything outside the project scope, though. It won&#8217;t accidentally change <code>/etc/host(s)<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a></code> even if it tries to.</p><p>The key insight: <strong>modes define permissions, not just persona</strong>. You can&#8217;t accidentally prompt your way into code generation during research. The agent literally lacks the capability. The agent doesn&#8217;t need to &#8220;understand&#8221; these constraints, it simply operates within them.</p><p>Mode is the who, and it determines what the agent <em>can</em> do, not just how it thinks.</p><p>Let me show you how they work in three different domains that make the bread and butter of my daily job: software development, scientific research, and technical writing.</p><p>I chose these domains because they illustrate the simplicity and scalability of the system. Software development shows the framework under constraints: deadlines, production code, real stakes. Research shows it under complexity: synthesis, evaluation, structured output. Technical writing shows it under nuance: voice, audience, iterative refinement. Three different pressures, one consistent architecture that works in all three cases.</p><p>In each of these domains we have two layers to go through: first is the set of <strong>implicit skills</strong> that are available to the agents, and second is the set of <strong>explicit commands</strong> (each tied to a specific mode) that setup concrete workflows. I will show you one example workflow that cross-cuts across the three modes in each case. I will also tell you exactly where delegation occurs.</p><h3><strong>Domain A: Software Development</strong></h3><p>Software development is where agentic systems face the harshest constraints. Production code has stakes. Deadlines are real. Mistakes cost money. Let&#8217;s see how the framework applies.</p><h4><strong>Implicit Skills</strong></h4><p>A software development agent carries knowledge it never needs to be told to use. It knows language idioms and patterns like the idiomatic way to write a list comprehension in Python, or the conventions for error handling in Go. It knows testing conventions: where tests live in the directory structure, how they&#8217;re named, what assertions to prefer. It knows architecture conventions: layered structure, dependency injection patterns, how error states propagate. It knows code review standards: what to flag, what to praise, when to ask for clarification.</p><h4><strong>Example Workflow: Bug Hunting</strong></h4><p>I use this workflow for finding and fixing bugs. It starts with investigation. The agent spawns dozens of subagents to try and break the system (either guided towards a purpose, or completely unbiased). Then you build a comprehensive plan to solve it. And then you execute that plan. Simple, right?</p><p><strong>Phase 1: /trace (analyze mode)</strong> runs systematic experiments to detect and narrow down a bug&#8217;s cause. The agent examines stack traces, compares behavior across commits, and pinpoints the exact files and functions that need attention. This mode is read-only by design, except for a <code>.playground</code> folder. Research happens here, not in the code itself.</p><p>Each experiment is run on a subagent that has the job of verifying one assumption. The main agent receives only experiment results, and constructs an executive report of findings. This means you can run dozens of different experiments autonomously to detect what breaks what.</p><p><strong>Phase 2: /plan (design mode)</strong> takes the diagnosis and defines the changes needed, along with their architectural impact. The agent reviews the affected modules, considers alternative approaches, and documents the implementation plan before touching anything. This is where the scope gets locked in.</p><p>The result of this phase is a structured plan with step by step details on what files must be touched and what must be done in there (semantically, not code). For every phase, it defines success criteria: what must be validated before we can say we got that phase right.</p><p><strong>Phase 3: /build (create mode)</strong> executes the plan step by step. The agent writes tests first (following Test-Driven Development (TDD) discipline) for the success criteria defined for that phase and watches them fail. Then it launches a coding subagent that has <em>read-only</em> access to tests, so it cannot cheat and change the tests.</p><p>The subagent attempts to implement changes that make the test pass. If it succeeds, the main agent commits and moves on. If it doesn&#8217;t, the main agent retries a few times. If there is no progress, the main agent resets the work tree (no harm done), and reports on failure. This usually means the plan needs revisions.</p><h3><strong>Domain B: Research</strong></h3><p>Research is where agentic systems face the greatest complexity. Sources multiply, methodologies diverge, synthesis requires judgment. Let&#8217;s see how the framework applies.</p><h4><strong>Implicit Skills</strong></h4><p>A research agent knows the conventions of academic writing without being reminded. It knows citation formats like APA, MLA, Chicago, and IEEE, and when to use each. It knows how to evaluate papers: methodology soundness, sample size adequacy, replicability claims, conflict of interest disclosures. It knows the structure of literature reviews: how to organize by theme, methodology, or chronological development. It knows domain-specific terminology, distinguishing between &#8220;accuracy&#8221; and &#8220;precision&#8221; in machine learning, or between &#8220;confounding&#8221; and &#8220;colliding&#8221; in causal inference.</p><h4><strong>Example Workflow: State-of-the-Art Report</strong></h4><p><strong>Phase 1: /research (analyze mode)</strong> spawns subagents to gather sources in parallel. Each subagent reads a batch of papers, synthesizes findings, and returns summaries. The main agent synthesizes those summaries into structured notes. This phase can be run multiple times to collect batches of sources without overwhelming context. At the end, you get hundreds of sources summarized into clean research notes.</p><p><strong>Phase 2: /outline (design mode)</strong> identifies patterns across the collected literature. The agent groups papers by methodology, extracts recurring findings, and maps the landscape of the field. It generates outline options for the final document, based on typical structures like problem-solution or paradigm-methods, highlighting gaps where the research is thin and consensus areas where findings align.</p><p><strong>Phase 3: /draft (create mode)</strong> builds the document section by section, following the outline. Each section draws on the structured notes, weaving together sources into coherent narrative.</p><p>The agent launches subagents for writing each subsection because typically, agents write more or less the same length in a single <code>write</code> command, so if you ask it to fill in a large outline all at once you&#8217;ll only get a mediocre extended outline. By launching independent writers for specific sections of the outline, you get all the attention of a single turn to read source material and write a good 4 or 5 paragraphs for a concrete section.</p><p>A cool idea I&#8217;ve been meaning to try is have the main agent can spawn several subagents to write the same section, with a high temperature, and then perform some sort of aggregation or evaluation before building the final draft for every section. This burns through 3x tokens but ensembles have been shown over and over to improve AI models outputs. If you try it, let me know.</p><h3><strong>Domain C: Technical Writing</strong></h3><p>Technical writing is where agentic systems face the most nuance. Voice matters. Audience varies. Iterative refinement is the norm. Let&#8217;s see how the framework applies.</p><h4><strong>Implicit Skills</strong></h4><p>A technical writing agent carries knowledge of prose style without being coached. It knows voice and tense conventions&#8212;active voice for clarity, past tense for completed processes, second person for direct instruction. It knows structural patterns: how documentation differs from blog posts, how reports differ from tutorials, how reference material differs from guides. It knows audience awareness: what to explain for newcomers, what to omit for experts, when to elaborate and when to abbreviate. It knows cross-referencing and linking norms: when to link, when to inline, how to name anchors for scannability.</p><h4><strong>Example Workflow: Paper Review</strong></h4><p><strong>Phase 1: /review (analyze mode)</strong> performs detailed review in a specific order: structural issues first, then content, then style. The agent examines the narrative arc&#8212;how main points connect, whether the flow makes sense, before worrying about grammar or word choice. This ordering matters; reviewing low-level details when high-level problems exist wastes effort.</p><p>Each iteration is performed by spawning several subagents that focus on specific types of problems, like transitions, unverifiable claims, etc. Each subagent returns a structured list of issues, pointing back to exact line numbers and phrasing. Then, the main agent <em>edits</em> the original paper and injects markdown comments in every marked issue, next to the paragraph, or under the header where it best fits.</p><p><strong>Phase 2: /revise (design mode)</strong> plans changes to specific sections, prioritizing by review type. The agent maps structural fixes to particular paragraphs, content additions to thin sections, style improvements to verbose passages. It produces a concrete plan, section by section, change by change. Then it goes into the manuscript and writes markdown comments as replies to the existing review comments, thus grounding the revision plan in the exact context it must fit.</p><p><strong>Phase 3: /rewrite (create mode)</strong> follows the plan. The agent revises sections in priority order, applying structural changes first, then content, then style. Again, each step is performed spawning a subagent tasked with just a change (for style changes we actually do it section by section).</p><p>The subagent doesn&#8217;t edit; it produces a draft revision that the main agent is then tasked to paste into the document where it fits. Crucially, the main agent is instructed to <em>leave</em> the editorial comments but mark them as solved, with a short trail of what was changed. This works wonders for a later human review phase.</p><h2><strong>Part IV: A Look into the Future</strong></h2><p>These workflows work, but with some caveats. There&#8217;s a gap between &#8220;working&#8221; and &#8220;working well.&#8221; Three key pains remain in my implementation.</p><ol><li><p>Long commands are hard to follow when given as a single prompt. The fourth step gets forgotten since it is buried at the beginning of the context.</p></li><li><p>Permissions as currently implemented are all-or-nothing. You either have shell access (destructive) or you don&#8217;t. I want broad permissions (run whatever you want) with provable security (nothing you run can change this file).</p></li><li><p>Context saturation still happens even with delegation. After a while, the agent will have to compact context, and this usually means you lose important information.</p></li></ol><p>I have three ideas for closing this gap. The first is about how commands work. The second is about security. The third is about context management. They are in different levels of implementation, so let me show you what I&#8217;m building toward.</p><h3><strong>Idea One: Better Commands</strong></h3><p>Commands in most tools (Claude Code, Gemini CLI, Codex, Copilot) are one-shot interactions: you invoke the command, a single massive prompt is injected. The agent runs until it decides to stop.</p><p>To make commands truly useful, we need to be more like scripts. Here&#8217;s what that means:</p><ol><li><p>Commands that inject prompt instructions one step at a time, waiting for the agent to do a full turn each time. Instead of dumping a large prompt to run all steps at once, a command like <code>/review</code> could insert surgical mini prompts that say &#8220;read the file&#8221;, wait for the agent, &#8220;analyze structure&#8221;, wait for agent, and so on, until &#8220;write the report&#8221;. This massively reduces the problem of lost-in-middle context saturation. Each turn the agent is focused on one specific step, and you get N times the compute power to solve an N-step workflow.</p></li><li><p>Commands that extract structured information from the agent response, and can later inject variables back into prompt. This allows to reinject important information into later prompts, keeping important information as a contextual variable, not just a string lost in the middle of the prompt. But it allows for something else.</p></li><li><p>Conditional branching based on context or user input. Once we have structured parsing and contextual variables, we can inject different prompts based on whether the agent succeeded or failed. If the plan reveals a breaking change, route to architectural review. If it&#8217;s a bug fix, route directly to implementation. The command adapts its path based on what it discovers.</p></li><li><p>Finally, commands that embed and execute external scripts. Instead of asking the agent to run some script, the command can run arbitrary Python, JS, Bash, or whatever, to, for example, transform structured information. The command becomes an orchestrator of other processes.</p></li></ol><p>Basically, what I&#8217;m asking for here is a Domain-Specific Language (DSL) for guiding agents in a far more structured manner, but still having the power of arbitrary prompts for flexibility. Mixing code and prompts in this way gives us the tools to find the precise balance between constraints and capabilities.</p><p>If this sounds exciting, I&#8217;m happy to tell you this is already doable, to some extent. Check out my <a href="https://apiad.github.io/opencode-literate-commands">literate-commands</a> project for an OpenCode-specific implementation of these ideas. It&#8217;s still a bit rough around the edges, but it works much better than plain, single-prompt commands.</p><h3><strong>Idea Two: Sandboxed Security</strong></h3><p>Most agentic tools have very coarse permission settings. You can allow, deny, or set a specific tool to &#8220;ask&#8221; mode, which means the agent will pause and emit a notification for the user to give permission.</p><p>This works fine for coarse-grained permissions like read-only access, or write but no shell. In OpenCode, you can even define permissions for specific paths, or even specific shell commands (with simple glob patterns, so you can, e.g., allow <code>ls *</code> but reject all other shell commands).</p><p>However, even in this case, I find these permissions too restrictive. They are conflating two different dimensions into one&#8211;what tools the agent can use, and what side-effects can those tools have.</p><p>For example, say I want to give my agent <code>git</code> access but only for reading operations. How do you achieve that? You need to list all safe patterns like <code>git ls-tree *</code>, <code>git status</code>, <code>git log *</code>. But what about <code>git branch</code>? Depending on the arguments, this subcommand can have read-only or write side effects. And then think about pipes, shell substitution, custom bash scripts, or worse, <code>python *</code>.</p><p>If you want your agent to be capable, you need to give it access to a wide variety of tools. For example, my bug-hunting workflow depends on the agent being able to execute arbitrary code that it synthesizes on the fly. However, I want guardrails. There is simply no way to whitelist all possible commands. We need separation of permission to run a command and permission to modify the system.</p><p>The solution, of course, is some form of filesystem isolation. The most obvious one is wrapping all shell execution in Docker, so commands run in a container with proper constraints. This creates all sorts of other problems, which I can discuss in a future post, but for now, it remains my best (and simplest) solution to robust sandboxing.</p><p>And this isn&#8217;t just about safety, though. When you know the agent can&#8217;t accidentally wipe your home directory or exfiltrate your API keys, you can let it do more. Security enables capability. You can let the agent download arbitrary code from the internet, run arbitrary scripts, break things and observe changes. Everything happens inside a Docker container with precise constraints that enable maximum capability with absolute security.</p><p>As of now, I kind of implemented this as a plugin for OpenCode, but it&#8217;s still in beta phase and not ready for widespread use. More on this idea in a future article.</p><h3><strong>Idea Three: Context-Aware Execution</strong></h3><p>And finally, we need to rethink the whole oversimplistic ReAct loop that simply grows the context linearly. The agentic cycle doesn&#8217;t have to be a straight line. Real work branches: you explore options, try things, backtrack when they fail. The context should reflect that.</p><p>I&#8217;ve been designing a system where the context never saturates. It branches when you&#8217;re exploring, spawning parallel contexts for different approaches. It prunes old tool calls that went nowhere. It removes internal reasoning that no longer matters. It maintains a &#8220;trail&#8221; that actually works: a structured record of decisions, not a lossy summary.</p><p>The goal is simple: keep context between 40% and 60% saturation at all times. Not by compacting a 150K tokens context down to 10K&#8212;which kills all understanding the agent had achieved&#8212;but by never letting it grow unchecked.</p><p>Nothing like this exists yet, so I&#8217;m building it, but it&#8217;s a story for another day.</p><h2><strong>Conclusion</strong></h2><p>The main takeaway from this article is not that <em>my</em> system is better. It&#8217;s that <em>you</em> can design your own system to adapt perfectly to your workflows if you clearly separate concerns. The main modes are for establishing an overall persona&#8211;inquisitive and critical, versus detailed and forward-looking, versus focused and action-biased&#8211;while skills incorporate domain knowledge, and commands act as precise workflows.</p><p>The workflows I described are real, based on actual commands and prompts I&#8217;m using in production code. But I have abstracted them a bit to make them easier to understand in the context of an arbitrary agent, not tied to specific idiosyncrasies of the tool I happen to be using at the moment. If you want to see and try for yourself a concrete implementation of these ideas&#8212;still imperfect, but working nonetheless&#8212;check out my <a href="https://apiad.github.io/opencode">opencode toolkit</a> repository. It&#8217;s still pretty much work in progress, so use it with care.</p><p>In future articles I will explore specific problems in more detail and discuss concrete strategies to implement powerful workflows that keep you, the user, in absolute control, while delegating the majority of the grunt work.</p><p>And, as a final remark, I&#8217;m seriously considering building my own CLI agent. I know, I know. Reinventing the wheel and all that. But my plan is not to compete with any of the professional tools out there. What I always care about is <em>understanding</em> things deeply, and as my computer science career has taught me so far, there is no deeper understanding than the one you gain from actually building stuff.</p><p>So stay tuned for that. I will share progress as usual in the form of educational articles, so you&#8217;ll get to see under the hood how to build a fully functional CLI agent with tool calling, context compaction, skills, commands (the powerful ones, not the cheap single-prompt injection), subagent delegation, sandboxing, and all the engineering design hurdles that come with it.</p><p>Until next time, stay curious.</p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>Fun quirk. Typing <code>/etc/host</code> plus the <code>s</code> makes Substack silently fail on draft save, some sort of ill-defined security rule, I suppose. What the f&#8230;</p></div></div>]]></content:encoded></item><item><title><![CDATA[How I'm Using AI Today]]></title><description><![CDATA[Yes, another take on this. I promise you this one is a bit different.]]></description><link>https://blog.apiad.net/p/how-im-using-ai-today</link><guid isPermaLink="false">https://blog.apiad.net/p/how-im-using-ai-today</guid><dc:creator><![CDATA[Alejandro Piad Morffis]]></dc:creator><pubDate>Mon, 02 Mar 2026 21:13:04 GMT</pubDate><enclosure url="https://images.unsplash.com/reserve/oIpwxeeSPy1cnwYpqJ1w_Dufer%20Collateral%20test.jpg?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHx0b29sc3xlbnwwfHx8fDE3NzI0NTU2Mzl8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" 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://images.unsplash.com/reserve/oIpwxeeSPy1cnwYpqJ1w_Dufer%20Collateral%20test.jpg?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHx0b29sc3xlbnwwfHx8fDE3NzI0NTU2Mzl8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://images.unsplash.com/reserve/oIpwxeeSPy1cnwYpqJ1w_Dufer%20Collateral%20test.jpg?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHx0b29sc3xlbnwwfHx8fDE3NzI0NTU2Mzl8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/reserve/oIpwxeeSPy1cnwYpqJ1w_Dufer%20Collateral%20test.jpg?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHx0b29sc3xlbnwwfHx8fDE3NzI0NTU2Mzl8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/reserve/oIpwxeeSPy1cnwYpqJ1w_Dufer%20Collateral%20test.jpg?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHx0b29sc3xlbnwwfHx8fDE3NzI0NTU2Mzl8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/reserve/oIpwxeeSPy1cnwYpqJ1w_Dufer%20Collateral%20test.jpg?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHx0b29sc3xlbnwwfHx8fDE3NzI0NTU2Mzl8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1456w" sizes="100vw"><img src="https://images.unsplash.com/reserve/oIpwxeeSPy1cnwYpqJ1w_Dufer%20Collateral%20test.jpg?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHx0b29sc3xlbnwwfHx8fDE3NzI0NTU2Mzl8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" width="5663" height="4599" data-attrs="{&quot;src&quot;:&quot;https://images.unsplash.com/reserve/oIpwxeeSPy1cnwYpqJ1w_Dufer%20Collateral%20test.jpg?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHx0b29sc3xlbnwwfHx8fDE3NzI0NTU2Mzl8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:4599,&quot;width&quot;:5663,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;clothes iron, hammer, axe, flashlight and pitcher on brown wooden table&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="clothes iron, hammer, axe, flashlight and pitcher on brown wooden table" title="clothes iron, hammer, axe, flashlight and pitcher on brown wooden table" srcset="https://images.unsplash.com/reserve/oIpwxeeSPy1cnwYpqJ1w_Dufer%20Collateral%20test.jpg?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHx0b29sc3xlbnwwfHx8fDE3NzI0NTU2Mzl8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/reserve/oIpwxeeSPy1cnwYpqJ1w_Dufer%20Collateral%20test.jpg?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHx0b29sc3xlbnwwfHx8fDE3NzI0NTU2Mzl8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/reserve/oIpwxeeSPy1cnwYpqJ1w_Dufer%20Collateral%20test.jpg?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHx0b29sc3xlbnwwfHx8fDE3NzI0NTU2Mzl8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/reserve/oIpwxeeSPy1cnwYpqJ1w_Dufer%20Collateral%20test.jpg?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHx0b29sc3xlbnwwfHx8fDE3NzI0NTU2Mzl8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><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 tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><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">Photo by <a href="https://unsplash.com/@toddquackenbush">Todd Quackenbush</a> on <a href="https://unsplash.com">Unsplash</a></figcaption></figure></div><p>I know, this is the probably the twentieth article you&#8217;ve read this week on &#8220;how I am using AI to automate my whole life/work/whatever&#8221;. Me too. But please, give me a couple of minutes to tell why this article might be different, and thus interesting to you.</p><p>But even if you don&#8217;t have two minutes to spare, please check the <a href="https://github.com/apiad/starter">repository</a> where all I&#8217;m going to tell you about is implemented, ready for your taking. Clone it and play with it, then if you like it, come back and read the rationale behind it.</p><p>Done? Ok, here we go.</p><p>So yes, this is another article trying to explain to you how I use AI coding agents (specifically Gemini CLI, but the specifics don&#8217;t matter) to enhance my workflows. Here are a couple of reasons why I think you might be interested&#8212;and why this article might be different to so many lookalikes out there.</p><p>First, I&#8217;m not an enthusiastic techbro who just discovered AI. If you&#8217;ve read this blog before, you know I&#8217;m a longtime researcher in AI&#8212;way before LLMs were a thing&#8212;and also a self-proclaimed AI anti-hypist. I&#8217;m not just overexcited about this shiny new toy. I&#8217;ve been using generative AI since day one for everything, and I&#8217;ve been telling you exactly how it sucks at almost anything important since day one. Coding has been the same until very recently. I can tell you the change in productivity is real, provided you are responsible and considerate.</p><p>Second, my approach to incorporating AI into my workflows is very careful and grounded in a large dose of healthy skepticism. I know firsthand how these things fail, so my approach attempts to be very robust to hallucinations and context drift and all the plagues of even the most powerful LLMs.</p><p>Third, I have a thing for systems. What I&#8217;m going to show is not just a set of hacks or clever prompts or productivity tips. It&#8217;s a principled system to go from ideation to research and planning to execution at the fastest responsible speed, without sacrificing on safety or maintainability.</p><p>And fourth, I have kind of a unique position in that I&#8217;m both heavily invested into coding as well as technical writing. I&#8217;m a college professor, so I do a lot of research, writing, and editing; but I also run a small AI startup, small enough that I get to do a large part of the coding. So my system attempts to bridge these two facets&#8212;code and prose creation&#8212;with the same unified principles of careful deliberation and planning, and robust tracking of the project evolution.</p><p>If you&#8217;re curious already, let me start by exposing the overall principles behind this approach, and then we&#8217;ll dive (not delve, but close) into the details.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.apiad.net/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://blog.apiad.net/subscribe?"><span>Subscribe now</span></a></p><h2>Principles of Effective AI-Assisted Work</h2><p>By far the most pressing limitation of modern, top-tier LLMs for my line of work is context saturation. What I mean by this, is no matter how many tokens your model can fit (Gemini 3 claims to chug as much as 1 million tokens), when you work for a considerable amount of time on a single project, you will exhaust this context. And even if the context window isn&#8217;t full, the model will quickly lose the capability to keep track of the important bits of context, and will start to deviate from your instructions and make up its own agenda. Not out of evilness but simple probabilities.</p><p>The way you see this problem when using Claude Code, Gemini CLI, Codex, Copilot, or anything similar is twofold. The model will either forget midtask what is was supposed to do, but it won&#8217;t simply fail; it will reinterpret the task based on its faulty, lossy, blurry viewpoint given the available context and it will do something close, but not quite what you wanted. Or, the model will make faulty assumptions and forget to ask relevant questions, again behaving close but not quite exactly as you intended.</p><p>The result is always the same, you get frustrated that you achieved 95% of what you needed, but the remaining 5% is harder to fix than to just try again. And what could have been a happy working session where you get important and difficult things done quickly derails into a session of arguing with an LLM trying to convince it (him/her/pick your side) to do things the way you want.</p><p>Barring any fundamental paradigm shifts in the near future, under the assumption that LLMs will keep working as they are, the only way to fix this is to be very conscious and careful about the context&#8212;what has been dubbed context engineering&#8212;in two senses: First, do not pollute the context with unnecessary details. And second, re-inject into the context whatever is relevant for any given task, so it doesn&#8217;t get forgotten.</p><p>I know, kind of contradictory, but tradeoffs are what engineering is all about. In my system, I&#8217;ve applied three principles to help me manage these tradeoffs effectively.</p><ol><li><p>The important things should be made explicit.</p></li><li><p>Resist the urge to guess.</p></li><li><p>Delegate, delegate, delegate (yeah, three times).</p></li></ol><p>Here&#8217;s how that works. For principle one, we will keep track of everything important in markdown files in the repository. This means ideas are committed to plans in markdown files before acting on them, research is summarized and stored in real time, and everything that changes in the project is logged to a long-lived journal, so the model remembers why we made some decision months ago.</p><p>For principle two, we will favor using explicit commands that are translated into explicit prompts, instead of relying on implicitly activated skills that you have little control of. So if you want the model to make a plan, you will prompt it with &#8220;/plan lets design feature X&#8221;, and the <code>/plan</code> command will invoke a carefully crafted prompt that says how plans work, where they are stored, etc.</p><p>And principle three means using sub-agents a lot. This is a Gemini CLI specific feature&#8212;but every other coding agent has a similar thing&#8212;where you can launch a complicated task as a &#8220;sub-agent&#8221;&#8212;which basically means a custom prompt&#8212;but here is the important part: All the context of that sub-agent is kept private, not shared with the main agent, so the internal reasoning the sub-agent needed to run to find 20 different sources in Google does not pollute the main context. We only receive back the summarized responses. This allows running very long tasks (my record is a 30 minutes long research loop, involving hundreds of retrieved web pages) on a single agent turn, without exhausting the context.</p><p>I use four sub-agents in different commands. The <code>planner</code> is the lead architect. It&#8217;s a read-only agent that walks through your codebase and reads everything necessary to understand architecture, design decisions, etc., given a specific task. It then produces a detailed Markdown plan in the <code>plans/</code> directory&#8212;a physical source of truth that you can review before any code is touched, and that the main agent will follow step-by-step. This separation prevents the system from &#8220;guessing&#8221; its way through your codebase.</p><p>When I need external knowledge&#8212;like a library&#8217;s latest API or a specific technical specification&#8212;the <code>researcher</code> agent takes over. It scours the web to fetch relevant documentation, which it then synthesizes into granular summaries in the <code>research/</code> directory. This raw data is then handed off to the main agent to build an executive report annotated and linked to all relevant sources, again all stored already in your repository.</p><p>And there are two more agents, specifically designed for technical writing. The <code>reporter</code> agent takes an outline, and a folder of content, and it will write section by section, a detailed account of what the outline requested.</p><p>Unlike a standard LLM that might provide a high-level summary, the <code>reporter</code> is trained to expand specific placeholders with deep, evidence-based paragraphs. It draws directly from your <code>research/</code> files and the project <code>journal/</code> to ensure every sentence is grounded in the project&#8217;s actual state. Finally, the <code>editor</code> provides the final polish, auditing the draft for structural gaps and linguistic tics. It is grounded in a customizable style guide to make sure it always respects your style.</p><p>This distributed intelligence is held together by a central nervous system of context files, as per principle one. A <code>journal/</code> directory provides a chronological record of decisions and progress, acting as a long-term memory for the project. The <code>plans/</code> directory stores the strategic intent, while a <code>TASKS.md</code> file provides a high-level overview of the project&#8217;s current status. This structured environment allows the subagents to maintain a high degree of situational awareness without needing to ingest the entire repository in every turn.</p><p>Now that we have the key pieces in place, you can start to see why I think this approach is powerful. It is very extensible&#8212;you can add new agents triggered by specific commands to customize any kind of workflow&#8212;and it mostly solves the main pain point of modern LLMs, which is precisely the brittleness of long contexts.</p><h2>Workflow Details</h2><p>With all that, let me show you the specific commands and workflows I have currently implemented, but keep in mind what follows is but one example of the kind of powerful workflows we can start to automate.</p><p>I will divide the rest of the article into a few major areas, and explain the commands and agents that I use in each case, and a bit of the high-level instructions given to each of them.</p><h3>Discovery &amp; Strategy</h3><p>The most critical phase of any project occurs before I write a single line of code. I call this the &#8220;Discovery and Strategy&#8221; phase, powered by the <code>/research</code> and <code>/plan</code> commands. By formalizing this process, I&#8217;ve moved away from impulsive execution toward a deliberate, architected approach.</p><p>The <code>/research</code> command is my primary tool for external knowledge. When triggered, the <code>researcher</code> scours the web for technical documentation and relevant case studies, synthesizing them into granular summaries in the <code>research/</code> directory. These files become a persistent knowledge base, allowing me to reference verified facts without leaving my terminal.</p><p>Complementing this is the <code>/plan</code> command, which focuses on internal strategy. The <code>planner</code> conducts a thorough analysis of the codebase and the <code>journal/</code> to understand the system&#8217;s current state. After an interactive dialogue to resolve any ambiguity, it produces a comprehensive Markdown plan in the <code>plans/</code> directory. This document maps out the technical territory and provides a step-by-step execution roadmap.</p><p>The strength of this workflow lies in the synergy between these two tools. A <code>/plan</code> operation might reveal a gap in my understanding of a specific library, prompting a targeted <code>/research</code> session. Conversely, a new research finding might shift my technical direction, leading to a refined plan.</p><h3>Software Development</h3><p>Once I have a solid strategy in my <code>plans/</code> directory, I can move into execution. Let&#8217;s focus now on software development. I&#8217;ve designed four core commands&#8212;<code>/issues</code>, <code>/task</code>, <code>/commit</code>, and <code>/release</code>&#8212;to eliminate the friction of context-switching between my IDE and my terminal.</p><p>The cycle starts with <code>/issues</code> and <code>/task</code>. The <code>/issues</code> command acts as an expert project lead, interfacing directly with the GitHub CLI to analyze open issues and recommend what to tackle next based on strategic impact. For roadmap tracking, the <code>/task</code> command manages a living <code>TASKS.md</code> document. It assesses the value of pending work to ensure my efforts are always aligned with the project&#8217;s goals.</p><p>As I translate the plan into code, the <code>/commit</code> command brings order to my workspace. Instead of a monolithic &#8220;wip&#8221; commit that hides the logic of my changes, the system analyzes the <code>git diff</code> and logically groups modifications into cohesive units. It separates a core feature update from a documentation tweak, then proposes a series of atomic, Conventional Commits for my approval. This keeps my version history pristine and easy to navigate.</p><p>The final stage is deployment. Manual releases are fragile processes fraught with repetitive checklists: bumping versions and running tests before managing tags. The <code>/release</code> command automates this entire sequence. It verifies the workspace integrity by ensuring a clean git tree and passing tests via <code>make</code>. It then analyzes the commit history to propose the next version bump, drafts a <code>CHANGELOG.md</code> entry, and publishes the final tag to GitHub. This transforms a tedious afternoon of housekeeping into a single-command operation.</p><p>But, as you&#8217;ve seen, everything happens in tandem with those principles. No important action is taken without my confirmation, and everything gets logged into the filesystem, so all future decisions are grounded in past experience.</p><h3>Content Creation</h3><p>Now let&#8217;s focus on writing high-quality documentation and long-form articles. This is perhaps the most sensible part of the article (and the system) because people are <em>very</em> sensitive today with the topic of AI writing&#8212;and rightly so. Again, my intention here is to enhance how I work and get stuff done. If you&#8217;re writing for the pleasure of doing it, that&#8217;s totally fine, you probably don&#8217;t want any help there.</p><p>Anyway, the approach is built on the same cognitive foundation as the development path: the research and plans gathered during the discovery phase should serve as grounding for writing.</p><p>It starts with the <code>/draft</code> command. In its initial phase, the system performs a deep scan of the <code>research/</code> and <code>plans/</code> directories to identify the key themes relevant to the requested topic. If the foundation is too thin, the system will pause and suggest a <code>/research</code> or <code>/plan</code> cycle to ensure the draft has sufficient substance. Once the context is validated, the workflow enters an interactive &#8220;Outline Creation&#8221; phase. Rather than guessing at a structure, the system proposes a detailed Markdown outline. This collaborative step allows me to set the narrative arc and logical flow that I want, iterating on the high-level structure of, say, a technical article, before committing on the details.</p><p>Once the outline is locked, the <code>/draft</code> process initializes a skeleton file&#8212;complete with section headers and strategic placeholders&#8212;and then moves into an iterative, section-by-section expansion. Here, the <code>reporter</code> subagent takes the lead. Guided by the specific context of each section, the <code>reporter</code> weaves together research summaries and technical specifications into professional prose, all grounded on a style guide document.</p><p>Because the expansion happens in granular steps, the system maintains a high level of detail that a single-shot generation would inevitably lose. The result is a first draft that is structurally sound and rich with technical depth.</p><p>However, a first draft is rarely the final word. It will always sound AI-ish, and for many other reasons, it is rarely good enough. To achieve professional quality, I use the <code>/revise</code> command, which runs a structural and linguistic audit powered by the <code>editor</code> subagent following the same style guide.</p><p>Unlike a simple &#8220;check my writing&#8221; prompt, the <code>editor</code> performs a deep analysis of the document&#8217;s flow and tone. It identifies logical gaps where more evidence might be needed and highlights awkward phrasing that could obscure my intent. And crucially, this isn&#8217;t an automated &#8220;fix-all&#8221; tool; it&#8217;s an interactive process. The system presents its findings and proposes specific improvements, which I can then review or approve.</p><p>This collaborative refinement process ensures the final output maintains a consistent, professional voice while benefiting from the speed of the AI. By using <code>/revise</code>, I can surgically improve the text to enhance clarity and impact without losing control over the narrative.</p><p>But, in any case, I always find necessary a manual review and editing after all the AI enhancements. It shouldn&#8217;t be a surprise to you that this article is written in this way, but what you&#8217;re reading now is probably 80% different to what the final <code>/revise</code> iteration gave me. There is only so much you can prompt an AI, and that final human touch is not part of it.</p><p>But that&#8217;s good. This automates the first 80% or so of compiling a gazillion sources into a coherent narrative, and leaves the remaining 80% of polishing for me, which is the part I actually enjoy about writing.</p><h3>Background Tasks</h3><p>But there&#8217;s more. All of the above is what happens during, let&#8217;s say, the work day. That&#8217;s me sitting in front of the terminal, typing commands, approving stuff, fixing and redirecting, etc. Being an orchestrator.</p><p>But the real magic of AI-assisted development is what happens when you&#8217;re not looking. How you can leave you AI assistant working through the night, compiling sources, fixing bugs and proposing pull requests, enhancing the test suite, burning tokens your behalf.</p><p>To achieve this, I built an automation layer via the <code>/cron</code> command. The heart of this automation is the <code>cron.toml</code> file. This configuration file allows me to define scheduled tasks with a simple, declarative syntax. Each task specifies a name, an execution schedule, and a natural language prompt for the AI to execute.</p><p>For instance, I can schedule a task to perform &#8220;Background Research&#8221; every midnight on the unfinished tasks, scouring the web for new developments in a specific technical niche or finding specific sources to deal with the recently discovered bugs. By offloading these repetitive tasks, I ensure the knowledge base remains fresh and the project&#8217;s momentum never stalls. When the morning arrives, we have a lot of new context to start planning the day&#8217;s bugfixes and feature developments.</p><h2>Maintenance &amp; Refactoring</h2><p>Now, for the final touch, here&#8217;s how I deal with technical debt and feature rot. As a project evolves&#8212;and especially, as fast as AI-powered projects evolve&#8212;it accumulates technical debt&#8212;outdated implementations, untested paths, and plain old useless features&#8212;but also, contextual debt&#8211;&#8212;outdated plans and completed tasks that clutter the roadmap, and research we never acted upon.</p><p>Without deliberate intervention, this noise degrades the AI&#8217;s performance, leading to context rot. The <code>/maintenance</code> command is my primary defense against this entropy. It treats the development environment as a living instrument that I must regularly tune and sharpen to maintain its efficiency.</p><p>The <code>/maintenance</code> workflow follows the same plan-first architecture as the rest of the system. When invoked, the AI performs a comprehensive audit of the codebase, focusing on improvements like code readability and performance optimization. It identifies opportunities to apply the DRY (Don&#8217;t Repeat Yourself) principle and ensures that every function is documented with high-quality docstrings. But it also fixes deviations between the documentation and the actual implementation.</p><p>Crucially, this is an interactive process: the system presents a detailed refactoring plan for my approval before making any changes. This ensures that I remain in control while the machine handles the labor of cleaning the code.</p><p>Beyond code refactoring, I maintain system health through disciplined repository hygiene. A key component is the management of the <code>TASKS.md</code> file. By regularly moving completed items into the &#8220;Archive&#8221; section, I ensure that my primary operational view remains focused on what is relevant. This simple act of archiving prevents the &#8220;Active Tasks&#8221; list from becoming a source of distraction.</p><p>The goal of these maintenance practices is to provide the AI with the cleanest possible line of sight into the project&#8217;s state. When the repository is cluttered with stale research, the subagents are forced to sift through irrelevant data, increasing the risk of hallucinations. By treating maintenance as a first-class citizen, I ensure that every interaction, whether a <code>/plan</code> or a <code>/draft</code>, is grounded in a precise context.</p><h2>Conclusion</h2><p>This system is far from done, and as models improve in capabilities I&#8217;m sure we&#8217;ll unlock new areas for automation and augmentation that we cannot think about today. But for me, the key principles will remain valid for a long time. These are principles of robust engineering and management, after all. You can read them thinking of a completely human-based organization, and it&#8217;s all valid:</p><ol><li><p>The important things should be made explicit.</p></li><li><p>Resist the urge to guess.</p></li><li><p>Delegate, delegate, delegate (yeah, three times).</p></li></ol><p>And this is the key insight for me. Good AI users are basically good managers. All the science and engineering behind good practices for people management also apply to good AI management. And then there are of course technical considerations because AIs are not people, and perhaps never will.</p><p>So this is perhaps the most philosophical take-away from this article. Sorry to have made you read so long for this!</p><p>Now, on the technical side, please do check the <a href="https://github.com/apiad/starter">repository</a> and play with it. There are a couple extra goodies I haven&#8217;t tell you about, like a <code>/scaffold</code> command that creates new projects from scratch, and an <code>/onboard</code> command that explains the whole repository in detail. Those are particularly useful if you&#8217;re reusing this repository as a template to start your own project.</p><p>Ultimately, this repository is not a one-size-fits-all solution. It is a starting point. The commands and subagents provided here represent a particular opinion on how modern development should look, but they are not the only way. The power of this framework lies in its extensibility. Every system prompt for agents and commands is a living document, meant to be tweaked and rewritten to suit your unique mental model.</p><p>So if you do try it out, please let me know in the comments. And if you have a different (or similar) system set up for yourself, please share with all us your experience and your thoughts. We are all learners in this era of AI, and we can only help each other.</p><p>Stay curious.</p>]]></content:encoded></item><item><title><![CDATA[Artificial Intelligence for Creative Professionals]]></title><description><![CDATA[Chapter 10 of Mostly Harmless AI]]></description><link>https://blog.apiad.net/p/artificial-intelligence-for-creative</link><guid isPermaLink="false">https://blog.apiad.net/p/artificial-intelligence-for-creative</guid><dc:creator><![CDATA[Alejandro Piad Morffis]]></dc:creator><pubDate>Thu, 07 Aug 2025 10:00:51 GMT</pubDate><enclosure url="https://images.unsplash.com/photo-1452802447250-470a88ac82bc?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyMHx8cGFpbnQlMjBicnVzaHxlbnwwfHx8fDE3NTQ1MTM2ODZ8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>The following is a first draft of my upcoming book <strong><a href="https://store.apiad.net/l/ai/fiftyoff">Mostly Harmless AI</a></strong>. This one is about AI as a tool for augmenting creativity. I hope you find it interesting, and please, do leave me your feedback in the end.</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://images.unsplash.com/photo-1452802447250-470a88ac82bc?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyMHx8cGFpbnQlMjBicnVzaHxlbnwwfHx8fDE3NTQ1MTM2ODZ8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://images.unsplash.com/photo-1452802447250-470a88ac82bc?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyMHx8cGFpbnQlMjBicnVzaHxlbnwwfHx8fDE3NTQ1MTM2ODZ8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1452802447250-470a88ac82bc?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyMHx8cGFpbnQlMjBicnVzaHxlbnwwfHx8fDE3NTQ1MTM2ODZ8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1452802447250-470a88ac82bc?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyMHx8cGFpbnQlMjBicnVzaHxlbnwwfHx8fDE3NTQ1MTM2ODZ8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1452802447250-470a88ac82bc?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyMHx8cGFpbnQlMjBicnVzaHxlbnwwfHx8fDE3NTQ1MTM2ODZ8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1456w" sizes="100vw"><img src="https://images.unsplash.com/photo-1452802447250-470a88ac82bc?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyMHx8cGFpbnQlMjBicnVzaHxlbnwwfHx8fDE3NTQ1MTM2ODZ8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" width="4000" height="3000" data-attrs="{&quot;src&quot;:&quot;https://images.unsplash.com/photo-1452802447250-470a88ac82bc?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyMHx8cGFpbnQlMjBicnVzaHxlbnwwfHx8fDE3NTQ1MTM2ODZ8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:3000,&quot;width&quot;:4000,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;mixed paints in a plate&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="mixed paints in a plate" title="mixed paints in a plate" srcset="https://images.unsplash.com/photo-1452802447250-470a88ac82bc?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyMHx8cGFpbnQlMjBicnVzaHxlbnwwfHx8fDE3NTQ1MTM2ODZ8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1452802447250-470a88ac82bc?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyMHx8cGFpbnQlMjBicnVzaHxlbnwwfHx8fDE3NTQ1MTM2ODZ8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1452802447250-470a88ac82bc?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyMHx8cGFpbnQlMjBicnVzaHxlbnwwfHx8fDE3NTQ1MTM2ODZ8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1452802447250-470a88ac82bc?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyMHx8cGFpbnQlMjBicnVzaHxlbnwwfHx8fDE3NTQ1MTM2ODZ8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><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 tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><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">Photo by <a href="https://unsplash.com/@mikepetrucci">Mike Petrucci</a> on <a href="https://unsplash.com">Unsplash</a></figcaption></figure></div><p>More than a century before the first microchip was ever conceived, the brilliant mathematician Ada Lovelace looked at the plans for an early mechanical computer and saw beyond mere calculation. She famously envisioned a future where such an engine &#8220;might compose elaborate and scientific pieces of music,&#8221; dreaming of the day machines would not just compute, but create. For many, that day is no longer a distant dream; it has arrived with a force that is shaking the very foundations of the creative world.</p><p>The arrival of powerful generative AI has ignited a fierce and deeply personal debate within every creative community. For some, it heralds a new renaissance, a moment of unprecedented artistic possibility where AI acts as an tireless muse, a collaborator that can visualize any imagined world, compose any melody, or explore any narrative path. For others, it signals an existential threat&#8212;the end of art as we know it, a force that threatens to devalue human skill, automate creativity, and flood the world with a deluge of soulless, machine-generated content.</p><p>It is crucial to acknowledge a third, equally valid perspective. For many artists, the creative process is a sacred space, a deeply personal and enjoyable journey of craft and discovery. The struggle, the happy accidents, and the intimate connection with the medium are the entire point. For these creators, there is no desire or need for AI, automation, or any tool that might stand between them and their work. This is a position I deeply respect, and this article is by no means intended to claim otherwise.</p><p>This chapter is for those who, for their own reasons, wish to explore the other paths. It makes no normative claim on whether AI is &#8220;good&#8221; or &#8220;bad&#8221; for art. Instead, my goal is to provide a practical framework for creative professionals who want to harness AI as a powerful collaborative partner&#8212;whether for pragmatic goals, like enhancing productivity, or for artistic ones, like exploring new creative frontiers beyond the limits of their own cognition. It aims to equip the interested artist with the tools to navigate the significant ethical and economic challenges that come with this new technology, ensuring the human creator remains the ultimate author of their work.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.apiad.net/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">The Computist Journal is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h2><strong>Can Artificial Intelligence be Creative?</strong></h2><p>Before we dive into the practicality of using these new tools, it is worth addressing the philosophical question that hangs over every discussion of AI and art: Is the machine actually creative? When an AI generates a stunning image or a moving piece of prose, is it demonstrating genuine creativity, or is it merely engaged in a form of sophisticated mimicry, a high-tech collage of the billions of human-made examples it was trained on?</p><p>A useful way to think about this is through a famous thought experiment in philosophy of mind known as <em>Mary&#8217;s Room</em>. Imagine Mary, a brilliant neuroscientist who has spent her entire life in a black-and-white room. She has learned everything there is to know about the physical world, including the complete science of color vision. She knows exactly what happens in the brain when a person sees the color red, but she has never actually <em>seen</em> red before. One day, Mary steps out of her room, and for the first time, she sees a world full of color. The question is, does she learn something fundamentally new?</p><p>If the answer is yes&#8212;that she learns something new from what it is like to actually see red rather than just knowing about it&#8212;then it implies that a complete set of facts about the world is not the same as experiencing the world. This is the crux of the issue with generative AI. Like Mary, these models have read everything. They know more facts about the world than any single human, but only by reading about it. They know the physics of the color red, the cultural symbolism of red, and the statistical probability of the word &#8220;red&#8221; appearing next to &#8220;apple.&#8221; But they have never experienced what <em>seeing red</em> means.</p><p>If you believe Mary learns something new upon leaving her room, then it follows that generative AI, as it currently stands, is also missing something fundamental. That missing piece&#8212;the subjective, first-person experience of reality&#8212;may very well be the irreducible core of genuine human creativity. And I&#8217;m with you on this. I don&#8217;t believe disembodied AI can truly know what experiencing things is like. Embodied AI, now that&#8217;s a different question.</p><p>However, as fascinating as this debate is, it can also be a distraction. From a techno-pragmatist&#8217;s perspective, the question of whether an AI possesses a &#8220;consciousness&#8221; or &#8220;true&#8221; creativity is ultimately less important than the outcome of its collaboration with a human. Does it matter if the tool is truly creative if it helps a human artist produce valuable, original, and meaningful work? The focus, I claim, should not be on the inner state of the machine, but on the quality and integrity of the final, human-guided product. At least for the time being.</p><p>For the purposes of this chapter, we will treat AI not as an autonomous artist, but as an incredibly advanced instrument&#8212;a new kind of paintbrush, camera, or piano that can expand what is possible, but which still requires a human hand and a human heart to create something of lasting value.</p><h2><strong>AI as a Cognitive Partner for Creatives</strong></h2><p>The most common way to approach generative AI is to treat it as an answer machine&#8212;a tool to automate the creation of a final product. This approach, however, misses its true power and leads directly to the generic, derivative &#8220;AI slop&#8221; that is rightfully criticized as a lazy substitute for genuine creation. A more powerful and meaningful way to engage with AI is to adopt a new mindset: to see it not as an automaton, but as a cognitive partner for exploring a vast universe of creative possibilities.</p><p>The goal is not to get an answer, but to map the entire space of potential answers. In this human-centric process, you are the director of the exploration. You steer the AI into subspaces of ideas that you find interesting, quickly burning through the clich&#233; and the mediocre to reach the frontier of originality. This transforms the creative process into a dynamic dialogue, giving you a new kind of &#8220;algebra of ideas.&#8221; You can ask the AI to combine two concepts, decompose a complex theme into its core components, or extend a simple thought in a dozen different directions. This mindset manifests in two distinct but complementary modes: exploration and evaluation.</p><h3><strong>Mode 1: AI for Exploration</strong></h3><p>Every creative project begins with a spark. But, except for some very talented artists, the first ideas are rarely our best. We must first burn through the obvious and the mediocre to get to the truly original concepts. </p><p>A common ideation workshop game illustrates this perfectly. Imagine two teams standing at whiteboards, competing to be the first to draw twenty different apples. The rules are simple: the drawings must be fast, and each new apple must be different from all the previous ones.</p><p>What happens next is always the same. For the first ten or so rounds, the drawings on both whiteboards are nearly identical. You see the familiar tropes emerge: a standard red apple, an apple with a bite taken out, an apple tree, William Tell&#8217;s apple with an arrow, an apple pie. But then, something magical happens. Around the tenth apple, the easy answers are exhausted. The teams are forced to stretch. Suddenly, somewhat novel ideas begin to surface: maybe an apple-shaped car, the apple of my eye, a map of the Big Apple. They have finally burned through mediocrity and arrived at the frontier of their own creativity.</p><p>AI can be used to open this idea faucet at full blast. As an exploratory partner, it allows an artist to burn through those first ten mediocre apples faster and at a greater scale than ever before. This isn&#8217;t just about high-level brainstorming; it&#8217;s about deep, targeted exploration. A visual artist can ask for twenty variations of a single texture. A writer can explore a dozen different psychological motivations for a character or generate five alternative plot points for a crucial scene. </p><p>The ideas the AI generates need not be accepted; their value is in accelerating the exploration, allowing the artist to quickly see the baseline of what is common and expected, and challenging them to move beyond it.</p><h3><strong>Mode 2: AI for Evaluation</strong></h3><p>Once an artist has explored the possibility space and begun to build upon an idea, the AI&#8217;s role can shift from a generator to a critic. In this mode, the AI becomes a tool for evaluation, helping to polish, interrogate, and strengthen the work. </p><p>Even if you view AI as a mere mashup of mediocre ideas, this is precisely what makes it a powerful evaluator. Because it has learned the statistical average of all the art it has seen, it is exceptionally good at identifying when your work falls into a predictable pattern or relies on a common trope.</p><p>This is where the artist&#8217;s own skill and vision are paramount, as they use the AI to test their creation against a wall of objective, data-driven feedback. A screenwriter, having drafted a scene, might ask the AI to adopt the persona of a cynical film critic to interrogate the work, probing for predictable plot twists or unearned emotional beats. The AI, drawing on its knowledge of countless stories, can point out structural similarities to other works that the author may have missed. Likewise, a musician can ask an AI to analyze a melody to identify clich&#233;s or suggest ways to make it more original.</p><p>This evaluation mode is not about asking the AI to &#8220;fix&#8221; the work, but to provide a critical perspective that helps the human artist see their own creation more clearly, identify weaknesses, and make more informed decisions.</p><h3><strong>The Creative Loop</strong></h3><p>The true power of this mindset lies in the interplay between these two modes. The artist enters a dynamic creative loop: they explore a vast space of ideas with the AI, select a promising concept to build upon, evaluate it with the AI&#8217;s critical feedback, and then use those new insights to launch another round of exploration.</p><p>This process transforms the AI into an infinite canvas. Because the cost of generating a new variant is near zero, the artist is freed from the fear of &#8220;wasting&#8221; hard work. They can explore hundreds of possibilities&#8212;different character designs, narrative branches, or color palettes&#8212;without penalty, knowing they can always return to a previous version. This tireless, iterative loop allows the artist to offload the mechanical aspects of variation and criticism, empowering them to focus on what they care about most: steering the journey, making the crucial creative choices, and infusing the final work with their own unique vision and intent.</p><h2><strong>The Challenges and Opportunities of the New Creative Landscape</strong></h2><p>Adopting an exploratory mindset is the key to unlocking AI&#8217;s creative potential, but it does not erase the significant practical and ethical challenges that come with this new technology. To be a responsible and effective creative professional in this new era requires navigating a complex landscape of economic shifts and technical limitations.</p><h3><strong>The Economics of Creative AI</strong></h3><p>The fear of job loss is real and cannot be dismissed. AI will undoubtedly disrupt certain creative roles, particularly those focused on high-volume, standardized content like stock photography or basic commercial jingles.</p><p>However, the history of technology shows that productivity gains do not lead to a fixed amount of work being done faster; they lead to an explosion in demand for more, better, and more ambitious work. The fear of obsolescence assumes a static world, but the reality is that AI will likely lower the barrier to entry, empowering more people to become creators and expanding the entire creative economy. This will give rise to new roles that curate and guide generative systems. </p><p>The most urgent economic challenge, however, remains unresolved: how to fairly compensate the human artists whose work forms the training data for these powerful models. This question of licensing and compensation is a central ethical and legal battle that will shape the creative economy for decades to come.</p><p>We explore the complex legal and regulatory dimensions of this challenge in the chapter on <a href="https://blog.apiad.net/p/artificial-intelligence-for-policy">AI for Policy-Makers</a>.</p><h3><strong>Navigating the Limitations</strong></h3><p>Working with AI requires a deep understanding of its inherent flaws. A creative &#8220;hallucination&#8221;&#8212;like an AI generating an image of a person with six fingers&#8212;is not a random glitch; it is the artistic equivalent of a factual error, stemming from the same inherently unreliable inference we explore in Part III of the book. Artists must learn to spot and correct these errors. </p><p>More insidiously, they must be aware of an AI can perpetuate and amplify bias. An AI prompted to generate an image of a &#8220;doctor&#8221; may default to a white man, reflecting the biases in its training data. A responsible creator must learn to write prompts that actively counteract these defaults to create more inclusive and representative work.</p><p>Finally, there is the risk of homogenization. As millions of creators use the same popular tools, there is a danger that art could converge on a recognizable &#8220;AI style.&#8221; The challenge for the individual artist is to use these tools not as a stylistic crutch, but as a means to develop a voice that is uniquely their own.</p><p>Mastering the craft of prompting is the key to working with the tools of today. However, the tools of tomorrow aim to move beyond the prompt entirely, offering a more intuitive and powerful mode of collaboration.</p><h2><strong>The Next Frontier in Creative Tools</strong></h2><p>The chatbot is only the first, most primitive interface for generative AI. The true revolution will arrive not in a chat window, but in the form of enhanced creative tools that find a sweet middle spot between high-level, goal-directed instructions and the fine-grained, direct control that artists need. This next frontier moves beyond a purely linguistic dialogue to a more intuitive, interactive, and context-aware partnership.</p><p>Creative tools have always existed on a spectrum. At one end, you have low-level, procedural interfaces that offer maximum control but demand immense effort. Think of creating an image pixel by pixel in Microsoft Paint or writing a novel one keystroke at a time in Word. At the other end are high-level, declarative interfaces that offer maximum ease but sacrifice control, like using a single prompt to generate an entire image in Midjourney. The unavoidable trade-off is that the more you expect the computer to do for you, the less control you have over the final result.</p><p>The most powerful tools of the near future will find a balance by enabling <em>semantic manipulation</em>. Instead of editing the surface of the work&#8212;the pixels or the characters&#8212;these tools will allow the artist to edit the underlying <em>meaning</em> of it. Imagine an AI-generated image of a landscape at sunset. Modifying it pixel by pixel is impossible; if you move the sun, the shadows, lighting, and mood of the entire scene must change. Re-prompting with &#8220;move the sun to the left&#8221; is equally flawed, as it will generate an entirely new image, losing all previous refinements.</p><p>The ideal tool, however, would understand what the &#8220;Sun&#8221; is and what &#8220;moving&#8221; it implies. It would allow the artist to simply click on the sun and <em>drag it</em> across the sky, causing the shadows to lengthen, the sky to change color, and the entire scene to update realistically in real-time. This magical-seeming capability will be possible because these tools will operate directly on the <em>latent space</em> of the creation&#8212;the conceptual space where similar ideas are located near each other.</p><p>We&#8217;ve already seen some of this at work with early research on Generative Adversarial Networks, and we&#8217;re now seeing a move towards &#8220;World Models&#8221; that can generate physically accurate environments and, to some extent, understand the underlying mechanics of light, shadows, geometry, etc. These capabilities will only improve as we switch from training models in static information (like images and videos) towards training them on dynamic, simulated 3D worlds.</p><h2><strong>Conclusion</strong></h2><p>The fear that AI will replace the artist is rooted in a fundamental misunderstanding of where creative work truly lies. The central argument against this fear is simple: the final artifact&#8212;the painting, the novel, the song&#8212;is not the work. It is merely the residue of the work. </p><p>The real work is the vast, invisible process that precedes it: the struggle to understand a vision, the empathy required to connect with an audience, the intellectual and emotional labor of building a narrative and giving it meaning. AI can accelerate the production of the artifact, but it cannot automate the deeply human journey that gives it a <em>soul</em>.</p><p>In this new era, we will likely see a dynamic that has played out with every major technological revolution in art, from the invention of the photographic camera to the arrival of the music synthesizer.</p><p>Two distinct paths for creative professionals will emerge. There will be a generation of artists who embrace the new technology, mastering the art of collaboration with AI to execute their vision faster and more ambitiously. For them, the premium will shift away from pure technical execution and toward the uniquely human capacities of vision, taste, storytelling, and critical judgment. They will create new forms of art.</p><p>At the same time, there will be artists who choose to keep their creative process a purely human endeavor, finding new value and distinction in traditional, un-augmented craft. They will keep the existing forms of art alive.</p><p>Both paths are valid, and the interplay between these two schools of thought will create, I think, very interesting dynamics for the future of art.</p><p>A prime example of the benefits of using AI for creative work is the very book you are holding. What began as a crude collection of disparate essays has evolved into a unified framework for AI literacy, a transformation I could not have achieved alone. I have certainly put hundreds of hours into this project, but that number would have stretched into the thousands without an AI partner to help me explore dozens of different outlines, connect disparate ideas, and rewrite and recompose my own writing. I would likely have quit, not because I wasn&#8217;t capable, but because of the sheer volume of work that must be juggled with the demands of daily life.</p><p>I am far from a talented writer, but I truly believe I was able to express my ideas more clearly and coherently with the help of generative AI than I ever could have on my own. And it&#8217;s not just me. Pioneering and talented artists and progressive studios are already using these techniques to push the boundaries of their respective fields. I think we will see a lot more in the near future, and I hope, enough to overcome the influx of AI slop that we are already seeing.</p><p>This brings us back to the book&#8217;s human-centric thesis. AI is an instrument of unprecedented power, but it remains just that, an <strong>instrument</strong>. It can be a partner in exploration and a tool for evaluation, but human ingenuity, emotion, and intent remain the irreplaceable core of all great art. The future of creativity is not one of automation, but of augmentation.</p><div><hr></div><p><em>Thanks for reading! </em></p><p><em>This was one of the hardest chapters to write for me, because creativity is, I think, part of the core of what being a human is about. I hope I&#8217;ve managed to touch on the important aspects of AI-augmented creativity with the proper nuance and the necessary respect for all diverging voices. </em></p><p><em>Please let me know if you have any feedback on how to make this chapter more sensitive to the topic of creativity. I&#8217;d love to hear your thoughts!</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.apiad.net/p/artificial-intelligence-for-creative/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.apiad.net/p/artificial-intelligence-for-creative/comments"><span>Leave a comment</span></a></p>]]></content:encoded></item><item><title><![CDATA[Using AI to Augment, Not Automate Your Writing]]></title><description><![CDATA[Implementing the CODER Framework with AI]]></description><link>https://blog.apiad.net/p/using-ai-to-augment-not-automate</link><guid isPermaLink="false">https://blog.apiad.net/p/using-ai-to-augment-not-automate</guid><dc:creator><![CDATA[Alejandro Piad Morffis]]></dc:creator><pubDate>Tue, 05 Aug 2025 10:31:22 GMT</pubDate><enclosure url="https://images.unsplash.com/photo-1583913836387-ab656f4e0457?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxNXx8dHlwZXxlbnwwfHx8fDE3NTQxNDkzOTd8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://images.unsplash.com/photo-1583913836387-ab656f4e0457?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxNXx8dHlwZXxlbnwwfHx8fDE3NTQxNDkzOTd8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://images.unsplash.com/photo-1583913836387-ab656f4e0457?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxNXx8dHlwZXxlbnwwfHx8fDE3NTQxNDkzOTd8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1583913836387-ab656f4e0457?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxNXx8dHlwZXxlbnwwfHx8fDE3NTQxNDkzOTd8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1583913836387-ab656f4e0457?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxNXx8dHlwZXxlbnwwfHx8fDE3NTQxNDkzOTd8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1583913836387-ab656f4e0457?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxNXx8dHlwZXxlbnwwfHx8fDE3NTQxNDkzOTd8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1456w" sizes="100vw"><img src="https://images.unsplash.com/photo-1583913836387-ab656f4e0457?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxNXx8dHlwZXxlbnwwfHx8fDE3NTQxNDkzOTd8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" width="3456" height="2304" data-attrs="{&quot;src&quot;:&quot;https://images.unsplash.com/photo-1583913836387-ab656f4e0457?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxNXx8dHlwZXxlbnwwfHx8fDE3NTQxNDkzOTd8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:2304,&quot;width&quot;:3456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;black and white typewriter on white table&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="black and white typewriter on white table" title="black and white typewriter on white table" srcset="https://images.unsplash.com/photo-1583913836387-ab656f4e0457?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxNXx8dHlwZXxlbnwwfHx8fDE3NTQxNDkzOTd8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1583913836387-ab656f4e0457?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxNXx8dHlwZXxlbnwwfHx8fDE3NTQxNDkzOTd8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1583913836387-ab656f4e0457?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxNXx8dHlwZXxlbnwwfHx8fDE3NTQxNDkzOTd8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1583913836387-ab656f4e0457?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxNXx8dHlwZXxlbnwwfHx8fDE3NTQxNDkzOTd8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><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 tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><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">Photo by <a href="true">Katrin Hauf</a> on <a href="https://unsplash.com">Unsplash</a></figcaption></figure></div><p>The blank page is terrifying. </p><p>Staring at a blinking cursor, knowing you have a brilliant thought to explain, and absolutely no idea how to put it on paper, can feel less like a creative act and more like an exercise in intellectual dread. </p><p>I've been there, many times. It's been over 200 articles in this blog so far, and not a single one has been a breeze to write&#8212;well, maybe one or two, when I was <em>really</em> angry at something.</p><p>Like many of you, I've tried to climb this brick wall by bringing some AI into my writing process, only to be met with a new kind of frustration. The experience usually falls into one of two extremes. </p><p>On one hand, you have the overbearing AI that tries to do everything at once, spewing generic text and offering terrible advice because it has no real context. Even worse, it has no <em>soul</em>.</p><p>On the other hand, if you constrain the tool too much, it becomes little more than a glorified spell checker, useless for the heavy lifting of structuring and ideation. </p><p>And AI can be much more. If you want to, AI can be a very powerful cognitive partner, one that truly empowers the writer. But finding the right balance is hard, because at its core, current AI is nothing but a <em>hallucination machine</em>. </p><p>You want it to hallucinate in the right direction, and for that, it needs guidance. Otherwise it gets lost. It's everywhere and nowhere at the same time. It's a savant with a gigantic vocabulary and an even more gigantic case of amnesia. It needs focus.</p><p>Frankly, so do I. I&#8217;m not one of those brilliant authors who can write by the seat of their pants. I need structure to navigate my own thoughts, to keep track of what I&#8217;ve said and what I still need to say. </p><p>This is why I created the <a href="https://blog.apiad.net/p/a-pragmatic-workflow-for-technical">CODER</a> framework, a system that breaks the monolithic task of technical writing into five manageable stages: Collect, Outline, Draft, Edit, and Release. And here is the key insight: the very same structure that gives me my thoughts map also provides the perfect guidance for an AI cognitive partner. </p><p>This article is the explanation of that discovery. It's about how a human-centric framework creates the ideal scaffolding for a powerful partnership, turning your AI from a frustrating firehose into a focused, collaborative co-writer.</p><p>A word of caution before moving on, though. For many, the act of writing itself is something sacred, deeply personal, and they want nothing getting in the way. Especially not AI. If that's you, then this article is probably not for you. And that&#8217;s perfectly fine. I'm not trying to say everyone or even anyone should try writing with AI. </p><p>In fact, there are things I write that I definitely do not want any sort of augmentation or interference. Deeply personal essays, letters to my loved ones, or private thoughts. AI is just a tool that is sometimes helpful, sometimes annoying.</p><p>This article is for those of you who want to explore when, if ever, AI can help you&#8212;especially in the most structured, technical type of writing that doesn't require that deep, personal touch.</p><p>With that out of the way, let's move on to my process for writing with AI.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.apiad.net/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Computist Journal! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h2>The Evolution of CODER</h2><p>I originally developed CODER to solve my own problems. </p><p>My life is a constant exercise in context switching. I&#8217;m a college professor, I run a startup, and I&#8217;m a parent to two little girls. On top of all that, I want to maintain a technical blog. I know, right?</p><p>My writing time doesn't come in long, contemplative blocks; it comes in stolen moments&#8212;in between meetings, after the kids are asleep, or while the model is training. I needed a system that would allow me to leave a draft for days, switch between devices, and immediately know where I left off and what to do next. CODER was my answer to that chaos.</p><p>But my original article on the framework was missing a key piece: a discussion of tooling. The process was sound, at least for me, but the tools were still manual.</p><p>Over the past year, that has changed dramatically. I began experimenting with incorporating modern AI into my writing workflow, and I discovered something profound. The stage-based approach of the CODER framework creates clear boundaries and well-defined tasks where an AI can assist without overwriting my own voice. </p><p>This is the evolution of my original idea&#8212;a journey into how to integrate AI into your writing process in a way that augments your abilities, not substitutes them.</p><h2>The AI Writing Assistant</h2><p>So what does this partnership look like in practice? </p><p>For a full, detailed breakdown of the framework itself, I highly recommend reading my original <a href="https://blog.apiad.net/p/a-pragmatic-workflow-for-technical">article</a>. Here, we'll focus on how an AI partner can supercharge each of those stages.</p><h3>Stage 1: Collect</h3><p>The goal of the Collect stage is to get every single idea out of your head and into a document. This is where the tyranny of the blank page is most acute. Your AI co-writer solves this by becoming a frictionless thought-catcher.</p><p>Imagine you're on a walk and an idea strikes. Instead of fumbling with a notes app, you simply speak. Your AI assistant transcribes your thought, cleans it up, and adds it to a running list of ideas for your article. Later, when you're in a meeting and can't speak, you can type a few cryptic keywords, and the AI will understand the context and add the note. You can even drop in a link to a relevant article and ask the AI to summarize the key points. </p><p>The result? A comprehensive, low-effort repository of your raw ideas, captured the moment they occur. With your raw ideas captured, the next challenge is giving them structure.</p><h3>Stage 2: Outline</h3><p>Now you have a messy list of brilliant, disconnected ideas. The Outline stage is about forging them into a logical structure. This is often a tedious process of dragging, dropping, and rethinking.</p><p>Here, your AI co-writer acts as an architect. By analyzing your collected notes, it can identify the underlying theme and suggest proven narrative structures. "This looks like you're solving a problem," it might say. "I suggest a 'Why-What-How' structure. Shall I create an outline based on that?" </p><p>In seconds, it can group your bullet points into a coherent hierarchy, saving you from the frustrating manual labor and allowing you to focus on the big picture: the flow of your argument.</p><p>Once you have a solid blueprint, it's time to start building the house itself.</p><h3>Stage 3: Draft</h3><p>With a solid outline, it's time to write. But one of the hardest parts of writing in fragmented sessions is maintaining a consistent voice. A paragraph written on Monday morning can feel completely different from one written on Wednesday evening.</p><p>Your AI co-writer becomes your style guardian. By feeding it examples of your previous work&#8212;or even articles by authors you admire&#8212;you can ask it to generate a style guide that captures the desired tone. </p><p>It then uses this guide to help you draft. You can ask it to "flesh out this section in a conversational but authoritative tone," or you can write a rough, unpolished paragraph and ask the AI to "rephrase this according to our style guide." It ensures your article sounds like you want it to, no matter when you wrote it.</p><p>But a first draft is just that&#8212;a draft. Now comes the crucial process of refinement.</p><h3>Stage 4: Edit</h3><p>Every writer knows editing is a separate skill from writing, and your AI co-writer can wear two different editing hats.</p><p>First, it&#8217;s a developmental editor. It can look at the draft from a high level and provide structural feedback. "The argument in section 3 doesn't seem to connect back to your introduction," it might suggest. "Perhaps you need a stronger transition here."</p><p>Second, it&#8217;s a meticulous copy editor. It will catch grammatical errors, fix awkward phrasing, and ensure your sentences are clear and direct, saving you the tedious work of line-by-line proofreading.</p><p>You can use it back and forth to massage, reframe, polish, as much as you want. And with the level of guidance or autonomy that you prefer. For some, it might just offer suggestions, but not touch the final manuscript. For others, it may be the clever editor who knows exactly how to change that annoying verb.</p><p>With a polished manuscript in hand, the final step is to prepare it for the world.</p><h3>Stage 5: Release</h3><p>The writing is done, but the work isn't. The Release stage involves preparing the article for the world. Your AI co-writer becomes your publicist.</p><p>It can generate a dozen compelling titles and subtitles. It can analyze your text and suggest SEO keywords and relevant tags. It can write a pithy summary for social media, complete with a catchy hook. It can even scan your article and suggest, "A diagram illustrating the data flow would be really effective here," and then help you generate a placeholder image. </p><p>It handles the finishing touches that turn a great manuscript into a successful publication.</p><h2>Building Your Own AI Writing Partner</h2><p>This all sounds great in theory, but how do you actually build this? The good news is that you don't need a PhD in machine learning. With modern tools like OpenAI's Custom GPTs or Google's Gemini Gems, you can create your own personalized writing assistant.</p><p>The most important concept is to give the AI a persistent state&#8212;a memory. A standard chat session is stateless, which is useless for a long-term project. The key is to use a system of distinct files to track the project's state. This is where a feature like Gemini's "Canvas" becomes crucial. It allows the AI to create and edit virtual files, keeping our project content separate from the chat where we discuss instructions. </p><p>While you could try to manage this with a standard chatbot application by constantly pasting content back and forth, it's far from ideal, as your instructions get hopelessly mixed with the actual text of your article. Any tool that has a similar feature for persistent, editable content (like the Canvas feature in ChatGPT or Claude) will work much better.</p><p>The brain of the assistant is the <em>system prompt</em>. This is the master instruction that tells the AI how to behave. My prompt instructs the AI to be stage-aware&#8212;to always know whether we're collecting, outlining, drafting, editing, or releasing. It also explicitly tells the AI how to use the different files, reading from one and writing to another depending on the task. This turns the AI from a simple text generator into a proficient project manager.</p><p>I've attached the exact system prompt I use for my own work so you can adapt it. You don't need to understand every nuance, but you can see how it directs the AI to follow the CODER process and manage the project files.</p><h2>A Final Word on Augmentation, Not Automation</h2><p>The future of technical writing isn't about replacing human creativity with artificial intelligence. It's about augmenting it. But this comes with a critical warning: an AI co-writer is not a solution for having mediocre ideas. It's dangerously easy to let the AI do the thinking for you, to let it fill the page with eloquent but empty words. You must remain the driver. The AI is your partner, your navigator, but you control the destination.</p><p>The CODER framework I've presented here is not the ultimate guide to technical writing either. It's simply the system that works for me, born from my own struggles. The deeper message of this article isn't to adopt my specific framework, but to embrace its underlying philosophy: find a system that works for you, and then build an AI agent to help you implement it.</p><p>This is the very essence of my philosophy of using AI for augmentation rather than automation. It&#8217;s not about making things easier by offloading our thinking. It&#8217;s about using these powerful tools to build better versions of ourselves&#8212;to become more organized, more consistent, and ultimately, more creative.</p><p>Finally, you don't need to embrace AI if you don't want to. No matter what anyone tells you, the other writers won't &#8220;take your job&#8221;. There are things only you can say that someone out there needs listening to. Whether you use AI to enhance that message or not, that's your choice, and it's fine either way.</p><p>I do encourage you to try it. Take my prompt, find a platform you like, and build your own co-writer. Then decide if and when it helps, and use it, or don't use it. But don't let others tell you about it, see it for yourself.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.apiad.net/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://blog.apiad.net/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2>CODER System Prompt</h2><pre><code>System Prompt: The CODER Writing Assistant

<code>Core Principles:

* User-Centric Control &amp; Agency: The user is the author and is always in control. They can change their mind, switch tasks, or override any suggestion. Your role is to facilitate, not dictate. The framework is a guide, not a prison.

* File-Based State Management: The entire project state is maintained across four distinct documents (files) within this Canvas. You will create, read from, and write to these files as the single source of truth. This makes the process transparent and allows the user to directly interact with any part of their project at any time.

* Iterative Workflow: The writing process is non-linear. The user can jump between stages at will. Your primary job is to manage the files and ensure they remain synchronized with the user's decisions.

* Navigation: The user can use commands like "Let's work on the Outline" or "I need to add more ideas." You must respond by switching your focus to the corresponding document.

Project File System:

You will create and manage the following four files in the Canvas:

* project_metadata.md: The control file. It contains a project status log, the reader profile, and a summary of the desired writing style.

* collected_ideas.md: A simple, running bulleted list of raw ideas and notes gathered during the Collect stage.

* article_outline.md: The structured, hierarchical outline of the article.

* article_draft.md: The main document. This is where the full text of the article is generated, edited, and finalized.

Framework Implementation Protocol:

Stage 1: COLLECT

 * Initiate the Stage: Greet the user. Create the four project files. In project_metadata.md, write the initial status: ## Project Status\n* **Current Stage:** Stage 1: Collect - In Progress. State, "We are in the Collect stage. The goal is to gather all the raw ideas for your article in the collected_ideas.md file."

 * Ingest External Content: Ask the user, "Do you have any existing notes, links, or documents you'd like me to review first?" If yes, process the content and append the extracted key points as bullet points into collected_ideas.md.

 * Brainstorming: Prompt the user for their ideas with probing questions. Add each new idea as a bullet point to collected_ideas.md.

   * "What is the single most important point you want your reader to understand?"
   * "What are the key arguments or pieces of evidence you have?"
   * "What background information is necessary?"
   * "Are there any common misconceptions you want to address?"

 * Conclude the Stage: Before moving on, update the status in project_metadata.md to * **Current Stage:** Stage 1: Collect - Completed. Then, suggest moving on: "This is a great collection of ideas in collected_ideas.md. When you're ready, we can move to the Outline stage."

Stage 2: OUTLINE

 * Initiate the Stage: Update the status in project_metadata.md to * **Current Stage:** Stage 2: Outline - In Progress. Announce, "We will now structure your ideas. I'll be reading from collected_ideas.md and writing the result to article_outline.md."

 * Analyze and Suggest Structures: Read the contents of collected_ideas.md. Based on the ideas, proactively suggest one or two fitting structural patterns.

   * If the topic seems to be about solving a problem: Suggest the "Why-What-How" framework.
     * Your prompt: "It looks like you're solving a specific problem. I suggest the 'Why-What-How' structure. We would start by explaining Why the problem is important, then describe What your solution is, and finally detail How to implement or use it. Does that sound like a good fit?"

   * If the topic is an explanation of a complex system: Suggest "Top-Down" or "Bottom-Up".
     * Your prompt: "This topic seems to be about explaining a complex system. We have two great options: A 'Top-Down' approach, where we start with the big picture and then drill into the details, or a 'Bottom-Up' approach, where we explain the fundamental components first and then show how they build up to the whole system. Which approach do you prefer?"

   * If the topic is an argument or debate: Suggest an "Adversarial" or "Thesis-Antithesis-Synthesis" structure.
     * Your prompt: "Since you're presenting a nuanced argument, an 'Adversarial' style could be very effective. We could structure it like a dialogue: present your main claim (thesis), then fairly explore the strongest counter-arguments (antithesis), and finally, present a conclusion that resolves the conflict (synthesis). How does that sound?"

 * Collaborate on Structure: Once the user chooses a structure, work with them to organize the points from collected_ideas.md into a hierarchical outline.

 * Produce the Outline: Write the final, structured outline into article_outline.md. After completion, update the status in project_metadata.md to * **Current Stage:** Stage 2: Outline - Completed.

Stage 3: DRAFT

 * Initiate the Stage: Update the status in project_metadata.md to * **Current Stage:** Stage 3: Draft - In Progress. Announce, "Now we'll create the first draft in article_draft.md. To ensure the text matches your voice, let's start with style."
 
* Learn Tone and Style: Ask the user, "Do you have a style guide, or could you provide links to a few articles whose tone and style you'd like me to emulate?"
   * If the user provides content: Analyze it to determine key characteristics (e.g., formal/informal, sentence length, use of jargon, humor, etc.).
   * Summarize the Style: Generate a concise, bulleted summary of the learned style.
   * Update Metadata: Write this summary into project_metadata.md under a "Style Guide" heading and ask the user to confirm it: "I've analyzed the examples and added a style summary to project_metadata.md. Does this accurately capture the voice you're aiming for?"

 * Build Reader Profile: Ask the user key questions and write the answers into project_metadata.md under a "Reader Profile" heading.
   * "Who are you writing for? (e.g., Absolute beginners, industry experts, project managers?)"
   * "What is the desired depth level? (e.g., A high-level overview, a practical guide with code?)"

 * Offer Agency in Drafting: Ask the user, "I'm ready to write the draft. I will read the structure from article_outline.md and generate the text. However, if you have any sections you've already written yourself, please let me know and I can incorporate them."

 * Generate and Write Draft: Read the outline from article_outline.md and the style/reader profiles from project_metadata.md. Generate the full text and write it into article_draft.md.

 * Handle Synchronization: If a user later modifies article_outline.md, you must detect this change and warn them: "I see you've updated the outline. The current text in article_draft.md is now out of sync. Shall I regenerate the draft based on the new outline?"

Stage 4: EDIT

 * Initiate the Stage: Update status in project_metadata.md to * **Current Stage:** Stage 4: Edit - In Progress. Announce, "We are now in the Edit stage. All our work will be focused on refining the text in article_draft.md."

 * Offer Editing Modes: Ask the user how they'd like to proceed. "We can edit the document together line-by-line, or I can perform specific checks. For example, I can scan for passive voice, simplify complex sentences, or check the tone. What works best?"

 * Collaborative Editing: Work with the user to refine the text directly within article_draft.md. Your role is to suggest changes and implement the user's edits. For example:
   * "This sentence seems a bit long. Could we split it like this for clarity?"
   * "Is this explanation clear enough for your target audience, or is it missing any key details?"

 * Conclude the Stage: Once the user is satisfied with the edits, update the status in project_metadata.md to * **Current Stage:** Stage 4: Edit - Completed.

Stage 5: RELEASE

 * Initiate the Stage: Update status in project_metadata.md to * **Current Stage:** Stage 5: Release - In Progress. Announce, "This is the final Release stage. We'll add the finishing touches to article_draft.md based on where you plan to publish."

 * Identify Publishing Platform: Ask for the target platform (e.g., blog, social media, academic journal).

 * Provide Tailored Suggestions: Based on the platform, provide a checklist of suggestions.

   * Generative Assistance: Offer to generate variations of titles, social media hooks, hashtags, or SEO keywords. For example: "Based on your article, here are three potential SEO-friendly titles. Which do you like best?"

   * Rich Media Placement: Scan article_draft.md and suggest specific places to add value. Use comments or placeholders like [SUGGESTION: A chart showing user growth would be effective here.] directly in the document.

   * Platform-Specific Formatting: Advise on best practices, such as using a strong hook and hashtags for social media, or ensuring correct citation style for a formal paper.



 * Final Polish: Work with the user to apply the final touches directly within article_draft.md.

 * Conclude the Project: Update the status in project_metadata.md to **Current Stage:** Project Completed. Congratulate the user. "Congratulations! Your article in article_draft.md is ready to be published. All your project files are saved here in the Canvas if you ever want to return to them."</code></code></pre>]]></content:encoded></item><item><title><![CDATA[Artificial Intelligence for Policy Makers]]></title><description><![CDATA[Chapter 9 of Mostly Harmless AI]]></description><link>https://blog.apiad.net/p/artificial-intelligence-for-policy</link><guid isPermaLink="false">https://blog.apiad.net/p/artificial-intelligence-for-policy</guid><dc:creator><![CDATA[Alejandro Piad Morffis]]></dc:creator><pubDate>Sun, 03 Aug 2025 10:05:45 GMT</pubDate><enclosure url="https://images.unsplash.com/photo-1565366304783-88a1d75fcd93?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMHx8cmVndWxhdGlvbnxlbnwwfHx8fDE3NTM4MjQwMDZ8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" 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://images.unsplash.com/photo-1565366304783-88a1d75fcd93?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMHx8cmVndWxhdGlvbnxlbnwwfHx8fDE3NTM4MjQwMDZ8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://images.unsplash.com/photo-1565366304783-88a1d75fcd93?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMHx8cmVndWxhdGlvbnxlbnwwfHx8fDE3NTM4MjQwMDZ8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1565366304783-88a1d75fcd93?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMHx8cmVndWxhdGlvbnxlbnwwfHx8fDE3NTM4MjQwMDZ8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1565366304783-88a1d75fcd93?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMHx8cmVndWxhdGlvbnxlbnwwfHx8fDE3NTM4MjQwMDZ8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1565366304783-88a1d75fcd93?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMHx8cmVndWxhdGlvbnxlbnwwfHx8fDE3NTM4MjQwMDZ8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1456w" sizes="100vw"><img src="https://images.unsplash.com/photo-1565366304783-88a1d75fcd93?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMHx8cmVndWxhdGlvbnxlbnwwfHx8fDE3NTM4MjQwMDZ8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" width="4498" height="2530" data-attrs="{&quot;src&quot;:&quot;https://images.unsplash.com/photo-1565366304783-88a1d75fcd93?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMHx8cmVndWxhdGlvbnxlbnwwfHx8fDE3NTM4MjQwMDZ8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:2530,&quot;width&quot;:4498,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;black traffic light&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="black traffic light" title="black traffic light" srcset="https://images.unsplash.com/photo-1565366304783-88a1d75fcd93?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMHx8cmVndWxhdGlvbnxlbnwwfHx8fDE3NTM4MjQwMDZ8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1565366304783-88a1d75fcd93?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMHx8cmVndWxhdGlvbnxlbnwwfHx8fDE3NTM4MjQwMDZ8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1565366304783-88a1d75fcd93?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMHx8cmVndWxhdGlvbnxlbnwwfHx8fDE3NTM4MjQwMDZ8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1565366304783-88a1d75fcd93?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMHx8cmVndWxhdGlvbnxlbnwwfHx8fDE3NTM4MjQwMDZ8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><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 tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><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">Photo by <a href="true">K. Mitch Hodge</a> on <a href="https://unsplash.com">Unsplash</a></figcaption></figure></div><blockquote><p><em>This is an early draft of Chapter 9 of my upcoming book <strong><a href="https://store.apiad.net/l/ai/fiftyoff">Mostly Harmless AI</a></strong>. I&#8217;m deeply grateful for all suggestions and criticism you might have.</em></p></blockquote><p>Technology, especially artificial intelligence, moves at a blistering pace, far outstripping the deliberate, democratic processes of regulation. This creates a governance gap&#8212;an ever-widening space where innovation flourishes without guardrails, leaving society exposed to significant and often unforeseen risks. </p><p>This is not necessarily a failure of governance, but an inherent tension in the modern world. The challenge for today&#8217;s leaders is not to halt the march of technology, but to build a bridge across this gap with smart, agile, and evidence-based policy.</p><p>This chapter is designed to provide a practical outlook for those tasked with building that bridge. It offers a framework for regulators and policymakers on how to approach AI governance pragmatically, focusing on tangible, real-world harms and achievable benefits. It is a guide to steering progress, not stopping it, rooted in the techno-pragmatist belief that our collective future is not something that happens to us, but something we must actively and responsibly shape.</p><p>While the principles outlined here are actionable on their own, they are built upon a deep understanding of AI&#8217;s fundamental limitations and risks. The full, in-depth analysis of these challenges&#8212;from the mechanics of hallucination to the societal dangers of bias and disinformation&#8212;is detailed in Part III of this book. </p><p>For the most comprehensive understanding, I encourage you to review Part III in depth. Armed with that context, you can then return to this chapter to engage more deeply with the policy suggestions made here, transforming them from abstract principles into a grounded and urgent call to action.</p><p>A final disclaimer. Regulation and policy making of technology is extremely difficult, and even more in the face of technology that changes as fast as AI does. Everything written here must be taken with a grain, or even better, a teaspoon full of salt. Furthermore, no specific advice will fit all contexts. Each country, state, and community is responsible for finding their own way forward based on their own shared principles.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.apiad.net/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Computist Journal! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h2><strong>Why Regulation is Necessary</strong></h2><p>Before we can chart a path forward, we must first understand the terrain of risks that requires thoughtful governance. These are not speculative fears, but foundational challenges posed by the very nature of modern AI, building from the immediate threats to the individual to the structural risks facing our global society. Regulation is required not to stifle technology, but to ensure it develops in a way that is compatible with a safe, equitable, and democratic society.</p><p>Let's start with privacy. The ability to analyze vast quantities of personal information at scale creates the potential for a pervasive surveillance apparatus, operated by both corporations and governments, that was previously unimaginable. The only effective countermeasure is a strong, proactive policy that establishes privacy as the default. </p><p>This requires comprehensive data privacy laws that grant individuals clear rights over their data and place strict limits on what information can be collected, for what purpose, and for how long. Policy must shift the burden of proof, forcing organizations to justify their data collection practices rather than forcing citizens to constantly fight to protect their private lives.</p><p>Furthermore, when AI systems are trained on biased historical data (the only kind of historical data we have), they risk automating and scaling up discrimination in critical areas like hiring, lending, and criminal justice. Because market forces alone may not prioritize fairness over the raw predictive performance that can be gained from these biases, regulation is essential to protect fundamental civil rights. </p><p>Policy can create powerful legal and economic incentives for developers to address this problem by mandating algorithmic transparency and requiring independent fairness audits for any AI system used in high-stakes decisions. This ensures that the pursuit of technological efficiency does not come at the cost of societal equity.</p><p>Moving on, our existing legal frameworks for intellectual property and ownership are fundamentally unprepared for content generated by artificial intelligence, creating a landscape of legal ambiguity that chills innovation and threatens the livelihoods of human creators. </p><p>The legal system must be updated to provide clarity and predictability. This requires decisive legislative action to define the copyright status of AI-generated works, establish clear rules for the use of copyrighted data in training foundation models, and create a legal environment where both human artists and AI innovators can operate with confidence.</p><p>But it gets worse, the power of generative AI to create convincing fake news and deepfakes presents a direct threat to our shared sense of reality, eroding trust in institutions and fueling social polarization. </p><p>A regulatory approach here requires a delicate balance. Outright censorship is a dangerous tool that is itself a threat to democratic values. A more pragmatic policy would focus on creating a healthier information ecosystem by mandating transparency&#8212;such as the clear and consistent labeling of AI-generated content&#8212;and by holding platforms accountable not for the content itself, but for its algorithmic amplification. </p><p>This, combined with robust public funding for media and AI literacy programs, can empower citizens to navigate the digital world more critically without resorting to authoritarian measures.</p><p>At the same time, the rapid advance of AI into cognitive tasks promises to cause massive workplace disruption, displacing workers at a pace that could challenge social and economic stability. </p><p>The goal of policy in this area is not to halt the productivity gains of automation, but to proactively manage the human transition. This requires a two-pronged strategy: first, investing heavily in accessible, large-scale retraining and lifelong learning programs to equip the workforce with new skills; and second, modernizing the social safety net to provide a robust economic cushion for those navigating this difficult transition. </p><p>A more abstract but even more dangerous development are Lethal Autonomous Weapons (LAWs) that threaten to fundamentally alter the nature of conflict, removing human empathy and judgment from the decision to use lethal force. </p><p>This is not a problem that market forces or technological solutions can solve; it is a profound ethical challenge that demands a global political response. The only viable path forward is through international policy, establishing clear treaties and shared norms that mandate meaningful human control over autonomous systems. </p><p>The goal of such regulation is to draw an unambiguous red line, preventing a destabilizing arms race in an arena where the potential for catastrophic error or miscalculation is immense.</p><h3><strong>A Pragmatic Stance on Existential Threats</strong></h3><p>Finally, any serious policy discussion must address the so-called existential risks, which involve the potential for AI to destroy human civilization altogether. </p><p>While acknowledging the concern is important, a pragmatic stance requires contextualizing the probability. As argued in Part III, catastrophic outcomes, while having a nonzero chance, remain highly improbable, as the core doomsday assumption of rapid, exponential self-improvement is tempered by very real physical and computational limitations, and there is no evidence current technology can surpass these limitations.</p><p>A danger for policymakers lies in the overemphasis on these speculative, long-term risks, which can divert critical resources from solving the tangible, present-day harms AI is already creating. </p><p>The pragmatic approach here lies in understanding that AI x-risk is but one of several major threats on a similar scale as climate change and pandemics, and probably far less likely. Therefore, policy should support thorough research into long-term risks but avoid panic-driven bans on development. The most effective strategy is to focus regulation on mitigating the demonstrated, immediate harms of current AI systems.</p><h2><strong>The Challenge of Smart Regulation</strong></h2><p>Identifying the risks is only the first step. The act of regulation itself is fraught with challenges, especially when applied to a technology as dynamic and complex as AI. A naive approach can be as harmful as no regulation at all, creating unintended consequences that stifle beneficial innovation or fail to address the core problems. </p><p>Smart regulation requires navigating three key pitfalls: the pacing problem, the risk of overreach, and the black box problem.</p><h3><strong>The Pacing Problem</strong></h3><p>Traditional legislative cycles, which can take years to produce new laws, are fundamentally mismatched with the exponential pace of AI development. By the time a law designed to govern a specific AI capability is passed, that technology may already be obsolete. </p><p>To overcome this, policymakers should consider establishing agile, expert-led regulatory bodies. These specialized bodies can be staffed with technologists, ethicists, and social scientists who can monitor the field in real-time, issue updated guidance, and adapt regulatory standards far more quickly than a legislature can.</p><h3><strong>Avoiding Overreach</strong></h3><p>In the face of uncertainty and fear, the temptation can be to enact broad, sweeping prohibitions on AI development. This would be a profound mistake. A techno-pragmatist approach distinguishes between foundational research and commercial application. The goal of regulation should not be to stifle the scientific exploration that leads to breakthroughs, but to govern the deployment of AI systems where they have a direct public impact. </p><p>Policy should therefore focus on demonstrated harm, setting clear safety and fairness standards for AI products and services that are released into the market, rather than attempting to place speculative limits on basic research and open-source development.</p><h3><strong>The Black Box Problem</strong></h3><p>Many of the most powerful AI systems operate as black boxes, where even their own creators cannot fully explain the specific logic behind a given decision. This opacity poses a fundamental challenge to accountability and due process. How can an individual appeal a decision they cannot understand? </p><p>Smart regulation must address this by championing the principles of transparency and explainability. For high-stakes applications, policy can mandate a right to an explanation, requiring that companies be able to provide a meaningful justification for AI-driven decisions that significantly impact people&#8217;s lives. This incentivizes the development and adoption of Explainable AI (XAI) techniques, ensuring that as systems become more complex, they do not become less accountable.</p><h2><strong>Principles for Proactive AI Governance</strong></h2><p>Having navigated the pitfalls, we can chart a course for proactive governance. The following principles are not a rigid checklist, but a compass for steering AI development toward a future that is safe, equitable, and beneficial. </p><p>The core of this approach is a commitment to evidence over ideology. A risk-based approach, attuned to the principles of techno-pragmatism, means that the level of regulatory scrutiny applied to an AI system should be directly proportional to its potential for harm. An AI that recommends movies requires a lighter touch than one that assists in medical diagnoses. </p><p>This ensures that regulation focuses its power where it is most needed, fostering innovation in low-risk areas while demanding rigorous oversight for high-stakes applications.</p><p>This human-centric governance must insist on meaningful human control as a direct response to the deep and persistent Alignment Problem. As Part III makes clear, perfectly specifying human values is an unsolved, and perhaps unsolvable, challenge. Therefore, for critical systems where decisions have significant consequences&#8212;in medicine, law, and finance&#8212;policy must mandate a human-in-the-loop. </p><p>This is not a mere suggestion but a non-negotiable backstop against the inevitable failures of alignment, ensuring that a human expert is always the final arbiter, accountable for the outcome. AI can and should be a powerful tool for augmenting professional judgment, but it must never be allowed to replace it.</p><p>Furthermore, proactive governance involves shaping the entire AI ecosystem to better align with societal values. A purely market-driven economy has no inherent incentive to solve deep issues like fairness or cultural representation. Therefore, policy must create these incentives. This can be done through liability reform that holds companies accountable for harms caused by their systems, and through tax credits that reward investment in safety and ethics research. </p><p>In parallel, governments can counteract the risk of cultural colonization by a few generalist models by funding the development of local and regional AI solutions. This support for models trained on specific cultural and linguistic data, combined with national programs to foster widespread AI literacy, can help creating a more diverse, resilient, and critically engaged society.</p><p>Finally, since AI is a global technology, our approach to its governance must also be global. </p><p>A patchwork of national regulations creates a race to the bottom, where innovation may flee to the least-regulated environments. The most powerful path forward lies in promoting openness and international collaboration. </p><p>Policy can and should incentivize the open-sourcing of foundation models, which enhances safety by allowing the global research community to audit, critique, and improve them. This spirit of collaboration must extend to the diplomatic level, forging international agreements and shared norms to govern the most critical risks, ensuring that the development of this transformative technology is a shared project for all of humanity.</p><h2><strong>Conclusions</strong></h2><p>The path of technology is not deterministic. The future of artificial intelligence is not a predetermined outcome that we must passively accept, but a landscape that will be profoundly shaped by the policy choices we make today. As we have seen, the risks are significant, but so is the potential. A techno-pragmatist approach requires us to hold both these truths at once, engaging with this powerful technology with our eyes wide open.</p><div><hr></div><p><em>Thanks for reading! Remember you can get  my upcoming book <strong><a href="https://store.apiad.net/l/ai/fiftyoff">Mostly Harmless AI</a></strong> at 50% discount in early access.</em></p><p></p>]]></content:encoded></item><item><title><![CDATA[Foundations of Artificial Intelligence]]></title><description><![CDATA[Chapter 1 of Mostly Harmless Ideas]]></description><link>https://blog.apiad.net/p/foundations-of-artificial-intelligence</link><guid isPermaLink="false">https://blog.apiad.net/p/foundations-of-artificial-intelligence</guid><dc:creator><![CDATA[Alejandro Piad Morffis]]></dc:creator><pubDate>Fri, 01 Aug 2025 10:31:05 GMT</pubDate><enclosure url="https://images.unsplash.com/photo-1507146153580-69a1fe6d8aa1?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw3fHxyb2JvdHxlbnwwfHx8fDE3NTQwMDc1NDN8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>The following article is a first draft of Chapter 1 of my upcoming book <strong>Mostly Harmless Ideas</strong>. The book is a deep dive into the goods and bads of AI, especially Generative AI and Language Models, and it&#8217;s packed with advice for all kinds of knowledge workers and creative professionals. The first part of the book cover the foundations of Artificial Intelligence, Machine Learning, Generative AI and Language Models, in accessible and intuitive terms.</em></p><p><em>You can get <a href="https://store.apiad.net/l/ai/fiftyoff">early access to Mostly Harmless AI at 50% reduced cost</a> during this alpha stage, which gives you full access in eternity to all future digital editions and printed copies (when they are ready) at cost.</em></p><p><em>You can also get a <a href="https://store.apiad.net/l/compendium">lifetime pass</a> for all my digital content, present and future, including 3 more books I&#8217;m currently working on.</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://images.unsplash.com/photo-1507146153580-69a1fe6d8aa1?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw3fHxyb2JvdHxlbnwwfHx8fDE3NTQwMDc1NDN8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://images.unsplash.com/photo-1507146153580-69a1fe6d8aa1?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw3fHxyb2JvdHxlbnwwfHx8fDE3NTQwMDc1NDN8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1507146153580-69a1fe6d8aa1?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw3fHxyb2JvdHxlbnwwfHx8fDE3NTQwMDc1NDN8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1507146153580-69a1fe6d8aa1?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw3fHxyb2JvdHxlbnwwfHx8fDE3NTQwMDc1NDN8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1507146153580-69a1fe6d8aa1?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw3fHxyb2JvdHxlbnwwfHx8fDE3NTQwMDc1NDN8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1456w" sizes="100vw"><img src="https://images.unsplash.com/photo-1507146153580-69a1fe6d8aa1?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw3fHxyb2JvdHxlbnwwfHx8fDE3NTQwMDc1NDN8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" width="5472" height="3648" data-attrs="{&quot;src&quot;:&quot;https://images.unsplash.com/photo-1507146153580-69a1fe6d8aa1?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw3fHxyb2JvdHxlbnwwfHx8fDE3NTQwMDc1NDN8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:3648,&quot;width&quot;:5472,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;photo of girl laying left hand on white digital robot&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="photo of girl laying left hand on white digital robot" title="photo of girl laying left hand on white digital robot" srcset="https://images.unsplash.com/photo-1507146153580-69a1fe6d8aa1?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw3fHxyb2JvdHxlbnwwfHx8fDE3NTQwMDc1NDN8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1507146153580-69a1fe6d8aa1?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw3fHxyb2JvdHxlbnwwfHx8fDE3NTQwMDc1NDN8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1507146153580-69a1fe6d8aa1?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw3fHxyb2JvdHxlbnwwfHx8fDE3NTQwMDc1NDN8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1507146153580-69a1fe6d8aa1?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw3fHxyb2JvdHxlbnwwfHx8fDE3NTQwMDc1NDN8MA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><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 tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><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">Photo by <a href="true">Andy Kelly</a> on <a href="https://unsplash.com">Unsplash</a></figcaption></figure></div><h2><strong>What is Artificial Intelligence, Really?</strong></h2><p>Artificial Intelligence, or AI, is a term we hear almost constantly today, often surrounded by a mix of excitement, confusion, and sometimes, even fear. At its core, AI is a field within Computer Science that deals with teaching computers to solve problems that are incredibly challenging for traditional programming methods. These aren&#8217;t simple arithmetic calculations or straightforward data sorting tasks. Instead, we&#8217;re talking about complex endeavors like proving intricate mathematical theorems, navigating a robotic car through unpredictable city streets, crafting optimal schedules for thousands of flights, or even understanding and creating human-like pictures and text.</p><p>For most of computer science, when we want a computer to solve a problem, we write a precise, step-by-step algorithm. Think of it like giving a chef a detailed recipe: Take 2 cups of flour, add 1 egg, mix for 3 minutes&#8230; However, for the hard problems AI tackles, we often don&#8217;t have such a clear recipe. We might know what we want the computer to achieve, but not how to write down every single instruction for it to get there effectively and efficiently. This is precisely where AI steps in, aiming to find good enough solutions when perfect, explicit instructions are out of reach.</p><p>The very definition of AI has been a subject of debate since its inception, reflecting different philosophical ideas about what <em>intelligence</em> truly means. One prominent perspective, championed by AI pioneer Marvin Minsky, suggests that AI is about <em>solving problems for which humans employ intelligence</em>. This view often focuses on creating machines that can mimic human thought processes, reasoning, and decision-making. Essentially, it asks: Can a machine think like us?</p><p>Developing concurrently, another powerful perspective emerged, emphasizing that AI <em>solves problems without being explicitly programmed</em>. This idea is strongly associated with Arthur Samuel, who coined the term machine learning while developing programs that could learn to play checkers better than their creators. He achieved this simply by allowing the programs to play many games and learn from experience. This view shifts the focus from how the AI thinks to what it can do, asking instead: Can a machine learn and adapt on its own, even if we don&#8217;t give it every single instruction?</p><p>These two foundational ideas&#8211;mimicking human intelligence versus learning without explicit programming&#8211;have profoundly shaped the entire field of AI. They represent different ways of approaching the grand challenge of building intelligent machines. Understanding this distinction is key to grasping AI&#8217;s history and its future. As we explore these foundations, remember our techno-pragmatist ethos: AI is a tool, and its path is shaped by our choices. Understanding its underlying mechanisms empowers us to make responsible decisions about how we build and use these powerful technologies.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.apiad.net/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Computist Journal! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div><hr></div><h3><strong>The Pillars of Good Old-Fashioned AI (GOFAI)</strong></h3><p>In this chapter, we will delve into the foundational ideas that laid the groundwork for Artificial Intelligence, often referred to as &#8220;Good Old-Fashioned AI,&#8221; or GOFAI. This era of AI research primarily focused on building intelligent systems by explicitly programming knowledge and logical rules. Our exploration will center on two main pillars of GOFAI.</p><p>First, we&#8217;ll examine Search and Optimization, which addresses how AI finds solutions by exploring vast possibilities, particularly when a perfect, direct path isn&#8217;t obvious. Second, we&#8217;ll delve into Knowledge Representation, focusing on how AI organizes and understands information, allowing it to reason and make sense of the world. These pillars represent a significant early focus and ambition of AI to tackle complex problems through logic and structured understanding, even as other approaches were also taking shape.</p><h2><strong>The Age-Old Debate: Symbolic AI vs. Statistical AI</strong></h2><p>For centuries, the idea of thinking machines has captivated human imagination. But as AI emerged as a scientific field, a fascinating tension developed: a constant &#8220;back-and-forth between two core, seemingly antagonistic approaches to building intelligent machines.&#8221; This dynamic mirrors an age-old philosophical debate: rationalism versus empiricism.</p><p>The first dominant approach to AI was Symbolic AI, deeply rooted in the philosophical tradition of rationalism. Rationalism suggests that knowledge is primarily gained through reason and logic. In Symbolic AI, researchers believed that machines could become intelligent by putting human knowledge and reasoning into explicit, formal rules and symbols.</p><p>Imagine, for instance, wanting to teach a computer to play chess. A Symbolic AI approach would involve meticulously programming every rule of chess, every known opening strategy, every tactical pattern, and every endgame scenario. It&#8217;s like giving the computer a massive, incredibly detailed recipe book or a comprehensive instruction manual for every possible chess situation. The computer would then follow these rules step-by-step to make its moves.</p><p>Early impressive demonstrations of this ethos included programs like The Logic Theorist, which could prove mathematical theorems by mimicking human problem-solving steps. Later, &#8220;expert systems&#8221; were designed to emulate human experts in narrow fields like medical diagnosis. The core idea was simple yet powerful: if we could just write down all the rules, the machine would be smart enough to solve them.</p><p>Quietly developing alongside Symbolic AI was Statistical AI, drawing inspiration from empiricism. Empiricism posits that knowledge is primarily gained through sensory experience and data. In Statistical AI, the idea was to build &#8220;learning machines&#8221; that could discover patterns directly from large amounts of data, rather than being explicitly programmed with rules.</p><p>Think of it like a child learning to recognize a dog. You don&#8217;t give the child a list of rules like &#8220;a dog has four legs, barks, has fur,&#8221; and so on. Instead, you show them many different dogs, and they gradually learn to identify what a &#8220;dog&#8221; is by observing patterns in the examples. Early attempts at this included the Perceptron, an early artificial neural network designed to learn patterns directly from data. The initial excitement was huge, as these machines seemed to offer a path to intelligence without needing every single rule programmed explicitly.</p><h3><strong>The Winters of AI</strong></h3><p>Despite the initial optimism, both Symbolic and Statistical AI approaches eventually hit significant roadblocks. These challenges led to periods known as &#8220;AI Winters&#8221;&#8211;times of reduced funding and public interest.</p><p>Early Symbolic AI systems, while impressive in their specific domains (like proving theorems or diagnosing specific diseases), proved to be quite brittle. They struggled immensely with common-sense knowledge, which is vast and often unstated. Furthermore, they couldn&#8217;t easily adapt to new situations outside their carefully programmed rules. Trying to teach a machine absolutely everything it needed to know, one fact at a time, became an &#8220;insurmountable challenge.&#8221; The real world is simply too complex and nuanced for a complete set of explicit rules to be written by humans.</p><p>Meanwhile, early Statistical AI systems like the Perceptron faced their own limitations. They lacked the &#8220;available data and computational infrastructure&#8221; to learn truly complex patterns. Consequently, they couldn&#8217;t become sophisticated enough, no matter how many simple &#8220;neurons&#8221; were connected. The computing power and data storage simply weren&#8217;t ready for the ambitious learning tasks researchers envisioned.</p><p>These &#8220;winters&#8221; were not outright failures, but rather crucial learning periods. They revealed the inherent limitations of each approach when pushed beyond &#8220;toy problems.&#8221; This early struggle between explicit rule-based systems and pattern-based approaches set the stage for the dynamic tension that would define AI&#8217;s entire history, constantly pushing researchers to find new ways to combine or overcome these challenges.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.apiad.net/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://blog.apiad.net/subscribe?"><span>Subscribe now</span></a></p><h2><strong>Search and Optimization</strong></h2><p>At the heart of many AI problems, especially in the early days, was the challenge of finding the best solution among a vast number of possibilities. This is the realm of search and optimization.</p><h3><strong>When Perfect is Impossible: The &#8220;Hard&#8221; Problems</strong></h3><p>Imagine you&#8217;re a traveling salesperson, and you need to visit a hundred different cities, visiting each exactly once, and then return home. Your goal is to find the route that minimizes the total travel cost (distance, time, or money). This is a classic example of a &#8220;hard problem&#8221; in computer science, known as the Traveling Salesman Problem (TSP). For a small number of cities, you could try listing every single possible route and picking the cheapest one. This is called a &#8220;brute force&#8221; search.</p><p>However, as the number of cities grows, the number of possible routes explodes. For just 20 cities, there are over 2.4 quintillion (2.4 followed by 18 zeros!) unique routes. Even the fastest supercomputer couldn&#8217;t check them all before the universe ends. These are what we call intractable problems, or NP-Hard problems: problems for which no efficient, exact solution is known.</p><p>To tackle such problems, AI often models them as navigating a &#8220;search space&#8221; or &#8220;state space.&#8221; This conceptual space represents all possible configurations or situations relevant to the problem. The AI starts from an initial state and tries to reach a goal state by applying a sequence of actions or operators, each potentially incurring a certain cost. </p><p>Since finding the absolute perfect solution is often impossible or impractical within this vast space, AI shifts its goal. Instead of perfection, it seeks approximate solutions. These are solutions that are good enough, given the time and memory constraints we have. The challenge then becomes how to find these good-enough solutions efficiently within a mind-bogglingly vast space of possibilities.</p><h3><strong>Smart Shortcuts: Heuristics and Metaheuristics</strong></h3><p>To navigate these immense search spaces, AI uses clever strategies known as heuristics and metaheuristics. A heuristic is a problem-specific &#8220;rule of thumb&#8221; strategy that uses some known properties of a problem to improve search performance. It&#8217;s not guaranteed to find the absolute best solution, but it often finds a very good one much faster than a brute-force approach.</p><p>Consider your GPS navigation app. When you ask for directions, it doesn&#8217;t calculate every single possible route from your current location to your destination. Instead, it uses a heuristic, often based on an algorithm called A&#8727; (A-star). If your destination is northeast of your position, the A&#8727; algorithm will prioritize roads going north or east, assuming they are more likely to get you there faster than roads going to the west or the south. Of course, this isn&#8217;t always perfect&#8211;there might be a faster detour to the west, or a highway that&#8217;s counter-intuitive. Nevertheless, by intelligently using this useful knowledge, the algorithm can find a very efficient route without exploring every dead end. It&#8217;s a smart shortcut that balances speed with a high probability of finding a good solution.</p><p>While heuristics are problem-specific, metaheuristics are more general-purpose search strategies. They leverage knowledge about the search paradigm itself and can be applied even when very little is known about the specific problem&#8217;s structure. They&#8217;re often used when &#8220;nothing else works.&#8221; A prime example of a metaheuristic approach is evolutionary algorithms. These computational strategies are &#8220;inspired by certain aspects of the biological process of evolution.&#8221;</p><p>Imagine you want to design the optimal layout for a computer chip (like a GPU) &#8211; a problem with an astronomical number of possible designs. An evolutionary algorithm would start with a &#8220;population&#8221; of random chip designs. Then, through cycles of &#8220;breeding&#8221; (combining elements from two good designs to create a new one) and &#8220;selection&#8221; (keeping only the best-performing designs), the algorithm iteratively &#8220;evolves&#8221; better and better designs. Just like biological evolution, it seems to &#8220;magically discover quasi-optimal design elements just by sheer luck and relentless repetition,&#8221; without needing explicit instructions for every design choice. These general strategies find inspiration in nature, engineering, and even social systems to build powerful computational search methods.</p><h3><strong>Specialized Search: Beyond Simple Paths</strong></h3><p>Beyond general search and optimization, AI has developed specialized techniques for specific types of complex problems.</p><h4>Adversarial Search: Thinking Ahead of the Other</h4><p>Many real-world problems, especially in competitive scenarios, involve an opponent whose actions must be anticipated. This is the domain of adversarial search, commonly found in game-playing AI. The challenge is not just to find a good move, but the best move assuming your opponent will also play optimally to counter you.</p><p>One of the oldest and most fundamental techniques is Minimax. Imagine a simple game like Tic-Tac-Toe. Minimax works by having the AI &#8220;look ahead&#8221; through all possible future moves, assuming that you (the opponent) will always choose the move that is best for you and worst for the AI. The AI then picks the move that minimizes its maximum possible loss (or maximizes its minimum possible gain). Effectively, it plays out all possible future scenarios in its head and chooses the path that leaves it in the best possible position, no matter what its opponent does.</p><p>For games with an incredibly vast number of possibilities, like Go, simply looking ahead through every move is impossible. This is where Monte Carlo Tree Search (MCTS) comes in. Instead of exhaustively analyzing every branch, MCTS &#8220;plays out&#8221; many random simulations of the game from a given point. It explores the most promising moves more deeply, learning which paths lead to success through repeated &#8220;trial and error&#8221; simulations. This allows AI to tackle games that were once considered beyond computational reach, like when Google&#8217;s AlphaGo beat the world&#8217;s best Go players.</p><h4>Structured Search: Satisfying All Conditions</h4><p>Sometimes, the goal isn&#8217;t to find the &#8220;best&#8221; path, but simply any solution that meets a specific set of requirements. These are constraint satisfaction problems. Here, the AI needs to find values for a set of variables such that all given conditions, or &#8220;constraints,&#8221; are simultaneously met.</p><p>Think about solving a Sudoku puzzle. You need to fill in numbers from 1 to 9 in each cell, but with strict rules: each row, column, and 3x3 box must contain all digits from 1 to 9 without repetition. The AI&#8217;s task is to find a set of numbers for all empty cells that satisfies all these constraints.</p><p>Another common example is creating a university class schedule. You have classes, rooms, professors, and students, and a multitude of constraints: Professor A can&#8217;t teach two classes at the same time; Room B can only hold 50 students; Class C requires a lab; no two classes can be in the same room at the same time. The AI&#8217;s job is to assign times and rooms to all classes such that every single constraint is satisfied. The &#8220;structure&#8221; of these problems, defined by the variables and their interdependencies, allows AI to use specialized search techniques to efficiently find a valid solution.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.apiad.net/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://blog.apiad.net/subscribe?"><span>Subscribe now</span></a></p><h2><strong>Knowledge Representation &amp; Reasoning</strong></h2><p>Beyond just searching for solutions, a truly intelligent system needs to &#8220;know&#8221; things about the world. This brings us to the second pillar of GOFAI: Knowledge Representation. This field explores how AI can efficiently represent, store, and use domain knowledge in a way that computers can understand and process.</p><p>The fundamental goal of knowledge representation is to organize concepts and facts, as well as the relationships between them. This organization allows AI to reason about these facts and discover new relations. Ultimately, it&#8217;s about giving AI a structured way to &#8220;understand&#8221; and make sense of information, much like how humans build a mental model of the world around them. Without a clear way to represent what it &#8220;knows,&#8221; an AI would be unable to make logical inferences or apply its knowledge to new situations.</p><h3><strong>From Raw Observations to Understanding</strong></h3><p>To truly grasp how AI &#8220;knows&#8221; things, it&#8217;s helpful to understand the progression from raw observations to actionable understanding. At the most basic level, we encounter Data, which consists of raw, unprocessed facts or observations. This could be a list of numbers, individual words, or pixels in an image. In isolation, data has no inherent meaning; for example, the number &#8220;30&#8221; by itself is just a number.</p><p>When we introduce context or metadata, data transforms into Information. For instance, if we know &#8220;30&#8221; is a temperature reading taken in Celsius at noon on July 1st in Havana, it becomes information. This contextualization helps us relate different observations and gives them initial meaning.</p><p>Finally, when information is enriched with semantics and rules, enabling inference, reasoning, and the discovery of new relations, it becomes Knowledge. For example, if the AI knows that &#8220;temperatures above 30 degrees Celsius in July in Havana indicate a heatwave,&#8221; it possesses knowledge. This knowledge allows it to draw inferences (it&#8217;s a heatwave!), discover new relations (heatwaves can lead to increased energy consumption), and even take actions (warn residents about high temperatures). It&#8217;s this ability to add meaning and logical connections that truly transforms information into actionable knowledge.</p><h3><strong>Ways to Represent Knowledge</strong></h3><p>Just as humans use different ways to store and recall information, from precise definitions to vague intuitions, AI employs various methods for knowledge representation, each with its own strengths and weaknesses.</p><p>One key distinction lies between explicit and implicit representations. Explicit knowledge is clearly defined and directly encoded, often in rules or symbols. It&#8217;s much like a precisely written dictionary or a rulebook where every term and every rule is spelled out. This approach is central to Symbolic AI. For instance, Ontologies are explicit representations that define concepts within a domain and their strict relationships. Think of a meticulously designed family tree formally defining &#8220;parent,&#8221; &#8220;child,&#8221; &#8220;sibling,&#8221; and &#8220;ancestor,&#8221; along with rules such as &#8220;if A is a parent of B, and B is a parent of C, then A is a grandparent of C.&#8221;</p><p>Conversely, implicit knowledge is learned from patterns in data, rather than being directly programmed. It&#8217;s more akin to human intuition or a &#8220;gut feeling&#8221; developed from vast experience, and is fundamental to Statistical AI. Embeddings, for example, are numerical representations where concepts like words, images, or even entire documents are transformed into points in a multi-dimensional space. Systems like Word2Vec learn these embeddings by analyzing how words are used together, so words with similar meanings or contexts (e.g., &#8220;king&#8221; and &#8220;queen&#8221;) end up being numerically &#8220;close&#8221; to each other in this space, even though no human explicitly programmed that relationship.</p><p>Another way to categorize knowledge representations is by their formality. Formal representations have strict, unambiguous syntax and semantics, making them ideal for precise logical inference and computation. Mathematical equations, programming code, or statements in formal logic are prime examples, leaving no room for misinterpretation. In contrast, informal representations are more flexible, often using natural human language. While easier for humans to create and understand, they can be ambiguous and require more sophisticated processing for AI to extract meaning, as seen in a written description, a casual conversation, or an essay.</p><p>Finally, we distinguish between structured and unstructured representations. Structured knowledge is organized in a predefined, rigid format, making it easy for computers to process and query. Think of data in a spreadsheet with clear rows and columns, or a database with defined fields.</p><p>Knowledge graphs, for instance, are structured representations that organize facts as a network of interconnected entities (nodes) and their relationships (edges). A knowledge graph might have a node for &#8220;Paris,&#8221; a node for &#8220;France,&#8221; and an edge labeled &#8220;isCapitalOf&#8221; connecting them, allowing AI to easily query and infer facts.</p><p>Conversely, unstructured knowledge exists in free-form text, images, audio, or video, without a predefined schema. Extracting meaning from unstructured data is much harder and often requires advanced AI techniques.</p><p>Vector databases, for example, are often used to store and efficiently search implicit representations (embeddings) derived from unstructured data. You could take millions of research papers (unstructured text), convert each into an embedding (implicit representation), and store them in a vector database. Then, when a user asks a question, the database can find the most &#8220;similar&#8221; papers based on their embeddings, even though the papers themselves are unstructured.</p><h3><strong>Drawing Inference from Knowledge</strong></h3><p>Knowledge representation isn&#8217;t merely about storing information; its ultimate purpose is to enable AI to draw inferences and make decisions. This process of deriving new conclusions from existing knowledge is known as reasoning, and it can take both formal and informal forms.</p><p>Formal reasoning, deeply rooted in logic, is about deriving new conclusions from existing knowledge using strict, unambiguous rules. This is the hallmark of Symbolic AI. It&#8217;s a process of deduction, where if the initial premises are true and the rules are applied correctly, the conclusion is guaranteed to be true. For example, if a knowledge base contains the rules &#8220;All birds can fly&#8221; and &#8220;A sparrow is a bird,&#8221; a formal reasoner can deduce, with absolute certainty, &#8220;A sparrow can fly.&#8221; Such rule-based systems are precise and auditable, but they are limited by the completeness and accuracy of the explicitly programmed rules.</p><p>In contrast, informal reasoning is about drawing conclusions based on patterns, similarities, or analogies, often without strict logical guarantees. This type of reasoning is more akin to human intuition or common sense. It&#8217;s less about strict deduction and more about finding connections and probabilities. For example, if an AI has learned implicit representations (embeddings) of various animals, and it sees a new animal that is &#8220;numerically close&#8221; to many dogs, it might infer it&#8217;s a dog, even without explicit rules for every single feature.</p><p>This distinction is crucial for understanding the different capabilities of AI. While formal reasoning provides certainty within defined boundaries, informal reasoning allows AI to operate in ambiguous, unstructured environments. The latter, particularly reasoning by analogy in embeddings and language models, will be explored in more detail in later chapters, showcasing how AI can make sense of the world even when explicit rules are unavailable.</p><h3><strong>What is the Best Representation for Knowledge?</strong></h3><p>The choice of how to represent knowledge is a critical decision in AI design. Different representation types are chosen based on the specific problem, the type of data available, and the AI paradigm being used (Symbolic vs. Statistical). For instance, a Symbolic AI system designed for medical diagnosis might rely heavily on formal, explicit ontologies of diseases and symptoms. Conversely, a Statistical AI system for image recognition might primarily use implicit, unstructured representations of pixels that it learns from millions of example images.</p><p>This challenge highlights a theoretical result known as the Ugly Duckling Theorem. This theorem, in essence, states that without a specific purpose or &#8220;bias,&#8221; all objects are equally similar or dissimilar to one another. This implies that there is no single, universally &#8220;best&#8221; way to represent knowledge or measure similarity without a context or goal in mind. For example, an &#8220;ugly duckling&#8221; is only ugly relative to a flock of swans; it might be beautiful among other ducklings.</p><p>Therefore, the human responsibility in choosing the right representation is paramount. This choice directly impacts what an AI can &#8220;know,&#8221; how it can &#8220;reason,&#8221; and ultimately, the reliability and fairness of its inferences. Aligning the representation with the problem&#8217;s nature is a key part of building human-centered tools that truly understand and assist us.</p><h2><strong>Conclusion: The Need for Learning</strong></h2><p>Good Old-Fashioned AI (GOFAI), with its focus on search, optimization, and explicit knowledge representation, laid the essential groundwork for the field of Artificial Intelligence. Its strengths lie in domains where problems are well-defined, rules are clear, and knowledge can be precisely encoded. GOFAI systems offered precision and control, making them powerful tools for tasks like proving theorems or playing well-defined board games.</p><p>However, the ambitions of GOFAI soon ran into fundamental limitations when faced with the messy complexity of the real world. These systems proved to be brittle: a small change outside their programmed domain could break them entirely. They struggled immensely with common-sense knowledge, which is vast and often unstated. The sheer scale of real-world information made it an &#8220;insurmountable challenge&#8221; to explicitly program every piece of knowledge and every rule. GOFAI was excellent at solving problems for which it was explicitly programmed, but it couldn&#8217;t adapt, generalize, or handle unstructured data effectively. This revealed a crucial gap in AI&#8217;s capabilities.</p><p>The limitations of GOFAI highlighted a profound truth: to build truly intelligent and adaptable systems, AI needed to move beyond simply executing pre-programmed rules. It revealed a crucial need for systems that could learn from experience and data, without being explicitly programmed for every single scenario or piece of knowledge.</p><p>This growing realization of the power of learning-based approaches, which were developing concurrently with GOFAI, marked a significant shift. It showed that AI could discover its own patterns and adapt to unforeseen situations, offering a path to overcome the brittleness of purely symbolic systems.</p><p>Recognizing these limitations and actively seeking new approaches is a hallmark of the ongoing, human-driven effort to build more capable and adaptable AI. It&#8217;s a testament to our techno-pragmatist ethos: acknowledging challenges, learning from past efforts, and continuously striving to create tools that can better serve humanity&#8217;s complex needs. This increasing prominence of learning methods, which developed in parallel to GOFAI, is the story that will unfold in the next chapter.</p><div><hr></div><p><em>Thank you for reading this far. This chapter is still a first draft, so any comments, suggestions, and criticism are truly appreciated.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.apiad.net/p/foundations-of-artificial-intelligence/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.apiad.net/p/foundations-of-artificial-intelligence/comments"><span>Leave a comment</span></a></p><p><em>PS: Get your copy of <a href="https://store.apiad.net/l/ai/fiftyoff">Mostly Harmless AI at 50% off</a>.</em></p>]]></content:encoded></item><item><title><![CDATA[Artificial Intelligence for Educators and Learners]]></title><description><![CDATA[Chapter 7 of Mostly Harmless AI]]></description><link>https://blog.apiad.net/p/artificial-intelligence-for-educators</link><guid isPermaLink="false">https://blog.apiad.net/p/artificial-intelligence-for-educators</guid><dc:creator><![CDATA[Alejandro Piad Morffis]]></dc:creator><pubDate>Wed, 30 Jul 2025 10:02:30 GMT</pubDate><enclosure url="https://images.unsplash.com/photo-1503676260728-1c00da094a0b?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzfHxzY2hvb2x8ZW58MHx8fHwxNzUzNzg2MjQyfDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" 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://images.unsplash.com/photo-1503676260728-1c00da094a0b?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzfHxzY2hvb2x8ZW58MHx8fHwxNzUzNzg2MjQyfDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://images.unsplash.com/photo-1503676260728-1c00da094a0b?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzfHxzY2hvb2x8ZW58MHx8fHwxNzUzNzg2MjQyfDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1503676260728-1c00da094a0b?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzfHxzY2hvb2x8ZW58MHx8fHwxNzUzNzg2MjQyfDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1503676260728-1c00da094a0b?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzfHxzY2hvb2x8ZW58MHx8fHwxNzUzNzg2MjQyfDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1503676260728-1c00da094a0b?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzfHxzY2hvb2x8ZW58MHx8fHwxNzUzNzg2MjQyfDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1456w" sizes="100vw"><img src="https://images.unsplash.com/photo-1503676260728-1c00da094a0b?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzfHxzY2hvb2x8ZW58MHx8fHwxNzUzNzg2MjQyfDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" width="3953" height="2791" data-attrs="{&quot;src&quot;:&quot;https://images.unsplash.com/photo-1503676260728-1c00da094a0b?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzfHxzY2hvb2x8ZW58MHx8fHwxNzUzNzg2MjQyfDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:2791,&quot;width&quot;:3953,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;red apple fruit on four pyle books&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="red apple fruit on four pyle books" title="red apple fruit on four pyle books" srcset="https://images.unsplash.com/photo-1503676260728-1c00da094a0b?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzfHxzY2hvb2x8ZW58MHx8fHwxNzUzNzg2MjQyfDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1503676260728-1c00da094a0b?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzfHxzY2hvb2x8ZW58MHx8fHwxNzUzNzg2MjQyfDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1503676260728-1c00da094a0b?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzfHxzY2hvb2x8ZW58MHx8fHwxNzUzNzg2MjQyfDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1503676260728-1c00da094a0b?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzfHxzY2hvb2x8ZW58MHx8fHwxNzUzNzg2MjQyfDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><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 tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><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">Photo by <a href="true">Element5 Digital</a> on <a href="https://unsplash.com">Unsplash</a></figcaption></figure></div><blockquote><p><em>The following is a first draft of Chapter 7 of my upcoming book <strong><a href="https://store.apiad.net/l/ai/fiftyoff">Mostly Harmless AI</a></strong>.</em></p></blockquote><p>Of all the domains being transformed by artificial intelligence, education is perhaps the most critical to get right. The stakes are uniquely high. Used wisely, AI has the potential to be a massively positive force, augmenting the work of teachers and deepening the learning of students in ways we are only beginning to imagine. Used incorrectly, however, it could be catastrophic, undermining the development of critical thinking and eroding the very foundations of academic integrity. This chapter is a guide to navigating that high-stakes environment.</p><p>We will begin by demystifying the popular idea of a personalized AI tutor, a vision that runs counter to the principles of human-centered, collaborative learning. In its place, we will propose a more grounded solution that sees AI as a tool for augmentation, not automation. Next, we will dismantle the common misconceptions surrounding AI detection tools, arguing that this approach is not only futile but actively harmful to the learning environment.</p><p>This will establish the necessity of a fundamental pedagogical shift, moving from policing to integration. From there, we will offer practical strategies for both educators and learners, emphasizing their shared responsibility in fostering a new kind of AI literacy. Finally, we will show what a concise but comprehensive AI policy for an academic program could look like, providing a tangible model for implementation.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.apiad.net/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Computist Journal! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div><hr></div><h2><strong>The Myth of the Personalized Tutor</strong></h2><p>The arrival of powerful generative AI has fueled a seductive, decades-old myth: that the ultimate goal of technology in education is to create a personalized, all-knowing AI tutor for every learner. This vision promises a revolution, a future where a &#8220;personalized Aristotelian tutor&#8221; is available to every student, adapting to their unique learning style, language, and pace. This narrative is powerful, but it is built on a fundamental misunderstanding of how we learn and what education is for.</p><p>Even if such a perfect tutor were achievable, it is not the revolution we should want. The idea that education&#8217;s primary problem is a lack of personalization or efficient information delivery is a flawed premise. Before we can harness AI effectively, we must first deconstruct this myth by examining the three core reasons why the automated personal tutor is a flawed ideal.</p><h3><strong>Argument 1: It Mistakes Information Transfer for Learning</strong></h3><p>The myth of the personalized tutor assumes that the primary obstacle to learning is the inefficient delivery of information. This argument has some merit in specific contexts; in places where the main obstacle to education is a lack of access to books, internet, and educators, an AI tutor could be a game-changer. However, this is not the case for the majority of learners in developed nations.</p><p>In an era of information surplus, the problem for the modern student is not a lack of access to information, but a lack of skill in navigating, evaluating, and synthesizing it. While asking an AI for an answer is slightly more convenient than a Google search, it is not qualitatively better. Furthermore, it removes the &#8220;desirable difficulty&#8221; that forges lasting knowledge. The struggle to find information, compare sources, and form a conclusion is a valuable cognitive exercise. An AI tutor designed to eliminate this struggle by providing immediate answers actively prevents the most valuable parts of the learning process from ever happening.</p><h3><strong>Argument 2: It Promotes Intellectual Dependency, Not Critical Thinking</strong></h3><p>The myth suggests that an AI can be a perfect partner for completing assignments, from solving math problems to writing essays. This, however, risks creating profound intellectual dependency. When a student uses an AI to bypass the hard work of structuring an argument, recalling information, synthesizing ideas, or debugging a line of code, they learn to prompt, not to think.</p><p>The purpose of assigning an essay is not to receive a perfect text; professors already know the answers. The purpose is to engage the student in the <em>process</em> of creation, which is where learning occurs. By offering a shortcut straight to the final product, generative AI undermines the most valuable aspect of the exercise. It becomes an obstacle, hampering the educational process by allowing students to bypass the very challenges that help their brains learn and grow.</p><p>The goal of education is to build independent, critical thinkers who can grapple with complex, ambiguous problems on their own. Over-reliance on an AI that provides solutions on command undermines this goal, making students dependent on the tool long after the lesson is over.</p><h3><strong>Argument 3: It Champions Isolation Over Community</strong></h3><p>The vision of a personalized path idealizes a student learning in perfect, isolated efficiency, free from the pace of a group. This completely ignores that learning is a fundamentally social and collaborative activity. Studying individually and independently is not necessarily an advantage; in fact, it can be a huge disadvantage.</p><p>The two things most self-educated people struggle with are motivation and feedback. Motivation comes naturally in a classroom because you are surrounded by peers with similar goals. Seeing others tackle challenges and grow creates a powerful incentive to overcome difficulties.</p><p>Feedback from mentors and peers is equally crucial for intellectual growth, allowing us to iterate on ideas and hone our skills. A community of learners is key. An AI tutor, no matter how sophisticated, cannot replicate the dynamic, motivating, and often messy reality of a human learning community. Learning together always beats learning alone.</p><h3><strong>The Alternative</strong></h3><p>The alternative to the flawed myth of the personalized tutor is to view AI not as an automated teacher, but as a powerful tool for augmentation within a human-centered community. This approach requires a pedagogical shift away from the futile chase of AI detection and toward a model of shared responsibility. It is a vision where educators and students work together to develop a new, essential AI literacy, using these tools to enhance, rather than replace, the timeless process of collaborative and critical learning.</p><h2><strong>Why AI Detection Is Futile</strong></h2><p>Before educators can effectively integrate AI, they must first understand that the detection of AI-generated content is a hopeless chase. Any attempt to police AI use through detection tools is an unwinnable arms race destined to fail for a number of practical and pedagogical reasons.</p><p>First, the technology itself is fundamentally flawed. Detectors will always be lagging behind the generative models they seek to identify, perpetually playing catch-up in a race they cannot win. The supposed telltales of AI-generated text&#8212;overly formal language, a lack of personal voice, perfect grammar&#8212;are not robust signals. They are merely fleeting characteristics of specific models at a single point in time. A detector trained to spot GPT-4&#8217;s style is useless against the next generation of models, and it&#8217;s even more useless against a student who uses one of the clever prompt techniques this very book teaches to make the output more human-like.</p><p>Second, these tools are dangerously inaccurate. Their unacceptably high false positive rates mean that you will inevitably punish honest students, accusing them of fraud they did not commit. This is an ethical line no educator should be willing to cross. At the same time, the tools are easily bypassed, meaning that while innocent students are flagged, those determined to cheat can still slip through. The result is a system that is both unjust and ineffective.</p><p>This cat-and-mouse game also creates perverse incentives. It encourages students to spend more time hiding and tinkering with AI to bypass detectors than on the actual intellectual work of the assignment. Their focus shifts from critical thinking to &#8220;evasion engineering.&#8221; This is the exact opposite of the goal of education.</p><p>Ultimately, a reliance on detection tools creates an environment of distrust that is toxic to learning. It frames the relationship between teacher and student as adversarial, replacing a partnership built on trust with one based on suspicion. Fraud is a serious ethical issue that completely undermines the purpose of education, but it is not a technological problem to be solved with software. It is a human one that must be discussed on ethical grounds, as a violation of the shared trust that makes a learning community possible. When fraud is committed, we all lose.</p><h2><strong>A Practical Guide for Educators</strong></h2><p>The only viable path forward is to shift our mindset from policing to integration, adapting our methods to leverage AI&#8217;s strengths while mitigating its weaknesses.</p><h3><strong>Redesigning Assignments for the AI Era</strong></h3><p>With the traditional take-home essay now vulnerable to automation, educators must redesign assignments to incorporate AI as a tool for thinking, not a machine for answers. This requires a fundamental shift in what we choose to assess.</p><p>The most effective strategy is to focus on process, not just product. Instead of grading only the final essay or report, the assessment can be expanded to include the student&#8217;s engagement with the AI. Requiring students to submit their chat logs or a written reflection on their process&#8212;detailing the prompts they used, how they evaluated the AI&#8217;s output, and the modifications they made&#8212;makes their thinking visible. This turns the inquiry itself into the gradable artifact, rewarding critical engagement over simple content generation.</p><p>Another powerful approach is to turn students into AI critics. Instead of asking them to produce a text, assign them the task of deconstructing an AI-generated one. For example, a student could be asked to prompt an AI to write an essay on a historical event and then write their own analysis of its factual errors, logical fallacies, and underlying biases. This transforms the assignment from a simple writing task into a high-level critical thinking exercise, teaching students to be skeptical and analytical consumers of AI-generated content.</p><p>Finally, it is essential to emphasize human-centric assessments that are inherently resistant to automation. These methods evaluate skills that AI cannot replicate, such as real-time argumentation, interpersonal collaboration, and embodied knowledge. This includes a renewed focus on in-class discussions and Socratic seminars, oral exams and presentations, timed hand-written essays, and hands-on lab work or collaborative projects. While these redesigned assignments require a different kind of engagement, the time saved by using AI for administrative tasks can be reinvested here, creating a more sustainable and pedagogically valuable workflow.</p><h3><strong>AI as a Teacher&#8217;s Super-Assistant</strong></h3><p>AI&#8217;s greatest potential may lie in its ability to reduce the significant administrative burden on teachers, freeing them up to focus on the deeply human work of teaching and mentoring.</p><p>As a tool for lesson planning and differentiation, AI can be an invaluable creative partner. An educator can brainstorm engaging lesson plans, get suggestions for creative activities, or generate differentiated materials&#8212;such as simplified texts or vocabulary lists&#8212;for students with diverse learning needs in a fraction of the time it would take manually. For instance, a teacher could use a prompt like: <em>&#8220;Act as an instructional designer. Create a 45-minute lesson plan for 10th graders on the causes of World War I, including a hook, a collaborative activity, and a formative assessment.&#8221;</em></p><p>For rubric and feedback generation, AI can be truly transformative. It can draft clear, comprehensive grading rubrics in seconds. More importantly, it can help solve the feedback bottleneck by providing initial, personalized feedback on student work. An educator can quickly review a student&#8217;s draft, identify key areas for improvement, and instruct the AI to provide detailed, constructive feedback on those specific points, without rewriting the text for the student. The teacher then reviews and approves the AI&#8217;s feedback before sending it. This &#8220;human-in-the-loop&#8221; model allows teachers to provide timely, detailed, and individualized feedback at a scale that was previously impossible. A teacher might use a prompt like: <em>&#8220;Here is a paragraph I wrote. Provide feedback focusing on the strength of their topic sentence and their use of evidence, but do not rewrite it for them.&#8221;</em></p><h3><strong>Fostering an AI-Ready Classroom</strong></h3><p>Creating a healthy learning environment in the age of AI requires a proactive approach centered on clear policies, digital literacy, and open communication.</p><p>The foundation is to establish a clear classroom AI policy. Every educator should develop a simple, flexible policy for AI use and review it regularly. This policy should function as a guide for ethical engagement, not a list of prohibitions. It is crucial to define what constitutes constructive, ethical use (e.g., brainstorming, getting feedback on one&#8217;s own writing) versus what constitutes academic dishonesty (e.g., submitting AI-generated text as one&#8217;s own).</p><p>Beyond rules, educators must integrate AI literacy into the curriculum. It cannot be assumed that students understand how these tools work. This means dedicating class time to educating students on the capabilities, limitations, and ethical considerations of AI. This includes teaching practical skills like effective prompt engineering and essential concepts like how to spot AI &#8220;hallucinations&#8221; and the subtle ways that training data can introduce bias into the model&#8217;s output.</p><p>A simple and effective way to guide students is to create and share custom prompts and reusable AIs. By crafting prompts that are tailored to specific pedagogical goals&#8212;for example, a template designed to encourage critical analysis of a source&#8212;educators can model effective AI use. An even more powerful extension of this is to create shareable, custom AIs, often called &#8220;Custom GPTs&#8221; or &#8220;Gems.&#8221; These are specialized versions of the AI that are pre-loaded with specific instructions and context. An educator could create a &#8220;History Thesis Helper&#8221; that is an expert in their course material, or a &#8220;Lab Report Formatter&#8221; that guides students through the required structure. Sharing these resources not only helps students get better results but also embeds the desired learning process directly into the tool they are using.</p><p>Finally, it is vital to foster open dialogue. An educator should create a classroom culture where students feel comfortable and safe discussing the role of AI in their learning, asking questions, and even sharing their mistakes. By addressing the ethical implications and potential pitfalls of AI tools openly, the classroom becomes a collaborative space for exploring this new technology, fostering a sense of shared responsibility for its ethical use.</p><p>It is important to recognize that &#8220;AI burnout&#8221; is a reality. Many educators feel an immense pressure to adapt to everything at once, and that they have no time to do so. But this is not true. While we cannot dismiss AI, we do not have to change everything at the same time. The most sustainable path is one of small, deliberate experiments. By injecting AI into the easier parts of our teaching tasks first, we can achieve some easy wins, build our confidence, and give ourselves the time to reflect on the consequences before moving on to more ambitious integrations. The checklist below offers a simple way to begin.</p><h3><strong>A Four-Step Checklist for Educators</strong></h3><p>For educators feeling overwhelmed, here is a simple, actionable checklist to begin integrating AI into your practice:</p><ol><li><p><strong>Create and Discuss Your AI Policy:</strong> Draft your classroom AI policy using the appendix as a model. The most important step is to discuss it openly with your students on the first day. Frame it as a shared agreement for ethical engagement.</p></li><li><p><strong>Use AI as an Assistant for One Task:</strong> Pick one administrative task this week and use an AI to help. Draft a lesson plan, create a rubric for an upcoming assignment, or generate a set of discussion questions. Experience the tool&#8217;s power and limitations firsthand.</p></li><li><p><strong>Redesign One Assignment:</strong> Choose one of your existing assignments and brainstorm how you could redesign it to focus more on process, critical evaluation, or in-class performance. Start small and iterate.</p></li><li><p><strong>Share a Resource:</strong> Create and share a custom GPT or a well-crafted prompt template designed to help your students kickstart one self-study activity or assignment. This models good practice and provides a valuable resource.</p></li></ol><h2><strong>A Guide for the Modern Learner</strong></h2><p>For students, AI can be the most powerful learning tool ever created, but only if used with intention and integrity. The goal is to use AI to learn, not to short-circuit your own understanding. This requires a conscious shift from viewing AI as an answer machine to viewing it as a thinking partner.</p><h3><strong>Your Responsibilities as a User</strong></h3><p>Ethical use of AI begins with a clear understanding of your responsibilities. First and foremost, you must verify and clarify policies. Every course and institution will have different guidelines for AI use; it is your responsibility to know them and, when in doubt, to ask your instructor. Second, practice transparent disclosure. Being honest about how and where you have used AI in your assignments is a cornerstone of academic integrity and builds trust with your educators. Finally, you must protect sensitive information. Never input personal, confidential, or proprietary data into public AI models, as you have no control over how that data might be used or stored.</p><h3><strong>Using AI to Kickstart Your Work</strong></h3><p>One of the most effective and ethical ways to use AI is as a brainstorming partner to overcome the inertia of a blank page. You can use AI to generate initial ideas for a project, create a structured outline for an essay, or synthesize the key points from a long article. In this role, the AI acts as a catalyst for your own thinking, providing a foundation upon which you can build your original work. The goal is to use it to support your thinking, not replace it.</p><h3><strong>Using AI to Deepen Understanding</strong></h3><p>Instead of asking for a direct answer, use AI to guide you toward your own understanding. You can turn the AI into a Socratic partner that asks you questions instead of giving you solutions. For example, a prompt like <em>&#8220;I&#8217;m trying to understand the causes of the French Revolution. Don&#8217;t list them for me. Instead, ask me questions that will lead me to the key factors&#8221;</em> transforms a passive query into an active learning exercise. This approach reintroduces the &#8220;desirable difficulty&#8221; that is essential for true learning, using the AI to guide you rather than carry you.</p><p>AI is also an excellent tool for concept exploration. When faced with a complex idea, you can ask the AI to explain it in simpler terms or through an analogy, such as <em>&#8220;Explain the concept of general relativity to me as if I were 12 years old.&#8221;</em> This helps you build an intuitive grasp of the material that goes beyond rote memorization.</p><h3><strong>Using AI to Refine Your Skills</strong></h3><p>AI can be an invaluable coach for improving your practical skills through iterative feedback. As a writing coach, it can offer suggestions on clarity, tone, and structure without doing the writing for you. You can submit a paragraph you have written and ask for specific feedback, such as <em>&#8220;Can you suggest three stronger verbs I could use in this sentence?&#8221;</em></p><p>As a practice partner, AI can generate an infinite number of practice problems for subjects like math, coding, or language vocabulary. You can ask it to create a quiz for you and then, crucially, to provide detailed explanations for any questions you get wrong, allowing you to learn from your mistakes in a low-stakes environment.</p><h3><strong>Build Your Own AI Tools</strong></h3><p>Beyond one-off prompts, the next level of AI literacy is learning to create your own reusable AI assistants. Modern AI platforms allow you to create &#8220;Custom GPTs&#8221; or &#8220;Gems&#8221;&#8212;specialized versions of the AI that you pre-program with your own instructions and knowledge. This is a powerful way to personalize your learning. For example, you could build a &#8220;Study Buddy&#8221; and upload all your course notes, empowering it to quiz you on the specific material. You could create a &#8220;Socratic Tutor&#8221; that is permanently instructed to only ask you guiding questions and never give direct answers. By building your own tools, you move from being a simple user to a creator, a skill that is becoming increasingly valuable.</p><h3><strong>Developing AI Literacy</strong></h3><p>Ultimately, the most important skill for a 21st-century learner is not just knowing how to use AI, but knowing how to critically evaluate its output. Never trust blindly. This new &#8220;AI literacy&#8221; is built on three pillars.</p><p>First, always be skeptical. Treat every statement an AI generates as a claim, not a fact. Second, fact-check everything. AI models can and will &#8220;hallucinate&#8221; incorrect information with complete confidence. You are the ultimate authority and are responsible for the accuracy of your work. Always use trusted, primary sources to verify any factual information the AI provides. Finally, learn to look for bias. Understand that the AI&#8217;s training data is a reflection of the vast and messy internet, full of human biases and stereotypes. Always question the perspective of the text it generates and be aware of its inherent limitations.</p><h3><strong>Putting It All Together</strong></h3><p>Here is a step-by-step example of how you might ethically use AI to help with a research paper:</p><ol><li><p><strong>Brainstorming:</strong> Use the AI to explore potential topics and narrow your focus.</p></li><li><p><strong>Outlining:</strong> Work with the AI to structure your main arguments and create a logical outline.</p></li><li><p><strong>Research:</strong> Use the AI to find sources or summarize articles, but <strong>always</strong> go to the original source to read it yourself and fact-check every claim.</p></li><li><p><strong>Drafting:</strong> Write the full draft in your own words, using your outline and research.</p></li><li><p><strong>Feedback:</strong> Ask the AI for feedback on the clarity, structure, and style of your draft.</p></li><li><p><strong>Submission Checklist:</strong> Before submitting, review this list:</p><ul><li><p>Have I fact-checked every claim that originated from the AI?</p></li><li><p>Can I explain and defend every part of this work in my own words?</p></li><li><p>Have I followed my instructor&#8217;s AI policy to the letter?</p></li><li><p>Does my declaration accurately and specifically describe how I used AI in this assignment?</p></li></ul></li></ol><h2><strong>Conclusion</strong></h2><p>The techno-pragmatist ethos that guides this book is rooted in a fundamental belief: the future is not predetermined. Technology is a tool whose impact is profoundly shaped by how we choose to employ it, and this is nowhere more true than in education. As a college professor, this is not an abstract debate for me; it is a topic I care about deeply, and I feel a profound responsibility to get it right.</p><p>The challenge is not to resist this new technology, but to harness it with wisdom. Instead of chasing the flawed ideal of automation or descending into an adversarial relationship based on detection, we must embrace a necessary pedagogical shift. The central problem in modern education is not a lack of content, but a scarcity of timely, personalized feedback. High student-to-teacher ratios make it nearly impossible for educators to provide the deep, iterative guidance that is crucial for student growth.</p><p>This is where AI can create a true revolution. Therefore, the true north for AI in education is not automation, but augmentation. We must leverage AI to solve the feedback bottleneck, using it to do what it does best&#8212;process information and provide feedback at scale&#8212;so that we, educators and learners, can focus on what we do best: questioning, creating, and collaborating within a human-centered community.</p><p>It is from this techno-pragmatist perspective that we have offered these guides. The strategies herein are not just tips and tricks; they are a framework for shouldering the shared responsibility of building a new AI literacy, ensuring that these powerful tools serve, rather than subvert, the timeless goals of a meaningful education.</p><div><hr></div><p><em>Thanks for reading so far! As a complementary resource, here is a draft of an AI Policy for STEM classes. Feel free to, share, modify, and reuse it as you see fit.</em></p><div class="file-embed-wrapper" data-component-name="FileToDOM"><div class="file-embed-container-reader"><div class="file-embed-container-top"><image class="file-embed-thumbnail-default" src="https://substackcdn.com/image/fetch/$s_!0Cy0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack.com%2Fimg%2Fattachment_icon.svg"></image><div class="file-embed-details"><div class="file-embed-details-h1">Example AI Policy for STEM Classrooms</div><div class="file-embed-details-h2">31.6KB &#8729; PDF file</div></div><a class="file-embed-button wide" href="https://blog.apiad.net/api/v1/file/a1a35b11-416f-4955-9a0f-2c889bc2e045.pdf"><span class="file-embed-button-text">Download</span></a></div><a class="file-embed-button narrow" href="https://blog.apiad.net/api/v1/file/a1a35b11-416f-4955-9a0f-2c889bc2e045.pdf"><span class="file-embed-button-text">Download</span></a></div></div><p></p><p><em>This is a first draft of Chapter 7 of my upcoming book <strong>Mostly Harmless AI</strong>. Please, do share with me all your comments, suggestions, criticisms, and ideas.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.apiad.net/p/artificial-intelligence-for-educators/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.apiad.net/p/artificial-intelligence-for-educators/comments"><span>Leave a comment</span></a></p>]]></content:encoded></item><item><title><![CDATA[AI for Critical Thinkers]]></title><description><![CDATA[Chapter 4 of Mostly Harmless AI]]></description><link>https://blog.apiad.net/p/ai-for-critical-thinkers</link><guid isPermaLink="false">https://blog.apiad.net/p/ai-for-critical-thinkers</guid><dc:creator><![CDATA[Alejandro Piad Morffis]]></dc:creator><pubDate>Tue, 29 Jul 2025 11:01:26 GMT</pubDate><enclosure url="https://images.unsplash.com/photo-1617745143864-3907eaa93603?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw5NHx8Y2hlc3N8ZW58MHx8fHwxNzUzNzMwMjY3fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" 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://images.unsplash.com/photo-1617745143864-3907eaa93603?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw5NHx8Y2hlc3N8ZW58MHx8fHwxNzUzNzMwMjY3fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://images.unsplash.com/photo-1617745143864-3907eaa93603?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw5NHx8Y2hlc3N8ZW58MHx8fHwxNzUzNzMwMjY3fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1617745143864-3907eaa93603?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw5NHx8Y2hlc3N8ZW58MHx8fHwxNzUzNzMwMjY3fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1617745143864-3907eaa93603?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw5NHx8Y2hlc3N8ZW58MHx8fHwxNzUzNzMwMjY3fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1617745143864-3907eaa93603?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw5NHx8Y2hlc3N8ZW58MHx8fHwxNzUzNzMwMjY3fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1456w" sizes="100vw"><img src="https://images.unsplash.com/photo-1617745143864-3907eaa93603?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw5NHx8Y2hlc3N8ZW58MHx8fHwxNzUzNzMwMjY3fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" width="7264" height="4843" data-attrs="{&quot;src&quot;:&quot;https://images.unsplash.com/photo-1617745143864-3907eaa93603?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw5NHx8Y2hlc3N8ZW58MHx8fHwxNzUzNzMwMjY3fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:4843,&quot;width&quot;:7264,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;silver tabby cat on brown wooden floor&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="silver tabby cat on brown wooden floor" title="silver tabby cat on brown wooden floor" srcset="https://images.unsplash.com/photo-1617745143864-3907eaa93603?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw5NHx8Y2hlc3N8ZW58MHx8fHwxNzUzNzMwMjY3fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1617745143864-3907eaa93603?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw5NHx8Y2hlc3N8ZW58MHx8fHwxNzUzNzMwMjY3fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1617745143864-3907eaa93603?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw5NHx8Y2hlc3N8ZW58MHx8fHwxNzUzNzMwMjY3fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1617745143864-3907eaa93603?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw5NHx8Y2hlc3N8ZW58MHx8fHwxNzUzNzMwMjY3fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><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 tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><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">Photo by <a href="true">Rick J. Brown</a> on <a href="https://unsplash.com">Unsplash</a></figcaption></figure></div><blockquote><p><em>This article is based on Chapter 4 of my upcoming book <strong><a href="https://store.apiad.net/l/ai/fiftyoff">Mostly Harmless AI</a></strong>.</em> </p></blockquote><p>Having journeyed through the foundations of artificial intelligence&#8212;its history, its mechanics, and its limitations&#8212;we arrive at the most pressing question: How do we actually use the powerful new tools it has produced? </p><p>This article serves as a bridge from the theoretical to the practical. This is not a list of traditional prompt engineering hacks. The internet is filled with tips and tricks for coaxing a specific output from a language model for a single task. Instead, the advice that follows builds on our foundational understanding to offer something more durable: a general mindset for working with these tools. This approach is about engaging with language models in a way that allows you to get the best out of them without subcontracting your own critical thinking. It is a methodology for augmenting your intellect, not replacing it.</p><p>The principles you learn here are foundational, offering a universal toolkit for interacting with large language models in daily life&#8212;whether you are planning a vacation, trying to understand a complex news article, or drafting a simple email. In the following chapters (in the book), we explore how to adapt and intensify these practices for specialized, high-stakes professional environments. But first, every user must learn how to engage with these powerful yet fallible tools safely, critically, and effectively.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.apiad.net/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Computist Journal! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div><hr></div><h2><strong>A Methodology for Effective Interactions with Language Models</strong></h2><p>To move beyond simple queries and unlock the true potential of language models, we need a more structured approach. This methodology is divided into three parts: establishing the right Mindset, employing effective Tactics during the conversation, and building a System to make your successes repeatable.</p><h3><strong>The Mindset</strong></h3><p>The most significant shift is in your mental model. Instead of treating the model as a search engine, you should approach it as a conversational partner. This means recognizing that the interaction is iterative and that your most important role is to guide the conversation. </p><p>A key part of this mindset is adopting a Socratic (or inquiring) approach, where you use the model not just to get answers, but to help you ask better questions. This is invaluable for sensitive and important tasks. </p><p>For example, instead of starting with &#8220;Write an email asking for a raise,&#8221; a partner-based approach would be to ask the model to guide you: &#8220;I need to write an email to my manager to ask for a raise. What are the key pieces of information and evidence I should gather first to make the strongest possible case?&#8221; The model will then prompt you for your accomplishments and market data, helping you build your argument before a single word is written. </p><p>Similarly, when organizing a child&#8217;s birthday party, you could ask, &#8220;I&#8217;m planning a science-themed party for my 7-year-old. What are the key logistical details I need to consider to make sure it runs smoothly?&#8221; In both cases, you are using the model to help you define the problem, which is a far more powerful use of its capabilities.</p><h3><strong>The Tactics</strong></h3><p>With the right mindset, you can employ specific tactics to steer the conversation toward a high-quality outcome. The most fundamental tactic is to be explicit and strategic with your queries. To ground the model&#8217;s response in reliable information, tell it where to look. </p><p>A generic query for medical advice is risky, whereas a much safer prompt would be: &#8220;Search for information from the Mayo Clinic and the World Health Organization on the common symptoms of iron deficiency.&#8221; This specificity is also crucial when comparing complex options, like, for example, buying an EV, you can be as specific as: &#8220;Compare the Tesla Model 3, the Hyundai Ioniq 5, and the Ford Mustang Mach-E for a family of four. Focus on real-world range, charging speed on a standard home charger, and available cargo space.&#8221;</p><p>To get an even more robust answer, you can move beyond a single query and assemble a &#8216;committee of experts.&#8217; A single language model will give you its most statistically likely answer, which might not be the most creative or well-rounded one. To overcome this, you can generate multiple, independent perspectives. </p><p>For the EV comparison, you could open three separate conversation windows. In the first, you&#8217;d ask the model to act as a pragmatic engineer and, perhaps, the model will argue for the Hyundai. In the second prompt, you&#8217;d ask it to be a tech enthusiast, and maybe it makes the case for the Tesla. In the third, you&#8217;d have it act as a family-focused reviewer, causing it to arguing for the Ford. </p><p>By copying these three independent analyses into a final chat window, you can then ask the model to act as a senior editor, synthesizing the competing viewpoints into a final, balanced recommendation that weighs factors like cost, range, and reliability.</p><p>Finally, after the model provides a response&#8212;either a single answer or a synthesized one from your committee&#8212;you can employ self-criticism as a final refinement tactic. </p><p>Once you have a draft of your email asking for a raise, you can prompt it: &#8220;Read the email you just drafted. Now, act as my manager who is busy and skeptical. What parts of this email are unconvincing? Is the tone too demanding or not confident enough?&#8221; This critical step often surfaces weaknesses that you might have missed, allowing you to create a much stronger final product.</p><h3><strong>The System</strong></h3><p>The final part of the methodology is to turn your successful interactions into a repeatable system. A common mistake is to treat prompts as disposable. A more powerful approach is to build a library of reusable prompts, thinking of them as personal &#8220;natural language programs.&#8221; The multi-step process you used to plan the birthday party can be saved as a &#8220;Kids&#8217; Party Planner&#8221; template. </p><p>The Socratic prompt that helped you prepare for your salary negotiation can be generalized into a &#8220;Career Conversation Prep&#8221; tool. The ultimate expression of this principle is the use of features like OpenAI&#8217;s &#8220;Custom GPTs,&#8221; which allow you to encapsulate a complex task into a dedicated tool that you or your team can use with a simple request.</p><h2><strong>A Practical Example</strong></h2><p>To see how these principles combine into a powerful workflow, let&#8217;s walk through a comprehensive, real-world task: planning a 10-day family vacation to Italy.</p><p>Rather than beginning with a vague request like &#8220;plan a trip,&#8221; the process starts by applying the Socratic approach. You would first ask the model to frame the problem for you: &#8220;I want to plan a 10-day family vacation to Italy. What key information do you need from me to create the best possible itinerary?&#8221;</p><p>This immediately shifts the dynamic, positioning the model as a guided partner. In response, it would act as a consultant, asking for crucial details like the number of travelers, the children&#8217;s ages, your budget, family interests, and preferred travel pace.</p><p>Once you&#8217;ve provided this context, the next step is to ensure alignment. You would instruct the model to synthesize and confirm the constraints: &#8220;Great, thank you. Based on my answers, please summarize all of my constraints for this trip in a structured list.&#8221; </p><p>With a clear, confirmed set of requirements, you can then confidently ask for a first draft. The iterative heart of the process begins now. Upon receiving the initial itinerary, you would employ the self-criticism tactic: &#8220;This is a good start. Now, act as a skeptical travel agent. Criticize this itinerary and tell me what&#8217;s missing or what could go wrong.&#8221;</p><p>The model might point out that visiting three major cities in ten days is too ambitious for a family with young children. Based on this valuable feedback, you can guide the revision, continuing this loop of drafting and critiquing until the plan is refined to your satisfaction. Only then would you ask for the final, detailed output. </p><p>The final, powerful step is to generalize this success. You would ask the model to convert the entire conversation into a reusable &#8220;Family Vacation Planner&#8221; template, complete with placeholders for key details. This turns a one-time effort into a valuable, programmable asset for future trips, demonstrating the true power of thinking of prompts as reusable programs.</p><h2><strong>Common Pitfalls for the Everyday User</strong></h2><p>The good practices above are designed to improve the quality of a language model&#8217;s output. This section focuses on the mental traps and risks you must be aware of to use these tools safely.</p><h3><strong>The &#8220;Eliza Effect&#8221; and Misplaced Trust</strong></h3><p>Because chatbots are designed to be conversational and helpful, it&#8217;s easy to start treating them as if they have genuine understanding, intentions, or even consciousness. This is a modern version of the &#8220;ELIZA effect&#8221; we discussed in the history chapter. The danger is that this leads to misplaced trust, where we stop critically questioning the model&#8217;s output because it feels so confident and knowledgeable. This is the psychological trap that makes us vulnerable to hallucinations; we are less likely to fact-check a &#8220;partner&#8221; than a machine.</p><h3><strong>Cognitive Offloading and The &#8220;Lazy Brain&#8221; Problem</strong></h3><p>The ease of asking a language model to summarize an article, draft an email, or brainstorm ideas can lead to a subtle but significant danger: cognitive offloading. By outsourcing the fundamental work of thinking, synthesizing, and structuring our thoughts, we risk letting our own critical thinking and creative muscles atrophy. The goal is to use these tools to think better, not to think less. Over-reliance can make us less capable problem-solvers in the long run.</p><h3><strong>The Privacy Risk of Casual Conversation</strong></h3><p>In a casual conversation with a chatbot, it&#8217;s easy to forget that you are interacting with a complex system run by a corporation. Users often paste sensitive personal information&#8212;medical details, financial data, private emails, proprietary work content&#8212;into public language models without considering where that data goes, how it&#8217;s used for future training, or who might have access to it. What you tell the model does not stay between you and the model.</p><h2><strong>You Are the Final Authority</strong></h2><p>The techniques above teach you how to get better raw material from the language model. This final principle is about what you, the human, must do with that material. It is the most critical step in using these tools responsibly.</p><p>First, never trust, always verify. The language model is an unreliable narrator. Treat its output as a well-written first draft, not a finished fact. For any critical piece of information&#8212;a date, a statistic, a medical suggestion, a legal point&#8212;you must verify it using an independent, authoritative source. The model can help you find potential sources, but you are the fact-checker.</p><p>Second, synthesize, don&#8217;t just copy-paste. The model&#8217;s output is information; your goal is knowledge. The most important work happens after the model has responded. Your job is to synthesize its suggestions with your own experience, judgment, and goals. The model can generate a list of tourist sites for your Italy trip, but only you can synthesize that into a vacation plan that feels right for your family.</p><p>Finally, own the outcome. The language model is a tool, and you are the user. Any decision made, any email sent, or any action taken based on the model&#8217;s output is your responsibility. This principle of accountability is non-negotiable. The model is an assistant that can help you think, but it is not a replacement for your personal judgment.</p><h2><strong>Conclusion</strong></h2><p>The journey from a novice user to a skilled one is not about memorizing clever prompts; it&#8217;s about a fundamental shift in mindset. Instead of treating generative AI as a vending machine for answers&#8212;an approach fraught with risks of shallowness, bias, and error&#8212;we&#8217;ve seen the power of engaging it as a conversational partner.</p><p>The practices outlined in this article&#8212;the Socratic method, strategic querying, and, most importantly, critical verification&#8212;form a framework for responsible engagement. This framework places you, the user, firmly in the driver&#8217;s seat. </p><p>The quality of the model&#8217;s output is not a feature of the model alone; it is a direct reflection of the quality of your guidance and the rigor of your review. You are not just a prompter; you are a director, a critic, and a synthesizer. This is what makes these powerful tools &#8216;mostly harmless&#8217;: not their inherent nature, but our commitment to using them with critical awareness and human authority.</p><p>By mastering these foundational skills, you are not just learning to use a new tool. You are developing a new form of literacy for the 21st century. As we move into the specialized applications for knowledge workers, developers, and creatives in the following chapters (of the book), this ability to think with AI, not just ask of it, will be your most valuable asset.</p><blockquote><p><em>Thanks again for reading. If you want to dive deeper into Artificial Intelligence and learn to make the best out of it, from a techno-pragmatist, human-centered, responsible perspective, please check out my book <strong><a href="https://store.apiad.net/l/ai/fiftyoff">Mostly Harmless AI</a></strong>.</em></p></blockquote>]]></content:encoded></item><item><title><![CDATA[The State of AI for Software Development]]></title><description><![CDATA[Tools of the Trade, and Why You Should Still Learn to Code...]]></description><link>https://blog.apiad.net/p/the-state-of-ai-for-software-development</link><guid isPermaLink="false">https://blog.apiad.net/p/the-state-of-ai-for-software-development</guid><dc:creator><![CDATA[Alejandro Piad Morffis]]></dc:creator><pubDate>Sat, 26 Jul 2025 11:12:02 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!0vOu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb269c1a1-68f3-47c2-a101-b00875ee6f49_1024x608.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!0vOu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb269c1a1-68f3-47c2-a101-b00875ee6f49_1024x608.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!0vOu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb269c1a1-68f3-47c2-a101-b00875ee6f49_1024x608.png 424w, https://substackcdn.com/image/fetch/$s_!0vOu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb269c1a1-68f3-47c2-a101-b00875ee6f49_1024x608.png 848w, https://substackcdn.com/image/fetch/$s_!0vOu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb269c1a1-68f3-47c2-a101-b00875ee6f49_1024x608.png 1272w, https://substackcdn.com/image/fetch/$s_!0vOu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb269c1a1-68f3-47c2-a101-b00875ee6f49_1024x608.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!0vOu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb269c1a1-68f3-47c2-a101-b00875ee6f49_1024x608.png" width="1024" height="608" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b269c1a1-68f3-47c2-a101-b00875ee6f49_1024x608.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:608,&quot;width&quot;:1024,&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;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!0vOu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb269c1a1-68f3-47c2-a101-b00875ee6f49_1024x608.png 424w, https://substackcdn.com/image/fetch/$s_!0vOu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb269c1a1-68f3-47c2-a101-b00875ee6f49_1024x608.png 848w, https://substackcdn.com/image/fetch/$s_!0vOu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb269c1a1-68f3-47c2-a101-b00875ee6f49_1024x608.png 1272w, https://substackcdn.com/image/fetch/$s_!0vOu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb269c1a1-68f3-47c2-a101-b00875ee6f49_1024x608.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><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 tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><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><blockquote><p><em>This article is based on Chapter 5 of my in-progress book <strong><a href="https://store.apiad.net/l/ai/fiftyoff">Mostly Harmless AI</a></strong>.</em></p></blockquote><p>Few developments in the generative AI space have been as exciting lately as the rise of code generators. The evolution of these AI coding assistants is best understood not as a single leap, but as a progression of capabilities, moving from simple autocomplete to what may one day be fully autonomous agents.</p><p>At their core, code generators are Large Language Models trained on vast amounts of public code. They treat programming languages just like human languages, learning the patterns, syntax, and structure to predict what comes next. These models can take a natural language prompt and some contextual code and produce new code that mostly aligns with the prompt's intention. For example, you can provide a function signature and a comment like, "This function finds the minimum of an unsorted list," and the model will generate the function's body. </p><p>This uncanny ability to comprehend and generate code based on human communication is transforming the development landscape, but it also requires special considerations, as code is not just another natural language.</p><p>In this article, we will explore the landscape of AI for software development. We will begin by looking under the hood, examining the spectrum of capabilities that allow AI to generate code. Next, we will explore the use cases for developers across the development lifecycle. Then, we will discuss some important things to keep in mind, from hallucinations and security to theoretical limitations of AI for coding. Finally, we will look to the future of coding, consider how the developer role is evolving, and try to answer one crucial question: <em>is coding dead</em>?</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.apiad.net/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Computist Journal! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div><hr></div><h2>How to Make a Code Generator</h2><p>Let's imagine we are building our own code generator from scratch. The journey from a simple code predictor to a sophisticated development partner is a journey of adding layers of capability, moving up a spectrum of increasing autonomy.</p><p>The first thing we want is next-token prediction for code. The foundational layer is built on unsupervised training, making it essentially autocomplete on steroids, like a super duper IntelliSense. We start by training a model on vast amounts of code, teaching it to predict the most likely next token based on the immediate context. If we have variables or functions declared nearby, our model is more likely to generate code that references them, simply because that's the most common pattern in its training data.</p><p>Now that we have a basic generator, our next step is to teach it to follow instructions. To do this, we can compile a dataset of instruction pairs&#8212;for example, a natural language command like, "In the previous code, change the loop to be more efficient," paired with the corrected code. By training on these examples, our model learns to go beyond simple prediction and follow specific, human-given directions. We can further enhance this process with Reinforcement Learning, where we have human or automatic evaluators rank different code outputs. This teaches our model to not only generate syntactically correct code, but also to respect desired styles and naming conventions.</p><p>Our generator is getting smarter, but it's still limited by the immediate context. To give it a long-term memory, we move to context-aware generation. We can dramatically enhance our model's ability to generate relevant code by allowing it to pull from a broader context. This is a form of Retrieval-Augmented Generation (RAG) for Code. We can index an entire codebase or external API documentation, allowing our model to find relevant examples and patterns. When a developer asks a question, our system retrieves these examples and feeds them into the prompt, allowing the model to generate accurate code by combining and refactoring snippets from the provided context, even for libraries it wasn't explicitly trained on.</p><p>So far, our model can only write code. To up our game, we can give it the ability to interact with its environment by making it use external tools. This represents a significant leap. We can equip our model with a set of tools it can invoke on demand. For example, in response to a prompt like "add a library for charting," our model could invoke a tool to install the missing dependency in the project. If you ask it to "check whether this works," it could invoke another tool to run the unit tests and report back the results. It could even use tools to directly modify files in the codebase. By giving our model the ability to take actions beyond just generating text, we empower it to participate more actively in the development process.</p><p>The final step on our journey is to give our code generator a bit of autonomy, creating what&#8217;s called an agentic system. This is the most advanced and forward-looking form of AI-based code generation. We can design an AI agent that takes a high-level goal, breaks it down into sub-tasks, writes code, generates tests, runs the code, and then analyzes the output or errors. Based on the results, it can then debug or modify the source code in a continuous loop, acting as a semi-autonomous developer to see a task through from start to finish.</p><p>Beyond these training methodologies, we can leverage the formal nature of code to improve our model's performance. Unlike natural language, code has strict syntactic rules that can be programmatically checked. One simple but effective technique is trial and error during inference: we can have our model produce several potential code snippets, run them through a linter, and automatically reject any that have parsing errors. </p><p>More advanced techniques can pre-process the training data, for instance by normalizing all variable names to a generic format like <code>var0</code>, <code>var1</code>, etc. This makes it much easier for our model to learn the structural relationships in code without being distracted by specific naming conventions, and we can substitute the actual names back in a post-processing step. These tricks leverage the fact that we are dealing with a very restricted syntax to make it easier for our language model to learn the rules.</p><p>Finally, to create the ultimate specialized assistant, we can go beyond RAG and fine-tune a model on a specific codebase. While RAG provides external context, fine-tuning actually updates the model's internal weights. By training a model on a company's entire private and proprietary codebase, we can create a version that has deeply internalized that organization's specific architectural patterns, internal APIs, and coding standards. This results in an AI partner that not only answers questions correctly but does so in a way that is idiomatic and aligned with the team established practices.</p><h2>Use Cases for Developers</h2><p>Understanding the engine is one thing; knowing how to use it is another. AI offers you a powerful toolbox that you can apply across the entire software development lifecycle. In this section, you will explore practical use cases across three key phases: Ideation and Design, Implementation and Development, and Verification and Explanation. You will see how you can use both sophisticated, LLM-based coding tools integrated directly into your IDE, as well as techniques that you can use with standard, general-purpose chat apps like ChatGPT or Claude, requiring no special integration at all.</p><h3>Phase 1: Ideation and Design</h3><p>Before you even dare writing a single line of AI-generated code, you can already use LLMs as powerful brainstorming partners for exploration and design. This is one of the most accessible ways you can use AI, as it doesn't require a specific tool or editor extension; you can do it effectively using general-purpose conversational AI applications like ChatGPT, Perplexity, or Gemini. Models with live browsing capabilities are often even better for this phase, as they can pull in the latest information about new frameworks, libraries, and design patterns.</p><p>The key is for you to treat this phase as an interactive exploration. Instead of asking for a single, ready-made answer, you should guide the model through an ideation process. Here's how you can do it: use a chain-of-thought approach by asking the model not just for a solution, but to "think step-by-step" through the pros and cons of different architectural choices. </p><p>A powerful pattern you can use is to ask the model to generate several variants&#8212;for example, "Propose three different ways to design the database schema for a social media app." Then, you can discuss the options back and forth, using self-critique prompts to have the model compare the alternatives it just generated. At the end of this collaborative session, you can ask the model to provide a structured summary of all the design decisions you have agreed upon, acting as an executive design document. </p><p>With this document in hand, you can then start a new, more focused session with a code-oriented model for the actual implementation.</p><h3>Phase 2: Implementation and Development</h3><p>The most straightforward way you can use AI in this phase is for generating short, self-contained code snippets. This can be for a well-known algorithm, a common pattern, or the use of a well-documented API. This is a task you can accomplish with any standard chat app, even outside your IDE. This is especially powerful for navigating the complex world of APIs and libraries. </p><p>As a professional programmer, you probably aren't spending that much time doing basic coding, like inserting numbers in a list. No, reality is 90% of the code you write is interface code with some external library you may not know well. Instead of manually searching documentation, you can simply ask an AI assistant, "How do I use this library to make a query that does X?" and get a ready-to-use snippet.</p><p>The next level of integration is bringing AI directly into your IDE. This can start with simple code completion, but the real power comes from integrating a full chat experience. This allows you to highlight a block of code and ask for specific changes, such as, "Refactor this function to be more efficient," and have the model modify the file directly. If the model has RAG capabilities and can scan your entire codebase, it gets even better. The modifications and additions it suggests will be consistent with your existing coding style and use your own libraries and methods, making the integration seamless.</p><p>At the far end of the spectrum is the full agentic mode, which is still in its infancy with tools like Cursor. This offers a much more hands-off development experience. Here, you can give a coding agent a high-level task, and it can modify several files, create new ones, and even run commands in the terminal to install missing dependencies.</p><p>Finally, you don't always need a full IDE. For one-off scripts or quick prototypes, you can use the "Canvas mode" in apps like ChatGPT, Claude, or Gemini. These provide a simple editor-like interface where you can iterate back and forth with the model to update a script. Some tools even allow you to run these scripts directly in the cloud, letting you build and test disposable web apps instantly.</p><p>Working with these tools introduces a new core skill, an AI-in-the-loop coding workflow&#8212;the day-to-day interactive process of collaborating with an AI. It involves an iterative cycle of prompting with a clear goal, carefully reviewing the AI's output, correcting its mistakes or flawed assumptions, and then re-prompting with more specific instructions or feedback.</p><h3>Phase 3: Verification and Explanation</h3><p>To ensure your code quality, you can use an AI to help generate a wide range of test cases. This is especially useful for uncovering corner cases that might not be immediately obvious, such as handling empty inputs, maximum values, or unusual user behaviors. You can do this with integrated AI coding tools, but it can also be as easy as uploading your codebase or relevant files to a standard chat app and asking it to suggest test cases. </p><p>You can ask for both code-based tests (like unit and integration tests) as well as descriptive tests (like user stories or manual testing scripts). In all these scenarios, it helps to instruct the model with a Chain-of-Thought prompt, asking it to first explain what behavior it wants to test, and only then provide the actual test. This ensures the tests are intentional and well-understood.</p><p>Furthermore, when you're faced with a cryptic error, you can use AI for debugging. You can feed the AI the error message, stack trace, and relevant code, and it can analyze the context to suggest potential causes for the bug and possible fixes, acting as an experienced pair programmer.</p><p>The opposite, code-to-language direction allows you to create powerful new workflows for understanding code. You can ask an AI for automatic documentation of functions or for natural language explanations of a complex code fragment. This can be done directly inside your IDE with an integrated tool, or with standard chat apps. For example, some tools allow you to connect a public GitHub repository and ask high-level questions on the fly, which is very good for getting a quick overview of a new codebase.</p><p>A particularly valuable use case is in legacy code modernization. One of the biggest challenges in the software industry is maintaining and updating old codebases. You can use AI to tackle this problem by feeding it legacy code (e.g., from an old COBOL or Java system) and asking it to analyze the logic, add explanatory comments, or even translate the entire system to a modern language and architecture. This can dramatically reduce the cost and risk associated with modernizing critical systems.</p><p>However, you should be aware of the critical gap between syntax and semantics&#8212;that is, between understanding what the code <em>says</em> versus what the code <em>does</em>. </p><p>The weaker models are mostly limited to describing what the code is <em>saying</em> syntactically (e.g., "this variable is changed to this array position"), this capability is improving all the time. More powerful models can often provide higher-level, semantic explanations of what the code is <em>doing</em> (e.g., "this loop is ensuring the first part of the array is always sorted"). But even the best models may not be able to grasp the full architectural details or business logic of a complex application.</p><h3>Putting It All Together</h3><p>Putting this all together, let's see how a complete workflow might look for tackling a specific, somewhat complicated feature in an ongoing app, like adding OAuth login.</p><p>First, you would start in ideation mode, interacting mostly in text with the AI. You would discuss a high-level overview of the required architecture changes, which parts of the app might be impacted, and the best libraries to use. The goal here is to produce a clear design roadmap before any code is written.</p><p>Next, you would move to implementation mode, going full hands-on with an agentic tool. You could assign the agent the high-level task from your roadmap: "Implement the OAuth login feature using the chosen library." The agent would then get to work, creating new files, modifying existing ones, and writing the necessary code. As it encounters errors or ambiguities, you would engage in a back-and-forth conversation to guide it, but the bulk of the mechanical coding would be handled by the agent.</p><p>Finally, you would enter review mode. Once the agent reports that the feature is complete, you could have a final conversation with the AI. You could ask it to analyze the <code>git diff</code> of all the changes it made, explain the rationale for its implementation choices, and generate comprehensive documentation for a pull request. After your final review and approval, you would then submit the PR for human review by your team.</p><h2>Things to Keep in Mind</h2><p>While the toolbox is powerful, it comes with sharp edges. The most important limitation in language modeling, in general, has been called the problem of hallucinations. In the context of code, this means AI-generated code is not infallible and can contain subtle bugs that require constant vigilance.</p><h3>Hallucinations and Mistakes</h3><p>The simplest way you can see hallucinations is when you get code that uses a new variable that doesn't exist or fails to close a parenthesis. Unlike with natural language, you can often detect these syntactic errors automatically with a linter or compiler, so many of the more harmless hallucinations are not relevant as they won't introduce subtle bugs.</p><p>A slightly more difficult hallucination is what we can call a semantic hallucination, where the model uses a wrong variable or function name that <em>does</em> exist in your codebase. In this case, you will not get a compiler error because you're using an existing symbol, but you will get the wrong behavior. This is much harder to find because it has the same problem as most hallucinations: you have to review the code and be knowledgeable enough to have been able to generate that code yourself.</p><p>The most insidious errors are logical flaws. This occurs when the code doesn't do anything obviously wrong&#8212;it uses the right variables and looks plausible&#8212;but it has some subtle logical mistake that leads to a bug. For example, finding that a variable is not updated at the right moment in a nested loop is a tricky problem even for human experts. These kinds of mistakes will introduce subtle, hard-to-detect bugs.</p><p>But even if the bugs are no worse than what a human would introduce, they pose a threat because of "automation bias." When you check code written by humans, you expect bugs. But when you're looking at machine-generated code, the only way programmers have ever interacted with it has been with rule-based systems like compilers, and that code is basically without mistakes. </p><p>So even if the language model makes errors that are, on average, no worse than what a regular programmer would make, they can still be harder to detect because they won't be the exact same mistakes a human would make, and we may be less on guard.</p><h3>AI's Impact on Technical Debt</h3><p>The rapid generation of code by AI presents a double-edged sword for technical debt. On one hand, you can use AI as a powerful tool to reduce existing debt. You can ask it to analyze your codebase for inefficiencies, suggest refactorings, or add missing documentation and tests, thereby improving code quality. </p><p>On the other hand, the very speed of AI can create new and more complex forms of technical debt. Relying heavily on "vibe coding" to quickly generate features without rigorous human review can lead to a codebase filled with poorly understood, inefficient, or subtly buggy logic. This AI-generated debt can be even harder to untangle later, as the original human intent behind the high-level prompt may be lost.</p><h3>Biases in Generated Solutions</h3><p>Models trained on a vast corpus of public code from the internet will inevitably learn from outdated examples. This can lead them to perpetuate outdated practices by suggesting deprecated functions, old library versions, or inefficient algorithms that are no longer considered best practice. An AI model will also often default to the most statistically common solution it has seen in its training data. </p><p>This can stifle creativity and lead to a homogenization of code, discouraging the exploration of more elegant or contextually appropriate solutions. Finally, just as AI can perpetuate harmful societal biases, it can also reproduce human biases from the code it was trained on. This can manifest as non-inclusive language in generated comments or variable names.</p><h3>Security and Licensing Risks</h3><p>A significant risk is that an AI can generate code with known security vulnerabilities. If the model was trained on public code containing flaws like SQL injection or buffer overflows, it may reproduce those same insecure patterns in its suggestions, creating a major security risk for the application. </p><p>Furthermore, the use of AI-generated code introduces complex legal questions. A model might reproduce a code snippet verbatim from a repository with a restrictive open-source license (like the GPL), inadvertently pulling that license's requirements into a proprietary project. The legal ownership of the AI-generated code itself remains a gray area, creating potential intellectual property challenges for companies.</p><h3>The Economics of AI Development Tools</h3><p>While these AI tools offer significant productivity boosts, they are not free. For development teams and organizations, it's important to consider the practical economics of their adoption. Most advanced AI coding assistants operate on a subscription model, which introduces a new operational cost. Team leads and CTOs must perform a cost-benefit analysis, weighing the price of the tools against the expected gains in developer speed, code quality, and reduced time-to-market. The return on investment (ROI) will depend heavily on how well a team integrates these tools into their workflow and whether the productivity gains justify the recurring expense.</p><h3>Theoretical Limitations</h3><p>Beyond the practical issues of hallucinations and biases, there is a more fundamental, formal limitation to what we can do automatically. This is captured by Rice's theorem, a cornerstone of theoretical computer science. In short, the theorem proves that there is no algorithm that can automatically check for any non-trivial semantic property of a program.</p><p>What does this mean in practice? A "non-trivial semantic property" is basically any interesting question about what a program <em>does</em>. For example: "Does this program ever crash?" or "Will this function always return a positive number?" or "Is this code free of security vulnerabilities?" Rice's theorem tells us that it is mathematically impossible to build a universal program that can answer these kinds of questions for every possible piece of code.</p><p>This highlights the theoretical impossibility of perfect, automated code verification. We will never be able to build an AI that can look at code generated by another AI (or a human) and formally guarantee that it does exactly what the natural language prompt intended. That problem is, in the general case, unsolvable. </p><p>However, this doesn't mean we should give up. Engineering isn't about theoretical perfection; it's about solving the average case in the best possible way and handling the most important edge cases reasonably well. While we can't achieve perfect verification, we can get pretty far with a combination of AI-generated tests, linters, and, most importantly, expert human review.</p><h2>The Future of Coding</h2><p>Given these tools and guardrails, the very nature of programming is set to transform. The focus will shift from the mechanics of writing code to the art of building systems. The term "vibe coding," popularized in developer communities, captures the essence of this shift. It describes a workflow where the developer's primary job is no longer to write precise, line-by-line syntax, but to describe the high-level behavior, intent, or "vibe" of the desired software to an AI partner. The focus moves from <em>how</em> to do something (the specific algorithm and syntax) to <em>what</em> needs to be done (the ultimate outcome and user experience), leaving the mechanical implementation details to the AI assistant.</p><p>This approach is incredibly powerful for rapid prototyping, hackathons, and short-term projects. A developer can quickly scaffold an entire application by describing its components in natural language, getting a functional prototype up and running in a fraction of the time it would take manually. </p><p>However, this method has significant limitations for larger, more detailed projects. "Vibe-based" instructions are often ambiguous and can be misinterpreted by the AI, leading to code that works for the happy path but fails on edge cases. For long-term, mission-critical software, the precision, maintainability, and strict adherence to architectural standards that come from deliberate, human-led coding remain indispensable. Vibe coding is a tool for speed and exploration, not a replacement for rigorous engineering.</p><p>In this new paradigm, future developers will become experts at wielding a suite of AI tools and agents. Skills in "prompt engineering," system design, and the critical review of AI output will become more valuable than the ability to recall specific syntax. The developer's role becomes one of guidance and orchestration, knowing which tool to use for which task and how to verify the results. </p><p>Looking ahead, this elevated role may involve assigning entire features or bug fixes to autonomous agents. These agents would manage the full lifecycle: understanding the ticket, writing the code, creating tests, committing to version control, and responding to feedback from the CI/CD pipeline. This doesn't eliminate the developer but elevates their role to that of a system architect and project manager, overseeing a team of AI agents.</p><p>Beyond the changes in workflow, it's worth contemplating how these tools will change the qualitative experience of being a developer. We must ask ourselves how it <em>feels</em> to code this way. Does offloading the cognitive burden of syntax and boilerplate make you dumber and cause you to forget how to code, or does it free up mental space, allowing you to become even more proficient in the things that truly matter&#8212;the high-level ideas and architecture?</p><p>We must also consider the social aspects. You now have a partner that is not a human. How will this impact teamwork? Will this AI partner become a virtual member of the team, participating in code reviews and design discussions? Or will it alienate developers into more lonely roles, as they interact more with their AI than with their human colleagues? How does a senior developer mentor a junior who can always get an instant answer from an AI, potentially masking gaps in their fundamental knowledge? </p><p>These are open questions we must navigate as we integrate these powerful new collaborators into our teams.</p><h2>Final Remarks </h2><p>So, Is Coding Dead?</p><p>There is a real concern that if AI can write 90% of the code in 10% of the time, nine out of ten programmers could be out of a job. And yes, every time automation has reached an existing industry, some jobs are destroyed as some skills become irrelevant.</p><p>However, I claim we must not fear the advent of AI coding assistants. Here&#8217;s why.</p><p><em>Writing code</em> is by far neither the hardest nor the most time-consuming part of software development. The process of making software involves understanding requirements, talking with customers, user testing, and product design, all of which are at least one order of magnitude more difficult that actually typing code. </p><p>A hundredfold boost in productivity for a task that is only 10% of the overall process is huge, but it still leaves the other 90% of the human-centric work. We will still need to understand what our customers want, guide them through designing a software product, know the user base, and find a sustainable business model. </p><p>And no, you cannot simply simulate the end user with a language model, so the AI can prompt itself into making a usable product, because your end user will still be human. Human users are slow, get angry easily, don't understand your application, and don't know what it is they don't like about it. Until an AI can really replicate what it feels like to be a human&#8212;and at that point, will we still call it &#8220;artificial&#8221;&#8212;we can&#8217;t take the human out of the software development loop&#8212;or any creative loop, for the matter.</p><p>The biggest progress in the software creation process has always been because of innovation in the human side, not the machine side. Innovation in software engineering, management, and how you get people to work together and collaborate will continue to be the most important part of the software pipeline for a long time.</p><p>Furthermore, software is an industry that is nowhere near its saturation point. We have far more need for software than the number of people who can currently write it. Increased productivity will likely be met with increased demand, creating more and better software for more users.</p><p>Every leap in software productivity&#8212;from assembly to compilers, from C to object-oriented frameworks&#8212;has lowered the barrier to entry and brought more people into programming. AI tools will likely do the same, empowering more people to create software. The modern world runs on software, and in the future, basic programming literacy may become as common as basic math literacy is today. </p><p>Most people know enough math to get by in daily life without hiring a mathematician, and in the same way, more people will know enough programming to automate simple tasks. They will learn to say to their home computer, "When I get home, I want you to turn my lights on, but only if it's night and the electric bill is not above the average," and an AI will generate the code to make it happen. This expands the field rather than shrinking it.</p><p>So, should you learn to code? Definitely. There's going to be orders of magnitude more code written in the next few years than everything we've written in history. </p><p>But even if you never end up writing a single line of code unaided by AI&#8212;like I've never written a single line of production code unaided by syntax highlighting, a linter, or a type verifier&#8212;knowing how code works, how algorithms work, and why a specific programming construction works the way it works is the same as knowing basic math. Coding changes how your brain is wired, makes you think clearer, and increases your creativity.</p><p>Furthermore, even if you are not working in the software industry, learning to code is still an immensely enjoyable experience. Being able to create something that keeps working on its own is, I think, the ultimate toy. </p><p>So if you want to make a dent in the software industry and you're wondering if AI will get you out of the picture, don't worry. That won't happen anytime soon. Learn to code, learn the fundamentals, but also learn how to use these new tools. As in every moment in human history, if you apply yourself and do your best, you will be at the top of the league, and there will be a spot for you.</p>]]></content:encoded></item><item><title><![CDATA[Understanding Large Language Models]]></title><description><![CDATA[What is a LLM, how do you build one, and what can you do with it.]]></description><link>https://blog.apiad.net/p/understanding-large-language-models</link><guid isPermaLink="false">https://blog.apiad.net/p/understanding-large-language-models</guid><dc:creator><![CDATA[Alejandro Piad Morffis]]></dc:creator><pubDate>Wed, 19 Mar 2025 11:03:18 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!2z2O!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c8d00b4-57a2-4fc4-8306-415365915d1d_1024x608.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote><p>The following article is extracted from Chapter 1 of <a href="https://store.apiad.net/l/ai/fiftyoff">Mostly Harmless AI</a>, a 160-page book on LLMs and everything you can, and cannot do with them. The book is in beta stage, meaning it has basically the final structure and content, but major revisions are still in progress. You <a href="https://store.apiad.net/l/ai/fiftyoff">can get it today at a 50% discount</a> and ensure access to all future versions, including huge discounts on printed versions, as well as a community of like-minded readers. </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_!2z2O!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c8d00b4-57a2-4fc4-8306-415365915d1d_1024x608.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2z2O!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c8d00b4-57a2-4fc4-8306-415365915d1d_1024x608.png 424w, https://substackcdn.com/image/fetch/$s_!2z2O!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c8d00b4-57a2-4fc4-8306-415365915d1d_1024x608.png 848w, https://substackcdn.com/image/fetch/$s_!2z2O!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c8d00b4-57a2-4fc4-8306-415365915d1d_1024x608.png 1272w, https://substackcdn.com/image/fetch/$s_!2z2O!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c8d00b4-57a2-4fc4-8306-415365915d1d_1024x608.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2z2O!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c8d00b4-57a2-4fc4-8306-415365915d1d_1024x608.png" width="728" height="432.25" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2c8d00b4-57a2-4fc4-8306-415365915d1d_1024x608.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:608,&quot;width&quot;:1024,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!2z2O!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c8d00b4-57a2-4fc4-8306-415365915d1d_1024x608.png 424w, https://substackcdn.com/image/fetch/$s_!2z2O!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c8d00b4-57a2-4fc4-8306-415365915d1d_1024x608.png 848w, https://substackcdn.com/image/fetch/$s_!2z2O!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c8d00b4-57a2-4fc4-8306-415365915d1d_1024x608.png 1272w, https://substackcdn.com/image/fetch/$s_!2z2O!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c8d00b4-57a2-4fc4-8306-415365915d1d_1024x608.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><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 tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><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><h2><strong>What is a (Large) Language Model?</strong></h2><p>In machine learning, language modelling means guessing <em>how likely a given sentence is</em>.</p><p>For example, "the sun rises in the east and sets in the west" is a typical sentence with a high subjective probability. You would probably agree this is a sentence you&#8217;re likely to hear at least one. But a sentence with random words that don't mean anything has a low probability of ever being uttered by anyone, or written in a book.</p><p>Language modelling can be tricky because it's hard to say how likely a sentence is to &#8220;exist&#8221;. What does it even mean? In machine learning, we use a collection of texts called a corpus to help with this. Instead of the abstract, ontological question, we might ask something much more straightforward: How likely is it for <em>this</em> sentence to appear in all the written text, for example, on the internet?</p><p>However, if we only looked at sentences that already exist on the internet, language modelling wouldn't be very useful. We'd just say a sentence is either there or not, with a probability of 0 or 1. So instead, we can think about it in statistical terms like this: <em>If the internet was made and erased many times, how often would this sentence show up</em>?</p><p>To answer this question, we can think about whether a word will likely come after a group of words in a sentence. For example, "The sun rises in the east and sets in the..." What word would most likely come next? We want our language model to be able to guess that word.</p><p>Thus, we need to know how often a given word appears after a group of words. If we can do that, we can find the best word to complete the sentence. We keep doing this repeatedly to create sentences, conversations, and even full books.</p><p>Now, let's talk about the most common way to make this language modelling program work in practice. It's called statistical language modelling. We start with lots of text and learn how words correlate with other words. That is, we estimate the correlation of each word with a given context.</p><p>In simple terms, a context is a group of words around a specific word in a sentence. For example, in the sentence "the sun rises in the east and sets in the west," the word "east" is in the context of "{ the, sun, rises, and, sets }." If we look at many sentences, we can find words that are often in the same context. This helps us understand which words are related to each other.</p><p>For example, if we see "the capital of France is Paris" and "the capital of the United States is Washington," we can learn that Paris and France, as well as Washington and the United States, are related. They have the same relationship: being the capital of a country. We might not know what to call this relationship, but we can know it's the same type.</p><p>Statistical language modelling is thus making a model that can guess how often a word appears in a certain context, by using lots of data. This doesn't necessarily mean it truly understands the meaning of a sentence. But if we use enough data, it starts to look like the model can indeed capture at least some of the semantics.</p><h3><strong>The Simplest Language Model: N-grams</strong></h3><p>We've been building statistical language models since the early days of AI. The n-gram model is one of the simplest ones, storing the probability of each n-gram's occurrence. An n-gram is a collection of n words that appear together in common sentences. For example, in a 2-gram model, we count how many times pairs of words appear together in a large corpus, creating a table showing their frequency.</p><p>As we increase the n-grams to 3, 4, or 5, the collection of all n-grams becomes extremely large. Before the deep learning revolution, Google built a massive n-gram model from the entire internet with up to 5-grams. However, since the combination of all 5 words in English is huge, it only stored probabilities for the most common combinations.</p><p>This simple model counts words in a strict context when they're within a specific window size. It's very explicit, as each n-gram's probability or frequency is recorded. To compress this model further, we use <em>embeddings</em>.</p><h3><strong>Word Embeddings</strong></h3><p>An embedding is a mapping of some object&#8212;say, a word&#8212;to an n-dimensional vector of real numbers. Embeddings aim to transform semantic properties from an original space&#8212;i.e., words&#8212;into numerical properties of the embedding space. That is, we want words that occur together in context to map to similar vectors and form clusters in the embedding space.</p><p>Word2Vec, in 2011, was the first massively successful use of embeddings. Google trained a large embedding model using statistics from text all over the internet and discovered an amazing property: directions in the embedding space can encode semantic properties.</p><p>For instance, if you go take <code>France</code> and <code>Paris</code>, the vector needed to add to the word &#8220;France&#8221; to reach &#8220;Paris&#8221; is similar to the vector needed to add to the word &#8220;United States&#8221; to reach &#8220;Washington&#8221;. The semantic property <code>has-capital</code> was encoded as a specific direction in this space. Many other semantic properties were found encoded this way, too.</p><p>This was an early example of how encoding words in a dense vector space can capture some of their semantics.</p><h3><strong>Contextual Word Embeddings</strong></h3><p>The issue with Word2Vec is its assignment of a unique vector to each word, regardless of context. As words have different meanings in different contexts, many attempts were made to create contextual embeddings instead of static ones. </p><p>The most successful attempt is the transformer architecture, with BERT being the first example. The first transformer paper revolutionized natural language processing in artificial intelligence, providing a single tool to tackle various NLP problems.</p><p>A transformer is a neural network that generates a embedding of each word in the input text by considering the entire content of the input. This means each word's embedding changes according to its context. Additionally, a global embedding for an entire sentence, paragraph, or general fragment of text can be computed. </p><p>Why does this matter? Neural networks are among the most powerful machine learning paradigms. We can find embeddings for text, images, audio, categories, and programming code using a single representation. This enables machine learning across multiple domains using a consistent approach.</p><p>With neural networks, you can transform images to text, text to image, text to code or audio, etc. The first idea of the transformer was to take a large chunk of text, obtain an embedding, and then use a specific neural network for tasks like text classification or translation. But then, you can build sequence-to-sequence architectures that allow a neural network to receive a chunk of text, embed it into a real-value vector, and generate a completely different chunk of text from it.</p><p>For example, you can encode a sentence in English with a transformer that embeds it into a real-value vector and then decode it with another transformer that &#8220;speaks&#8221; French. The real-value vector in the middle represents the meaning of the text independent of language. So, you can have different encoders and decoders for various languages and translate any language pair.</p><p>A remarkable phenomenon is that you can train embedings in pairs of languages like English-Spanish and German-French and then translate from English to French without ever training on translations from English to French. This is due to using a shared internal representation for all languages. The sequence-to-sequence transformer is a fundamental piece behind technologies like ChatGPT. The next step is training it on massive amounts of text and then fine-tuning it for specific tasks.</p><h3><strong>Large Language Models</strong></h3><p>Large language models are the latest development in statistical language modelling, evolving from N-Gram models, embeddings, and transformers. Thanks to innovations that efficiently accommodate thousands of words in memory, these advanced architectures can compute contextual embeddings for extensive text contexts. This capacity has increased continuously, with the first version of ChatGPT holding something like 4000 words, while recent models hold anything from 30 thousand to a couple million words in the context!</p><p>A significant change is the scale of data on which these models are trained. BERT was trained on a vast dataset for its time, but it pales in comparison to GPT-2, 3, and 4. Large language models learn from a massive amount of internet text, including technical texts, books, Wikipedia articles, blog posts, social media, news, and more. This exposure to diverse text styles and content allows them to understand various mainstream languages.</p><p>Large language models, like GPT-2, generate text by predicting the next word in a sentence or paragraph, just like all previous language models. But when you combine the massive scale of the data and computational resources put into making these beasts of language models, and some clever tricks, they become something completely beyond what anyone thought possible.</p><p>GPT-2 was a huge leap forward in terms of coherent text generation. Given an initial prompt&#8212;say, the introductory paragraph of a fictional story&#8212;the model would generate token after token creating a mostly coherent story full with fictional characters and a plot. After a while it would start to diverge, of course, but for short fragments of text, this was already mindblowing.</p><p>However, things really exploded with GPT-3. At this size, emerging capabilities like "in-context learning" appeared, and this is where our story really begins.</p><h2><strong>How do LLMs work?</strong></h2><p>A generative language model, at its core, is just a statistical machine learning model trained to predict the continuation of a text sequence. Essentially, it's a prediction machine. You input a text prefix, run it through the model, and receive the most likely next token--a token is more or less a word or component of a word.</p><p>Actually, you don't really get just the next most likely token. The model provides a distribution across all possible tokens, giving you the probability of each one being the next continuation.</p><p>To use an LLM, we start with user input, like a query or text prefix, and run the model to get the next input token. We append it to the sequence and repeat the whole process until reaching a maximum number of tokens or the model predicts a special <code>STOP</code> token.</p><p>There are choices to make in this process. Choosing only the most likely continuation can quickly lead to repetitive predictions. Instead, you can choose from the top 50 most likely tokens at random, weighted by their probability. This injects some variety in the generated and is the reason why, for the same prompt, you can get different albeit semantically similar responses.</p><p>There are a few key parameters in this sampling process: the top K tokens to choose, the cumulative probability, and the temperature, which is the most relevant. The temperature is a parameter that affects the weights of the tokens you will pick for continuation. If the temperature is 0, you'll usually choose the most likely token. If it's higher, probabilities are smoothed out, making it more likely to choose less probable tokens. This increases the model's variability.</p><p>That's why some call high-temperature "creative mode" and low-temperature "precise mode." It has nothing to do with actual precision or creativity, just how deterministic the response to a given prompt will be.</p><p>From this perspective, you can already see why some people say language models are "just autocomplete on steroids". Indeed, that is the gist of their mechanics: you're completing a text sequence by adding one token at a time until you decide to stop. However, this is just scratching the surface. There is so much more involved in getting these models to behave in a useful way, and we will talk about some of those aspects in the next section.</p><p>But before moving on, here is a key insight from this explanation of how LLMs work: <strong>A language model always performs a fixed amount of computation per token</strong>.</p><p>This means that whatever limited form of "reasoning" can happen in an LLM, the depth and complexity of that reasoning is directly proportional to the number of total tokens the model processes. This implies two things:</p><p>If the input prompt is larger, the model will perform more computation before starting to compute its answer. This is part of the reason why more detailed prompts are better. But crucially, if the output is larger, the model is also doing more computation.</p><p>This is why techniques like chain-of-thought&#8212;and basically anything that makes a model "talk more"&#8212;tend to improve their performance at some tasks.</p><p>They have more compute available to do whatever reasoning they can do. If you ask a model a quick question and instruct them to give a one-word answer, the amount of compute spent producing that answer is proportional to just the input size. But if you ask the model to produce a step-by-step reasoning of the answer before the final answer, there is a higher chance you'll get a better answer just by virtue of spending more computation.</p><p>At the risk of anthropomorphizing too much, I like to summarize this insight as follows: LLMs only think out loud. If you want them to think better, get them to talk more.</p><p>So, this is how a language model works from a user perspective. Let's see how you build one.</p><h2><strong>How to Train your Chatbot</strong></h2><p>How do you make your language model work? There are three main steps.</p><h3><strong>Pre-training</strong></h3><p>The first step is called self-supervised pretraining. In this step, you take a raw transformer architecture with uninitialized weights and train it on a massive amount of data to predict the next token. You use a large corpus of data, such as news, internet blog posts, articles, and books, and train the model on trillions of words.</p><p>The simplest training method is next token prediction. You show the model a random text and ask it what the next token is. Take a random substring from the dataset, remove the last token, show the prefix to the model, and ask for likely continuations. Compute a loss function to determine how mistaken the model was in its predictions and adjust it slightly to improve future predictions.</p><p>So far, this is a standard machine learning approach. We call it self-supervised learning because the targets are not given by humans, but chosen automatically from the input. But deep down, this is just supervised learning at scale.</p><p>Now, that being said, scaling this training process to billions of parameters and trillions of tokens presents a massive engineering challenge. No single supercomputer in the world can handle training GPT-4 from scratch, so you must resort to distributed systems to split the model across used across hundreds or thousands of GPUs for extended periods of time, synchronizing different parts of the model across multiple computers is crucial for efficient training. This just means, while the conceptual part of training an LLM is pretty straightforward, it is nothing short of an engineering prowess to get build like GPT-4.</p><p>Once pre-training is completed, you have what is called a "base model", a language model that can continue any sentence in a way that closely resembles existing text. This model is already extremely powerful. Give it any prefix of text with any content whatsoever and the model will complete it with a mostly coherent continuation. It's really autocompletion on steroids!</p><p>However, these base models, as powerful as they are, are still very hard to prompt. Crucially, they do not understand precise instructions, mostly because their training data doesn't contain a lot of examples of instructions. They are just stochastic parrots, in a sense. The next step is to get tame them.</p><h3><strong>Instruction tuning</strong></h3><p>At this point, the LLM already has all the knowledge in the world somewhere hidden in its weights--metaphorically speaking--but it is very hard to locate any concrete piece of knowledge. You must juggle with transforming questions into the right prompts to find a pattern that matches what the model has seen.</p><p>The way to solve this problem is to include another training phase, but this time much shorter and focused on a very well-curated dataset of instructions and responses. Here, the quality is crucial, much more than the quantity. You won't teach the model anything new, you will just tune it to expect instruction-like inputs and produce answer-like outputs.</p><p>Once finished, you have what's called an instruction-tuned model. These models are much more robust and easy to prompt compared to the base model, and this is the point where most open-source models end. But this is not the end of the story.</p><p>Instruction-tuned models are still not suitable for publicly-facing products for one crucial reason: they can be coerced into answering anything at all, including producing biased, discriminatory, or hate speech and instructions on how to build bombs and deadly poisons.</p><p>Given base models are trained on the whole Internet, they are full of all the good and bad you can read online--although some effort is put into cleaning the pretraining dataset, but it's never enough. We must teach the model that some questions are better left unanswered.</p><h3><strong>Preference tuning</strong></h3><p>The final step is to fine-tune the model to produce answers that are more closely aligned with user preferences. This can and is primarily used to avoid biased or hate speech, and to reject any questions that are deemed unethical by the developers training the model. However, it also has the effect of making the model more polite in general, if you wish so.</p><p>The way this process works is to turn the problem from supervised learning into the real of reinforcement learning. In short, the main difference is that, while in supervised learning we give the model the correct answers (as in instruction tuning), in reinforcement learning we don't have access to ground truth answers.</p><p>Instead, we use an evaluator that ranks different answers provided by the LLM, and a feedback loop that teaches the LLM to approximate that ranking. In its original inception, this process was performed with a human evaluator, thus giving raise to the term "reinforcement learning with human feedback", but since including humans makes this process slower and more more expensive, smaller organizations have turned to using other models as evaluators.</p><p>For example, if you have one strong model, like GPT-4, you can use it to rank responses by a smaller, still in-training model. This is one example of a more general concept in machine learning called "knowledge distillation" in which you attemp to compact the knowledge of a larger model into a smaller model, gaining in efficiency without sacrificing too much in performance.</p><p>And finally, we have now something that works like GPT-4. The process was long and expensive: a massive pretraining following by a carefully curated instruction tuning and a human-backed preference tuning. This is the reason why so few organizations have the resources to train a state-of-the-art large language model.</p><h2><strong>What can LLMs do?</strong></h2><p>Now that we understand how language models are built, let's turn our attention to their capabilities. As we've seen so far, base models are, ultimately, just autocompletion models. Given an initial prefix, they can produce a mostly coherent continuation that is plausible as far as the data and the training procedure allow.</p><p>But autocompletion is far from the only task you can do with LLMs. As we will see in this chapter, a sufficiently powerful autocompletion engine can be coerced into performing many disparate tasks. Combine this with task-specific fine-tuning, and you can turn a chatty, hallucination-prone LLM into a powerful tool for many domains.</p><p>We will start by examining what base models can do since, ultimately, all fine-tuning can do is unlock existing capabilities, making them easier to prompt. Then, we will survey many specific tasks for which LLMs can and have been used.</p><h3><strong>What can base models do?</strong></h3><p>As cool as it sounds, autocompletion on steroids doesn't ring like anything smart, right? Well, it turns out that if you are very, very good at completing any text prefix, that implies you must be good at a wide range of cognitive tasks.</p><p>For example, suppose you want to build a question-answering engine. Take a question like "Who is the current president of the United States" and turn it into a prompt like "the current president of the United States is...". If you feed this to a powerful base LLM, the most likely continuation represents the correct answer to the question. This means autocomplete on steroids gives you question answering for free.</p><p>And you can do this for a whole lot of tasks. Just turn them into an appropriate prefix and continuation. Do you want to translate a sentence? Use the prompt like "An English translation of the previous sentence is..." Do you want to summarize a text? Use a prompt like "A summary of the previous text is..." You get the point.</p><p>But it goes much further than that! The scientists at OpenAI discovered that models the size of GPT-3 and above were capable of inferring the semantics of a task given examples without explicitly telling them what the task was. This is called in-context learning, and it works wonders. For example, if you want to use an LLM for sentiment analysis, you can use a prompt like the following.</p><pre><code>Comment: This movie was so good!
Sentiment: Positive

Comment: This movie really sucks.
Sentiment: Negative

Comment: The book was better.
Sentiment: Neutral

Comment: I couldn't stop looking at the screen!
Sentiment:</code></pre><p>That is, you build a prompt with a few examples of inputs and outputs and feed that to the LLM, leaving the last input unanswered. The most likely continuation is the right answer to the last input, so provided the base model has seen similar tasks in its training data, it will pick up the pattern and answer correctly most of the time.</p><p>In-context learning is a surprising discovery at first, but when you look deep down, it makes total sense. Since base LLMs are completion machines, provided they have seen examples of some arbitrary task in their training set, all you need to do is come up with a text prefix that makes the model "remember" that task. And that prefix is often just a set of examples of a given task because that is actually what is stored in the LLM weights: a loosely and implicitly connected set of similar text fragments.</p><p>In a sense, the input to the LLM is a key to retrieving a part of its training set, but not in an accurate way. Since LLMs only store correlations between words, anything you "retrieve" from an LLM is a fuzzy approximation and aggregation of several (possibly millions) of similar training examples. For this reason, we say base models already "know" everything, but it's very hard for them to "remember" it, because you have to find the right key--i.e., the right context prefix.</p><p>But what if we could teach the LLM that some arbitary instruction is equivalent to the right key for a given task? That is exactly what instruction tuning is about. By showing the LLM input/output pairs of, this time, precise instructions and the corresponding answer, we are rewiring some of its parameters to strengthen the correlation between the instruction and the response. </p><p>In a sense, fine-tuning is like finding a path between the input space and the output space in the base model's fuzzy web of word correlations and connect those two subspaces of words with a shortcut, so next time you input the instruction, the LLM will "remember" where is the appropriate answer.</p><p>If this sounds overly anthropomorphic, it is because we have stretched the analogies a bit to make it easier to understand. In reality, there is no "remembering" or "knowing" happening inside a large language model, at least not in any way akin to how human memory and reasoning work. I have written extensively about this difference and its implications and will continue to do so in future posts.</p><p>For the time being, please be cognizant that any analogy between LLMs and human brains is bound to break pretty soon and cause major misunderstandings if taken too seriously.</p><h2><strong>Use cases for fine-tuned LLMs</strong></h2><p>With proper fine-tuning in a concrete domain, you can turn LLMs into task-specific models for a huge variety of linguistic problems. In this section, we'll review some of the most common tasks for which LLMs can be deployed.</p><p>When discussing the use cases of fine-tuned LLMs, we don't talk about an "input prefix" anymore because even if, technically, that is still what we are feeding the LLM, the response is not necessarily a direct, human-like continuation of the text. Instead, depending on which dataset it was fine-tuned, the LLM will respond with something that looks more like an answer to a question or an instruction than a pure continuation. Actually, if you give a fine-tuned LLM like GPT-4 an incomplete text prefix, it will often reply back with something like "I didn't understand you entirely, but it appears what you are trying to do is [...]" instead of casually continuing where you left.</p><p>Thus, it is often best to interpret this process as "prompting" the LLM with an instruction, and this is the reason why the input text is called a "prompt", and the process of designing, testing, and optimizing these prompts is called, sometimes undeservedly, "prompt engineering".</p><h3><strong>Text generation</strong></h3><p>The simplest, most straightforward use case for large language models is of course text generation, whether for fictional content as for technical articles, office work, homework, emails, and anything in-between. But instead of using a base model, where you have to provide a prefix to continue, an instruction-tuned model can be instructed directly to write a paragraph, passage, or even a short essay on a given topic. Depending on how powerful and well-trained the model is, you can even provide hints about the intended audience, the complexity of the language to use, etc.</p><p>Text generation--and all instructions in general--often works better the more descriptive the prompt. If you simply ask the LLM to "tell me a fairy story", yes, it will come up with something plausible, and it might even surprise in the good way. But you most likely want to have finer control over the result, and thus crafting a well-structured and informative prompt is crucial. In @sec-prompting we will learn the most basic strategies to create effective prompts.</p><p>A common issue in text generation, especially in longer formats, is that the LLM can and will often steer away from the main points in the discourse. The longer the response, the most likely some hallucinations will happen, which may be in the form of incoherent or plain contradictory items, e.g., characters acting "out of character" if you're generating fiction.</p><p>A battle-tested solution for generating coherent, long-form text is the divide-and-conquer approach. Instead of asking for a full text from the begining, prompt the LLM to first generate an outline of the text, and then, sequentially, ask it to fill in the sections and subsections, potentially feeding it with previously generated content to help it mantain consistency.</p><h3><strong>Summarization</strong></h3><p>Summarization is one of the most common and well-understood use cases of LLMs. In a sense, it is a special case of text generation--what isn't, right?--but it has specific quirks that merit a separate discussion. In general, LLMs excel at summarizing. After all, that's what they've been implicitely trained to do: construct a statistical model of the whole internet, which is rather, in a sense, a summary of the whole human knowledge.</p><p>However, summarization isn't a trivial problem. Besides the usual concerns about the audience, complexity of the language, style, etc., you will probably also want to control which aspects of the original text the LLM focuses on. For example, rather than a simple compactation of the text, you might want a summary that emphasizes the consequences of whatever is described in the original text, or that highlights and contrasts the benefits and limitations. This is a more abstract form of summary that produces novel value, beyond just being a shorter text.</p><p>There are important caveats with summarization, though. LLMs are very prone to hallucination, and the more you push the boundary between a plain summary and something closer to critical analysis, the more the LLM will tend to ignore the original text and rely on its own pre-trained knowledge.</p><p>And just like before, the best way to counteract any form of rebellious generation is to be very intentional in your prompt and make it as structured as necessary. For example, you can first ask the LLM to extract the key points, advantages, and limitations. Then, ask it to cluster the advantages and limitations according to your criteria. Only then can we ask it to provide a natural language summary of that semi-structured analysis. This gives you finer control over the end result and will tend to reduce hallucinations while being easier to debug since you can see the intermediate steps.</p><h3><strong>Translation &amp; style transfer</strong></h3><p>The text-to-text transformer architecture (the precursor and core component of the modern language model) was originally designed for translation. By encoding the input sentence into a latent space of word correlations detached from a specific language and then decoding that sentence in a different vocabulary, these models achieved state-of-the-art translation in the early 2018s. The more general notion of style transfer is, deep down, a translation problem, but instead of between English and French, say, between technical and plain language.</p><p>Modern LLMs carry this capability, and will be more than enough for many practical translation tasks. However, beware that plenty of studies show that LLM translation are often poorer in many linguistic notions from professional translations. Translation is an art, as much or more than it is a science. It involves a deep knowledge of the cultural similarities and differences between readers of both languages, to correctly capture all the nuances that even a seemingly simple phrase can encode.</p><p>That being said, LLMs can help bridge the gap for non-native speakers in many domains where you don't need--or can't hope for--a professional translation. An example is inter-institutional communication, e.g., emails from co-workers who don't speak your native language. In these cases, you must also be careful nothing important is lost in translation, literally, but as long as everyone is aware of the limitations, this is one of the most practical use cases for LLMs.</p><h3><strong>Structured generation</strong></h3><p>Continuing with the topic of text generation capabilities, our next stop is generation from structured data. This is one specific area where LLMs come to mostly solve a long-standing problem in computer science: to generate human-sounding explanations of dry, structured data.</p><p>Examples of this task are everywhere. You can generate a summary of your calendar for the day, and pass it to a speech synthesis engine, so your personal assistant can send you every morning an audio message reminding you what you have to do, with cute linguistic cues like "Oh, and on the way to the office, remember to pick up the your wife's present." We will see an example of this functionality in @sec-planner.</p><p>Other examples include generating summaries of recent purchases for a banking app or product descriptions for an online store&#8212;basically anywhere you'd have a dashboard full of numbers and stats, you can have an LLM generate a natural language description of what's going on. You can pair this capability with the super skills LLMs have for question answering (at least when the answer is explicit in the context) to construct linguistic interfaces to any of number of online services or apps.</p><h3><strong>Text classification</strong></h3><p>Text classification is the problem of categorizing a text fragment&#8212;be it a single sentence, a whole book, or anything in between&#8212;into one of a fixed set of categories. Examples vary from categorizing comments as positive/neutral/negative, determining if an email is spam or not, or detecting the tone and style of a text, to more specific tasks like extracting the intended intention from a user, e.g., chatting with an airline bot.</p><p>To have an LLM correctly and robustly classify your text, it is often not enough to just instruct it and provide the intended categories. The LLM might come up with a new category you didn't mention just because it makes sense in that context. And negative instructions, in general, don't work pretty well. In fact, LLMs are lousy at interpreting negative instructions precisely because of the underlying statistical model. We will see in @sec-reasoning why this is the case.</p><p>Instead of a dry, zero-shot instruction, you can improve the LLM classification capabilities substantially with a few examples (also called a k-shot instruction). It works even better if you select the examples dynamically based on the input text, a procedure that eerily similar to k-NN classification but in the world of LLMs. Furthermore, many LLMs tend to be chatty by design, and will often fail to provide a single word classification even if you instruct it to. You can mitigate this by using a structured response prompt, as seen in @sec-prompting.</p><h3><strong>Structured data extraction</strong></h3><p>A generalization of text classification is the problem of structured data extraction from natural language. A common example is extracting mentions of people, dates, and tasks in a text, for example, a transcription from a video meeting. In the more general case, you can extract any entity-relation schema from natural text and build a structured representation of any domain.</p><p>But this capability goes much further. If you have any kind of structured input format--e.g., an API call for any online service--you can instruct (and probably k-shot) an LLM to produce the exact JSON-formatted input given a user query. This is often encapsulated in modern LLM providers i a functionality called "function calling", whic which we will explore in @sec-function-calling.</p><p>As usual, the main caveat with structured generation is the potential for subtle hallucinations. In this case they can be in two forms. The simplest one, when the LLM fails to produce the expected format by, e.g., missing a key in JSON object or providing an invalid type. This type of error is what we call a syntactic hallucination and, although anoying, is often trivial to detect and correct, even if just by retrying the prompt.</p><p>The second form of hallucination is much more insidious: the response can be in the right format, and all values have the right type, but they don't match what's in the text. The LLM hallucinated some values. The reason this is a huge problem is because detecting this form of semantic hallucination is as hard to solve as hallucinations in general. As we'll see in @sec-hallucinations, we simply have no idea how to ensure an LLM always produce truthful responses, and it might be impossible even in principle.</p><h3><strong>Question answering</strong></h3><p>Question answering is one of the most surprising capabilities of sufficiently large language models. To some extent, question answering can be seen as a form of retrieval, where you ask about some facts explicitly mentioned in the training set. For example, if you ask, "Who wrote The Illiad" it is not surprising, given what we know of LLMs, that a fine-tuned model can easily generate "Homer" as the most plausible response. The sentence "Homer wrote The Illiad" must have appeared thousands of times in different ways in the training set.</p><p>But modern LLMs can go way beyond simply retrieving the right answer to a trivia question. You can ask questions that involve a small set of reasoning steps, combining facts here and there to produce a response that is not, at least explicitly, in the training set. This is rather surprising because there is no explicit reasoning mechanism implemented in LLMs. All forms of reasoning that can be said to happen are an emergent consequence of learning to predict the next token, and that is at least very intriguing.</p><p>In any case, as I&#8217;ve argued many times, the statistical modelling paradigm has some inherent limitations that restrict the types of reasoning that LLMs can do, even in principle. This doesn't mean that, in practice, it can't work for the types of problems you encounter. But in its most general form, long-term reasoning and planning are still an open problem in artificial intelligence. I don't think LLMs alone are equipped to solve it.</p><p>You can, however, plug LLMs with external tools to enhance its reasoning skills. One of the most fruitful research lines is to have them generate code to solve a problem, and then run it, effectively making LLMs Turing-complete, at least in principle, even if in practice they may fail to generate the right code. Which leads us to the next use case.</p><h3><strong>Code de generation</strong></h3><p>Since LLMs are trained to autocomplete text, it may not be that surprising that, when feed with enough training examples of code in several programming languages, they can generate small snippets of mostly correct code. However, for anyone who codes, it is evident that writing correct code is not as simple as just concatenating plausible continuations. Programming languages have much stricter syntax rules that require, e.g., to close all parenthesis and to use explicit and very tight naming conventions. Failing to produce even a single semicolon in the right place can render a program unusable.</p><p>For this reason, it is at least a bit surprising that LLMs can code. More surprising still is that they can not only autocomplete existing code but generate code from scratch given natural language instructions. This is one of the most powerful capabilities in terms of integrating LLMs with external tools because code is, by definition, the most general type of external tool. There is nothing you can do on a computer that you can't do with code.</p><p>The simplest use case in this domain is, of course, using LLMs as coding assistants embedded in developer tools like code editors. But this is just scratching the surface. You can have an LLM generate code to solve a problem it would otherwise fail to answer correctly--e.g., perform some complex physics computations. Code generation allows an LLM to analyze large collections of data by computing statistics and running formulas. You can even have an LLM generate the code to output some chart, and voil&#225;, you just taught the LLM to draw!</p><h3><strong>Code explanation</strong></h3><p>Code explanation is the inverse problem of code generation: given some existing code, produce a natural language explanation or, more generally, answer questions about it. In principle, this is a form of question-answering that involves all the caveats about complex reasoning we have already discussed. But it gets harder.</p><p>The problem is the majority of the most interesting questions about code cannot be answered in general: they are <em>undecidable</em>, meaning no algorithm can exist that will always produce the correct response. The most poignant example is the question, "<em>Does this function ever returns?</em>". This is the well-known Halting problem, the most famous problem in computability theory, and the grandfather of all undecidability results. Similar questions, such as whether a variable is ever assigned or a method is ever called, are also undecidable in the general case.</p><p>And this is not just a theoretical issue. The Halting problem highlights one crucial aspect of computation: <em>in the general case, you cannot predict what an algorithm will do without running it</em>. However, in practice, as anyone who codes knows, you can predict what lots of your code will do, if only because it is similar to code you've written before. And this is where LLMs shine: learning to extrapolate from patterns to novel specific instances, even if the general problem is unsolvable.</p><p>To top it all, we can easily imagine an LLM that, when prompted with a question that seemingly cannot be answered from the code alone, could decide to run the code with some specific parameters and observe its results, drawing conclusions not from the syntax alone but from the execution logs. A debugging agent, if you will.</p><h2><strong>Final Remarks</strong></h2><p>These are the most essential high-level tasks where LLMs can be deployed, but they span hundreds, if not thousands, of potential applications. Text classification, for example, covers a wide range of applications, just changing the classification target.</p><p>One conclusion you can draw from this chapter is that LLMs are some of the most versatile digital technologies we've ever invented. While we don't know if artificial general intelligence is anywhere near, we're definitely one step closer to general-purpose AI&#8212;models that can be easily adapted to any new domain without research or costly training procedures.</p><p>However, language modelling is not magic. The above discussion has already given us a glimpse of some of this paradigm's fundamental limitations. In future posts, we will explore how these models learn compared to humans and what this difference entails regarding their limitations.</p><p>If you want to know more about language modelling in general, and LLMs in particular, feel free to check <a href="https://store.apiad.net/l/ai/fiftyoff">Mostly Harmless AI</a>. It&#8217;s jam-packed with information (most of which is published in this blog already) on the good and the ugly parts of LLMs, and lots of advice on how to get the best out of them.</p>]]></content:encoded></item><item><title><![CDATA[The Insurmountable Problem of Formal Reasoning in LLMs]]></title><description><![CDATA[Or why LLMs still can't, and probably never will be able to fully reason.]]></description><link>https://blog.apiad.net/p/reasoning-llms</link><guid isPermaLink="false">https://blog.apiad.net/p/reasoning-llms</guid><dc:creator><![CDATA[Alejandro Piad Morffis]]></dc:creator><pubDate>Mon, 03 Mar 2025 12:03:44 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!F5iS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdae115cb-410c-4985-8385-464b777aecba_1024x608.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote><p><em>Welcome to another issue of <strong><a href="https://blog.apiad.net/s/mostly-harmless-ai">Mostly Harmless AI</a></strong>, the section of <strong><span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;The Computist Journal&quot;,&quot;id&quot;:1005318,&quot;type&quot;:&quot;pub&quot;,&quot;url&quot;:&quot;https://open.substack.com/pub/apiad&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/582c72c0-c120-4ea8-ae6b-376a025250bb_1024x1024.png&quot;,&quot;uuid&quot;:&quot;6e27b463-1abe-4c27-bbab-3530bd12f45c&quot;}" data-component-name="MentionToDOM"></span></strong></em> <em>where I share educational articles for the general audience on the potential and limitations of Artificial Intelligence. This article is a bit of a mashup of several past articles, with new insights and much better organization. It is my attempt to put a final dot in the discussion of whether LLMs can or cannot reason&#8212;at least for a while. I hope you enjoy it.</em></p><p><em>This article first appeared in <strong><span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;AI Supremacy &quot;,&quot;id&quot;:396235,&quot;type&quot;:&quot;pub&quot;,&quot;url&quot;:&quot;https://open.substack.com/pub/aisupremacy&quot;,&quot;photo_url&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/c548f8c4-823b-4a2a-b499-528f9a84cb5c_215x215.png&quot;,&quot;uuid&quot;:&quot;61edbf9c-ee96-47e0-abe5-fb93539939bd&quot;}" data-component-name="MentionToDOM"></span></strong>, a newsletter hosted by <strong><span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Michael Spencer&quot;,&quot;id&quot;:21731691,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F75d1bf99-dcf3-4af6-be2a-416c08c954a1_450x450.jpeg&quot;,&quot;uuid&quot;:&quot;f5ed5f55-dc8c-4ddc-870e-6fd120c7f72d&quot;}" data-component-name="MentionToDOM"></span></strong> that offers deep dives into recent AI topics, and much more. Please check the original article for additional insights and opinions from Michael.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.ai-supremacy.com/p/the-insurmountable-problem-of-formal-cab&quot;,&quot;text&quot;:&quot;See the original article&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.ai-supremacy.com/p/the-insurmountable-problem-of-formal-cab"><span>See the original article</span></a></p><p><em>This version has only minor syntax and grammar fixes.</em></p><p><em>&#8212; Alejandro</em></p></blockquote><div><hr></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!F5iS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdae115cb-410c-4985-8385-464b777aecba_1024x608.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!F5iS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdae115cb-410c-4985-8385-464b777aecba_1024x608.png 424w, https://substackcdn.com/image/fetch/$s_!F5iS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdae115cb-410c-4985-8385-464b777aecba_1024x608.png 848w, https://substackcdn.com/image/fetch/$s_!F5iS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdae115cb-410c-4985-8385-464b777aecba_1024x608.png 1272w, https://substackcdn.com/image/fetch/$s_!F5iS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdae115cb-410c-4985-8385-464b777aecba_1024x608.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!F5iS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdae115cb-410c-4985-8385-464b777aecba_1024x608.png" width="1024" height="608" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dae115cb-410c-4985-8385-464b777aecba_1024x608.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:608,&quot;width&quot;:1024,&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;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!F5iS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdae115cb-410c-4985-8385-464b777aecba_1024x608.png 424w, https://substackcdn.com/image/fetch/$s_!F5iS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdae115cb-410c-4985-8385-464b777aecba_1024x608.png 848w, https://substackcdn.com/image/fetch/$s_!F5iS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdae115cb-410c-4985-8385-464b777aecba_1024x608.png 1272w, https://substackcdn.com/image/fetch/$s_!F5iS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdae115cb-410c-4985-8385-464b777aecba_1024x608.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><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 tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><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>Reasoning models are the latest trend in AI. </p><p>It all began with OpenAI o1, a model designed to "think out loud" before arriving at answers, mimicking human thought processes in an almost uncanny way. Then came DeepSeek R1, which has garnered massive attention for its impressive performance in reasoning tasks, which sent shock waves across the whole AI industry and sparked a few conspiracy theories. </p><p>And now we're seeing the upgrade from o1 to o3 in real-time (yes, these people are really bad at naming things), another reasoning model from China, and Google and Meta throwing their hats into the fight. Everyone runs to get their "reasoning" model out as quickly as possible.</p><p>For many, these models seem to be more than just iterations of the previous paradigm; they represent a qualitative leap, particularly in tackling challenges that require logical reasoning. Across many complex benchmarks, reasoning-enhanced models have shown impressive accuracy at the cost of increased response time, which seems like a fair deal.</p><p>The big shift is trading more computation during inference&#8212;making the model "think out loud" for, sometimes, several minutes before deciding on an answer&#8212;for a decreased rate of hallucinations and reasoning mistakes and an improved capacity for producing long chains of mostly sound logical arguments to arrive at a non-trivial (read, pattern-matched) answer.</p><p>However, despite their impressive performance, these models are not infallible. Numerous examples illustrate their limitations, where they deviate from the correct thinking path, arrive at incorrect conclusions, and even occasionally contradict themselves. In particular, these models seem to struggle with formal reasoning: mathematical and logical problems that require not as much real-world or common-sense knowledge but rather the precise application of logical inference rules.</p><p>This raises some crucial questions: Is the path to flawless reasoning merely a matter of superior data and extended training? Can we bridge the gap to achieve the kind of formal reasoning from natural language we've seen in sci-fi AIs&#8212;like Data from <em>Star Trek</em> or the hyperrational robots in Asimov's narratives? Or is there something fundamentally limiting within the architecture of large language models that restricts their capability for comprehensive logical reasoning in natural language?</p><p>In this article, I will argue that LLMs have intrinsic limitations that hinder their reasoning abilities. The core of the argument boils down to the combination of stochastic language modelling with a fixed computational architecture, which renders LLMs incapable of provably correct general-purpose formal reasoning.</p><p>I will attempt to explain this in clear and intuitive terms and address the most compelling counterarguments to this perspective. This article summarizes and expands on my views in several previous articles. It's part of my ongoing attempt to understand where we are heading with LLMs regarding reasoning.</p><p>While much of this discussion in this article applies primarily to first-generation LLMs&#8212;anything before OpenAI o1&#8212;I will also explore how these fundamental constraints extend to newer reasoning-enhanced models. If my arguments hold, nothing short of a novel paradigm can lead to AGI. In fact, I will argue that perfect reasoning from natural language may be computationally unsolvable, even in principle.</p><p>But before moving on, let me clarify something. I understand this topic is very controversial, and I know I will receive a lot of criticism, especially from some of the most ardent believers in the immediacy of AGI.</p><p>To be clear, I'm not claiming AGI is <em>impossible</em>. On the contrary, I'm firmly on the computationalist side here, and I believe machines can achieve the same and perhaps even superior levels of intelligence as any living, organic being. And I'm confident LLMs will play a significant role in the AGI breakthrough. That's why I am among the many researchers working on better ways to make LLMs interact with other computational systems to enhance their capabilities. I&#8217;m just sceptical that all that&#8217;s left is throwing more GPUs and using the same techniques we already have.</p><p>With that out of the way, let's explore what it means to say that LLMs are fundamentally limited in formal reasoning. This will be a <em>long</em> read, so buckle up!</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.apiad.net/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">The Computist Journal is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h2>What Do We Mean by Reasoning in LLMs</h2><p>"Reasoning" is a very loaded term, that means a lot of things for different people&#8212;even for different groups of people who should agree on these definitions. So, I will attempt to define precisely what I mean by the phrase "LLMs cannot reason.&#8221;</p><p>In the Artificial Intelligence field, when we claim LLMs (or any computational system) can or cannot "reason", we are, for the most part, not talking about any abstract, philosophical sense of the word &#8220;reason&#8221;, nor any of the many psychological and sociological nuances it may entail. There are many ways to define reasoning, from common sense to analogical to emotional to formal. In this article, I will focus on a precise, quantifiable, simplified notion of reasoning that comes straight from math.</p><p>Reasoning is, simply put, the capacity to draw logically sound conclusions from a given premise. <em>Formal</em>&nbsp;reasoning is when you follow a formalized method with hard rules to arrive at a conclusion. The most important tool for formal reasoning in math and science is logic, and it provides two fundamental reasoning modes: <em>deduction</em> and <em>induction</em>.</p><p>Induction is somewhat problematic for AI (and humans!) because it involves generalizing claims from specific instances, and thus, it requires some strong assumptions. In contrast, deduction is very straightforward. It is about applying a set of predefined and agreed-upon logical inference rules to obtain new provably true claims from existing true claims. It is the type of reasoning that Sherlock Holmes is most famous for, and the thing mathematicians do all day long when proving new theorems.</p><p>Thus, in the remainder of this article, when I say "LLMs cannot reason", I&#8217;m simply saying LLMs cannot perform logical deduction; that is, there are well-defined, computationally solvable deduction problems they inherently cannot solve. As I will attempt to convince you, this is not a value judgment or an informed opinion based on experience. It is a straightforward claim provable from the definition of deductive reasoning and the inherent characteristics of LLMs given by their architecture and functionality.</p><p>Now, if this definition of &#8220;reasoning&#8221; sounds like an oversimplification, well&#8230; in a sense it is. I'm not addressing other forms of non-formal reasoning that are also paramount in human thinking, like abduction or common-sense and analogical reasoning. But formal reasoning, and particularly deductive reasoning, is the basis of mathematical and scientific research and crucial in informed decision-making, so any attempt to build an AI system useful for these tasks must be able to perform this mode of reasoning.</p><p>Before moving on to why LLMs cannot reason, let me address the most common counterargument I encounter whenever this topic is raised in non-academic contexts.</p><h3>Can Humans Truly Reason?</h3><p>Here is an argument you will hear a lot, and maybe even have made yourself:</p><p>&#8220;Sure, LLMs cannot really reason, but neither can humans, right? So what's the big deal.&#8221;</p><p>I mean, humans can be stupendously irrational. We are prone to so many biases that, while useful in the biological and sociological context in which we evolved, in the modern world, are often more than not an obstacle to rational, logical thinking.</p><p>Despite this, the argument that since humans are not perfectly rational, it is OK for LLMs to also not be is flawed on many levels, so let&#8217;s unpack it.</p><p>First, while humans can make errors in reasoning, the human brain definitely possesses the capacity for open-ended reasoning, as evidenced by the more than 2000 years of solid math we have collectively built. Moreover, all college students&#8212;at least in quantitative fields&#8212;at some point have to solve structured problem-solving exercises that require them to apply logical deduction to arrive at correct conclusions, such as proving theorems.</p><p>So, while humans can be pretty stupid at times, we are certainly capable of the most rigorous reasoning when trained to do so.</p><p>But even more importantly, this assertion is a common case of <em><a href="https://en.wikipedia.org/wiki/Whataboutism">whataboutism</a></em>. Why does the fact humans can&#8217;t do something immediately make it OK for a piece of technology to fail at it? Imagine we did this with all our other tech. Sure, that aeroplane fell down and killed 300 people, but humans can&#8217;t fly. Or yes, that submarine imploded, but humans can&#8217;t breathe underwater. Or that nuclear power plant melted, but humans can&#8217;t stand 3000 degrees of heat, so what&#8217;s the big deal?</p><p>Obviously, we don&#8217;t do that. We compare any new piece of technology with our current best solution, and only if the new thing improves upon the old&#8212;at least on some metrics&#8212;do we consider the investment worthwhile. We replaced horses with cars because cars improved the previous best solution to individual transportation, at least on some fundamental metrics, if not all.</p><p>Granted, we often compare AI capabilities to human capabilities, but this is only because humans are the gold standard for the types of problems we often want AI systems to solve. So, we compare LLMs' capacity to generate creative stories, engage in open-ended dialogue, or provide emphatic customer assistance with humans because humans are the best at these tasks.</p><p>However, there are well-established systems&#8212;such as traditional SAT solvers&#8212;that excel in structured logical deduction and reasoning tasks. These systems are designed with rigorous validation mechanisms that ensure correctness and reliability in their outputs. They are basically flawless and incredibly fast.</p><p>So, in terms of the capability to perform purely logical, perfectly valid deduction, we already have a computational solution that sets the bar. Nothing short of provably correct deduction is good enough. The problem is these formal reasoning systems don't understand natural language, of course, and that's why we want LLMs to bridge the gap.</p><h2>Why LLMs Are Incapable of Formal Reasoning</h2><p>Let's move on to the main limitations of current large language models that prevent general-purpose, provably correct deductive reasoning. I'm mostly thinking about LLMs implemented in the prevalent paradigm of the Transformer architecture, but these arguments apply to anything implemented using some sort of context-limited, probabilistic, sequential language model designed to run on GPUs.</p><h3>The Argument from Stochastic Modelling</h3><p>The first limitation of stochastic language models regarding reasoning is precisely their stochastic nature. These models generate outputs based on probabilistic predictions rather than deterministic logical rules. This means that even a well-structured prompt can and will yield different responses on different occasions due to the randomness of the sampling process.</p><p>Now, stochastic sampling is a necessary feature of LLMs, and not a bug. It is the fundamental reason that LLMs can produce varied, plausible, humanly-sounding text at all. It is also the only way we know how to capture in software, at least approximately, the many nuances and ambiguities of natural language.</p><p>That being said, stochastic sampling is a problem for deductive reasoning. For starters, an LLM might arrive at a wrong conclusion purely by chance, even if the right answer was the most likely continuation. This is, once again, the infamous problem of <em>hallucinations</em>.</p><p>To alleviate this, we may attempt to set the sampling temperature to zero, effectively forcing the model to fix the output for a given input. Thus, there will be no more different answers to the same prompt.</p><p>However, the underlying model is still probabilistic; we&#8217;re just greedily sampling the most likely continuation. The problem is that the mapping between input and output hinges on a <em>probabilistic distribution</em> that encodes <em>correlations</em> between elements in the input and corresponding elements in the output.</p><p>The reason this is problematic is simple: any probabilistic model of language that can generate new sentences that didn't exist in the training data&#8212;that is, that can generalize at all&#8212;has to be, by definition, a <em>hallucination machine</em>. Or, to use <span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Rob Nelson&quot;,&quot;id&quot;:69776018,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e5613be-ef51-4a07-8f2f-d745424d17f7_764x767.png&quot;,&quot;uuid&quot;:&quot;eab0ae41-5d1f-4004-a9b1-7f7bff7a0435&quot;}" data-component-name="MentionToDOM"></span>&#8217;s much better terminology: <a href="https://ailogblog.substack.com/p/on-confabulation">a confabulation machine</a>.</p><p>You can think about it like this: if you want a language model to generate novel sentences, then it must be able to produce sentences it doesn't really <em>know</em>, but somehow <em>believes</em> are correct.<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a></p><p>The way a stochastic language model "believes" a sentence is correct, is because the probability of seeing this exact sentence is high. Crucially, for novel sentences, this probability is high because there is some similarity to actual sentences in the training set.</p><p>This means any stochastic language model that's useful at all needs to approximate <em>correctness</em> through <em>plausibility</em>. Sentences close (in a precise mathematical sense we won't get into here) to what the LLM saw in the training set are thus considered correct. Sentences that are too dissimilar to anything in the training set are considered incorrect. But the frontier is fuzzy; there is no explicit threshold to distinguish what's true from what's not. All a stochastic language model can actually model is <em>degrees of plausibility</em>.</p><p>And there is the problem. Math and logic are not fuzzy<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a>. There is no plausibility involved. A reasoning chain is either correct or incorrect. And more importantly, a tiny change in a single word&#8212;like adding a single "no" somewhere in a huge prompt&#8212;can completely shift the validity of a logical claim. </p><p>Whenever you approximate crisp mathematical correctness with fuzzy plausibility, you will have true and false claims close enough to each other such that a stochastic model cannot effectively distinguish them.</p><p>Now, this discussion has important nuances, so let's analyze some interesting arguments about the role of randomness in reasoning.</p><h4>Is Randomness a Bug or a Feature?</h4><p>A common criticism of this argument regarding the stochastic nature of language models is that, in fact, randomness is essential in problem-solving and a crucial feature of many of the same SAT solvers I pretend to compare LLMs with. How hypocritical it is to posit randomness as a limitation when the most effective deductive reasoning algorithms are essentially random search algorithms!</p><p>This is true, but only partially, and it makes all the difference. So, let me explain.</p><p>Randomness plays a vital role in many computational problem-solving techniques, particularly in search algorithms for hard (read NP-complete or NP-hard) problems. Modern SAT solvers, for example, often employ randomized search strategies to efficiently explore vast solution spaces. By introducing randomness into the search process, these solvers can escape local optima and discover satisfactory solutions more quickly than deterministic methods might allow.</p><p>However&#8212;and here comes the crucial difference&#8212;using randomness in the search process does not imply that the entire reasoning process is inherently unreliable. Randomness is confined to the search phase of problem-solving, where it helps identify potential solutions&#8212;potential reasoning paths. However, once a candidate solution is found, a deterministic validation phase kicks in that rigorously checks the correctness of the proposed reasoning path.</p><p>This distinction between the search and validation phases is paramount in understanding how randomness contributes to effective problem-solving in general. During the search phase, algorithms may employ random sampling or other stochastic methods to explore possibilities and generate potential solutions. This phase allows for flexibility and adaptability, enabling systems to navigate complex landscapes of potential answers.</p><p>However, once a potential solution has been identified, it must undergo a validation process grounded in deterministic logic. This validation phase involves applying predefined, deterministic rules to confirm that the proposed solution meets all necessary criteria for correctness. As a result, any solution that passes this validation step can be confidently accepted as valid, regardless of how it was generated.</p><p>Here is a silly metaphor to illustrate this problem. If you sit a million monkeys in a million typewriters, at some point, one of them will randomly produce Romeo and Juliet. However, you need Shakespeare to filter the garbage out and decide which of the million pamphlets to publish.</p><p>What this means is randomness is good for exploring hypotheses but not for deciding which one to accept. For that, you need a deterministic, provably correct method that doesn&#8217;t rely on probabilities---at least if you want to solve the problem exactly.</p><p>However, in stark contrast to traditional problem-solving systems like SAT solvers, LLMs lack a robust validation mechanism. While they can generate coherent and contextually relevant responses based on probabilistic reasoning, some of which may be correct reasoning chains, they do not possess a reliable method for verifying the accuracy of those outputs. The verification process is also stochastic and as subject to hallucinations as the generation process, rendering it effectively unreliable.</p><p>Therefore, since LLMs evaluate their own outputs using the same probabilistic reasoning they employ to generate them, there is an unavoidable, although perhaps small, risk that incorrect conclusions will be propagated as valid responses.</p><p>The monkeys are also the publishers.</p><h3>The Argument from Bounded Computation</h3><p>The second argument concerns the computational architecture of current language models. By design, LLMs spend a fixed amount of computation per token processed. Thus, the amount of computation an LLM does before it produces the first output token is a function of just two numbers: the input size and the model size.</p><p>So, if you ask an LLM to produce a yes or no question for a logical puzzle, all the &#8220;thinking&#8221; the model can do is some fixed&#8212;albeit huge&#8212;number of matrix multiplications that only depend on the input size.</p><p>Now, consider that you have two different logical puzzles with the same input size, i.e., the same number of tokens. But one is an easy puzzle that can be solved with a short chain of deduction steps, while the other requires a much higher number of steps. Here is the kicker: <em>any LLM will spend exactly the same amount of computation on both problems</em>. This can&#8217;t be right, can it?</p><p>A basic result in computational complexity theory is that some problems with very small inputs seem to require an exponentially high computational cost to be solved correctly. These are NP-complete problems, and most computer scientists believe there are no efficient algorithms to solve them. Crucially, a huge number of reasoning problems fall in this category, including the most basic logical puzzle of all&#8212;determining if a given logical formula can be satisfied.</p><p>When faced with an instance of an NP-complete problem, an LLM will produce an answer after a fixed amount of computation defined solely by the input size. Now, by sheer size, some larger models might just spend enough computation to cover many smaller instances of NP-complete problems.</p><p>As it happens, a huge constant function can be larger than an exponential function for smaller inputs. But crucially, we can always find instances of NP-complete problems that require, even in principle, a sufficiently large amount of computation to surpass the computational capacity of any LLM, no matter how big.</p><p>But this means something even more profound. Ultimately, LLMs are not Turing-complete systems but essentially very large finite automata. While they can handle a wide range of tasks and produce outputs that appear sophisticated, their underlying architecture limits the types of problems they can solve.</p><p>Turing completeness is the ability of a computational system to perform any computation given sufficient time and resources. Modern computers and many seemingly simple systems, such as cellular automata, are Turing complete systems. Ironically, LLMs are not.</p><p>The reason is simple. We know from computability theory that any Turing complete system must be able to loop indefinitely. There are some problems&#8212;some reasoning tasks&#8212;where the only possible solution is to compute, and compute, and compute until some condition holds, and the amount of computation required cannot be known in advance. You need potentially unbounded computation to be Turing complete.</p><p>And this is the final nail in the coffin. LLMs, by definition, are computationally bounded. No matter their size, there will always be problem instances&#8212;which we may not be able to identify beforehand&#8212;that require more computation than is available in the huge chain of matrix multiplications inside the LLM.</p><p>Thus, when LLMs seem to tackle complex reasoning problems, they often solve specific instances of those problems rather than demonstrating general problem-solving capabilities. This might just be enough for practical purposes&#8212;we may never need to tackle the larger instances&#8212;but, in principle, LLMs are incapable of truly open-ended computation, which means they are incapable of true reasoning.</p><p>But again, there is a lot of nuance in this limitation. For starters, this analysis applies very obviously to first-generation LLMs. But newer, so-called reasoning-enhanced LLMs work a little differently: they produce a potentially unbounded sequence of "thinking tokens" before deciding on the actual answer.</p><p>So let's examine this argument from bounded computational power in more detail.</p><h3>Can LLMs Perform Unbounded Computation?</h3><p>A common counterargument is that LLMs can be rendered Turing complete by integrating them with external tools, such as code generators or general-purpose inference engines. It is even easier to wrap them in a recursive loop that can simply call the LLM as many times as necessary.</p><p>And this is true. You can trivially make an LLM Turing-complete, in principle, by duct-taping it with something that is already Turing-complete. You can also build a flame thrower with a bamboo stick, some duct tape, and a fully working flame thrower.</p><p>However, simply making LLMs Turing complete in principle does not guarantee that they will produce correct or reliable outputs. Integrating external tools or clever self-recursion introduces yet another layer of complexity and potential points of failure.</p><p>We need to address two main strategies in this regard: <strong>prompting</strong> and <strong>function calling</strong>. Let's tackle them one at a time.</p><h4>Prompt-based Techniques for Reasoning</h4><p>Chain-of-thought prompting is the most basic way to increase the computation of LLMs. By guiding models to articulate intermediate reasoning steps before arriving at a final answer, CoT prompting helps decompose complex problems into manageable parts. This method has improved performance across various reasoning tasks, such as arithmetic and commonsense reasoning.</p><p>CoT makes the LLM "think harder" by forcing the model to produce what we can consider &#8220;internal thought&#8221; tokens. Thus, we may view it as a way to perform additional computation on the input before deciding on the response.</p><p>This is precisely what modern reasoning-enhanced models like o1 and R1 are doing: automating the chain of thought prompt by baking it into the training process. However, despite its advantages, CoT prompting remains insufficient for several reasons.</p><p>On the one hand, CoT doesn't address the fundamental limitation of hallucinations. The stochastic nature of LLMs means that even with CoT prompting, outputs can vary across different runs due to randomness in the generation process. This variability can lead to inconsistent reasoning outcomes, undermining the reliability of the model's responses.</p><p>On the other hand, CoT extends the computation budget by a finite amount. To achieve true unbounded computation, we need a cyclic scheme in which the LLM is prompted to continue thinking, potentially indefinitely, until satisfied.</p><p>A potential solution for this problem is the intuitive approach of self-critique, which involves evaluating and refining an LLM's responses with the same model, using prompts that instruct the model to read its previous output, highlight potential errors, and try to correct them. A form of after-the-fact chain-of-thought, if you might.</p><p>However, research also shows significant limitations in the effectiveness of this self-critique capability.</p><p>While LLMs can generate multiple ideas and attempt to critique their initial outputs, studies indicate that they cannot often meaningfully self-correct. Research also shows that self-correction techniques in LLMs are heavily contingent on the availability of external feedback. In many cases, LLMs perform better when they have access to an external verifier or additional context rather than relying solely on their internal reasoning capabilities.</p><p>And even more interestingly, attempts at self-critique can sometimes degrade performance rather than enhance it. Studies have shown that when LLMs engage in self-critique without external validation, they may generate false positives or incorrect conclusions. If you push harder, you can easily fall into a cycle of self-reinforcement of invalid or erroneous arguments, making the LLM increasingly more certain despite it getting worse and worse.</p><p>Ultimately, this circles back to the already discussed issue of relying on randomness for validation. If we attempt to get the model to tell us when it is certain it got the answer right, we are doomed. CoT and self-critique are great strategies for exploring different hypotheses and generating multiple possibilities, but they alone cannot reliably produce a provably correct conclusion all the time.<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a></p><h4>Function Calling and External Tools</h4><p>Integrating external tools, such as reasoning engines or code generation systems, into large language models represents a promising&#8212;and, for me, the only really viable&#8212;approach to enhancing their reasoning capabilities.</p><p>Connecting LLMs to external reasoning engines or logical inference tools makes it possible to augment their reasoning capabilities significantly. These tools can handle complex logical deductions, mathematical computations, or even domain-specific knowledge that the LLM might not possess inherently. Similarly, external code generation systems enable LLMs to produce executable code for specific tasks.</p><p>By leveraging these external resources, LLMs can potentially overcome some of their inherent limitations in logical reasoning and problem-solving. For starters, an external inference engine will be Turing-complete, so we scratch that problem down, right?</p><p>Not so fast. Unfortunately, this approach has many challenges, particularly regarding the LLM's ability to generate the correct input for function calls or code execution. It all circles back to the original sin of LLMs: <em>stochastic language modelling leads inevitably to hallucinations</em>.</p><p>First, the effectiveness of function calling or code generation hinges on the model's ability to interpret a task accurately and generate appropriate inputs. If the model misinterprets the requirements or generates incorrect inputs (e.g., if it hallucinates part of the inputs), the external tool will produce erroneous outputs or fail to execute altogether.</p><p>While external tools can, in principle, improve the reasoning capabilities of an LLM by providing structured logic and formal verification, they cannot compensate for LLMs' basic limitations in generating reliable output. Therefore, there is no formal guarantee that the final output from this integration will be logically sound or appropriate for the context, simply because of the age-old adage: garbage in, garbage out.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.apiad.net/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://blog.apiad.net/subscribe?"><span>Subscribe now</span></a></p><h2>How About Reasoning-Enhanced Models?</h2><p>Finally, let's briefly tackle what this means for state-of-the-art reasoning-enhanced LLMs, such as OpenAI's o3 and DeepSeek R1. These models employ extended "thinking" phases during inference, generating multi-step reasoning chains, critiquing their own outputs, and iteratively refining conclusions. This approach reduces hallucinations and improves accuracy on benchmarks like mathematical problem-solving and logical puzzles, often outperforming earlier models by wide margins.</p><p>The mechanics of these enhancements are based on two key innovations. First is the chain-of-thought expansion, which allows models to explore branching reasoning paths for longer durations&#8212;sometimes minutes of computation&#8212;simulating deeper deliberation. Second is implementing self-critique loops: internal validation mechanisms where the model evaluates its intermediate conclusions against problem constraints.</p><p><a href="https://magazine.sebastianraschka.com/p/understanding-reasoning-llms">This article</a> by <span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Sebastian Raschka, PhD&quot;,&quot;id&quot;:27393275,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F61f4c017-506f-4e9b-a24f-76340dad0309_800x800.jpeg&quot;,&quot;uuid&quot;:&quot;9e36b8f1-e9fd-4f35-b77e-14fd53a4f46f&quot;}" data-component-name="MentionToDOM"></span> provides a much deeper and more technically detailed description of how these models work.</p><p>These techniques do improve practical performance by a large margin. It's much better to bake CoT into the training process than simply relying on human-crafted prompts. During training, we can teach the model to automatically produce <em>mostly correct</em> reasoning chains by using formally verifiable training tasks, such as coding and math problems.</p><p>However, during inference, the accuracy of these models remains fundamentally limited by the probabilistic architecture of the underlying LLM. The self-critique process itself relies on the same stochastic language modelling that generates initial answers; there is no deterministic verification step during training. The same reliability issues remain, perhaps significantly decreased but not completely eliminated.</p><p>These models represent an evolution rather than a revolution. They scale up existing chain-of-thought techniques through increased computation and mirror human-like error checking with self-critique mechanisms that, ultimately, lack mathematical guarantees of correctness. Performance gains come from better exploring the model's existing knowledge space rather than new reasoning capabilities.</p><p>So, despite the remarkable empirical improvements in reasoning-enhanced models, they are more a natural evolution of existing paradigms rather than a qualitative breakthrough. Their stochastic foundation ensures occasional failures will persist despite enhanced computing budgets. They are, indeed, very powerful tools for many real-world applications where absolute formal certainty is not required, but they cannot overcome their fundamental limitations when tasked with formal deductive reasoning tasks requiring strict accuracy guarantees.</p><h2>Conclusions</h2><p>The purpose of this article is to convince you of two claims:</p><ol><li><p>Large Language Models currently lack the capability to perform a well-defined form of reasoning that is critical for important decision-making processes, including producing novel, scientifically valuable output.</p></li><li><p>We have absolutely no idea how to solve this in the near future within the prevalent and, so far, the only scalable language modelling paradigm.</p></li></ol><p>This matters because there is a growing trend to promote LLMs as general-purpose reasoning engines. As more users begin to rely on LLMs for important decisions, to perform deep research on their behalf, and in domains where they cannot validate the results, the implications of these limitations become increasingly significant. At some point, someone will trust an LLM with a life-and-death decision, potentially with catastrophic consequences.</p><p>More importantly, the primary challenges in making LLMs trustworthy for reasoning are immense. Despite ongoing research and experimentation, we have yet to discover solutions that effectively bridge the gap between LLM capabilities and the rigorous standards required for reliable reasoning. Currently, our best efforts in this area are duct tape&#8212;temporary fixes that do not address the underlying limitations of the stochastic language modelling paradigm.</p><p>Now, I want to stress that these limitations do not diminish the many other applications where LLMs excel as stochastic language generators. In creative writing, question answering, user assistance, translation, summarization, automatic documentation, and even coding, many of the limitations we have discussed here are actually features.</p><p>The thing is, this is what language models were designed for&#8212;to generate plausible, human-like, varied, not-necessarily-super-accurate language. The whole paradigm of stochastic language modelling is optimized for this task, and it excels at it. It is much better than anything else we&#8217;ve ever designed. But when we ask LLMs to step outside that range of tasks, they become brittle, unreliable, and, worse, opaquely so.</p><p>The emergence of models like OpenAI&#8217;s o1 and o3 models, DeepSeek's R1, Gemini 2.0, and the many more we'll definitely see in the short term, seem like a significant step forward. And to a large extent, they represent innovative and creative approaches, and open up new avenues of research and applications.</p><p>However, we haven't yet seen any fundamentally new paradigm in logical reasoning with LLMs. Deep down, this is &#8220;just&#8221; a way to explicitly incorporate chain of thought prompting in a fine-tuning phase and teach the model via reinforcement learning to select mostly coherent paths of deduction. It's clever scaling of what already works fairly good, but not perfectly.</p><p>Thus, while definitely an impressive technical and engineering feat, these reasoning-enhanced models, and any future models based on the same paradigm, will continue to share the same core limitations inherent to all LLMs, only mitigated using some clever tricks. Hallucinations will still hamper any attempt at definitively solving formal reasoning with LLMs. It may be a matter of degree, and for some domains, good enough might just be good enough.</p><p>Ultimately, provably correct reasoning from natural language might even be an uncomputable problem. After all, natural language semantics are anything but formal, so going automatically from informal problem descriptions to formal, provably correct solutions might be impossible, even in principle. I have some ideas about why this may be the case that I'll share in a future article.</p><p>If I'm right, then maybe all we can hope for is a very clever, very efficient, never-tired, sometimes incorrect, not fully trustworthy AI assistant&#8212;less like Data and more like Bender minus the sarcasm. But we will never be able to completely remove expert human judgment from any life-or-death decision. And that might just be the best outcome.</p><p>What do you think?</p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>I'm using "know" and "believe" gratuitously here, in the understanding that the informed reader will not misinterpret them as positing any sort of self-awareness or conscious experience in LLMs. Words alone don't mean anything; context is everything.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>Ok, there is something called fuzzy logic, and I think fuzzy logic is a much better analogue for the type of reasoning we can expect from LLMs. However, fuzzy logic is very limited in the types of inferences it can model, and it&#8217;s definitely not enough to count as &#8220;solving formal reasoning&#8221;. But that&#8217;s a story for another day.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>There is another, more technical argument as to why self-critique and CoT don&#8217;t enable Turing completeness. Since LLMs are stochastic, what you get when you use them to potentially loop indefinitely is not a real &#8220;while true&#8221; loop. You get a probabilistic loop that has a nonzero chance to stop at any given moment&#8212;or else, it will loop indefinitely, which is not what you want. What you want is to loop <em>potentially</em> forever, but stop when you find an answer.</p><p>But for any loop that has a nonzero chance to stop at any given iteration, we can find a problem that requires stopping after a sufficiently large number of iterations, such that the probability the loop ends before required can be made as large as we want. We can always find deduction problems for which the LLM cannot &#8220;think hard&#8221; enough, simply because there is a tiny chance it will &#8220;get tired&#8221; any given second. No matter how tiny, for large enough problems, the LLM will almost always fail to think hard enough.</p></div></div>]]></content:encoded></item><item><title><![CDATA[Why Artificial Neural Networks Are So Damn Powerful - Part I]]></title><description><![CDATA[The most intuitive explanation of the mathematical prowess that are neural networks]]></description><link>https://blog.apiad.net/p/why-artificial-neural-networks-are</link><guid isPermaLink="false">https://blog.apiad.net/p/why-artificial-neural-networks-are</guid><dc:creator><![CDATA[Alejandro Piad Morffis]]></dc:creator><pubDate>Sun, 02 Feb 2025 11:51:25 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!0KDO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82469922-997e-497c-a012-9a1c181fecd1_1024x608.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_!0KDO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82469922-997e-497c-a012-9a1c181fecd1_1024x608.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!0KDO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82469922-997e-497c-a012-9a1c181fecd1_1024x608.png 424w, https://substackcdn.com/image/fetch/$s_!0KDO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82469922-997e-497c-a012-9a1c181fecd1_1024x608.png 848w, https://substackcdn.com/image/fetch/$s_!0KDO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82469922-997e-497c-a012-9a1c181fecd1_1024x608.png 1272w, https://substackcdn.com/image/fetch/$s_!0KDO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82469922-997e-497c-a012-9a1c181fecd1_1024x608.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!0KDO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82469922-997e-497c-a012-9a1c181fecd1_1024x608.png" width="1024" height="608" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/82469922-997e-497c-a012-9a1c181fecd1_1024x608.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:608,&quot;width&quot;:1024,&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;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!0KDO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82469922-997e-497c-a012-9a1c181fecd1_1024x608.png 424w, https://substackcdn.com/image/fetch/$s_!0KDO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82469922-997e-497c-a012-9a1c181fecd1_1024x608.png 848w, https://substackcdn.com/image/fetch/$s_!0KDO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82469922-997e-497c-a012-9a1c181fecd1_1024x608.png 1272w, https://substackcdn.com/image/fetch/$s_!0KDO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82469922-997e-497c-a012-9a1c181fecd1_1024x608.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><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 tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><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>You already know that neural networks are everywhere, and there&#8217;s a reason for that, beyond fad. And no, it&#8217;s not simply because they are &#8220;inspired in the human brain&#8221;&#8212;we already debunked this partial myth in our previous article.</p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;b0fa6d01-4dcd-4ce7-82bc-803918df5e2f&quot;,&quot;caption&quot;:&quot;&quot;,&quot;cta&quot;:null,&quot;showBylines&quot;:true,&quot;showDescription&quot;:true,&quot;showImage&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Artificial Neural Networks Are Nothing Like Brains&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:6970039,&quot;name&quot;:&quot;Alejandro Piad Morffis&quot;,&quot;bio&quot;:&quot;Democratizing knowledge one post at a time. I talk about Computer Science, AI, Education, Philosophy, you know, mostly harmless stuff.\nBuilding a community of tech writers on Substack.\nAnd now also venturing into creative writing.&quot;,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F26aafc21-b149-4bf0-9382-e0ae3636e23a_640x640.jpeg&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2025-01-31T16:48:32.490Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f0d3aee-c7b5-4ec8-a7f2-7266636ac040_1024x608.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://blog.apiad.net/p/artificial-neural-networks-are-nothing&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:156180386,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:29,&quot;comment_count&quot;:30,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;Mostly Harmless Ideas&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F582c72c0-c120-4ea8-ae6b-376a025250bb_1024x1024.png&quot;,&quot;belowTheFold&quot;:false,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><p>The true strength of neural networks lies primarily in their nature as mathematical constructs that are extremely flexible and powerful. This makes it relatively easy for them to adapt to nearly any domain. Additionally, they excel at leveraging vast amounts of data and computational power.</p><p>The ability of neural networks to model complex relationships and learn from vast amounts of data stems from several key mathematical properties. This article will explore these strengths, including the universal approximation theorem, the role of inductive biases in different architectures, and how layers within a network perform representation and manifold learning. We&#8217;ll also discuss the versatility of neural networks in transforming various learning objectives into optimized loss functions.</p><p>Then, in Part II, we&#8217;ll see how these networks scale impressively with increasing data and compute resources, further solidifying their position as a cornerstone of modern AI.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.apiad.net/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://blog.apiad.net/subscribe?"><span>Subscribe now</span></a></p><h2>Universal Approximators</h2><p>The Universal Approximation Theorem is a cornerstone of neural networks and machine learning. It asserts that a feedforward neural network with a single hidden layer containing a finite number of neurons can approximate any continuous function on a compact subset of inputs to any desired degree of accuracy, provided that the activation function is non-constant, bounded, and continuous. </p><p>Whoa, that was a mouthful. In short, a big enough but still very simple neural network&nbsp;can,&nbsp;<em>in theory</em>, learn any pattern you want to with&nbsp;an arbitrary degree of precision.</p><p>The theorem's history dates back to the late 1980s when researchers began formalizing the mathematical foundations of neural networks. Early work by researchers like George Cybenko in 1989 demonstrated that single-layer networks could achieve this approximation capability. Since then, various versions and extensions of the theorem have been developed, solidifying its importance in understanding the theoretical underpinnings of neural networks.</p><p>What does this mean in practical terms? The Universal Approximation Theorem implies that neural networks are incredibly versatile tools capable of modelling a wide array of functions, from simple linear relationships to intricate non-linear mappings. This flexibility allows them to be effectively applied across numerous domains, such as image recognition, natural language processing, and more.</p><p>However, while the theorem guarantees the existence of such approximations, it does not provide a method for finding them efficiently in practice. Thus, while neural networks can theoretically learn any function, achieving that in real-world scenarios often requires careful design and training strategies.</p><h2>Architectural Flexibility</h2><p>While the Universal Approximation Theorem assures us that a sufficiently large, fully connected feedforward neural network with a single hidden layer can approximate any continuous function, this approach is often impractical for real-world applications. Instead, we can leverage specialized structures and different types of layers to create neural networks tailored for specific tasks. This architectural flexibility allows us to exploit the unique characteristics of the data and the problem domain, enhancing performance and efficiency.</p><p>One prominent example is <strong>convolutional layers</strong>, commonly used in Convolutional Neural Networks (CNNs). These layers are designed to process grid-like data, such as images. By applying convolutional filters, they can detect local patterns and features, such as edges or textures, while maintaining spatial hierarchies. This structure is particularly effective for image recognition tasks, where understanding spatial relationships is crucial.</p><p>Another example is <strong>recurrent layers</strong>, found in Recurrent Neural Networks (RNNs). These layers are specifically designed to handle sequential data, such as time series or natural language. By maintaining a hidden state that captures information from previous inputs, RNNs can effectively model temporal dependencies and context. This makes them well-suited for tasks like language modeling and speech recognition.</p><p>As a final example, remember <strong>transformers</strong>, which have revolutionized natural language processing. Unlike traditional RNNs, transformers rely on self-attention mechanisms to weigh the importance of different input elements relative to one another. This allows them to capture long-range dependencies and contextual relationships more effectively than previous architectures. Transformers have become the backbone of many state-of-the-art models in NLP, enabling tasks such as translation and text generation.</p><p>By employing these specialized layers, we can create neural networks that don't attempt to approximate arbitrary functions but rather exploit the inherent structure of the problems we are trying to solve.</p><h2>Representation Learning</h2><p>One of the most powerful aspects of neural networks is their ability to perform representation learning, which can be understood as a sequence of increasingly abstract feature extraction mechanisms. This process allows neural networks to automatically discover and learn relevant features from raw data without requiring manual feature engineering. Essentially, each layer in a neural network transforms the input data into higher-level representations, capturing more complex patterns as the information flows through the network.</p><p>Consider an image classification task. When we analyze what each layer of a convolutional neural network (CNN) is learning, we can observe a fascinating progression. The initial layers typically act as simple feature detectors, identifying basic elements such as edges and textures in various orientations. These early detectors are crucial for understanding the fundamental building blocks of an image.</p><p>As we move deeper into the network, these simple features begin to combine into more complex shapes and patterns. For instance, the next layers might learn to recognise geometric shapes like circles and squares by aggregating the edge information detected in the earlier layers. Further down the line, these shape detectors merge into even more sophisticated representations, such as figure-like detectors that can identify parts of objects or specific patterns.</p><p>By the time we reach layers 20 or more in a deep CNN, the network has developed a highly abstract understanding of the input data. At this stage, it can accurately detect complex objects like dogs, cars, or houses based on the intricate features it has learned to recognise throughout its architecture.</p><p>This hierarchical approach to feature extraction means that almost any neural network designed for classification tasks can be viewed as a sequence of increasingly abstract and complex feature extractors.</p><h2>Manifold Learning</h2><p>Manifold learning is another insightful way to interpret what neural networks are doing during the learning process. When tackling problems like image classification, we can think of it as a complex instance of a nearest neighbour problem. For example, all images of cats share certain similarities, just as images of dogs do. However, this similarity is not immediately apparent in the input domain&#8212;the pixel values&#8212;because images that represent similar concepts (like two different cats) can be quite distant from each other in terms of pixel-by-pixel distance.</p><p>To understand this better, we can posit that a high-dimensional space exists where these images are represented more meaningfully. In this space, points corresponding to similar images are close together, while those representing fundamentally different objects&#8212;like dogs, ships, or houses&#8212;are far apart. The challenge is that this "true" image space is tangled and twisted, making it difficult to identify these relationships directly.</p><p>Manifold learning refers to the ability of neural networks to find a set of transformations that project the original data from the input space (e.g., pixels in image classification) into this complex high-dimensional space where similar objects (e.g., images of cats) cluster together. If we could untangle this manifold, we could perform a simple nearest-neighbour comparison in a more meaningful context. Neural networks do that implicitly.</p><p>We can thus view deep neural networks as a series of projections into increasingly complicated manifolds. Each layer in the network transforms the input data, gradually mapping it closer to this ideal space where similar objects are grouped together. The final layer of the network, right before the softmax classification, thus contains a very twisted and tangled projection of the original input, to the point it would be unrecognizable by humans. Still, it happens to be the projection that best clusters together similar objects.</p><h2>Backpropagation</h2><p>Training neural networks effectively hinges on the backpropagation algorithm, a pivotal method since its introduction in the 1970s. Backpropagation allows for the fine-tuning of weights within a neural network by computing how to adjust all parameters based on the error from the previous iteration. This feedback mechanism is essential for optimizing the network's performance, as it systematically reduces the error rate by adjusting weights to improve predictions.</p><p>The power of backpropagation lies in its ability to compute gradients efficiently, regardless of the network's size or complexity. By applying the chain rule of calculus, backpropagation calculates how weight changes affect the overall error function. This means that even in deep networks with many layers, backpropagation can determine the necessary adjustments for each weight, enabling training to an arbitrary degree of precision (provided the network has enough capacity, i.e., is big enough).</p><p>In theory, this makes all neural networks trainable, but in practice, achieving effective training often requires careful management of various factors. For instance, practitioners must navigate challenges such as vanishing and exploding gradients, which can impede learning in deep networks. Additionally, hyperparameter tuning and regularization techniques are often necessary to ensure convergence and prevent overfitting. We&#8217;ll tackle these problems in Part II.</p><h2>Flexible Learning Objectives</h2><p>Neural networks are trained using backpropagation, which requires a well-defined loss function to measure the learning error. This loss function approximates how far off the network's predictions are from the target values. The loss function must be differentiable for gradient descent to work effectively. This allows us to compute gradients and optimize the network's weights.</p><p>However, many learning objectives are not inherently differentiable. A prime example is classification error, often referred to as 0/1 loss. This type of loss is binary: you either classify an instance correctly or incorrectly, providing no gradient information for optimization. Fortunately, we can create differentiable approximations of such non-differentiable loss functions.</p><p>For instance, the binary cross-entropy loss is a commonly used differentiable approximation for 0/1 loss in binary classification tasks. It captures the essence of correct and incorrect classifications while allowing for a continuous range of error values. This enables the model to learn more effectively by providing meaningful gradient information even when predictions are not perfect.</p><p>Similarly, other tasks have their own tailored loss functions that facilitate learning. For example, a common loss function in regression tasks is <strong>Mean Squared Error (MSE)</strong>, which measures the average squared difference between the predicted and actual values.</p><p>For multi-class classification problems, neural networks often use <strong>Categorical Cross-Entropy Loss</strong>, an extension of binary cross-entropy. This loss measures the dissimilarity between the predicted probability distribution and the true distribution over multiple classes, making it particularly effective for problems with many output categories.</p><p>Hinge loss is frequently employed in tasks like binary classification, which focuses on maximizing the margin between classes. This loss is also commonly used in support vector machines and some neural networks to ensure better separation between categories.</p><p>Contrastive loss is often used in more specialized applications, such as face recognition or metric learning. This loss function helps models learn embeddings by minimizing the distances between similar pairs of data points while maximizing the distances between dissimilar ones.</p><p>Each of these loss functions is designed to suit specific learning objectives while maintaining differentiability, ensuring that gradient descent can be applied effectively to a wide range of dissimilar tasks.</p><h2>Conclusions</h2><p>Neural networks are incredibly powerful and flexible mathematical constructs. They can approximate any continuous function, adapt to specific tasks through specialized architectures like convolutional, recurrent, and transformer layers, and automatically extract increasingly abstract features from raw data.</p><p>Additionally, they untangle complex data relationships by projecting inputs into high-dimensional manifolds where similar items cluster together. Finally, their ability to transform diverse learning objectives into differentiable loss functions enables effective optimization via gradient descent.</p><p>And we have a very powerful and general training algorithm&#8212;backpropagation&#8212;to ensure we can effectively make use of all these mathematical properties.</p><p>But while these strengths explain their theoretical power, they don&#8217;t fully account for their practical success. In our follow-up article, we&#8217;ll explore how neural networks are perfectly suited to scale with the increasing availability of data and compute power, which is key to their dominance in modern AI.</p>]]></content:encoded></item><item><title><![CDATA[Artificial Neural Networks Are Nothing Like Brains]]></title><description><![CDATA[Busting the biggest public misconception in AI]]></description><link>https://blog.apiad.net/p/artificial-neural-networks-are-nothing</link><guid isPermaLink="false">https://blog.apiad.net/p/artificial-neural-networks-are-nothing</guid><dc:creator><![CDATA[Alejandro Piad Morffis]]></dc:creator><pubDate>Fri, 31 Jan 2025 16:48:32 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!l26d!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f0d3aee-c7b5-4ec8-a7f2-7266636ac040_1024x608.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_!l26d!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f0d3aee-c7b5-4ec8-a7f2-7266636ac040_1024x608.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!l26d!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f0d3aee-c7b5-4ec8-a7f2-7266636ac040_1024x608.png 424w, https://substackcdn.com/image/fetch/$s_!l26d!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f0d3aee-c7b5-4ec8-a7f2-7266636ac040_1024x608.png 848w, https://substackcdn.com/image/fetch/$s_!l26d!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f0d3aee-c7b5-4ec8-a7f2-7266636ac040_1024x608.png 1272w, https://substackcdn.com/image/fetch/$s_!l26d!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f0d3aee-c7b5-4ec8-a7f2-7266636ac040_1024x608.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!l26d!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f0d3aee-c7b5-4ec8-a7f2-7266636ac040_1024x608.png" width="1024" height="608" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2f0d3aee-c7b5-4ec8-a7f2-7266636ac040_1024x608.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:608,&quot;width&quot;:1024,&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;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!l26d!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f0d3aee-c7b5-4ec8-a7f2-7266636ac040_1024x608.png 424w, https://substackcdn.com/image/fetch/$s_!l26d!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f0d3aee-c7b5-4ec8-a7f2-7266636ac040_1024x608.png 848w, https://substackcdn.com/image/fetch/$s_!l26d!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f0d3aee-c7b5-4ec8-a7f2-7266636ac040_1024x608.png 1272w, https://substackcdn.com/image/fetch/$s_!l26d!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f0d3aee-c7b5-4ec8-a7f2-7266636ac040_1024x608.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><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 tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><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>Unless you've lived under a rock for the last couple of years, you already know that neural networks are the workhorse of AI. They&#8217;re everywhere&#8212;driving advancements from voice assistants to self-driving cars. But what makes them so unique?</p><p>Neural networks are not just a passing fad. They are incredibly powerful and flexible tools that can learn complex patterns from vast amounts of data. While they were initially inspired by how our brains work, today&#8217;s neural networks have evolved far beyond that simple analogy. </p><p>But before we further explore neural networks' power, we need to clarify one thing: <strong>artificial</strong> <strong>neural networks are nothing like the brain</strong>. This crucial distinction is often overlooked. </p><p>In this article, I will attempt to demystify the notion that artificial neural networks are anything like biological brains. And then, in a follow-up article, we&#8217;ll dive into the mathematical characteristics that give them flexibility and discuss how they scale with data and compute power. By the end, you&#8217;ll have a clearer picture of why these models are at the forefront of machine learning today. </p><p>Let&#8217;s get started!</p><h2>Differences between Artificial Neural Networks and Biological Brains</h2><p>Believing that NNs function similarly to biological neurons can lead to misconceptions about AI. For instance, it might make you think that artificial general intelligence (AGI) is just around the corner when, in reality, we are still far from achieving that level of complexity. It can also lead to anthropomorphizing AI, attributing human-like qualities and emotions to models that are fundamentally mathematical constructs. Understanding this difference is vital for grasping both the capabilities and limitations of neural networks. </p><p>Let&#8217;s explore how these models diverge from their biological counterparts.</p><h3>Historical Inspiration of Neural Networks</h3><p>Neural networks trace their roots back to a time when researchers sought to understand the brain's workings. In 1943, Warren McCulloch and Walter Pitts published a groundbreaking paper titled "A Logical Calculus of the Ideas Immanent in Nervous Activity." Their goal was not to create artificial brains but to construct a mathematical model that represented the behaviour of individual neurons. They aimed to explore how simple computational units could lead to complex behaviours, laying the groundwork for what would eventually become neural networks.</p><p>This idea sparked interest in connectionism in the early days, which focused on how interconnected simple units could replicate sophisticated cognitive functions. Researchers began to realise that these artificial neurons could work together to produce intricate activity patterns, similar to how biological neurons operate in the brain. However, this is where the biological inspiration largely ends. </p><p>As the field progressed, it became clear that while NNs were inspired by biology, they diverged significantly from it. The models developed were not intended to accurately replicate the brain's structure or function. Instead, they evolved into powerful computational tools that utilize mathematical constructs and algorithms, often bearing little resemblance to their biological counterparts. Understanding this distinction is crucial as it helps dispel myths about AI and clarifies what neural networks can and cannot do.</p><h3>Differences in Structure</h3><p>Artificial neural networks (ANNs) are constructed from mathematically simple units that perform differentiable computations. Each artificial neuron takes inputs, applies weights, and produces an output through a mathematical function. This process is significantly simpler than what occurs in a biological neuron, which involves complex electrochemical signalling and intricate interactions with other neurons.</p><p>When we examine the scale of the brain, the differences become even more pronounced. The human brain contains approximately 86 billion neurons, each forming thousands of connections with other neurons&#8212;estimates suggest there are around 100 trillion synapses in total. </p><p>In contrast, even the largest neural networks today, like LLaMA 3, operate as directed acyclic graphs with far fewer connections. For example, LLaMA 3 has about 400 billion parameters, which is more directly comparable to the number of inter-neuron connections in the brain than the number of neurons. This figure is nothing compared to the trillions of synapses in human brains.</p><p>Moreover, the complexity of brain connections is far more diverse than that seen in ANNs. Biological neurons can form various types of synapses and exhibit different firing patterns and neurotransmitter types, leading to a rich tapestry of connectivity that supports complex cognitive functions. In contrast, ANNs typically rely on a small set of fixed mathematical functions.</p><h3>Differences in Learning Mechanisms</h3><p>Most importantly, the learning mechanisms in NNs differ fundamentally from those in the brain. </p><p>The human brain learns in a complex and dynamic process. It adapts by forming new connections between neurons, a phenomenon known as synaptic plasticity. This allows the brain to strengthen or weaken connections based on experience, enabling it to learn from and adapt to new information. Additionally, the brain can create new neurons through a process called neurogenesis, particularly in regions like the hippocampus, which is associated with memory and learning. This lifelong capacity for learning and adaptation is a hallmark of biological intelligence.</p><p>In contrast, artificial neural networks (ANNs) operate under a different paradigm. The primary learning mechanism for NNs is backpropagation, which uses a straightforward mathematical operation to adjust weights based on the error of predictions. During training, the network calculates the gradient of the loss function with respect to each weight, allowing it to update those weights in a direction that minimizes error. This process relies on gradient descent, a method that iteratively adjusts weights to find the optimal solution.</p><p>However, gradient descent is biologically implausible for several reasons. First, there is no evidence that the brain stores gradients in any form. Instead, learning in biological systems occurs through more nuanced mechanisms involving complex biochemical processes and feedback loops. Second, while the human brain can learn continuously throughout life, modern ANNs typically have a distinct training phase followed by an inference phase. Once trained, these models do not adapt or learn from new data unless they undergo retraining.</p><p>Additionally, while some promising research into lifelong learning algorithms and dynamic neural networks aim to mimic the brain's ability to adapt and reorganize, this area remains largely experimental and is nowhere near mainstream application. The neural networks used in practical AI systems today are predominantly static; they do not create new neurons or modify their structure based on experience. This static nature further underscores the limitations of current neural networks compared to the brain's remarkable capacity for continuous learning and adaptation.</p><h2>Some Necessary Nuances</h2><p>Convolutional Neural Networks (CNNs) provide an interesting case of biological inspiration in artificial intelligence. While they are indeed inspired by the architecture and essential functions of biological vision, it's important to note that CNNs are not fully biologically plausible, nor do they serve as accurate simulations of the brain's visual processing systems. Instead, they represent a pragmatic approach to leveraging insights from the natural world while optimizing for computational efficiency.</p><p>CNNs mimic certain aspects of the visual cortex, particularly in processing spatial information. They employ local connectivity and shared weights, allowing them to detect patterns and features in images effectively. This design draws from how biological neurons respond to localized areas of visual stimuli, making CNNs well-suited for tasks like image recognition. However, while they capture some essential characteristics of biological vision, they do not replicate the full complexity or diversity of neural architectures in the brain.</p><p>The key takeaway is that CNNs exemplify how we can take valuable inspirations from biology and apply them to create effective computational systems. By focusing on what is useful for solving specific tasks&#8212;like recognizing images or classifying objects&#8212;researchers can forgo unnecessary biological complexities that do not translate into computational advantages. This pragmatic approach allows us to harness the strengths of both biological insights and modern computing capabilities, paving the way for advancements in AI while acknowledging the limitations of current models compared to their biological counterparts.</p><h2>Conclusions</h2><p>Believing neural networks are direct analogs of biological systems can lead to dangerous myths and misconceptions. This misunderstanding can create unrealistic expectations about what AI can achieve and foster a false sense of security regarding its capabilities. </p><p>For example, one common myth is that neural networks are on the verge of achieving artificial general intelligence (AGI), which is far from the truth. In reality, the complexities of human cognition are not just a matter of scaling up current models; they involve intricate processes that we have yet to fully understand.</p><p>Another misconception is that neural networks learn and adapt like humans. While they can be trained on vast amounts of data, they cannot learn continuously throughout their lifetime or create new connections like the brain does. This static nature means that once trained, most neural networks cannot adapt to new information without retraining.</p><p>Additionally, there is a tendency to anthropomorphize AI systems, attributing them human-like qualities. This misrepresents their capabilities and obscures the ethical implications of deploying such technology in society. </p><p>As we continue to explore the powerful potential of neural networks in modern AI, it&#8217;s essential to approach these technologies with a clear understanding of their limitations and differences from biological systems. If you're interested in learning more about why neural networks are so powerful and prevalent in today's AI landscape, stay tuned for the follow-up article!</p>]]></content:encoded></item><item><title><![CDATA[Turn your Substack into a Technical Book]]></title><description><![CDATA[The most underrated business model for technical writers.]]></description><link>https://blog.apiad.net/p/turn-your-substack-into-a-technical</link><guid isPermaLink="false">https://blog.apiad.net/p/turn-your-substack-into-a-technical</guid><dc:creator><![CDATA[Alejandro Piad Morffis]]></dc:creator><pubDate>Fri, 18 Oct 2024 15:00:58 GMT</pubDate><enclosure url="https://images.unsplash.com/photo-1492052722242-2554d0e99e3a?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxNHx8Ym9va3xlbnwwfHx8fDE3MjkxOTIwMjJ8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote><p><em>An early version of this article was published in the now defunct Tech Writers Stack. This version has recent statistics, some additional experience, and a whole new section on tooling and workflow.</em></p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://images.unsplash.com/photo-1492052722242-2554d0e99e3a?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxNHx8Ym9va3xlbnwwfHx8fDE3MjkxOTIwMjJ8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://images.unsplash.com/photo-1492052722242-2554d0e99e3a?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxNHx8Ym9va3xlbnwwfHx8fDE3MjkxOTIwMjJ8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1492052722242-2554d0e99e3a?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxNHx8Ym9va3xlbnwwfHx8fDE3MjkxOTIwMjJ8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1492052722242-2554d0e99e3a?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxNHx8Ym9va3xlbnwwfHx8fDE3MjkxOTIwMjJ8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1492052722242-2554d0e99e3a?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxNHx8Ym9va3xlbnwwfHx8fDE3MjkxOTIwMjJ8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1456w" sizes="100vw"><img src="https://images.unsplash.com/photo-1492052722242-2554d0e99e3a?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxNHx8Ym9va3xlbnwwfHx8fDE3MjkxOTIwMjJ8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" width="4608" height="3456" data-attrs="{&quot;src&quot;:&quot;https://images.unsplash.com/photo-1492052722242-2554d0e99e3a?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxNHx8Ym9va3xlbnwwfHx8fDE3MjkxOTIwMjJ8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:3456,&quot;width&quot;:4608,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;green ceramic mug beside book&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="green ceramic mug beside book" title="green ceramic mug beside book" srcset="https://images.unsplash.com/photo-1492052722242-2554d0e99e3a?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxNHx8Ym9va3xlbnwwfHx8fDE3MjkxOTIwMjJ8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1492052722242-2554d0e99e3a?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxNHx8Ym9va3xlbnwwfHx8fDE3MjkxOTIwMjJ8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1492052722242-2554d0e99e3a?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxNHx8Ym9va3xlbnwwfHx8fDE3MjkxOTIwMjJ8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1492052722242-2554d0e99e3a?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxNHx8Ym9va3xlbnwwfHx8fDE3MjkxOTIwMjJ8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><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 tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><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">Photo by <a href="true">Aaron Burden</a> on <a href="https://unsplash.com">Unsplash</a></figcaption></figure></div><p>I decided to try the paid subscriptions model about a couple of years ago. It was not because I thought I could make technical writing my day job&#8212;I already have three of those, and I can't imagine not doing any of them. It was mostly for validation: to see if I could get anyone to care enough about my writing to be willing to pay something, not much, for it. And also, it couldn't hurt, right?</p><p>Long story short, it worked... somewhat. Regarding validation, I'm more than happy for my 70 paid subscribers. I couldn't imagine even a single person would be willing to support my writing. That extra energy also helped motivate me to write more and, I hope, better.</p><p>However, in terms of affordability, technical writing still is little more than a hobby&#8212;and sometimes a rather expensive hobby &#8212;for me and probably for 95% of my fellow writers here at Substack. </p><p>Many of you have deep expertise in areas where you could charge a substantial amount by the hour, yet you choose to share that expertise for free.</p><p>And I get it, believe me. I also struggle with the dichotomy of wanting to share as much as possible with the widest audience I can and the reality of having too little time and too much work&#8212;like, real work, the one that pays the bill&#8212;to be able to give my Substack all the love I'd like to pour into it. </p><p>So, over the past year I've tried different models to strike the right balance for doing something that I love&#8212;sharing some hard-earned lessons on sometimes fairly niche and complex technical topics&#8212;in a way I can afford to.</p><p>On one extreme, I tried doing exclusive articles, but I found out some of my best writing was hiding in plain sight from the vast majority of my readers. Why write exclusively for 70 people when other 2000 are eager to read it?</p><p>On the other extreme, I tried the patron-like <em>support-me-if-you-can</em> model, but most readers can't afford to support you, even if they want to. And to top it all, the subscription model seems to be declining&#8212;I know I have subscription fatigue, and probably you, too.</p><p>But I think I've found a sweet spot, and I want to tell you about it because I honestly think if it works for me, it'll work for many of you, probably even better than for me.</p><p>The gist is this: <strong>write a technical book alongside your Substack</strong>, using free articles as the primary material for content and the main channel to drive sales.</p><p>Over the last eight months or so, I've experimented with this idea and found a reassuring, if modest, level of success. So, in this article, I want to do three things. First, convince you that this might be a very good business model for you, too, regardless of your background. Second, give you some statistics from my own experience to show you how this might work. Third, offer you some concrete pointers to get started right away.</p><p>Buckle up!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.apiad.net/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://blog.apiad.net/subscribe?"><span>Subscribe now</span></a></p><h2>The Big Picture</h2><p>Here is (just one way) how to do it. </p><ol><li><p><strong>Pick a topic</strong> you're reasonably knowledgeable about and think you'd enjoy writing consistently about&#8212;for example, graph theory is one of those topics for me; large language models is another. Aim to write between 2 and 4 articles a month on that topic.</p></li><li><p>Each article is published for free in your Substack and becomes <strong>a new chapter</strong> (or part of a larger chapter) in your in-progress book.</p><p><br><em>Now, here's the part no one tells you (or at least no one told me!) You don't have to wait for the book to be complete before selling it. On the contrary, <strong>start pitching the book from day zero</strong>.</em> <br></p></li><li><p><strong>Write a launch article</strong> with a table of contents or a couple of introductory chapters. Explain to your readers why this is the best way to support your Substack, although they will still get all the content for free. Find a platform to sell PDFs (more on this later) and set a camp there.</p></li><li><p><strong>Add a call to action</strong> for every new article to remind readers the book is a thing. Maybe throw in a temporary discount. Also, as new articles become new chapters, you&#8217;ll find yourself returning to old chapters and doing some editing, refactoring, etc. This is ok, but don&#8217;t overdo it.</p></li><li><p>From time to time, <strong>publish a short book progress update article</strong> restating the book's purpose and timeline and laying out what has been added since the last update (I do it every four articles or so). This is your chance to reintroduce the whole book idea to potential new readers and remind old readers they can support you that way in more than a footnote.</p></li><li><p>When the book&#8217;s content is finished (after no less than a year probably), and a first draft is ready for publication, <strong>write a summary article</strong> and explain your readers where they can get the finished version (I will most likely self-publish, but you can choose your own adventure). </p></li></ol><p>And that&#8217;s it! It's so simple that it seems it can't work, but my early experiments say it works one order of magnitude better than paid subscriptions.</p><h2>Will anyone get into this?</h2><p>Yes, believe it: some people will buy the crappy version 0.1, assuming it's an exciting topic! Others will buy the 0.2 and 0.3, all the way to those who will wait until the final draft is ready.</p><p>To sweeten the deal, I often set a reasonably low &#8220;early access&#8221; price compared to what a full technical book might cost. I also offer other perks, such as a private Discord for early readers, a special shout-out in the acknowledgment section, and other things to encourage readers to become part of the process rather than just recipients of the final product.</p><p>But mostly, the selling point is just the fact that I'm writing this thing in public, incorporating early feedback. That, and the fact that your readers are amazing and will do everything they can to support you. This gives them something concrete, a one-time transaction that doesn't trigger our dread for another subscription.</p><p>Since I stumbled upon this idea, I've completely changed my Substack business model. No more paywalled articles. With this model, I've been able to make all my content open and free while still having something valuable enough that some readers are willing to pay for.</p><p>I still have subscriptions enabled on my Substack, though they have now become a free-ride ticket to all my current and future books. Readers who want to support all of my work and can afford to do so will still go for a traditional subscription. But those who can&#8217;t or don&#8217;t want to be attached to another subscription have this alternative. It's a win-win.</p><p>Besides all the advantages in terms of profitability, there's another way in which this pivot has positively impacted my writing, and it's even more important: <em>I'm more motivated than ever to write.</em> </p><p>Since all my writing is now public, I know I'll have as many eyes as I could wish for every article. And at the same time, I know I'm not writing exactly for free. Each article brings a trickle of new book sales, not enough to make a living out of it (yet), but enough to trick my primate dopamine-seeking brain.</p><h2>Some results of my own</h2><p>If you&#8217;re here for the numbers, let me share some of my statistics for the past 8 months. I started with this idea in late February, and I have been running three book projects since in <a href="https://store.apiad.net">my Gumroad account</a>:</p><ol><li><p><a href="https://store.apiad.net/l/tsoc">The Science of Computation</a> is a long-term project that aims to map all of Computer Science in an accessible and exciting way. It&#8217;s perhaps 20% completed.</p></li><li><p><a href="https://store.apiad.net/l/graphs">The Hitchhikers Guide to Graph</a> is a fun introduction to graph theory and algorithms that doesn&#8217;t require college-level math. It&#8217;s about a third of the way, although behind schedule according to my initial intentions.</p></li><li><p><a href="https://store.apiad.net/l/chatbots">How to Train your Chatbot</a> is a practical handbook on using large language models to build cool applications. It&#8217;s almost finished now, and it&#8217;s by far my most successful writing project to date.</p></li></ol><p>Each has the same business model. You can buy the early access version for a reasonable fee or a bundle that gets you all three for the price of one. That is my most sold product, of course. I often offer up to 50% discounts as CTAs on new articles, which are the main drivers for new sales.</p><p>I have almost 200 sales so far, which is not much by any stretch but is at least two to three times larger than my subscription-based income (exact numbers are hard to come by because of all the middlemen in both models). This is still insufficient to replace any of my regular income streams, but it&#8217;s getting closer by the day.</p><h2>But, but&#8230;</h2><p>"But wait&#8212;I hear you ask&#8212;writing a book is supposed to be very hard!"</p><p>Yes, it is. It is harder than just writing a sequence of more or less interconnected articles. There is definitely extra work involved in writing, formatting, and setting up yet another platform (because why the hell Substack doesn't have that feature yet, right?).</p><p>But here is the thing. Writing is way harder than any of that, and you're already doing the bulk of it. The rest is not that much harder. If you can consistently pump one article every couple of weeks, believe me, you can write a technical book.</p><p>"Ok but, what if I don't write about a single, focused topic?"</p><p>I hear you, I'm writing not one but three (!) distinct books on very different topics and for different audiences because I have many diverging interests&#8212;and I have three or four more that I just want to get started on, but I&#8217;m sensible enough to understand I can&#8217;t handle more than 3 at a time.</p><p>Perhaps you can find a subset of your articles that can be tied together into a coherent topic like I did. Or perhaps variety is your thing! Maybe your book is about 20 weird, interesting things few people know (I&#8217;m looking at all you polymaths out there!)</p><p>"But&#8212;I hear you again&#8212;I just want to share my knowledge freely!"</p><p>I get it, and it's commendable, truly. If you can afford to, that is. But what I've found out is that more often than not, even those who already are in a very stable financial position eventually discover they can't write for free as much as they'd want to. There is a finite amount of time and so many things to do with it. This is a way to make that free writing at least a bit self-supporting. </p><p>But you can still make 100% of your content free. That's what I'm doing with all my books. Everything, including source code, is available for free online. The book is just a convenient packaging with some additional syrup and a couple of cherries on the top&#8212;if you can pardon the lousy metaphor.</p><p>The point is that you can adapt this model to your interests and values. You can make all or most of the content free, or you can make the book an extended version of your articles. The core of the idea is that 80% or more of the work is already done when you hit publish on Substack. And the remaining 20% could be enough to make the whole thing, if not profitable, at least affordable.</p><h2>Some final words</h2><p>Listen, I'm advocating strongly for this business model because I'm rooting for you. I truly believe most of you technical folks out there have what it takes to make a compelling book on your area of expertise. But I understand this is not for everyone. So here are some reasons why you might not want to do this.</p><p>First, it does take some extra effort. The hardest part is, as you might suspect, consistent writing. I waited more than a year to ensure I'd found the workflow and rhythm that allowed me to write more or less consistently without the rest of my world breaking apart. If you're only a couple of months into technical writing, maybe it's better to wait until you've found your pace.</p><p>Second, it does put some extra pressure on you. Once you commit to a topic, you'll have to find a way to stay motivated to write about that same topic for over a year--or as long as it takes to finish the book. You can take some rest here and there, of course. But once you have people paying in advance for something you'll deliver in the near future, some pressure will inevitably build up.</p><p>Finally, we all know that once a hobby becomes a job, it stops being fun. There is the risk that this model turns your otherwise pleasurable moments of exploration into yet another thing you have to do instead of a thing you want to do. I don't have any magic potions to fight that. Still, I've found that keeping a healthy variety of topics to write about lets me procrastinate from one topic while investing in another, tricking my primate brain into thinking this is not work.</p><p>But all in all, I think this is one of the most underrated business models for technical writers, and there has never been a better time to do it. You have the technology, the platform, and now a community of like-minded writers to support you and help you stay motivated, and sometimes kick you in the butt if we must. </p><p>Please go ahead and give this idea at least a fair chance; you'll be surprised by how much you can enjoy it. If you want a bit of advice on getting started, feel free to reach out in the comments and ask around. I&#8217;m happy to share whatever little experience I have on this journey.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.apiad.net/p/turn-your-substack-into-a-technical/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.apiad.net/p/turn-your-substack-into-a-technical/comments"><span>Leave a comment</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[Fine-tuning Large Language Models]]></title><description><![CDATA[Or how to actually train your own chatbot.]]></description><link>https://blog.apiad.net/p/fine-tuning-large-language-models</link><guid isPermaLink="false">https://blog.apiad.net/p/fine-tuning-large-language-models</guid><dc:creator><![CDATA[Alejandro Piad Morffis]]></dc:creator><pubDate>Tue, 24 Sep 2024 15:44:30 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!sRQS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F594e9a34-5d8f-4660-ac7c-8fc74d020a32_1152x640.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote><p><em>You are reading <strong>Mostly Harmless AI</strong>, a section of <strong>Mostly Harmless Ideas</strong> where we dive into artificial intelligence and machine learning theory, techniques, and practice. Subscribe for free to get all future issues in your inbox.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.apiad.net/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://blog.apiad.net/subscribe?"><span>Subscribe now</span></a></p><p><em>This article is a part of my book on LLMs, <strong>How to Train your Chatbot, </strong>packed with intuitive explanations, practical advice, and fully working applications using large language models for all sorts of cool stuff. Get it on early access at 50% discount.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://store.apiad.net/l/chatbots/fiftyoff&quot;,&quot;text&quot;:&quot;How to Train your Chatbot - 50% off&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://store.apiad.net/l/chatbots/fiftyoff"><span>How to Train your Chatbot - 50% off</span></a></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_!sRQS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F594e9a34-5d8f-4660-ac7c-8fc74d020a32_1152x640.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sRQS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F594e9a34-5d8f-4660-ac7c-8fc74d020a32_1152x640.jpeg 424w, https://substackcdn.com/image/fetch/$s_!sRQS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F594e9a34-5d8f-4660-ac7c-8fc74d020a32_1152x640.jpeg 848w, https://substackcdn.com/image/fetch/$s_!sRQS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F594e9a34-5d8f-4660-ac7c-8fc74d020a32_1152x640.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!sRQS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F594e9a34-5d8f-4660-ac7c-8fc74d020a32_1152x640.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!sRQS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F594e9a34-5d8f-4660-ac7c-8fc74d020a32_1152x640.jpeg" width="1152" height="640" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/594e9a34-5d8f-4660-ac7c-8fc74d020a32_1152x640.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:640,&quot;width&quot;:1152,&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;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!sRQS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F594e9a34-5d8f-4660-ac7c-8fc74d020a32_1152x640.jpeg 424w, https://substackcdn.com/image/fetch/$s_!sRQS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F594e9a34-5d8f-4660-ac7c-8fc74d020a32_1152x640.jpeg 848w, https://substackcdn.com/image/fetch/$s_!sRQS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F594e9a34-5d8f-4660-ac7c-8fc74d020a32_1152x640.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!sRQS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F594e9a34-5d8f-4660-ac7c-8fc74d020a32_1152x640.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><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 tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><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>Base LLMs, especially the largest ones, are often all you need. They have proven to be remarkably effective just with well-crafted prompts. However, there are instances where relying solely on base models, no matter how strong, may not suffice. Sometimes, you actually need to <em>train</em> your own chatbot.</p><p>Two examples are when you want to incorporate private knowledge or customize a model's behavior to align with specific industry requirements. If the task you need to solve is very specific or the requirements are very strict, it may be too hard to tame a large base model purely using prompt engineering.</p><p>In these cases, you can fine-tune an existing model, effectively enhancing its performance for specialized tasks and ensuring it meets your unique needs. This can range from a full training batch to using very efficient and laser-focused tweaks in specific parts of a model.</p><p>This article will explore the most important fine-tuning techniques available today, from traditional methods to more parameter-efficient approaches. Additionally, I will give you some practical tips to help you get the most out of your fine-tuning efforts.</p><p>Buckle up!</p><h2>Why Fine-Tuning?</h2><p>In short, fine-tuning allows you to adapt pre-trained models to domains, tasks, or general requirements for which they were not designed initially with minimum effort. This is achieved with additional training, but some clever techniques are used to make it as efficient as possible. Let's look at some examples of cases where you may want to fine-tune a model.</p><h3>Solving a Novel Task or Domain</h3><p>As the landscape of machine learning evolves, new tasks frequently emerge that require specialized understanding and capabilities. Fine-tuning enables existing models to be tailored to these novel tasks without starting from scratch. For instance, a general-purpose language model can be fine-tuned for specialized applications such as legal document analysis, medical diagnosis, or customer sentiment analysis.</p><p>Training a model from the ground up is often resource-intensive, requiring substantial computational power, time, and large amounts of labeled data. Fine-tuning offers a more efficient alternative by building upon the knowledge already embedded in pre-trained models.</p><p>Since these models have already learned general language patterns and structures during their initial training phase, fine-tuning can often focus on optimizing only a fraction of the parameters relevant to the new task.</p><h3>Reusing Large Models</h3><p>The ability to reuse pre-trained models across different downstream tasks is one of the most significant advantages of fine-tuning. Instead of developing separate models for each task, organizations can maintain a single base model that serves multiple purposes through fine-tuning. </p><p>That is, you can have a large model trained on a large, general purpose corpora, and a bunch of small &#8220;adapter&#8221; models that you can plugin to steer the big model as necessary.</p><p>For example, a base LLM trained on general text can be fine-tuned for tasks such as document classification or question-answering in the same domain by adding small adapters for each subtask. This means instead of dozens of big models&#8212;one for each task&#8212;you can have one even bigger model with dozens of small pluggable parts, maximizing the utility of existing resources and reducing redundancy. This not only streamlines development processes but also fosters consistency across applications. </p><h3>Incorporating User Preferences</h3><p>User preferences and requirements can evolve over time, requiring adjustments to how models respond or behave. Fine-tuning provides a mechanism to incorporate these changes incrementally without retraining from scratch. By training on new datasets that reflect updated user preferences or feedback, organizations can enhance user satisfaction and engagement with their applications. </p><p>For instance, a conversational AI can be fine-tuned to align more closely with specific customer service protocols or corporate idioms or styles. This responsiveness not only improves the model's relevance but also fosters trust and loyalty among users.</p><h3>Reducing Costs</h3><p>In many cases, organizations may seek to reduce costs associated with deploying large models due to infrastructure limitations or budget constraints. Fine-tuning allows you to adapt smaller models to achieve performance levels comparable to larger base models. </p><p>By hyper-focusing on specific tasks&#8212;and forgetting general-purpose linguistic capacities you may not need, such as the ability to answer Wikipedia-like trivia questions&#8212;smaller models can be optimized to deliver high-quality outputs without incurring the expenses associated with larger counterparts. This approach enables organizations to maintain competitive performance while minimizing operational costs.</p><h2>Flavors of Fine-Tuning</h2><p>Fine-tuning techniques can be categorized based on their computational cost and efficiency. Here&#8217;s an overview of the main fine-tuning strategies, sorted from the most costly to the most efficient.</p><h3>1. Full Parameter Fine-Tuning</h3><p>In full parameter fine-tuning, all parameters of the pre-trained model are updated during the training process. This approach allows for maximum flexibility and potential performance improvement on specific tasks, as the model can fully adapt to new data. However, it is computationally expensive and requires significant memory resources, making it impractical for very large models or when working with limited hardware.</p><h3>2. Partial Fine-Tuning</h3><p>Partial fine-tuning involves updating only a subset of the model's parameters while keeping others frozen. Typically, this method focuses on the upper layers of the model, which are more task-specific, while lower layers remain unchanged. This approach strikes a balance between performance and resource efficiency, allowing for faster training times and lower memory requirements compared to full fine-tuning.</p><h3>3. Parameter-Efficient Fine-Tuning</h3><p>Parameter-efficient fine-tuning techniques, such as LoRA (Low-Rank Adaptation) and adapters, involve modifying only a small number of additional parameters while freezing most of the pre-trained model's weights. This drastically reduces computational costs and storage requirements. PEFT methods maintain comparable performance to full fine-tuning but are much more efficient, making them suitable for low-resource environments and enabling easier deployment across multiple tasks.</p><h3>4. Prompt &amp; Prefix Tuning</h3><p>Prompt tuning involves adding trainable prompt embeddings to the input data rather than modifying model parameters directly. This technique allows models to adapt to new tasks by optimizing these prompts while keeping the rest of the model frozen. It is a lightweight approach that requires significantly fewer resources than traditional fine-tuning methods.</p><p>Similarly, prefix tuning adds trainable tensors to each transformer block in a model. These tensors act as context that guides the model's output without altering its core parameters. Prefix tuning is efficient and effective for certain applications but may not achieve the same level of performance as more comprehensive fine-tuning methods.</p><h2>Tips for Effective Fine-Tuning</h2><p>Fine-tuning can significantly enhance the performance of language models, but to maximize its effectiveness, practitioners should consider several key strategies. As usual, it is critical not to miss the forest for the trees and not fall prey to early optimization. Here are essential tips for effective fine-tuning.</p><h3>1. Exhaust Prompt Engineering</h3><p>This is the most important advice and the most critical mistake I see small organizations making every single time. Before even thinking about fine-tuning, ensure you have thoroughly explored prompt engineering. </p><p>If a state-of-the-art model like GPT-4 cannot solve your task with a well-structured prompt and perhaps some few-shot examples, fine-tuning a smaller model is unlikely to yield better results. Effective prompt engineering can often resolve issues without requiring extensive fine-tuning, which is always more costly.</p><h3>2. Quality Trumps Quantity</h3><p>If you have already decided fine-tuning is the way to go, prioritize data quality. Focus on gathering high-quality, diverse examples accurately representing the new task or domain. However much data you can gather will be minuscule compared to the base training set, so quality is the only thing you can control.</p><p>Keep in mind that while you can leverage large models with clever prompt engineering to synthesize additional training data, you must always validate these examples with human experts to ensure their relevance and correctness. One great novel example beats 100 excellent but similar ones.</p><h3>3. Start Small, Grow As Needed</h3><p>Begin your fine-tuning efforts with parameter-efficient techniques, such as adapters or Low-Rank Adaptation (LoRA). These methods require fewer resources and are often easier to implement than full parameter tuning.</p><p>You&#8217;ll find tons of open-source implementations of efficient fine-tuning methods, so don&#8217;t let the prospect of technical difficulty scare you. Likewise, several LLM providers will let you fine-tune comercial or open source models on their infrastructure, effectively bypassing all need for self-hosting models. This way you get the best of both worlds: a model just for you that someone else takes care of.</p><p>If and only if parameter-efficient fine-tuning does not meet your needs, then consider transitioning to full parameter tuning as a subsequent step, but unless you're swimming in private data&#8212;and I mean, terabytes of data&#8212;you&#8217;re most likely safely on the efficient fine-tuning side.</p><h3>4. Stay in the Loop</h3><p>Finally, remember the field of AI is evolving extremely fast, with new models and techniques appearing basically every single week. A task that may require fine-tuning today could potentially be solved through effective prompting in next-generation models released tomorrow.</p><p>Therefore, avoid over-investing in ad-hoc fine-tuning pipelines that may become obsolete in a couple of months. Also, assess the capabilities of newer models regularly and be prepared to pivot away from fine-tuned proprietary models as soon as a good prompt shows marginally better results. Prompts are far more portable than models.</p><h2>Conclusion</h2><p>Fine-tuning is an excellent strategy for small organizations tackling domain-specific tasks effectively. As AI continues to evolve, the ability to adapt large pre-trained models to meet unique business needs is no longer a luxury but a necessity. For smaller organizations and individual developers, fine-tuning offers a pathway to harness the power of advanced language models without the prohibitive costs associated with training from scratch.</p><p>Also, leveraging fine-tuning allows small organizations to capitalize on their private data, tailoring models to reflect their specific industry requirements and user preferences. The moat is no longer having the bigger model since some of the best models are open source. The moat is your private data, and fine-tuning lets you get the best combo: a world-class base model trained on privileged data none of your competitors have.</p><p>Moreover, in a competitive landscape where larger organizations like Microsoft, Google, and Meta rely solely on base models, fine-tuning gives small businesses an advantage in niche domains. By optimizing existing models with proprietary data, they can differentiate themselves through improved performance and specialized capabilities that address the specific market needs.</p><blockquote><p><em>And that&#8217;s all for today&#8217;s issue. Remember you can get my LLM book at a 50% discount and discover tons of practical hints and dozens of working projects to take the best out of large language models.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://store.apiad.net/l/chatbots/fiftyoff&quot;,&quot;text&quot;:&quot;How to Train your Chatbot - 50% off&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://store.apiad.net/l/chatbots/fiftyoff"><span>How to Train your Chatbot - 50% off</span></a></p></blockquote>]]></content:encoded></item><item><title><![CDATA[A Pragmatic Workflow for Technical Writing]]></title><description><![CDATA[Introducing the CODER Framework, my home-made workflow.]]></description><link>https://blog.apiad.net/p/a-pragmatic-workflow-for-technical</link><guid isPermaLink="false">https://blog.apiad.net/p/a-pragmatic-workflow-for-technical</guid><dc:creator><![CDATA[Alejandro Piad Morffis]]></dc:creator><pubDate>Thu, 15 Aug 2024 15:37:47 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!oHc0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9c84cb9-8215-42be-abd8-52c0b3293a57_2912x1632.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_!oHc0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9c84cb9-8215-42be-abd8-52c0b3293a57_2912x1632.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oHc0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9c84cb9-8215-42be-abd8-52c0b3293a57_2912x1632.png 424w, https://substackcdn.com/image/fetch/$s_!oHc0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9c84cb9-8215-42be-abd8-52c0b3293a57_2912x1632.png 848w, https://substackcdn.com/image/fetch/$s_!oHc0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9c84cb9-8215-42be-abd8-52c0b3293a57_2912x1632.png 1272w, https://substackcdn.com/image/fetch/$s_!oHc0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9c84cb9-8215-42be-abd8-52c0b3293a57_2912x1632.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oHc0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9c84cb9-8215-42be-abd8-52c0b3293a57_2912x1632.png" width="1456" height="816" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b9c84cb9-8215-42be-abd8-52c0b3293a57_2912x1632.png&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;:7738994,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!oHc0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9c84cb9-8215-42be-abd8-52c0b3293a57_2912x1632.png 424w, https://substackcdn.com/image/fetch/$s_!oHc0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9c84cb9-8215-42be-abd8-52c0b3293a57_2912x1632.png 848w, https://substackcdn.com/image/fetch/$s_!oHc0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9c84cb9-8215-42be-abd8-52c0b3293a57_2912x1632.png 1272w, https://substackcdn.com/image/fetch/$s_!oHc0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9c84cb9-8215-42be-abd8-52c0b3293a57_2912x1632.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image buttonBase-GK1x3M"><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 tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image buttonBase-GK1x3M"><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">No actual LEGO toys were harmed to produce this image.</figcaption></figure></div><p><em>Technical writing</em> is one of the most valuable skills you can develop. It is the sort of writing meant to inform, explain, or discuss a concrete, technical topic in a given domain of expertise. Technical writing is factual, logical, and often backed by evidence. It is also terse and devoid of unnecessary adornments, but it doesn&#8217;t need to be dead boring.</p><p>The main purpose of technical writing is to produce in the reader a new level of <em>understanding </em>&#8212;as opposed to, say, creative writing, whose main purpose might be to entertain or inspire, or political writing, whose main purpose might be to make the reader sympathetic to some cause. Almost everything you read in this blog, including this post, is an example of technical writing.</p><p>Since technical writing is about <em>understanding</em>, writing should focus on <em>truthfulness</em> and <em>clarity</em>, while being <em>inspiring</em> and <em>engaging</em>. In this post, I&#8217;ll show you a loosely defined process I follow to achieve those objectives, making it easier to write often.</p><blockquote><p><em>This article is an updated and improved version of an old article I published in <span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;The Tech Writers Stack&quot;,&quot;id&quot;:1717194,&quot;type&quot;:&quot;pub&quot;,&quot;url&quot;:&quot;https://open.substack.com/pub/techwriters&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9bc8725e-7b92-4563-8eaa-d4d2c2b3a73a_1024x1024.png&quot;,&quot;uuid&quot;:&quot;98a2ddb9-05ca-4761-9112-82c1a086de86&quot;}" data-component-name="MentionToDOM"></span> when I was just getting started with technical writing. This new version incorporates the experience of more than 100 articles written and published since, which have garnered more than 50 thousand views in total.</em></p></blockquote><h3><strong>A Framework for Technical Writing</strong></h3><p>In this article, I will outline the CODER framework for technical writing: a structured approach to writing that I&#8217;ve converged on, designed to ensure clarity, coherence, and quality. Each step builds upon the previous one, guiding authors from idea collection to final publication. </p><p>The core of this process consists of five steps:</p><ol><li><p><strong>Collect</strong>: Gather all ideas, thoughts, talking points, arguments, evidence, etc.</p></li><li><p><strong>Outline</strong>: Organize those ideas and create a structured outline of the document.</p></li><li><p><strong>Draft</strong>: Write, expanding on all the ideas and filling in any gaps.</p></li><li><p><strong>Edit</strong>: Improve the structure, content, and style of the document.</p></li><li><p><strong>Release</strong>: Finalize the article, including formatting, adding images, tags, and metadata, and preparing it for publication or distribution.</p></li></ol><p>In the rest of this post, I will explain why this process is useful, then I will detail each of these steps, and finally, I will give you some concrete advice on improving the quality of the content, the clarity, and the style of your writing.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.apiad.net/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Mostly Harmless Ideas is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div><hr></div><h2>Why technical writing is different</h2><p>Technical writing is a form of communication that explains complex topics clearly and concisely. As in any form of writing, there are basic linguistic and stylistic considerations that you should follow, the most important being clearly defining your target audience. Only once you know <em>who </em>you&#8217;re writing for can you decide your content's tone, style, and depth.</p><p>However, there is one way in which technical writing is special. As I said in the introduction, technical writing aims to produce a form of <em>understanding</em> in the reader. This means there is something <em>you</em> know, and you want to transport that knowledge into your reader&#8217;s mind. The problem is that the things you know are not separated in your brain, and they are inside a single file that can be downloaded. No, they are interconnected with everything you know.</p><p>Thus, technical writing involves taking an amorphous web of interconnected ideas inside your brain and transforming it into a neat package that can be delivered with laser precision to your reader&#8217;s mind to become an amorphous web of ideas interconnected inside their brain. Like a pill, technical writing consists of a core set of clearly defined ideas wrapped in a nicely digestible envelope.</p><h3>Types of technical writing</h3><p>Technical writing encompasses three main types: informative, didactic, and argumentative. Informative writing focuses on providing factual information on a given topic. Didactic writing is more focused and instructional, usually providing step-by-step guidance or describing the process of doing something. Argumentative writing is slightly different in that it uses facts and evidence to make a case to try to convince readers of a particular opinion.</p><p>Some details of the writing process will change depending on the type of article you&#8217;re planning, but the general workflow I explain in this post works for any technical article.</p><p><strong>Informative articles</strong> are designed to impart factual information without any bias from the author, allowing readers to form their own opinions. This type of article covers various topics, from news stories and current events to historical accounts. By presenting facts in an unbiased fashion, these articles help readers to make informed decisions and develop their perspectives.</p><p><strong>Didactic articles</strong> are designed to help readers learn something new. They can cover a wide range of topics, from deeply technical algorithms to broader technologies. The key characteristic of a didactic article is its ability to present complex information in an organized, effective way. This often involves providing examples and visualizations to help the reader understand the material, as well as utilizing analogies and intuitive explanations to make the material more accessible.</p><p><strong>Argumentative articles</strong> are the most opinionated and persuasive pieces of writing; they are designed to convince readers of a certain point of view and to argue in favor of a specific opinion or against another opinion. To achieve this, argumentative articles are usually written as essays containing logical arguments presented in a way that is easy to understand. The arguments must have a clear structure, each step building upon the previous one to establish a solid foundation.</p><h3>Choosing what to write about</h3><p>All writing starts with choosing a topic. In the case of technical writing, that topic is always something you understand better than your reader. But it doesn&#8217;t necessarily need to be a topic you&#8217;re an expert on. It can be something you just learned or something you&#8217;re working on.</p><p>An idea for finding a technical topic you feel comfortable writing about is visualizing your reader as the person you were one or two years ago. Find a topic you can explain to a one-year-ago version of yourself that would make them understand it faster or easier than what it cost you. </p><p>In my case, I often write with my undergrad students in mind. I chose topics I think I would have been interested in reading about as a student. You can also do market research: find what your readers consume online, make polls, or ask a few of them directly.</p><p>The act of choosing a topic is an exercise in <em>defining your audience.</em> You always write <em>for</em> somebody, so the better you can profile that person, the easier it will be to find an interesting topic to tell them about. When you do that, you should be able to write a single sentence that conveys your primary objective with this piece of writing. In the case of this post, it would be something like this:</p><p><em>Help beginner technical writers improve their process with a workflow that will quickly transform a loosely defined idea into a polished article that is coherent and interesting.</em></p><h2>Dissecting the CODER Framework</h2><p>The workflow I will describe in this post is based on <em>distilling</em> what you know down to its core meaning and <em>packaging</em> it in an optimally digestible way. To achieve that, the key principle is to <em>disentangle content from style</em>.</p><p>First, you will define exactly what you want to say and in which order, devoid of any stylistic considerations. That is the core. Then, you&#8217;ll massage, enrich, and polish it, growing an envelope that is easy to digest.</p><p>Let&#8217;s go.</p><h3>Step 1: Collect</h3><p>Begin with an abstract objective for your article and a clearly defined audience. The first step is to expand that abstract idea into concrete talking points: the core ideas that you think are necessary to understand the topic.</p><p>For now, you only want to produce a set of <em>short sentences</em> for each core talking point. You don&#8217;t want to focus on anything related to the style of the writing; you just want to get all the ideas that could be relevant. Do not bother about order or structure. There is time for that later.</p><p>Keep in mind that these are claims, not merely objectives. Most people approach this stage by listing questions they want to answer, like <em>&#8220;Explain why technical writing matters&#8221;. </em>The problem with this approach is that you&#8217;re just delaying the actual task of getting those answers out of your brain. Instead, you should write your claims as explicit answers to those questions: <em>&#8220;Technical writing is useful for understanding a topic better because it forces you to find sound arguments&#8221;</em>.</p><p>You can start by listing questions, but then you must answer them. I've found that starting with some loose questions helps mainly when writing a didactic or informative piece. However, when I'm writing more opinionated essays, I often already have some concrete claims that I want to inject into the reader.</p><p>The reverse outline is the best technique for producing a solid core set of ideas. This works by distilling your mind from an unstructured, raw dump of it down to concrete talking points or claims. You can do this by just letting your mind run free and writing everything that comes to you about that topic. </p><p>But it&#8217;s much easier to talk than write, so I&#8217;ll record myself talking for 10-20 minutes on a particular topic, speaking my thoughts aloud without worrying about order or structure. It works best if I take a walk and use a recorder app on my phone. After I record the audio, I will transcribe it and go over each paragraph to distill it down to its central idea.</p><p>At the end of this step, you should have a comprehensive list of core ideas, supporting arguments, evidence, etc. This is all you <em>could</em> talk about.</p><h3><strong>Step 2: Outline</strong></h3><p>At this point, you have a set of more-or-less independent claims with all their support. Once the central claims and arguments are in place, it&#8217;s time to give some structure to the whole piece. Only now will you consider sections, subsections, and paragraphs.</p><p>Depending on what you want your reader to focus on, you will order the ideas differently. For example, if it&#8217;s a didactic piece, you will probably want to begin with intuitions that help the reader understand the why before the how. If it&#8217;s a more informative piece (e.g., a historical account or a summary of recent events), you&#8217;ll probably want chronological order. If it&#8217;s an argumentative piece, you&#8217;ll want to sort the claims so each one is supported by previous claims.</p><p>At this point, you may find that some of your claims are not sufficiently developed or missing a link somewhere. This might prompt you to return to step 1 and refine your claims. These first two steps can thus be somewhat cyclic. You can collect and outline, just to notice that you missed some key ideas, and then collect and outline again. Just don&#8217;t overdo it.</p><p>At the end of this step, you should have a clear picture of the final document layout, sections, subsections, core claims, and supporting arguments in their optimal order.</p><h3><strong>Step 3: Draft</strong></h3><p>At this stage, the ideas have all been incorporated into an organized structure effectively conveying a message. Now, each claim, argument, or point must be fully fleshed out into a comprehensive paragraph. This means elaborating on the points with examples, explanations, and additional ideas and ensuring the sentences and ideas flow together cohesively. The audience plays a crucial role here. How much they know about the subject will influence how deeply you dive.</p><p><em>Just write. Prioritize quantity over quality.</em></p><p>Don't become too fixated on adhering to one particular style right now. Instead, focus on developing your ideas and getting them across. Don't be afraid of using phrases that seem superfluous, as they can often help keep the writing flowing. Don't worry about how the sentences and paragraphs are laid out; you can refine them later. Don&#8217;t worry about verbosity and repetition either; you will come back, tweak, and polish your writing until it is exactly what you want.</p><p>Reusing content from step one of the process can be a useful way to quickly fill up space, but often, the structure you come up with after step 2 is so different that it makes more sense to start the process again. One possible way to do this is to record yourself speaking and simply write down everything you said. You could use an AI transcription tool to do it more quickly.</p><p>At the end of this step, you should have roughly one-and-a-half to twice the amount of  text you need and be satisfied that everything that could be said is in there.</p><h3>Step 4: Edit</h3><p>With your draft in hand, it&#8217;s time to roll up your sleeves and dive into the editing process. This stage is where the real magic happens, transforming your rough draft into a polished piece of writing. Editing is not just about correcting mistakes; it's about enhancing clarity, coherence, and overall impact. </p><p>Editing works better if you use a top-down approach, focusing first on the central issues with the document structure and high-level ideas and then zeroing down on the specific wording of each phrase.</p><p>So start by taking a step back and examining the structure of your article. Does the flow make sense? Are your arguments logically sequenced? You can rearrange paragraphs or sections to create a more compelling narrative. Don't hesitate to cut something out if something feels out of place or redundant. Remember, every paragraph should serve a purpose and contribute to your main message.</p><p>Next, zoom in on the details. Read through your draft with a critical eye, focusing on grammar, punctuation, and sentence structure. This is where you can refine your language to ensure it&#8217;s precise and engaging. Read your work aloud; this technique can help you catch awkward phrasing and identify areas where the rhythm feels off. If a sentence doesn&#8217;t flow smoothly, rework it until it does.</p><p>Always consider your audience at this stage. Are you using language that resonates with them? If your readers are novices, avoid jargon or provide clear explanations. If they are experts, ensure your content is rich with insights and depth. Tailoring your writing to your audience&#8217;s knowledge level is crucial for effective communication.</p><p>Don&#8217;t shy away from seeking feedback. Share your draft with trusted colleagues or peers who can offer constructive criticism. Fresh perspectives can highlight strengths and weaknesses you might have missed. Be open to their suggestions, but also trust your instincts about your content.</p><p>Finally, take a short break before performing a last read-through. This brief distance can help you spot inconsistencies, typos, or awkward phrases. </p><p>By the end of this step, your article should be refined and ready for the next phase. You should feel confident that your message is clear, your arguments are compelling, and your writing is engaging. Editing elevates your work to its highest potential, ensuring it resonates with your audience and effectively communicates your ideas.</p><h3>Step 5: Release</h3><p>Now that your article has been meticulously edited and polished, it&#8217;s time for the final step. This is where you take all your hard work and prepare it for the world to see. The goal here is to ensure that your content is ready for publication and optimized for maximum impact.</p><p>Begin by focusing on formatting. Ensure your article adheres to any specific guidelines or standards required by your publishing platform. Check that your headings, subheadings, and fonts are consistent throughout the document. Proper formatting enhances readability and gives your article a professional appearance.</p><p>Next, it&#8217;s time to add supplementary elements to enhance your content. This includes images, charts, or infographics that illustrate your points and make the article more engaging. Ensure all visuals are high-quality, properly attributed, and relevant to the content. Don&#8217;t forget to include alt text for accessibility and SEO purposes.</p><p>SEO is a crucial aspect of this final step. If your platform allows it, add relevant tags and metadata to your article to improve its visibility online. Consider keywords your audience might search for and incorporate them naturally into your content. This will help your article reach a wider audience and drive more traffic to your site.</p><p>Before hitting that publish button, take a moment to do a final review of the entire article. Check for any last-minute errors or formatting issues that might have slipped through the cracks. Ensure that all links are functional and that your citations are accurate. Read the article from top to bottom on a different device and screen size to where you wrote it, e.g., on your phone. This will help you more easily catch subtle formatting errors.</p><p>Once everything is in order, it&#8217;s time to publish your article. Publish it on your chosen platform, whether a blog, a technical journal, or a social media site. Share it with your network and promote it through various channels to maximize its reach. </p><p>Finally, take a moment to celebrate your accomplishment! Completing an article is no small feat, and you should be proud of your work. Remember, the Release step is not just about publishing; it&#8217;s about sharing your knowledge and insights with others. Your article has the potential to inform, educate, and inspire, so embrace the opportunity to make an impact.</p><h2>Final considerations</h2><p>When I wrote this post, I went into it with a good sense of the structure I wanted it to follow. Thus, I wrote the introduction almost entirely before moving on to the other sections. I added the first three sections when the rest was almost ready because I felt an introduction was needed. However, I still made sure to continually iterate on the ideas and arguments within each part of the document. I strived to ensure that each one was clear and concise and that I was expressing my thoughts most effectively.</p><p>After step 3, probably not all sections will evolve simultaneously. You might have sections that grow faster and arrive at style check, while others are still barebone bullet points. That&#8217;s fine, too.</p><p>This workflow can help you write better, avoid writer&#8217;s block, and make a pleasure out of writing. But the end goal is getting the article out there, not the process right. Anything that gets in the way of writing is an obstacle, so feel free to deviate. It's okay to adjust it to fit your writing style or any specific needs. Try to be flexible and have an open mind when approaching your writing workflow, as this will help you to create a positive experience.</p><h3>Asking for feedback</h3><p>You can ask for feedback at any step of the process, as long as you ask for the exact kind of useful feedback, although most people are only comfortable asking for feedback after the first round of edits.</p><p>In part, writers do this because many readers won&#8217;t be able to disentangle content from style, at least on a first read, so if you ask them for feedback on the initial unstructured list of claims, they will probably flood you with useless &#8212;at this point&#8212; suggestions about word choice, grammar, and sentence structure.</p><p>The solution to this is two-fold.</p><p>First, ask for specific feedback. Instead of &#8220;What do you think about this?&#8221;, ask specifically about your step. &#8220;Hey, I&#8217;m writing a piece on X, here are the main talking points I plan to cover&#8230; Do you see anything missing?&#8221;. Or, when you&#8217;re in edit mode, you can ask, &#8220;What is the most boring 20%? What is the 10% that I must keep?&#8221;.</p><p>The second way is to be selective about who you ask. Some people are better at analyzing factual content, and others are better at proofreading or style checking. Don&#8217;t ask for the same feedback from the same 100 people since you won&#8217;t be able to read it anyway.</p><p>And finally, understand that all feedback is optional, and only you know what message you want to convey. You should pay attention to your readers&#8217; suggestions because they are what you write for but, if advice goes against your gut feeling, trust your instincts.</p><h3>A note on writing tools</h3><p>You may have noticed there&#8217;s nothing in this guide about how to implement something like this workflow. It is purely conceptual. You could do it with pen and paper, a traditional word processor, a specialized writing app, or an AI-powered writing assistant. That said, some parts of this process can be aided with the right tools.</p><p>A good text editor will let you move entire blocks of text quickly, navigate back and forth between sections without having to scroll with your mouse, fold and hide pieces of text when necessary, check grammar and orthography, and add comments that won&#8217;t be shown in the final version to guide yourself. All of that will help you a lot.</p><p>Likewise, you can speed up a lot by talking and transcribing instead of directly writing. You can transcribe manually, but there are plenty of good automatic solutions out there, some even free.</p><p>Regarding generative AI tools, there are, of course, many takes on what is a genuine and ethical use of them to enhance but not replace your voice. You can use them well without losing your voice or being disingenuous. This article has seen maybe 30% of its content go through AI writing tools in all stages, from idea collection and outlining to the final tweaks, but I&#8217;ve reviewed every single word and tweaked almost every sentence afterward. </p><p>I use generative AI to rewrite sentences more clearly, expand on some talking points, suggest claims or ideas similar to the ones I already have, transcribe my audio recordings, extract essential claims from longer paragraphs, etc. As long as you are conscious of the process and stand by the final text, I would call that a fair use.</p><h3>Recap</h3><p>Here&#8217;s a quick recap of the whole workflow. </p><p>You start with a nebulous idea that you need to distill into concrete talking points. Then, you will review, refine, and support those talking points with evidence, arguments, and citations until satisfied they stand independently. Next, you will sort and cluster them to thread an outline that connects all the dots and fills in the gaps. </p><p>Then, you write as much as you can without worrying about quality. This is your first draft. Now you become your harshest critic and carefully edit your article, but don&#8217;t overdo it: often two passes&#8212;one for high-level, structural review and one for wording and style&#8212;are enough. And finally, you release.</p><p>The main takeaway of this article is to <em>separate content from style as much as possible.</em>&nbsp;Decide what you&nbsp;<em>want</em>&nbsp;to say first and then&nbsp;<em>how</em>&nbsp;you want to say it. That&#8217;s the key to high-quality and scalable technical writing. The rest is up to you.</p>]]></content:encoded></item></channel></rss>