<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[AI for data science]]></title><description><![CDATA[Discussions at the intersection of data science and AI]]></description><link>https://substack.hadley.nz</link><image><url>https://substackcdn.com/image/fetch/$s_!VBTV!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53f97f66-8d04-4f48-8405-10227bafae4d_1024x1024.png</url><title>AI for data science</title><link>https://substack.hadley.nz</link></image><generator>Substack</generator><lastBuildDate>Wed, 21 Oct 2026 22:51:54 GMT</lastBuildDate><atom:link href="https://substack.hadley.nz/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Hadley Wickham]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[tidydesign@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[tidydesign@substack.com]]></itunes:email><itunes:name><![CDATA[Hadley Wickham]]></itunes:name></itunes:owner><itunes:author><![CDATA[Hadley Wickham]]></itunes:author><googleplay:owner><![CDATA[tidydesign@substack.com]]></googleplay:owner><googleplay:email><![CDATA[tidydesign@substack.com]]></googleplay:email><googleplay:author><![CDATA[Hadley Wickham]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Tidy design principles is now AI for data science]]></title><description><![CDATA[I&#8217;ve changed the name of this newsletter from &#8220;tidy design principles&#8221; (which has not made sense for some time) to AI for data science.]]></description><link>https://substack.hadley.nz/p/tidy-design-principles-is-now-ai</link><guid isPermaLink="false">https://substack.hadley.nz/p/tidy-design-principles-is-now-ai</guid><dc:creator><![CDATA[Hadley Wickham]]></dc:creator><pubDate>Tue, 20 Oct 2026 13:13:44 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/16187f49-5c41-4eed-aa02-c29f2330dc3d_1200x600.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I&#8217;ve changed the name of this newsletter from &#8220;tidy design principles&#8221; (which has not made sense for some time) to AI for data science. I&#8217;ve made this change even as I continue to have mixed feelings about AI. I have found AI to be very rewarding for projects at the edges of my expertise, but I am also deeply worried about its long-term implications for the environment, for how we work, and for how we learn. (I also have AI fatigue and I&#8217;m sick of every work conversation being about it in some way or another.)</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!AKh9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c29e23a-f8e6-4004-9b0e-d22432aed5cc_1024x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!AKh9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c29e23a-f8e6-4004-9b0e-d22432aed5cc_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!AKh9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c29e23a-f8e6-4004-9b0e-d22432aed5cc_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!AKh9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c29e23a-f8e6-4004-9b0e-d22432aed5cc_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!AKh9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c29e23a-f8e6-4004-9b0e-d22432aed5cc_1024x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!AKh9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c29e23a-f8e6-4004-9b0e-d22432aed5cc_1024x1024.png" width="300" height="300" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7c29e23a-f8e6-4004-9b0e-d22432aed5cc_1024x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&quot;resizeWidth&quot;:300,&quot;bytes&quot;:525591,&quot;alt&quot;:&quot;A robot on a ladder, cheerfully painting over an old name on a shopfront   sign, the new name only half visible.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://substack.hadley.nz/i/221316261?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c29e23a-f8e6-4004-9b0e-d22432aed5cc_1024x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A robot on a ladder, cheerfully painting over an old name on a shopfront   sign, the new name only half visible." title="A robot on a ladder, cheerfully painting over an old name on a shopfront   sign, the new name only half visible." srcset="https://substackcdn.com/image/fetch/$s_!AKh9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c29e23a-f8e6-4004-9b0e-d22432aed5cc_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!AKh9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c29e23a-f8e6-4004-9b0e-d22432aed5cc_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!AKh9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c29e23a-f8e6-4004-9b0e-d22432aed5cc_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!AKh9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c29e23a-f8e6-4004-9b0e-d22432aed5cc_1024x1024.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>But AI is happening regardless of how I feel about it, and it&#8217;s better to recognise that my work (and my writing) has changed and will continue to change. Even so, the most important things remain the same: I&#8217;m still dedicated to my mission to make data science faster, better, and more fun. And I believe I have useful knowledge to share, and that clear, informative writing has a positive impact on the world.</p><p>To that end, I&#8217;m rededicating myself to daily writing, with the goal of producing one post a week. I have a large backlog of topics I want to write about, including my recent work on data-dict and data-diff, my experiences using AI for R package development, and what my colleagues at Posit are working on.</p><p>Thanks for continuing to travel this rocky road with me. As always, if you have ideas for particular topics you think I should cover, please let me know in the comments!</p>]]></content:encoded></item><item><title><![CDATA[A no bullshit guide to LLMs]]></title><description><![CDATA[A talk from useR! 2025]]></description><link>https://substack.hadley.nz/p/a-no-bullshit-guide-to-llms</link><guid isPermaLink="false">https://substack.hadley.nz/p/a-no-bullshit-guide-to-llms</guid><dc:creator><![CDATA[Hadley Wickham]]></dc:creator><pubDate>Sat, 05 Sep 2026 19:24:14 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!zWbH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fefd2f250-62e0-43bb-8f7e-d6954a4bc3b1_1920x1080.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1><strong>A no bullshit guide to LLMs</strong></h1><blockquote><p>I&#8217;m busy preparing for posit::conf() so no new content this week, but I thought you might enjoy this write up of a talk I gave about a year ago at useR! 2025. I find it interesting to reflect on just how much has changed in the last 12 months. Not least, the agentic coding revolution where now LLMs are writing the majority of code for most software engineers (including me!). And Claude is no longer my favourite model given how it&#8217;s become even more relatively expensive, and the quality of its writing has dropped substantially. My new favourite is Kimi K3, which feels somewhere between Opus and Fable in terms of quality, and is closer to the cost of Sonnet.</p></blockquote><h2><strong>Introduction</strong></h2><p>What I want to give you is a no bullshit guide to LLMs. I think there&#8217;s a lot of bullshit about LLMs in the air, so my goal is to hopefully clear a little bit of that.</p><p>I think probably many of you have big feelings about AI. I certainly do. If you read about AI, on the one hand there&#8217;s so much unbridled optimism, and on the other, so much skepticism. And as you start to engage with it yourself, I think you experience both of those emotions, because LLMs can seem both incredibly, surprisingly, intelligent and also incredibly, surprisingly, stupid. So I&#8217;ll show you a few examples of that. But if you don&#8217;t feel conflicted about AI, that&#8217;s weird.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zWbH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fefd2f250-62e0-43bb-8f7e-d6954a4bc3b1_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zWbH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fefd2f250-62e0-43bb-8f7e-d6954a4bc3b1_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!zWbH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fefd2f250-62e0-43bb-8f7e-d6954a4bc3b1_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!zWbH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fefd2f250-62e0-43bb-8f7e-d6954a4bc3b1_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!zWbH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fefd2f250-62e0-43bb-8f7e-d6954a4bc3b1_1920x1080.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zWbH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fefd2f250-62e0-43bb-8f7e-d6954a4bc3b1_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/efd2f250-62e0-43bb-8f7e-d6954a4bc3b1_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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;: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_!zWbH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fefd2f250-62e0-43bb-8f7e-d6954a4bc3b1_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!zWbH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fefd2f250-62e0-43bb-8f7e-d6954a4bc3b1_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!zWbH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fefd2f250-62e0-43bb-8f7e-d6954a4bc3b1_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!zWbH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fefd2f250-62e0-43bb-8f7e-d6954a4bc3b1_1920x1080.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></figure></div><p>Oil painting of a shadowy figure amid swirling clouds and circuitry</p><p>My feelings of existential dread swing between mild and moderate. They&#8217;re currently mild at the moment, but it does feel like my identities as a software engineer and a data scientist are under threat. And it&#8217;s very easy to feel disempowered right now. One of the things I do that&#8217;s not so helpful is I get drunk and donate money to good causes. I&#8217;m not going to promote that as a strategy.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!byhR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3105ef9b-4b0f-45f7-a920-b53162c31761_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!byhR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3105ef9b-4b0f-45f7-a920-b53162c31761_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!byhR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3105ef9b-4b0f-45f7-a920-b53162c31761_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!byhR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3105ef9b-4b0f-45f7-a920-b53162c31761_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!byhR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3105ef9b-4b0f-45f7-a920-b53162c31761_1920x1080.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!byhR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3105ef9b-4b0f-45f7-a920-b53162c31761_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3105ef9b-4b0f-45f7-a920-b53162c31761_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!byhR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3105ef9b-4b0f-45f7-a920-b53162c31761_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!byhR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3105ef9b-4b0f-45f7-a920-b53162c31761_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!byhR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3105ef9b-4b0f-45f7-a920-b53162c31761_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!byhR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3105ef9b-4b0f-45f7-a920-b53162c31761_1920x1080.jpeg 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image 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>Oil painting of a person picking up trash</p><p>But the other thing that I&#8217;ve found really useful is just to try and do one small thing to make the world a better place. So occasionally, when I&#8217;m feeling particularly down, I&#8217;ll just go out and pick up some trash around my neighborhood. And that reminds me that it&#8217;s not my job to fix the world. All I can do is make my little bit of the world a little bit better.</p><p>And so I want to give you a bit of that today. I want to give you some ways that you can engage with AI and LLMs that hopefully empower you and make you feel a little bit more in control of your future. So my two goals today are to give you a handful of useful skills and to demystify a few of the many, many, many jargony terms that come with AI.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!O7Sb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8a5b993-6b03-4bf0-834f-81370a8d833c_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!O7Sb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8a5b993-6b03-4bf0-834f-81370a8d833c_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!O7Sb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8a5b993-6b03-4bf0-834f-81370a8d833c_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!O7Sb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8a5b993-6b03-4bf0-834f-81370a8d833c_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!O7Sb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8a5b993-6b03-4bf0-834f-81370a8d833c_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!O7Sb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8a5b993-6b03-4bf0-834f-81370a8d833c_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e8a5b993-6b03-4bf0-834f-81370a8d833c_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!O7Sb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8a5b993-6b03-4bf0-834f-81370a8d833c_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!O7Sb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8a5b993-6b03-4bf0-834f-81370a8d833c_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!O7Sb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8a5b993-6b03-4bf0-834f-81370a8d833c_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!O7Sb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8a5b993-6b03-4bf0-834f-81370a8d833c_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>Two main goals of this talk: useful skills, demystify jargon</p><p>And I&#8217;m going to do this mostly in R, using the <a href="https://ellmer.tidyverse.org/">ellmer</a> package. ellmer is a package that me and a few others at <a href="https://posit.co/">Posit</a> have been working on recently. As you might guess from the name, it&#8217;s about using LLMs in R, and it has the honor of being the first package name that I&#8217;ve created by adding vowels rather than taking them away.</p><p>So here&#8217;s some ellmer code. We&#8217;re gonna start by loading ellmer, obviously, and then I&#8217;m gonna create this chat object. Here I&#8217;m using <code>chat_anthropic()</code>. I&#8217;ll show you a few other models today, but this is my starting place. This is my favorite model. And then I can interact with it from R in exactly the same way you can interact with it on the web.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PQlm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23a0e689-ccc9-4d48-a2a3-7897607a90c5_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PQlm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23a0e689-ccc9-4d48-a2a3-7897607a90c5_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!PQlm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23a0e689-ccc9-4d48-a2a3-7897607a90c5_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!PQlm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23a0e689-ccc9-4d48-a2a3-7897607a90c5_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!PQlm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23a0e689-ccc9-4d48-a2a3-7897607a90c5_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!PQlm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23a0e689-ccc9-4d48-a2a3-7897607a90c5_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/23a0e689-ccc9-4d48-a2a3-7897607a90c5_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!PQlm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23a0e689-ccc9-4d48-a2a3-7897607a90c5_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!PQlm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23a0e689-ccc9-4d48-a2a3-7897607a90c5_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!PQlm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23a0e689-ccc9-4d48-a2a3-7897607a90c5_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!PQlm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F23a0e689-ccc9-4d48-a2a3-7897607a90c5_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>ellmer code: creating a chat with chat_anthropic() and asking &#8220;Who are you?&#8221;</p><h2><strong>LLMs kind of suck</strong></h2><p>I think one of the things that makes LLMs so hard to think about is they kind of turn upside down what we think of as computers being good at and what we think of computers being bad at.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!b-in!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70d206c3-dc23-4973-81a3-21ca108f6a3a_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!b-in!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70d206c3-dc23-4973-81a3-21ca108f6a3a_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!b-in!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70d206c3-dc23-4973-81a3-21ca108f6a3a_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!b-in!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70d206c3-dc23-4973-81a3-21ca108f6a3a_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!b-in!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70d206c3-dc23-4973-81a3-21ca108f6a3a_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!b-in!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70d206c3-dc23-4973-81a3-21ca108f6a3a_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/70d206c3-dc23-4973-81a3-21ca108f6a3a_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!b-in!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70d206c3-dc23-4973-81a3-21ca108f6a3a_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!b-in!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70d206c3-dc23-4973-81a3-21ca108f6a3a_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!b-in!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70d206c3-dc23-4973-81a3-21ca108f6a3a_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!b-in!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70d206c3-dc23-4973-81a3-21ca108f6a3a_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>Psychedelic painting of a computer</p><p>Because you think of computers as being good at multiplying numbers together, but it turns out that LLMs are pretty bad at multiplying numbers together. They&#8217;ll certainly do their darndest and get something that looks kind of right, but they&#8217;ll be a little bit off.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3fsF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F538ee9f5-c83f-4525-8879-d856dbd998e2_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3fsF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F538ee9f5-c83f-4525-8879-d856dbd998e2_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!3fsF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F538ee9f5-c83f-4525-8879-d856dbd998e2_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!3fsF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F538ee9f5-c83f-4525-8879-d856dbd998e2_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!3fsF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F538ee9f5-c83f-4525-8879-d856dbd998e2_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!3fsF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F538ee9f5-c83f-4525-8879-d856dbd998e2_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/538ee9f5-c83f-4525-8879-d856dbd998e2_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!3fsF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F538ee9f5-c83f-4525-8879-d856dbd998e2_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!3fsF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F538ee9f5-c83f-4525-8879-d856dbd998e2_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!3fsF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F538ee9f5-c83f-4525-8879-d856dbd998e2_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!3fsF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F538ee9f5-c83f-4525-8879-d856dbd998e2_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>LLMs can&#8217;t multiply big numbers</p><p>In fact, they can&#8217;t even count. So I asked this version of <a href="https://claude.ai/">Claude</a> how many n&#8217;s are in the word unconventional. I won&#8217;t make you think too much: it&#8217;s actually four n&#8217;s. But Claude confidently said two n&#8217;s.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qq5l!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5252f77-6f4a-4af9-8d09-e918e5b915b0_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qq5l!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5252f77-6f4a-4af9-8d09-e918e5b915b0_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!qq5l!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5252f77-6f4a-4af9-8d09-e918e5b915b0_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!qq5l!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5252f77-6f4a-4af9-8d09-e918e5b915b0_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!qq5l!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5252f77-6f4a-4af9-8d09-e918e5b915b0_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!qq5l!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5252f77-6f4a-4af9-8d09-e918e5b915b0_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c5252f77-6f4a-4af9-8d09-e918e5b915b0_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!qq5l!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5252f77-6f4a-4af9-8d09-e918e5b915b0_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!qq5l!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5252f77-6f4a-4af9-8d09-e918e5b915b0_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!qq5l!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5252f77-6f4a-4af9-8d09-e918e5b915b0_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!qq5l!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc5252f77-6f4a-4af9-8d09-e918e5b915b0_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>LLMs can&#8217;t even count: Claude says there are 2 n&#8217;s in unconventional</p><p>And then I asked it again, and it said there were three n&#8217;s.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RyY6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba028692-4539-4bc0-bc9d-2ec4c77861d9_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RyY6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba028692-4539-4bc0-bc9d-2ec4c77861d9_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!RyY6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba028692-4539-4bc0-bc9d-2ec4c77861d9_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!RyY6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba028692-4539-4bc0-bc9d-2ec4c77861d9_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!RyY6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba028692-4539-4bc0-bc9d-2ec4c77861d9_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!RyY6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba028692-4539-4bc0-bc9d-2ec4c77861d9_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ba028692-4539-4bc0-bc9d-2ec4c77861d9_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!RyY6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba028692-4539-4bc0-bc9d-2ec4c77861d9_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!RyY6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba028692-4539-4bc0-bc9d-2ec4c77861d9_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!RyY6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba028692-4539-4bc0-bc9d-2ec4c77861d9_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!RyY6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fba028692-4539-4bc0-bc9d-2ec4c77861d9_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>And they&#8217;re not even consistent: now it says 3 n&#8217;s</p><p>And then, the cool thing about this being an API: I asked one hundred times. 14 times it said there was one n, 76 times it said there were two n&#8217;s, and 10 times it said there were three n&#8217;s. So zero times it got it correct. And this is an easy problem!</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!R8dz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84323169-d209-4234-981c-850e43c0007c_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!R8dz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84323169-d209-4234-981c-850e43c0007c_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!R8dz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84323169-d209-4234-981c-850e43c0007c_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!R8dz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84323169-d209-4234-981c-850e43c0007c_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!R8dz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84323169-d209-4234-981c-850e43c0007c_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!R8dz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84323169-d209-4234-981c-850e43c0007c_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/84323169-d209-4234-981c-850e43c0007c_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!R8dz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84323169-d209-4234-981c-850e43c0007c_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!R8dz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84323169-d209-4234-981c-850e43c0007c_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!R8dz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84323169-d209-4234-981c-850e43c0007c_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!R8dz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84323169-d209-4234-981c-850e43c0007c_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>And another run says 1 n, with a tally of 100 runs: never correct</p><p>Now you might notice I&#8217;ve specified this model here, and that&#8217;s because Claude fixed this problem. So now if you ask Claude how many n&#8217;s are there in unconventional, it gives you the right number. And this is not because the model has become more intelligent. This is because <a href="https://www.anthropic.com/">Anthropic</a> is embarrassed by the fact that its LLM can&#8217;t count the number of letters, and has adjusted their prompt to make it do this correctly.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1fvk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed3bdb82-f274-43a2-a705-02ace538e634_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1fvk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed3bdb82-f274-43a2-a705-02ace538e634_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!1fvk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed3bdb82-f274-43a2-a705-02ace538e634_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!1fvk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed3bdb82-f274-43a2-a705-02ace538e634_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!1fvk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed3bdb82-f274-43a2-a705-02ace538e634_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!1fvk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed3bdb82-f274-43a2-a705-02ace538e634_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ed3bdb82-f274-43a2-a705-02ace538e634_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!1fvk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed3bdb82-f274-43a2-a705-02ace538e634_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!1fvk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed3bdb82-f274-43a2-a705-02ace538e634_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!1fvk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed3bdb82-f274-43a2-a705-02ace538e634_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!1fvk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed3bdb82-f274-43a2-a705-02ace538e634_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>And the goal posts are constantly moving: Claude Sonnet 4 now counts 4 n&#8217;s correctly</p><p>And interestingly, if you&#8217;ve been following any of the news about <a href="https://chatgpt.com/">ChatGPT</a>&#8217;s latest model, it has exactly the same problem. Like how many b&#8217;s in blueberry? This is a simpler problem, I think. It thinks there are three b&#8217;s rather than two.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pBsB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a83e057-7316-4e6e-973c-90fc5350503c_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pBsB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a83e057-7316-4e6e-973c-90fc5350503c_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!pBsB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a83e057-7316-4e6e-973c-90fc5350503c_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!pBsB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a83e057-7316-4e6e-973c-90fc5350503c_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!pBsB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a83e057-7316-4e6e-973c-90fc5350503c_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!pBsB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a83e057-7316-4e6e-973c-90fc5350503c_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1a83e057-7316-4e6e-973c-90fc5350503c_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!pBsB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a83e057-7316-4e6e-973c-90fc5350503c_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!pBsB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a83e057-7316-4e6e-973c-90fc5350503c_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!pBsB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a83e057-7316-4e6e-973c-90fc5350503c_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!pBsB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a83e057-7316-4e6e-973c-90fc5350503c_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>ChatGPT 5 miscounts the b&#8217;s in blueberry</p><p>So LLMs kind of suck, right? The results are stochastic, their models are constantly changing. The difference between good results and bad results can be razor thin (hence the term &#8220;the jagged edge&#8221;). And they always give results that look plausible, and it&#8217;s pretty unusual for them to say &#8220;oh, I don&#8217;t know&#8221; or &#8220;this is just my best guess&#8221;. They don&#8217;t admit doubt or lack of knowledge.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!F1VU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a67522b-a42e-48a2-a288-1a5e0871cf11_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!F1VU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a67522b-a42e-48a2-a288-1a5e0871cf11_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!F1VU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a67522b-a42e-48a2-a288-1a5e0871cf11_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!F1VU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a67522b-a42e-48a2-a288-1a5e0871cf11_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!F1VU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a67522b-a42e-48a2-a288-1a5e0871cf11_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!F1VU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a67522b-a42e-48a2-a288-1a5e0871cf11_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9a67522b-a42e-48a2-a288-1a5e0871cf11_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!F1VU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a67522b-a42e-48a2-a288-1a5e0871cf11_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!F1VU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a67522b-a42e-48a2-a288-1a5e0871cf11_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!F1VU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a67522b-a42e-48a2-a288-1a5e0871cf11_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!F1VU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a67522b-a42e-48a2-a288-1a5e0871cf11_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>So LLMs kind of suck: stochastic results, changing models, jagged edge, plausible answers, no doubt</p><h2><strong>Yes, and</strong></h2><p>So I think all of those things are true, and yet LLMs can do things that computers traditionally could not. We can ask them to write poems, like give me a limerick about the <a href="https://www.tidyverse.org/">tidyverse</a>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SIlk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4e44491-2002-4077-b4f0-c876031b8ea9_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SIlk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4e44491-2002-4077-b4f0-c876031b8ea9_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!SIlk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4e44491-2002-4077-b4f0-c876031b8ea9_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!SIlk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4e44491-2002-4077-b4f0-c876031b8ea9_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!SIlk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4e44491-2002-4077-b4f0-c876031b8ea9_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!SIlk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4e44491-2002-4077-b4f0-c876031b8ea9_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e4e44491-2002-4077-b4f0-c876031b8ea9_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!SIlk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4e44491-2002-4077-b4f0-c876031b8ea9_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!SIlk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4e44491-2002-4077-b4f0-c876031b8ea9_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!SIlk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4e44491-2002-4077-b4f0-c876031b8ea9_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!SIlk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4e44491-2002-4077-b4f0-c876031b8ea9_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>Computers can now write poems: the tidyverse limerick. &#8220;A coder who worked with great zeal, said tidyverse makes data feel real. With dplyr to wrangle and ggplot2&#8217;s angle, my pipe dreams are now a good deal.&#8221;</p><p>Maybe not the best limerick in the world, but certainly a better limerick than I can come up with in five seconds.</p><p>You can also use AI to roast your colleagues. I gave a talk at the <a href="https://en.wikipedia.org/wiki/Joint_Statistical_Meetings">JSM</a> a couple of days ago and came up with a few roasts. I particularly like the one for <a href="https://rdpeng.org/">Roger Peng</a>: &#8220;Roger believes in reproducibility, which is great because his jokes in lecture reproducibly bomb every time.&#8221;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!toYn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07984c82-2e76-4780-9c00-79ad96cc50f1_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!toYn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07984c82-2e76-4780-9c00-79ad96cc50f1_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!toYn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07984c82-2e76-4780-9c00-79ad96cc50f1_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!toYn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07984c82-2e76-4780-9c00-79ad96cc50f1_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!toYn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07984c82-2e76-4780-9c00-79ad96cc50f1_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!toYn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07984c82-2e76-4780-9c00-79ad96cc50f1_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/07984c82-2e76-4780-9c00-79ad96cc50f1_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!toYn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07984c82-2e76-4780-9c00-79ad96cc50f1_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!toYn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07984c82-2e76-4780-9c00-79ad96cc50f1_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!toYn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07984c82-2e76-4780-9c00-79ad96cc50f1_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!toYn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07984c82-2e76-4780-9c00-79ad96cc50f1_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>And roast your colleagues: roasts of Jeff Leek, Jenny Bryan, Mine, and Roger Peng</p><p>Or as Matt pointed out, you can of course combine the two and roast yourself with a limerick.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2feW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18ce862e-2c90-4e38-8413-0e32a8623164_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2feW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18ce862e-2c90-4e38-8413-0e32a8623164_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!2feW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18ce862e-2c90-4e38-8413-0e32a8623164_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!2feW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18ce862e-2c90-4e38-8413-0e32a8623164_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!2feW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18ce862e-2c90-4e38-8413-0e32a8623164_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!2feW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18ce862e-2c90-4e38-8413-0e32a8623164_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/18ce862e-2c90-4e38-8413-0e32a8623164_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!2feW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18ce862e-2c90-4e38-8413-0e32a8623164_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!2feW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18ce862e-2c90-4e38-8413-0e32a8623164_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!2feW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18ce862e-2c90-4e38-8413-0e32a8623164_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!2feW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18ce862e-2c90-4e38-8413-0e32a8623164_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>Or roast yourself poetically: a limerick roasting Hadley</p><p>And you can use LLMs to create art.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PlvQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa36e19a5-f7bf-44ba-b7ea-45f2c405ba27_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PlvQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa36e19a5-f7bf-44ba-b7ea-45f2c405ba27_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!PlvQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa36e19a5-f7bf-44ba-b7ea-45f2c405ba27_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!PlvQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa36e19a5-f7bf-44ba-b7ea-45f2c405ba27_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!PlvQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa36e19a5-f7bf-44ba-b7ea-45f2c405ba27_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!PlvQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa36e19a5-f7bf-44ba-b7ea-45f2c405ba27_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a36e19a5-f7bf-44ba-b7ea-45f2c405ba27_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!PlvQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa36e19a5-f7bf-44ba-b7ea-45f2c405ba27_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!PlvQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa36e19a5-f7bf-44ba-b7ea-45f2c405ba27_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!PlvQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa36e19a5-f7bf-44ba-b7ea-45f2c405ba27_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!PlvQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa36e19a5-f7bf-44ba-b7ea-45f2c405ba27_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>And create art: the ellmer hex logo and AI-generated paintings</p><p>And you can use them to make fun games. So I&#8217;m gonna give you a live demo.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gf7D!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70dba91a-38a9-4e9e-a366-9a428d775fba_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gf7D!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70dba91a-38a9-4e9e-a366-9a428d775fba_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!gf7D!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70dba91a-38a9-4e9e-a366-9a428d775fba_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!gf7D!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70dba91a-38a9-4e9e-a366-9a428d775fba_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!gf7D!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70dba91a-38a9-4e9e-a366-9a428d775fba_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!gf7D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70dba91a-38a9-4e9e-a366-9a428d775fba_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/70dba91a-38a9-4e9e-a366-9a428d775fba_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!gf7D!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70dba91a-38a9-4e9e-a366-9a428d775fba_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!gf7D!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70dba91a-38a9-4e9e-a366-9a428d775fba_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!gf7D!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70dba91a-38a9-4e9e-a366-9a428d775fba_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!gf7D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70dba91a-38a9-4e9e-a366-9a428d775fba_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>And make fun games: a quiz master system prompt with live_browser()</p><p>So I&#8217;ve asked it to create a fun quiz game that asks challenging questions about the tidyverse. So welcome to Tidy or Die!</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zsH7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F605d7327-850c-4517-aebc-436b5e63c059_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zsH7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F605d7327-850c-4517-aebc-436b5e63c059_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!zsH7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F605d7327-850c-4517-aebc-436b5e63c059_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!zsH7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F605d7327-850c-4517-aebc-436b5e63c059_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!zsH7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F605d7327-850c-4517-aebc-436b5e63c059_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!zsH7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F605d7327-850c-4517-aebc-436b5e63c059_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/605d7327-850c-4517-aebc-436b5e63c059_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!zsH7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F605d7327-850c-4517-aebc-436b5e63c059_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!zsH7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F605d7327-850c-4517-aebc-436b5e63c059_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!zsH7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F605d7327-850c-4517-aebc-436b5e63c059_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!zsH7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F605d7327-850c-4517-aebc-436b5e63c059_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>The quiz game introduces itself: Commander dplyr and the gauntlet of tidyverse challenges</p><p>Okay, so let&#8217;s see. You have a dataset called <code>sales</code> and you want to keep only rows where the revenue column is greater than a thousand. Which tidyverse function? Okay, let&#8217;s do a vote. Who thinks A? Okay, who thinks B? Okay, who thinks C? And who thinks D? Okay, let&#8217;s say B.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kIp0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36869de5-6e4d-4920-bc12-fc05f2560205_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kIp0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36869de5-6e4d-4920-bc12-fc05f2560205_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!kIp0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36869de5-6e4d-4920-bc12-fc05f2560205_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!kIp0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36869de5-6e4d-4920-bc12-fc05f2560205_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!kIp0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36869de5-6e4d-4920-bc12-fc05f2560205_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!kIp0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36869de5-6e4d-4920-bc12-fc05f2560205_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/36869de5-6e4d-4920-bc12-fc05f2560205_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!kIp0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36869de5-6e4d-4920-bc12-fc05f2560205_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!kIp0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36869de5-6e4d-4920-bc12-fc05f2560205_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!kIp0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36869de5-6e4d-4920-bc12-fc05f2560205_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!kIp0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36869de5-6e4d-4920-bc12-fc05f2560205_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>Round 1: which tidyverse function keeps only rows where revenue is greater than 1000?</p><p>Okay, so let&#8217;s do another question. Okay: I want to fit a linear model predicting values from row number, extract the R-squared value, and then return a tibble with group and &#8212; wow, okay. Which approach is most tidyverse elegant?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Rjr1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53c1e36d-041d-454c-ad40-a82960dba5cb_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Rjr1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53c1e36d-041d-454c-ad40-a82960dba5cb_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Rjr1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53c1e36d-041d-454c-ad40-a82960dba5cb_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Rjr1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53c1e36d-041d-454c-ad40-a82960dba5cb_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Rjr1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53c1e36d-041d-454c-ad40-a82960dba5cb_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Rjr1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53c1e36d-041d-454c-ad40-a82960dba5cb_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/53c1e36d-041d-454c-ad40-a82960dba5cb_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!Rjr1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53c1e36d-041d-454c-ad40-a82960dba5cb_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Rjr1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53c1e36d-041d-454c-ad40-a82960dba5cb_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Rjr1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53c1e36d-041d-454c-ad40-a82960dba5cb_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Rjr1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53c1e36d-041d-454c-ad40-a82960dba5cb_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>A much harder question: fit a linear model within each group and extract the R-squared</p><p>So it&#8217;s fun, right? You can certainly use LLMs to stop learning about anything, but you can also use them to learn about things in new ways.</p><p>And there&#8217;s lots of practical things you can do too. Here I&#8217;m going to take advantage of the first argument to <code>chat_anthropic()</code>, which provides a system prompt. A system prompt is not something you can use when you&#8217;re using a chat app on the web. But it&#8217;s something that&#8217;s going to set the tone for all of the following conversations, and I just say &#8220;be terse&#8221; here just so the answer will fit on one slide.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!AnNh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9bdb807-f46d-4ce9-9058-fb402160b1d2_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!AnNh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9bdb807-f46d-4ce9-9058-fb402160b1d2_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!AnNh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9bdb807-f46d-4ce9-9058-fb402160b1d2_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!AnNh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9bdb807-f46d-4ce9-9058-fb402160b1d2_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!AnNh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9bdb807-f46d-4ce9-9058-fb402160b1d2_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!AnNh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9bdb807-f46d-4ce9-9058-fb402160b1d2_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b9bdb807-f46d-4ce9-9058-fb402160b1d2_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!AnNh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9bdb807-f46d-4ce9-9058-fb402160b1d2_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!AnNh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9bdb807-f46d-4ce9-9058-fb402160b1d2_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!AnNh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9bdb807-f46d-4ce9-9058-fb402160b1d2_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!AnNh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9bdb807-f46d-4ce9-9058-fb402160b1d2_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>Or more practically: a &#8220;Be terse&#8221; system prompt, and asking for the name of a half-remembered base R function (apropos())</p><p>I think one of the things that is challenging about Google, or search in general, is if you know the name of the thing you&#8217;re looking for, you can find out a ton of information. If you don&#8217;t know what you&#8217;re looking for, you can&#8217;t. And LLMs often give us that ability to say: I&#8217;m looking for this thing that I vaguely remember, it does something like this &#8212; and now you can get an answer. And I think that&#8217;s tremendously empowering.</p><p>One thing I used it for recently: as I was working on <a href="https://httr2.r-lib.org/">httr2</a> and needed to add a new feature, I was like, someone must have thought about this problem before, so I asked Claude. And it told me about the <a href="https://en.wikipedia.org/wiki/Leaky_bucket">leaky bucket algorithm</a>. And that algorithm and that metaphor were so powerful and so useful for the problem I was tackling and would have been very, very difficult for me to discover by googling.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lSnq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761d2df7-125c-4198-a086-9111f11b893e_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lSnq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761d2df7-125c-4198-a086-9111f11b893e_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!lSnq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761d2df7-125c-4198-a086-9111f11b893e_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!lSnq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761d2df7-125c-4198-a086-9111f11b893e_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!lSnq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761d2df7-125c-4198-a086-9111f11b893e_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!lSnq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761d2df7-125c-4198-a086-9111f11b893e_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/761d2df7-125c-4198-a086-9111f11b893e_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!lSnq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761d2df7-125c-4198-a086-9111f11b893e_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!lSnq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761d2df7-125c-4198-a086-9111f11b893e_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!lSnq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761d2df7-125c-4198-a086-9111f11b893e_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!lSnq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761d2df7-125c-4198-a086-9111f11b893e_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>Asking what algorithms to consider for req_throttle(): token bucket, leaky bucket, sliding window, exponential backoff</p><p>Or as <a href="https://www.cerebralmastication.com/">JD Long</a> puts it succinctly:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!AvzC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7452f910-0b5a-418a-8444-96636795f018_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!AvzC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7452f910-0b5a-418a-8444-96636795f018_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!AvzC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7452f910-0b5a-418a-8444-96636795f018_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!AvzC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7452f910-0b5a-418a-8444-96636795f018_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!AvzC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7452f910-0b5a-418a-8444-96636795f018_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!AvzC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7452f910-0b5a-418a-8444-96636795f018_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7452f910-0b5a-418a-8444-96636795f018_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!AvzC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7452f910-0b5a-418a-8444-96636795f018_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!AvzC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7452f910-0b5a-418a-8444-96636795f018_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!AvzC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7452f910-0b5a-418a-8444-96636795f018_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!AvzC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7452f910-0b5a-418a-8444-96636795f018_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>JD Long: &#8220;Counting letters in words is the dumbest heuristic to test an AI model. It&#8217;s not useful. And it&#8217;s misleading.&#8221;</p><p>I think another thing that&#8217;s challenging about LLMs is that they can be bad at simple things and good at complex things. You can&#8217;t just give up on them because they make these really silly mistakes on very simple problems. That&#8217;s not really what they&#8217;re designed for. They&#8217;re designed to do things that computers are not traditionally good at.</p><p>So again, my goal with this talk is to give you some useful skills and to demystify some jargon.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!O7Sb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8a5b993-6b03-4bf0-834f-81370a8d833c_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!O7Sb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8a5b993-6b03-4bf0-834f-81370a8d833c_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!O7Sb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8a5b993-6b03-4bf0-834f-81370a8d833c_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!O7Sb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8a5b993-6b03-4bf0-834f-81370a8d833c_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!O7Sb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8a5b993-6b03-4bf0-834f-81370a8d833c_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!O7Sb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8a5b993-6b03-4bf0-834f-81370a8d833c_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e8a5b993-6b03-4bf0-834f-81370a8d833c_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!O7Sb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8a5b993-6b03-4bf0-834f-81370a8d833c_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!O7Sb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8a5b993-6b03-4bf0-834f-81370a8d833c_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!O7Sb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8a5b993-6b03-4bf0-834f-81370a8d833c_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!O7Sb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8a5b993-6b03-4bf0-834f-81370a8d833c_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>The two goals again: useful skills, demystify jargon</p><p>So let&#8217;s dive in to talk about three particularly important topics. The first is using LLMs to extract structured data, to turn all sorts of data into nice rectangles. Then I&#8217;ll talk a little bit about tool calling, which is a way to add extra capabilities to LLMs and to create interactive agents. And then we&#8217;ll finally talk a little bit about how you can use LLMs to help you with your programming.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ih2u!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bfe4ba8-dc9e-4848-84bf-f6b6aedee85d_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ih2u!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bfe4ba8-dc9e-4848-84bf-f6b6aedee85d_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ih2u!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bfe4ba8-dc9e-4848-84bf-f6b6aedee85d_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ih2u!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bfe4ba8-dc9e-4848-84bf-f6b6aedee85d_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ih2u!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bfe4ba8-dc9e-4848-84bf-f6b6aedee85d_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!ih2u!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bfe4ba8-dc9e-4848-84bf-f6b6aedee85d_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9bfe4ba8-dc9e-4848-84bf-f6b6aedee85d_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!ih2u!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bfe4ba8-dc9e-4848-84bf-f6b6aedee85d_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ih2u!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bfe4ba8-dc9e-4848-84bf-f6b6aedee85d_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ih2u!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bfe4ba8-dc9e-4848-84bf-f6b6aedee85d_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ih2u!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bfe4ba8-dc9e-4848-84bf-f6b6aedee85d_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>The three topics: 1. Structured data, 2. Tool calling, 3. Coding</p><h2><strong>Structured data</strong></h2><p>So, to tee this up, I want you to take a couple of seconds, just look at this data here, a very simple vector, and I want you to think: how would you go about extracting the name and age of each person?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!b-hO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7053e218-d027-41a4-a096-72cf1707fd4d_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!b-hO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7053e218-d027-41a4-a096-72cf1707fd4d_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!b-hO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7053e218-d027-41a4-a096-72cf1707fd4d_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!b-hO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7053e218-d027-41a4-a096-72cf1707fd4d_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!b-hO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7053e218-d027-41a4-a096-72cf1707fd4d_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!b-hO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7053e218-d027-41a4-a096-72cf1707fd4d_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7053e218-d027-41a4-a096-72cf1707fd4d_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!b-hO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7053e218-d027-41a4-a096-72cf1707fd4d_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!b-hO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7053e218-d027-41a4-a096-72cf1707fd4d_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!b-hO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7053e218-d027-41a4-a096-72cf1707fd4d_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!b-hO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7053e218-d027-41a4-a096-72cf1707fd4d_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>Your turn: how would you extract name and age from these sentences?</p><p>So if you&#8217;ve ever collected data from humans, you&#8217;ve encountered situations like this. There&#8217;s like eight people from Posit here. And <a href="https://mine-cr.com/">Mine</a> was saying that everyone put a different name for our company in their conference registration!</p><p>If you look at this data, maybe you could come up with some regular expressions. Like the age: you could use digits, but oh, some people spelled it out, and we&#8217;ve got &#8220;the big 5-0&#8221;. Names are even harder: they&#8217;re mostly one word, but not always. They often start with a capital letter, but there&#8217;s lots of other capital letters in there. So trying to do this deterministically with code is going to be really, really hard.</p><p>But this is something that LLMs are pretty good at. They&#8217;re not going to hallucinate, because all the data&#8217;s there. It&#8217;s just finding the right thing.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WhXK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2af09428-5f0d-4925-afc8-cdc81e6e6761_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WhXK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2af09428-5f0d-4925-afc8-cdc81e6e6761_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!WhXK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2af09428-5f0d-4925-afc8-cdc81e6e6761_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!WhXK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2af09428-5f0d-4925-afc8-cdc81e6e6761_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!WhXK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2af09428-5f0d-4925-afc8-cdc81e6e6761_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!WhXK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2af09428-5f0d-4925-afc8-cdc81e6e6761_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2af09428-5f0d-4925-afc8-cdc81e6e6761_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!WhXK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2af09428-5f0d-4925-afc8-cdc81e6e6761_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!WhXK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2af09428-5f0d-4925-afc8-cdc81e6e6761_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!WhXK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2af09428-5f0d-4925-afc8-cdc81e6e6761_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!WhXK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2af09428-5f0d-4925-afc8-cdc81e6e6761_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>LLMs are generally good at this sort of task: extracting name and age with plain chat</p><p>But wouldn&#8217;t it be nice if, rather than getting a string which we&#8217;ll need to parse in some way, we could get an R data structure back? Maybe something like this.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pODF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a2132b3-32c6-49ee-8eeb-04675b3721a7_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pODF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a2132b3-32c6-49ee-8eeb-04675b3721a7_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!pODF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a2132b3-32c6-49ee-8eeb-04675b3721a7_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!pODF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a2132b3-32c6-49ee-8eeb-04675b3721a7_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!pODF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a2132b3-32c6-49ee-8eeb-04675b3721a7_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!pODF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a2132b3-32c6-49ee-8eeb-04675b3721a7_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5a2132b3-32c6-49ee-8eeb-04675b3721a7_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!pODF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a2132b3-32c6-49ee-8eeb-04675b3721a7_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!pODF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a2132b3-32c6-49ee-8eeb-04675b3721a7_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!pODF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a2132b3-32c6-49ee-8eeb-04675b3721a7_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!pODF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a2132b3-32c6-49ee-8eeb-04675b3721a7_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>But wouldn&#8217;t it be nice to get an R data structure?</p><p>Well, you can. And all you really need to do here is give the LLM a description of the schema &#8212; exactly what you want to get back from it. Here I&#8217;m saying I want an object. This is a JSON schema; JSON is kind of the lingua franca of the web, and so this is what LLMs are pretty good at speaking as well. I want an object, which is like a named list. The name is a string and the age is a number. And now I can use this with <code>chat_structured()</code> instead of <code>chat()</code>, and I get a nice list back.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wEUm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F413a3859-6b60-411d-a143-ac60d68c603b_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wEUm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F413a3859-6b60-411d-a143-ac60d68c603b_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!wEUm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F413a3859-6b60-411d-a143-ac60d68c603b_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!wEUm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F413a3859-6b60-411d-a143-ac60d68c603b_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!wEUm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F413a3859-6b60-411d-a143-ac60d68c603b_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!wEUm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F413a3859-6b60-411d-a143-ac60d68c603b_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/413a3859-6b60-411d-a143-ac60d68c603b_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!wEUm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F413a3859-6b60-411d-a143-ac60d68c603b_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!wEUm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F413a3859-6b60-411d-a143-ac60d68c603b_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!wEUm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F413a3859-6b60-411d-a143-ac60d68c603b_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!wEUm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F413a3859-6b60-411d-a143-ac60d68c603b_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>Well you can: defining a schema with type_object() and using chat_structured()</p><p>And I can do this to many prompts all at once, in parallel, using another ellmer function called <code>parallel_chat_structured()</code>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QunM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe793d34f-4441-4004-aabc-b89a28165d7a_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QunM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe793d34f-4441-4004-aabc-b89a28165d7a_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!QunM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe793d34f-4441-4004-aabc-b89a28165d7a_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!QunM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe793d34f-4441-4004-aabc-b89a28165d7a_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!QunM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe793d34f-4441-4004-aabc-b89a28165d7a_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!QunM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe793d34f-4441-4004-aabc-b89a28165d7a_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e793d34f-4441-4004-aabc-b89a28165d7a_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!QunM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe793d34f-4441-4004-aabc-b89a28165d7a_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!QunM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe793d34f-4441-4004-aabc-b89a28165d7a_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!QunM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe793d34f-4441-4004-aabc-b89a28165d7a_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!QunM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe793d34f-4441-4004-aabc-b89a28165d7a_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>And you can do this to many prompts at once with parallel_chat_structured()</p><p>I think this is a data science superpower, because you can now go from all sorts of unstructured data &#8212; not just text but, as I&#8217;ll show shortly, images and video and audio &#8212; into nice rectangles. And if there&#8217;s one thing that data scientists are good at, it&#8217;s working with rectangles.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HCPd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F123bde47-9769-456c-8a38-95e4a16aba57_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HCPd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F123bde47-9769-456c-8a38-95e4a16aba57_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!HCPd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F123bde47-9769-456c-8a38-95e4a16aba57_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!HCPd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F123bde47-9769-456c-8a38-95e4a16aba57_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!HCPd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F123bde47-9769-456c-8a38-95e4a16aba57_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!HCPd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F123bde47-9769-456c-8a38-95e4a16aba57_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/123bde47-9769-456c-8a38-95e4a16aba57_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!HCPd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F123bde47-9769-456c-8a38-95e4a16aba57_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!HCPd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F123bde47-9769-456c-8a38-95e4a16aba57_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!HCPd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F123bde47-9769-456c-8a38-95e4a16aba57_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!HCPd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F123bde47-9769-456c-8a38-95e4a16aba57_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>Oil painting of a flying data science superhero</p><p>So here&#8217;s another little example. Here I&#8217;ve got four images:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!W3SH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabab8137-9e6c-4363-af43-f33240588566_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!W3SH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabab8137-9e6c-4363-af43-f33240588566_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!W3SH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabab8137-9e6c-4363-af43-f33240588566_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!W3SH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabab8137-9e6c-4363-af43-f33240588566_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!W3SH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabab8137-9e6c-4363-af43-f33240588566_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!W3SH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabab8137-9e6c-4363-af43-f33240588566_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/abab8137-9e6c-4363-af43-f33240588566_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!W3SH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabab8137-9e6c-4363-af43-f33240588566_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!W3SH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabab8137-9e6c-4363-af43-f33240588566_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!W3SH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabab8137-9e6c-4363-af43-f33240588566_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!W3SH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabab8137-9e6c-4363-af43-f33240588566_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>And you&#8217;re not limited to just text: four animal photos</p><p>I&#8217;ll just give you a little bit of code. I&#8217;m going to find all of the files in the animals directory. I&#8217;m going to use this <code>content_image_file()</code> function &#8212; that&#8217;s how you tell ellmer you want to send an image to the LLM. I&#8217;m going to say what I want back: I want the animal and the background color. And then I&#8217;m going to call that same function again.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4D1O!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd49bd8cb-829e-4aa2-8261-22859e77d797_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4D1O!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd49bd8cb-829e-4aa2-8261-22859e77d797_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!4D1O!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd49bd8cb-829e-4aa2-8261-22859e77d797_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!4D1O!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd49bd8cb-829e-4aa2-8261-22859e77d797_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!4D1O!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd49bd8cb-829e-4aa2-8261-22859e77d797_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!4D1O!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd49bd8cb-829e-4aa2-8261-22859e77d797_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d49bd8cb-829e-4aa2-8261-22859e77d797_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!4D1O!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd49bd8cb-829e-4aa2-8261-22859e77d797_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!4D1O!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd49bd8cb-829e-4aa2-8261-22859e77d797_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!4D1O!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd49bd8cb-829e-4aa2-8261-22859e77d797_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!4D1O!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd49bd8cb-829e-4aa2-8261-22859e77d797_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>And it&#8217;s not a lot of code: content_image_file() plus a schema</p><p>And again, there&#8217;s a little bit of stochasticity there. If I call this four times, I get four slightly different answers.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TrFR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03675849-46f3-45be-8c41-8f7595498644_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TrFR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03675849-46f3-45be-8c41-8f7595498644_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!TrFR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03675849-46f3-45be-8c41-8f7595498644_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!TrFR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03675849-46f3-45be-8c41-8f7595498644_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!TrFR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03675849-46f3-45be-8c41-8f7595498644_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!TrFR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03675849-46f3-45be-8c41-8f7595498644_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/03675849-46f3-45be-8c41-8f7595498644_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!TrFR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03675849-46f3-45be-8c41-8f7595498644_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!TrFR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03675849-46f3-45be-8c41-8f7595498644_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!TrFR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03675849-46f3-45be-8c41-8f7595498644_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!TrFR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03675849-46f3-45be-8c41-8f7595498644_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>Four runs give four slightly different tables</p><p>But when you look at how they vary, this is kind of fair. What animal would you say this is? I think kitten and cat are both valid answers. What&#8217;s the background? Well, it&#8217;s kind of a beige gray.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ATX9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b933add-2317-4572-8bfb-605ae5c97efa_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ATX9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b933add-2317-4572-8bfb-605ae5c97efa_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ATX9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b933add-2317-4572-8bfb-605ae5c97efa_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ATX9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b933add-2317-4572-8bfb-605ae5c97efa_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ATX9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b933add-2317-4572-8bfb-605ae5c97efa_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!ATX9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b933add-2317-4572-8bfb-605ae5c97efa_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8b933add-2317-4572-8bfb-605ae5c97efa_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!ATX9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b933add-2317-4572-8bfb-605ae5c97efa_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ATX9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b933add-2317-4572-8bfb-605ae5c97efa_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ATX9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b933add-2317-4572-8bfb-605ae5c97efa_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ATX9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b933add-2317-4572-8bfb-605ae5c97efa_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>The variation is fair: kitten vs cat, beige vs gray</p><p>So again, you&#8217;re not going to get 100% reliable answers, but I think the problem here is that we haven&#8217;t been clear enough with what we want.</p><p>The other thing that&#8217;s interesting here is that once you&#8217;ve got that rectangular data frame, now you can use all of your statistical tools with it. And statistical tools don&#8217;t assume that the data is measured without error. The assumption that there&#8217;s going to be mistakes and variation and differences is fundamentally baked into statistics. And I think this combination of structured data extraction and statistical modeling is super, super powerful.</p><p>But of course you&#8217;re gonna really want to think about that. You&#8217;re gonna think about: is this the right prompt? Am I getting the right examples? If you want to do that in the LLM world, that&#8217;s called evals &#8212; evaluating your LLM. And <a href="https://www.simonpcouch.com/">Simon Couch</a>, my colleague, has been working on the <a href="https://vitals.tidyverse.org/">vitals</a> package, if you want to make that a little bit easier. Simon&#8217;s on the <a href="https://www.tidymodels.org/">tidymodels</a> team, and so the goal is to really bring what we know about evaluating statistical models, combine that with the state of the art of evaluating LLMs, and give you something that&#8217;s well principled and well thought out.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lVFU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc7f38ec-d6a9-4e86-bcc1-88f3ca5d0b23_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lVFU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc7f38ec-d6a9-4e86-bcc1-88f3ca5d0b23_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!lVFU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc7f38ec-d6a9-4e86-bcc1-88f3ca5d0b23_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!lVFU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc7f38ec-d6a9-4e86-bcc1-88f3ca5d0b23_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!lVFU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc7f38ec-d6a9-4e86-bcc1-88f3ca5d0b23_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!lVFU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc7f38ec-d6a9-4e86-bcc1-88f3ca5d0b23_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dc7f38ec-d6a9-4e86-bcc1-88f3ca5d0b23_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!lVFU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc7f38ec-d6a9-4e86-bcc1-88f3ca5d0b23_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!lVFU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc7f38ec-d6a9-4e86-bcc1-88f3ca5d0b23_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!lVFU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc7f38ec-d6a9-4e86-bcc1-88f3ca5d0b23_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!lVFU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc7f38ec-d6a9-4e86-bcc1-88f3ca5d0b23_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>The vitals package hex logo</p><h2><strong>Tool calling</strong></h2><p>The next thing I want to talk about is tool calling. And I want to illustrate that with a problem &#8212; another thing that LLMs are bad at. If you ask an LLM what day it is today, best case scenario it&#8217;s going to say: I don&#8217;t know. If you ask this of ChatGPT, it actually just makes up a date, which is not very reassuring.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RyIp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F818767c1-c952-4d46-af55-edadf9c3fafc_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RyIp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F818767c1-c952-4d46-af55-edadf9c3fafc_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!RyIp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F818767c1-c952-4d46-af55-edadf9c3fafc_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!RyIp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F818767c1-c952-4d46-af55-edadf9c3fafc_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!RyIp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F818767c1-c952-4d46-af55-edadf9c3fafc_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!RyIp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F818767c1-c952-4d46-af55-edadf9c3fafc_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/818767c1-c952-4d46-af55-edadf9c3fafc_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!RyIp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F818767c1-c952-4d46-af55-edadf9c3fafc_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!RyIp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F818767c1-c952-4d46-af55-edadf9c3fafc_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!RyIp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F818767c1-c952-4d46-af55-edadf9c3fafc_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!RyIp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F818767c1-c952-4d46-af55-edadf9c3fafc_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>LLMs don&#8217;t have access to live data about the world</p><p>And LLMs can&#8217;t do anything, right? They&#8217;re stuck in a box. You can&#8217;t say: hey LLM, delete the CSV files in my directory.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fFQa!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f01e0c8-37e5-4c88-8172-057568b23082_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fFQa!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f01e0c8-37e5-4c88-8172-057568b23082_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!fFQa!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f01e0c8-37e5-4c88-8172-057568b23082_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!fFQa!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f01e0c8-37e5-4c88-8172-057568b23082_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!fFQa!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f01e0c8-37e5-4c88-8172-057568b23082_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!fFQa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f01e0c8-37e5-4c88-8172-057568b23082_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2f01e0c8-37e5-4c88-8172-057568b23082_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!fFQa!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f01e0c8-37e5-4c88-8172-057568b23082_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!fFQa!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f01e0c8-37e5-4c88-8172-057568b23082_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!fFQa!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f01e0c8-37e5-4c88-8172-057568b23082_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!fFQa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f01e0c8-37e5-4c88-8172-057568b23082_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>Or the ability to make changes to the world</p><p>We can get around both of these limitations by using these things called tools.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IShF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3f2ed3e-e2a1-44b7-ae95-ca878631e363_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IShF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3f2ed3e-e2a1-44b7-ae95-ca878631e363_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!IShF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3f2ed3e-e2a1-44b7-ae95-ca878631e363_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!IShF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3f2ed3e-e2a1-44b7-ae95-ca878631e363_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!IShF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3f2ed3e-e2a1-44b7-ae95-ca878631e363_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!IShF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3f2ed3e-e2a1-44b7-ae95-ca878631e363_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a3f2ed3e-e2a1-44b7-ae95-ca878631e363_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!IShF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3f2ed3e-e2a1-44b7-ae95-ca878631e363_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!IShF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3f2ed3e-e2a1-44b7-ae95-ca878631e363_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!IShF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3f2ed3e-e2a1-44b7-ae95-ca878631e363_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!IShF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa3f2ed3e-e2a1-44b7-ae95-ca878631e363_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>Oil painting of a toolbox</p><p>And a tool is actually something really simple. It&#8217;s just a function along with some metadata. I&#8217;m obviously going to write R functions; but you can write them in any language. And then you&#8217;re going to provide a little bit of metadata to tell the LLM when it might want to use that tool.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QJhW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0fc368f-779b-46f2-97d8-74c15f9b85ab_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QJhW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0fc368f-779b-46f2-97d8-74c15f9b85ab_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!QJhW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0fc368f-779b-46f2-97d8-74c15f9b85ab_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!QJhW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0fc368f-779b-46f2-97d8-74c15f9b85ab_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!QJhW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0fc368f-779b-46f2-97d8-74c15f9b85ab_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!QJhW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0fc368f-779b-46f2-97d8-74c15f9b85ab_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a0fc368f-779b-46f2-97d8-74c15f9b85ab_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!QJhW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0fc368f-779b-46f2-97d8-74c15f9b85ab_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!QJhW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0fc368f-779b-46f2-97d8-74c15f9b85ab_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!QJhW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0fc368f-779b-46f2-97d8-74c15f9b85ab_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!QJhW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0fc368f-779b-46f2-97d8-74c15f9b85ab_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>tool = function + metadata</p><p>So for example, I can create a tool. This tool I&#8217;ve called today. It&#8217;s going to call Sys.Date(), which gives you today&#8217;s date. Now I&#8217;m going to say what it does, and I&#8217;m going to say what arguments it takes, which in this case is none.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xdon!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19995e13-1612-4ef7-945a-f78d09793cda_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xdon!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19995e13-1612-4ef7-945a-f78d09793cda_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!xdon!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19995e13-1612-4ef7-945a-f78d09793cda_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!xdon!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19995e13-1612-4ef7-945a-f78d09793cda_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!xdon!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19995e13-1612-4ef7-945a-f78d09793cda_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!xdon!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19995e13-1612-4ef7-945a-f78d09793cda_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/19995e13-1612-4ef7-945a-f78d09793cda_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!xdon!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19995e13-1612-4ef7-945a-f78d09793cda_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!xdon!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19995e13-1612-4ef7-945a-f78d09793cda_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!xdon!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19995e13-1612-4ef7-945a-f78d09793cda_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!xdon!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19995e13-1612-4ef7-945a-f78d09793cda_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>A tool is just a function with some extra metadata: the today tool</p><p>And now that I&#8217;ve empowered my chat, I can ask it what day is it today, and it can tell me.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7PIf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cf56d88-367d-493b-9dd9-dab676028e75_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7PIf!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cf56d88-367d-493b-9dd9-dab676028e75_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!7PIf!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cf56d88-367d-493b-9dd9-dab676028e75_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!7PIf!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cf56d88-367d-493b-9dd9-dab676028e75_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!7PIf!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cf56d88-367d-493b-9dd9-dab676028e75_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!7PIf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cf56d88-367d-493b-9dd9-dab676028e75_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5cf56d88-367d-493b-9dd9-dab676028e75_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!7PIf!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cf56d88-367d-493b-9dd9-dab676028e75_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!7PIf!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cf56d88-367d-493b-9dd9-dab676028e75_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!7PIf!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cf56d88-367d-493b-9dd9-dab676028e75_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!7PIf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cf56d88-367d-493b-9dd9-dab676028e75_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>Now the model can know what day it is</p><p>And when you look at this, you might be a little surprised. Is Anthropic running R on their servers? I mean, that would be cool, but certainly a little surprising. That&#8217;s not actually how tool calls work. When you send a request to the LLM, the LLM is going to be like: oh, okay, I recognize that I need to call this tool, and it&#8217;s going to send that information back to you. That&#8217;s going to get intercepted by ellmer, and ellmer is going to call the tool and return the result back. Now the LLM has all the information it needs to answer your original query. So the neat thing about this is, because the code is running on your computer, you can do anything that you can do on your computer.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ibzA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc28f826f-69be-4dd7-a858-10933bbe6ea6_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ibzA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc28f826f-69be-4dd7-a858-10933bbe6ea6_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ibzA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc28f826f-69be-4dd7-a858-10933bbe6ea6_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ibzA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc28f826f-69be-4dd7-a858-10933bbe6ea6_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ibzA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc28f826f-69be-4dd7-a858-10933bbe6ea6_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!ibzA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc28f826f-69be-4dd7-a858-10933bbe6ea6_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c28f826f-69be-4dd7-a858-10933bbe6ea6_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!ibzA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc28f826f-69be-4dd7-a858-10933bbe6ea6_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ibzA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc28f826f-69be-4dd7-a858-10933bbe6ea6_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ibzA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc28f826f-69be-4dd7-a858-10933bbe6ea6_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ibzA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc28f826f-69be-4dd7-a858-10933bbe6ea6_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>Diagram of how tool calls flow between you, ellmer, and the LLM</p><p>One thing you could do, for example, is to give the LLM traditional computing powers. I could give it the power to multiply two numbers together.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gDqx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F226cec76-c55d-4921-a581-49b55849ea9f_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gDqx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F226cec76-c55d-4921-a581-49b55849ea9f_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!gDqx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F226cec76-c55d-4921-a581-49b55849ea9f_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!gDqx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F226cec76-c55d-4921-a581-49b55849ea9f_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!gDqx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F226cec76-c55d-4921-a581-49b55849ea9f_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!gDqx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F226cec76-c55d-4921-a581-49b55849ea9f_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/226cec76-c55d-4921-a581-49b55849ea9f_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!gDqx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F226cec76-c55d-4921-a581-49b55849ea9f_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!gDqx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F226cec76-c55d-4921-a581-49b55849ea9f_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!gDqx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F226cec76-c55d-4921-a581-49b55849ea9f_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!gDqx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F226cec76-c55d-4921-a581-49b55849ea9f_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>We can use this to give the LLM traditional computing powers: a multiply tool</p><p>And now if I ask it to multiply two large numbers together, it can do that correctly, because it&#8217;s going to use that tool.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Ewfo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72b4a4b3-962f-4b1e-ac17-7126b38e918d_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ewfo!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72b4a4b3-962f-4b1e-ac17-7126b38e918d_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Ewfo!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72b4a4b3-962f-4b1e-ac17-7126b38e918d_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Ewfo!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72b4a4b3-962f-4b1e-ac17-7126b38e918d_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Ewfo!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72b4a4b3-962f-4b1e-ac17-7126b38e918d_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ewfo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72b4a4b3-962f-4b1e-ac17-7126b38e918d_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/72b4a4b3-962f-4b1e-ac17-7126b38e918d_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!Ewfo!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72b4a4b3-962f-4b1e-ac17-7126b38e918d_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Ewfo!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72b4a4b3-962f-4b1e-ac17-7126b38e918d_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Ewfo!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72b4a4b3-962f-4b1e-ac17-7126b38e918d_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Ewfo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72b4a4b3-962f-4b1e-ac17-7126b38e918d_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>So now we get the correct result</p><p>And indeed, if you ask many of these LLMs on their websites to do these things, they&#8217;ll just write a little bit of JavaScript code, because this is just another tool that they can use to answer the question. The models &#8212; specifically the ones presented on their websites &#8212; have been trained not to try and do this stuff themselves, but to write a little program to do it.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ABF6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4590af0-26a6-4e2d-9585-7c5062f9deef_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ABF6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4590af0-26a6-4e2d-9585-7c5062f9deef_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ABF6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4590af0-26a6-4e2d-9585-7c5062f9deef_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ABF6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4590af0-26a6-4e2d-9585-7c5062f9deef_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ABF6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4590af0-26a6-4e2d-9585-7c5062f9deef_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!ABF6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4590af0-26a6-4e2d-9585-7c5062f9deef_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b4590af0-26a6-4e2d-9585-7c5062f9deef_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!ABF6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4590af0-26a6-4e2d-9585-7c5062f9deef_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ABF6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4590af0-26a6-4e2d-9585-7c5062f9deef_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ABF6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4590af0-26a6-4e2d-9585-7c5062f9deef_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ABF6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4590af0-26a6-4e2d-9585-7c5062f9deef_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>ChatGPT writes JavaScript to multiply numbers</p><h3><strong>Agents</strong></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wYCc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78760894-b018-47e9-818f-013ef091c378_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wYCc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78760894-b018-47e9-818f-013ef091c378_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!wYCc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78760894-b018-47e9-818f-013ef091c378_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!wYCc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78760894-b018-47e9-818f-013ef091c378_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!wYCc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78760894-b018-47e9-818f-013ef091c378_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!wYCc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78760894-b018-47e9-818f-013ef091c378_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/78760894-b018-47e9-818f-013ef091c378_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!wYCc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78760894-b018-47e9-818f-013ef091c378_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!wYCc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78760894-b018-47e9-818f-013ef091c378_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!wYCc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78760894-b018-47e9-818f-013ef091c378_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!wYCc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78760894-b018-47e9-818f-013ef091c378_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>Oil painting of a figure walking through a golden landscape</p><p>That brings me to one of the most powerful things you can do with tools, and that&#8217;s to create an agent. If you&#8217;ve read anything about AI on the internet lately, you&#8217;ve probably heard the term agent or agentic a million times. And you probably still have no sense of exactly what an agent is. But it turns out, if you know what a tool is &#8212; and that&#8217;s just a function plus some metadata &#8212; it&#8217;s really easy to explain what an agent is. Because an agent is just a chatbot that&#8217;s been empowered with two tools: one that can read the state of the world, and one that can write the state of the world.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!OZ9Y!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc4ec928-7c66-4bbe-b5b1-a11fd59220c7_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!OZ9Y!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc4ec928-7c66-4bbe-b5b1-a11fd59220c7_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!OZ9Y!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc4ec928-7c66-4bbe-b5b1-a11fd59220c7_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!OZ9Y!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc4ec928-7c66-4bbe-b5b1-a11fd59220c7_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!OZ9Y!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc4ec928-7c66-4bbe-b5b1-a11fd59220c7_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!OZ9Y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc4ec928-7c66-4bbe-b5b1-a11fd59220c7_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fc4ec928-7c66-4bbe-b5b1-a11fd59220c7_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!OZ9Y!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc4ec928-7c66-4bbe-b5b1-a11fd59220c7_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!OZ9Y!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc4ec928-7c66-4bbe-b5b1-a11fd59220c7_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!OZ9Y!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc4ec928-7c66-4bbe-b5b1-a11fd59220c7_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!OZ9Y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc4ec928-7c66-4bbe-b5b1-a11fd59220c7_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>agent = reading tool + writing tool</p><p>So let&#8217;s make an agent. I&#8217;m going to give my chatbot the ability to list all of the files in the current directory.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vO81!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3682c113-6320-4ebc-be73-81bfb3f35985_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vO81!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3682c113-6320-4ebc-be73-81bfb3f35985_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!vO81!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3682c113-6320-4ebc-be73-81bfb3f35985_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!vO81!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3682c113-6320-4ebc-be73-81bfb3f35985_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!vO81!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3682c113-6320-4ebc-be73-81bfb3f35985_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!vO81!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3682c113-6320-4ebc-be73-81bfb3f35985_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3682c113-6320-4ebc-be73-81bfb3f35985_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!vO81!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3682c113-6320-4ebc-be73-81bfb3f35985_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!vO81!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3682c113-6320-4ebc-be73-81bfb3f35985_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!vO81!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3682c113-6320-4ebc-be73-81bfb3f35985_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!vO81!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3682c113-6320-4ebc-be73-81bfb3f35985_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>An agent needs a tool to read state: ls</p><p>And I&#8217;m going to give it the ability to delete files.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!382J!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ce06ba2-04bb-48c0-854b-9210889f4415_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!382J!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ce06ba2-04bb-48c0-854b-9210889f4415_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!382J!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ce06ba2-04bb-48c0-854b-9210889f4415_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!382J!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ce06ba2-04bb-48c0-854b-9210889f4415_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!382J!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ce06ba2-04bb-48c0-854b-9210889f4415_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!382J!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ce06ba2-04bb-48c0-854b-9210889f4415_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1ce06ba2-04bb-48c0-854b-9210889f4415_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!382J!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ce06ba2-04bb-48c0-854b-9210889f4415_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!382J!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ce06ba2-04bb-48c0-854b-9210889f4415_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!382J!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ce06ba2-04bb-48c0-854b-9210889f4415_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!382J!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ce06ba2-04bb-48c0-854b-9210889f4415_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>And a tool to write state: rm</p><p>And now I can say: hey, delete all the CSV files in the current directory. It&#8217;s going to say: well, okay, to do that, I&#8217;m going to need to find out what files are in the current directory. So it requests that ellmer calls ls(). It&#8217;s gonna say: okay, I found two CSV files, a.csv and b.csv. I&#8217;m gonna delete those. It&#8217;s gonna send that tool call request back to ellmer. ellmer is gonna delete the files, and now it&#8217;s deleted those files on my computer.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!iTJJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8bbd14c0-26fd-45c9-bfff-b61963f07f92_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!iTJJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8bbd14c0-26fd-45c9-bfff-b61963f07f92_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!iTJJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8bbd14c0-26fd-45c9-bfff-b61963f07f92_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!iTJJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8bbd14c0-26fd-45c9-bfff-b61963f07f92_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!iTJJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8bbd14c0-26fd-45c9-bfff-b61963f07f92_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!iTJJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8bbd14c0-26fd-45c9-bfff-b61963f07f92_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8bbd14c0-26fd-45c9-bfff-b61963f07f92_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!iTJJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8bbd14c0-26fd-45c9-bfff-b61963f07f92_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!iTJJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8bbd14c0-26fd-45c9-bfff-b61963f07f92_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!iTJJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8bbd14c0-26fd-45c9-bfff-b61963f07f92_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!iTJJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8bbd14c0-26fd-45c9-bfff-b61963f07f92_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>Now my chatbot can delete files on my computer: the full tool-calling transcript</p><p>Hopefully when you look at this, you&#8217;re like: Hadley, what on earth are you thinking? You have just empowered an LLM, which is notoriously unreliable, to delete files on your computer.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Uj1G!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b55f9fb-544c-4e1d-8bfb-eb33f1e0d5eb_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Uj1G!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b55f9fb-544c-4e1d-8bfb-eb33f1e0d5eb_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Uj1G!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b55f9fb-544c-4e1d-8bfb-eb33f1e0d5eb_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Uj1G!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b55f9fb-544c-4e1d-8bfb-eb33f1e0d5eb_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Uj1G!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b55f9fb-544c-4e1d-8bfb-eb33f1e0d5eb_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Uj1G!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b55f9fb-544c-4e1d-8bfb-eb33f1e0d5eb_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3b55f9fb-544c-4e1d-8bfb-eb33f1e0d5eb_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!Uj1G!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b55f9fb-544c-4e1d-8bfb-eb33f1e0d5eb_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Uj1G!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b55f9fb-544c-4e1d-8bfb-eb33f1e0d5eb_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Uj1G!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b55f9fb-544c-4e1d-8bfb-eb33f1e0d5eb_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Uj1G!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b55f9fb-544c-4e1d-8bfb-eb33f1e0d5eb_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>Oil painting of a horrified woman staring at a red laptop</p><p>And certainly you can put a few guardrails around it, and there are some built into the LLMs &#8212; if you ask it to delete all the files on your computer, the model itself is gonna be like, that&#8217;s a bad idea, I&#8217;m not gonna do that. But basically this is the state of security today with agents. It&#8217;s the YOLO model.</p><p>Agents are interesting because they offer so much potential: you can now empower an LLM to do anything. But also so much danger: you&#8217;ve now empowered an LLM to do anything. And it&#8217;s going to take us, I think, collectively quite some time to figure out how to do this safely.</p><h2><strong>Coding</strong></h2><p>So that brings me to my third topic, which is using LLMs to code. I&#8217;ll first orient you to the main techniques for using LLMs to code. Hopefully you&#8217;ve seen many of these before.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qg_R!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b0c29fc-756d-45ab-9251-0342a4fd233a_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qg_R!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b0c29fc-756d-45ab-9251-0342a4fd233a_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!qg_R!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b0c29fc-756d-45ab-9251-0342a4fd233a_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!qg_R!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b0c29fc-756d-45ab-9251-0342a4fd233a_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!qg_R!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b0c29fc-756d-45ab-9251-0342a4fd233a_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!qg_R!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b0c29fc-756d-45ab-9251-0342a4fd233a_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7b0c29fc-756d-45ab-9251-0342a4fd233a_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!qg_R!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b0c29fc-756d-45ab-9251-0342a4fd233a_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!qg_R!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b0c29fc-756d-45ab-9251-0342a4fd233a_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!qg_R!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b0c29fc-756d-45ab-9251-0342a4fd233a_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!qg_R!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b0c29fc-756d-45ab-9251-0342a4fd233a_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>Main techniques: web chat, inline autocomplete, in-IDE chat, agentic coding</p><p>The first one is the most basic. You just go into chatgpt.com and say: hey, give me a function that does blah, or, I need to write some R code that solves this problem. That&#8217;s kind of fine, but you&#8217;re constantly copying and pasting back and forth. This is like the old days, pre-<a href="https://rmarkdown.rstudio.com/">R Markdown</a>, where you&#8217;re copying and pasting results from Excel into your Word document; when something changes, you copy things back and forth again, and it&#8217;s very, very easy to get out of sync.</p><p>Now most IDEs are starting to bring in AI tooling. The first way is inline autocomplete: that&#8217;s when you start typing and the LLM &#8212; helpfully sometimes, and not so helpfully most of the time &#8212; suggests finishing your thought. I think one of the skills of programming today is being able to ignore that when it&#8217;s bad and accept it when it&#8217;s good.</p><p>You can also have chat that&#8217;s inside your IDE. This is just sort of a convenience. It&#8217;s exactly the same thing as chatting with ChatGPT, but you don&#8217;t have to copy things back and forth &#8212; you can just click a button, and the chat knows more about what you&#8217;re doing because it can see what you&#8217;re working on.</p><p>And then finally, the newest trend is agentic coding. This is things like <a href="https://cursor.com/">Cursor</a> or <a href="https://claude.com/claude-code">Claude Code</a>, where the LLM is just going to go off and do a bunch of work. It&#8217;s going to write some code. It might write some tests, run those tests, and iterate for a little while.</p><h3><strong>Clear win: translations</strong></h3><p>There are lots of ways in which LLMs do pretty useless and horrible things when coding, but I want to talk about the things that I think are clear wins, and there are two.</p><p>The first clear win is translations. Whenever all of the information the LLM needs is there and it just needs to be expressed in a different form, they tend to do pretty well. So if you can really accurately write in pseudocode what you&#8217;re trying to do, LLMs are going to turn that into code in any language pretty reliably.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!XaKv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce18f578-4801-4f36-bd46-a3ff4c792353_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XaKv!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce18f578-4801-4f36-bd46-a3ff4c792353_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!XaKv!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce18f578-4801-4f36-bd46-a3ff4c792353_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!XaKv!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce18f578-4801-4f36-bd46-a3ff4c792353_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!XaKv!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce18f578-4801-4f36-bd46-a3ff4c792353_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!XaKv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce18f578-4801-4f36-bd46-a3ff4c792353_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ce18f578-4801-4f36-bd46-a3ff4c792353_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!XaKv!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce18f578-4801-4f36-bd46-a3ff4c792353_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!XaKv!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce18f578-4801-4f36-bd46-a3ff4c792353_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!XaKv!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce18f578-4801-4f36-bd46-a3ff4c792353_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!XaKv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce18f578-4801-4f36-bd46-a3ff4c792353_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>Clear win: translations &#8212; pseudocode to code, curl to httr2, LaTeX to Quarto, SQL to dplyr, SAS to R, words to regular expressions, image to Shiny app</p><p>One thing I use it for: often websites give you a <a href="https://curl.se/">curl</a> command that you run on the console. You can ask an LLM to translate that to httr2 code. Or you can convert your <a href="https://www.latex-project.org/">LaTeX</a> docs to <a href="https://quarto.org/">Quarto</a>, you can convert your SQL to dplyr, you can convert your SAS to R code, you can convert your words to regular expressions. Many of these things it&#8217;s going to get correct a lot of the time. And even when it doesn&#8217;t, just having that first shot at a translation can be really, really useful.</p><p>And I want to finish with one kind of cool example that my colleague George came up with.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jw4d!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89b6a5d0-fcb4-4a86-ab13-e41dadca781a_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jw4d!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89b6a5d0-fcb4-4a86-ab13-e41dadca781a_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!jw4d!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89b6a5d0-fcb4-4a86-ab13-e41dadca781a_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!jw4d!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89b6a5d0-fcb4-4a86-ab13-e41dadca781a_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!jw4d!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89b6a5d0-fcb4-4a86-ab13-e41dadca781a_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!jw4d!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89b6a5d0-fcb4-4a86-ab13-e41dadca781a_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/89b6a5d0-fcb4-4a86-ab13-e41dadca781a_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!jw4d!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89b6a5d0-fcb4-4a86-ab13-e41dadca781a_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!jw4d!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89b6a5d0-fcb4-4a86-ab13-e41dadca781a_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!jw4d!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89b6a5d0-fcb4-4a86-ab13-e41dadca781a_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!jw4d!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89b6a5d0-fcb4-4a86-ab13-e41dadca781a_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>George&#8217;s hand-drawn sketch of a penguins data Shiny app</p><p>I&#8217;m going to take a screenshot of this <a href="https://shiny.posit.co/">Shiny</a> app that <a href="https://gws.phd/">George</a> drew, and I&#8217;m gonna pop open <a href="https://positron.posit.co/">Positron</a> chat, and I&#8217;m gonna drag the screenshot in, and I&#8217;m gonna be like: please make this into a Shiny app. And actually I need to stop running this Shiny app I was running earlier, so let&#8217;s do that first. Okay, please make this into a Shiny app.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xjFe!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfa2e275-2c2f-4270-a939-bfa6fa893e15_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xjFe!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfa2e275-2c2f-4270-a939-bfa6fa893e15_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!xjFe!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfa2e275-2c2f-4270-a939-bfa6fa893e15_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!xjFe!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfa2e275-2c2f-4270-a939-bfa6fa893e15_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!xjFe!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfa2e275-2c2f-4270-a939-bfa6fa893e15_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!xjFe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfa2e275-2c2f-4270-a939-bfa6fa893e15_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bfa2e275-2c2f-4270-a939-bfa6fa893e15_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!xjFe!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfa2e275-2c2f-4270-a939-bfa6fa893e15_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!xjFe!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfa2e275-2c2f-4270-a939-bfa6fa893e15_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!xjFe!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfa2e275-2c2f-4270-a939-bfa6fa893e15_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!xjFe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfa2e275-2c2f-4270-a939-bfa6fa893e15_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>Positron Assistant with the sketch screenshot attached: &#8220;Please make this into a shiny app&#8221;</p><p>And it&#8217;s certainly writing Shiny code much faster than I can write Shiny code. Is it any good? Well, we&#8217;ll find out in a couple of seconds. So now I&#8217;m just gonna click run. I&#8217;m gonna see this Shiny app. It&#8217;s not done a very good job, actually.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CZzc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb1f22f5-3122-4218-9de3-8a98b2b981bb_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CZzc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb1f22f5-3122-4218-9de3-8a98b2b981bb_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!CZzc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb1f22f5-3122-4218-9de3-8a98b2b981bb_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!CZzc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb1f22f5-3122-4218-9de3-8a98b2b981bb_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!CZzc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb1f22f5-3122-4218-9de3-8a98b2b981bb_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!CZzc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb1f22f5-3122-4218-9de3-8a98b2b981bb_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cb1f22f5-3122-4218-9de3-8a98b2b981bb_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!CZzc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb1f22f5-3122-4218-9de3-8a98b2b981bb_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!CZzc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb1f22f5-3122-4218-9de3-8a98b2b981bb_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!CZzc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb1f22f5-3122-4218-9de3-8a98b2b981bb_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!CZzc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb1f22f5-3122-4218-9de3-8a98b2b981bb_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>The first attempt at the penguins Shiny app</p><p>So this is one of these stochasticity things &#8212; it&#8217;s certainly done better in the past. But you can see it&#8217;s got the basic idea of the Shiny app, right? It&#8217;s got the variable, it&#8217;s got the distribution. The distribution&#8217;s not very useful because it only offers one thing. So we could say &#8212; let&#8217;s go back to my chat and be like: could you add box plots plus frequency polygon plus density plot. I have to say, one thing I particularly like about LLMs is that I don&#8217;t have to worry about correcting my spelling mistakes so I don&#8217;t look like an idiot. Let&#8217;s see how it does.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Dq09!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa704a903-572d-466f-b2c9-c2f1a636ca29_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Dq09!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa704a903-572d-466f-b2c9-c2f1a636ca29_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Dq09!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa704a903-572d-466f-b2c9-c2f1a636ca29_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Dq09!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa704a903-572d-466f-b2c9-c2f1a636ca29_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Dq09!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa704a903-572d-466f-b2c9-c2f1a636ca29_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Dq09!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa704a903-572d-466f-b2c9-c2f1a636ca29_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a704a903-572d-466f-b2c9-c2f1a636ca29_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!Dq09!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa704a903-572d-466f-b2c9-c2f1a636ca29_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Dq09!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa704a903-572d-466f-b2c9-c2f1a636ca29_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Dq09!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa704a903-572d-466f-b2c9-c2f1a636ca29_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Dq09!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa704a903-572d-466f-b2c9-c2f1a636ca29_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>The rewritten penguins app, now with a distribution dropdown</p><h3><strong>Clear win: lowering activation energy</strong></h3><p>And that brings me to the other area where I think LLMs give you a clear win, which, and maybe this is not the best name, I think of this as lowering the activation energy. You can just do something very, very quickly. It might not be super correct or perfect, but it gives you something. Maybe that&#8217;s a quick demo or prototype that you can look at and be like: oh okay, this is cool, that&#8217;s not cool &#8212; it gives you some immediate feedback. Or maybe it&#8217;s something that&#8217;s just so awful, you feel compelled to fix it.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uBbQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ecd31c9-ebb2-4cf4-9ec4-e873ea08f5aa_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uBbQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ecd31c9-ebb2-4cf4-9ec4-e873ea08f5aa_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!uBbQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ecd31c9-ebb2-4cf4-9ec4-e873ea08f5aa_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!uBbQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ecd31c9-ebb2-4cf4-9ec4-e873ea08f5aa_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!uBbQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ecd31c9-ebb2-4cf4-9ec4-e873ea08f5aa_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!uBbQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ecd31c9-ebb2-4cf4-9ec4-e873ea08f5aa_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5ecd31c9-ebb2-4cf4-9ec4-e873ea08f5aa_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!uBbQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ecd31c9-ebb2-4cf4-9ec4-e873ea08f5aa_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!uBbQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ecd31c9-ebb2-4cf4-9ec4-e873ea08f5aa_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!uBbQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ecd31c9-ebb2-4cf4-9ec4-e873ea08f5aa_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!uBbQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ecd31c9-ebb2-4cf4-9ec4-e873ea08f5aa_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>Clear win: lowering activation energy &#8212; demos, bad first drafts, scary bugs, unfamiliar domains, postponed unit tests</p><p>This is something that I find useful for writing. I&#8217;ll ask it to write about something, not because I think it&#8217;s gonna do a good job, but because I know it&#8217;s gonna do a bad job, and then I feel compelled to correct it. This reminds me of one of my strategies back in the old days of the <a href="https://stat.ethz.ch/mailman/listinfo/r-help">R-help mailing list</a>. Sometimes you ask a question and it&#8217;s just crickets &#8212; no one cares to answer. So instead of asking a question, you just state something confidently, and if you&#8217;re wrong, someone will dive in and correct you.</p><p>The other thing I&#8217;ve been using it for lately: I&#8217;ve been working on <a href="https://testthat.r-lib.org/">testthat</a>. There are issues there that have been lingering for four or sometimes more years, because I&#8217;m like: oh, this is gonna be a lot of work. And so I&#8217;ve just been throwing Claude Code at it. I&#8217;m just like: take a stab. And sometimes it comes up with an answer, and I&#8217;m like: oh, that problem actually wasn&#8217;t that hard after all. The challenge has been all in my head this whole time.</p><p>It&#8217;s also great if you&#8217;re working in an unfamiliar area, whether that&#8217;s a new programming language or a new package or a new domain. LLMs get you good enough to be dangerous, for better or worse, very, very quickly. And I think Claude actually came up with a pretty good summary of this: &#8220;LLMs can make the cost of trying so low that you attempt things you&#8217;d normally postpone, avoid, or never get around to.&#8221;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JHDb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7475cd01-88e1-43ef-80f1-9ce0439b37e4_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JHDb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7475cd01-88e1-43ef-80f1-9ce0439b37e4_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!JHDb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7475cd01-88e1-43ef-80f1-9ce0439b37e4_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!JHDb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7475cd01-88e1-43ef-80f1-9ce0439b37e4_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!JHDb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7475cd01-88e1-43ef-80f1-9ce0439b37e4_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!JHDb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7475cd01-88e1-43ef-80f1-9ce0439b37e4_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7475cd01-88e1-43ef-80f1-9ce0439b37e4_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!JHDb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7475cd01-88e1-43ef-80f1-9ce0439b37e4_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!JHDb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7475cd01-88e1-43ef-80f1-9ce0439b37e4_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!JHDb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7475cd01-88e1-43ef-80f1-9ce0439b37e4_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!JHDb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7475cd01-88e1-43ef-80f1-9ce0439b37e4_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>Claude Opus 4.1: &#8220;The key theme: LLMs make the cost of trying so low that you attempt things you&#8217;d normally postpone, avoid, or never get around to.&#8221;</p><p>And I think this is a pretty compelling use case. You&#8217;re not going to want to trust everything it produces, but you&#8217;ve gotten unstuck, you&#8217;re moving forward. Sure, it&#8217;s going to make mistakes, but you&#8217;re going to learn from those.</p><h2><strong>Conclusion</strong></h2><p>To sum up: I feel like you can&#8217;t give a talk about LLMs without talking about some of the many, many, many concerns.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pysd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc002ebd1-bd7e-471a-83f3-c10f58b340d2_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pysd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc002ebd1-bd7e-471a-83f3-c10f58b340d2_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!pysd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc002ebd1-bd7e-471a-83f3-c10f58b340d2_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!pysd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc002ebd1-bd7e-471a-83f3-c10f58b340d2_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!pysd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc002ebd1-bd7e-471a-83f3-c10f58b340d2_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!pysd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc002ebd1-bd7e-471a-83f3-c10f58b340d2_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c002ebd1-bd7e-471a-83f3-c10f58b340d2_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!pysd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc002ebd1-bd7e-471a-83f3-c10f58b340d2_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!pysd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc002ebd1-bd7e-471a-83f3-c10f58b340d2_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!pysd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc002ebd1-bd7e-471a-83f3-c10f58b340d2_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!pysd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc002ebd1-bd7e-471a-83f3-c10f58b340d2_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>LLM concerns: cost/equality of access, environmental concerns, data privacy, evil billionaires</p><p>I think the first concern is the cost of, and the equality of, access. I will say, I&#8217;d really encourage you to sign up for an API key, put five dollars on it, and just see how far that takes you, because it takes you a surprisingly long way. The LLMs are getting cheaper and cheaper and cheaper, and you can do quite a lot of cool stuff for only five dollars. Also Google&#8217;s <a href="https://gemini.google.com/">Gemini</a> model is kind of in a distant third place, and so Google is just spending cash like anything to try and make it popular. And that means it&#8217;s got a very generous free tier right now, so you should take advantage of it. By and large, I think local models are not worth it. They can be worth it in general, but if you&#8217;re just getting started with LLMs, start with something that&#8217;s much more likely to give you positive results, which is Anthropic, <a href="https://openai.com/">OpenAI</a>, or Gemini.</p><p>Another concern is the environment. I genuinely believe you should care about the environment, you should worry about climate change, you should think about how much water and electricity you&#8217;re using. But if you have flown on a plane in the last 12 months, that just blows away, by orders of magnitude, any environmental impact of your ChatGPT usage. So while I think it makes sense to think about this on a societal level, the actual impact of an individual ChatGPT query is very, very small, and you should be thinking about other ways to save water and power.</p><p>There are also lots of concerns about data privacy around LLMs. I think this is, sort of surprisingly, something that affects you more as an individual. Basically every large company&#8217;s data already lives on Azure or GCP or AWS. All of the data is already in the cloud, and all the LLM models are running in the same cloud. Most large enterprises do not have these concerns, because these big companies already technically have access to all of their data, but there&#8217;s lots of protection in place to make sure it&#8217;s not misused. So it is something you should think about as an individual: certainly if you&#8217;re working with any confidential data, you need to be very, very cautious about sending it to these models. But most businesses can negotiate contracts with these providers that ensure that your data is not going to be used to train future models.</p><p>Finally, the biggest concern I have, which I don&#8217;t have a good answer for, is evil billionaires. I feel like I&#8217;m becoming increasingly radicalized that billionaires shouldn&#8217;t exist.</p><p>So again, to come back to my first point: if you are feeling disempowered or out of control, or you don&#8217;t understand how AI and LLMs are gonna affect your future life, I&#8217;d really encourage you to just do one little thing. Do one little experiment that helps you understand what&#8217;s going on. I think you&#8217;ll find that empowering. I think you&#8217;ll learn that while there&#8217;s lots of hype around models replacing data scientists and software engineers, we&#8217;re a very, very long way from that happening in practice. They are very good at some things. They can be very useful and empowering tools, but they&#8217;re a long way from replacing our jobs.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!byhR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3105ef9b-4b0f-45f7-a920-b53162c31761_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!byhR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3105ef9b-4b0f-45f7-a920-b53162c31761_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!byhR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3105ef9b-4b0f-45f7-a920-b53162c31761_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!byhR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3105ef9b-4b0f-45f7-a920-b53162c31761_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!byhR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3105ef9b-4b0f-45f7-a920-b53162c31761_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!byhR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3105ef9b-4b0f-45f7-a920-b53162c31761_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3105ef9b-4b0f-45f7-a920-b53162c31761_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!byhR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3105ef9b-4b0f-45f7-a920-b53162c31761_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!byhR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3105ef9b-4b0f-45f7-a920-b53162c31761_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!byhR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3105ef9b-4b0f-45f7-a920-b53162c31761_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!byhR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3105ef9b-4b0f-45f7-a920-b53162c31761_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>Oil painting of a person picking up trash, again</p><p>The other thing I will say &#8212; the best defense is a strong offense. If you&#8217;re worried about your job being replaced by AI: it feels like managers are way more vulnerable to being replaced by AI, because so much of what a manager does is just summarize the information that they receive from multiple channels and report it out. So feel free to go on the attack against people higher up in your company.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ih2u!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bfe4ba8-dc9e-4848-84bf-f6b6aedee85d_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ih2u!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bfe4ba8-dc9e-4848-84bf-f6b6aedee85d_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ih2u!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bfe4ba8-dc9e-4848-84bf-f6b6aedee85d_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ih2u!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bfe4ba8-dc9e-4848-84bf-f6b6aedee85d_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ih2u!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bfe4ba8-dc9e-4848-84bf-f6b6aedee85d_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!ih2u!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bfe4ba8-dc9e-4848-84bf-f6b6aedee85d_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9bfe4ba8-dc9e-4848-84bf-f6b6aedee85d_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&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_!ih2u!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bfe4ba8-dc9e-4848-84bf-f6b6aedee85d_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ih2u!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bfe4ba8-dc9e-4848-84bf-f6b6aedee85d_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ih2u!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bfe4ba8-dc9e-4848-84bf-f6b6aedee85d_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ih2u!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9bfe4ba8-dc9e-4848-84bf-f6b6aedee85d_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>The three topics, one more time: structured data, tool calling, coding</p><p>So in summary, I showed you three areas where I think LLMs are particularly interesting and empowering today. Use structured data extraction to turn unstructured data &#8212; text, images, audio, video &#8212; into rectangles; then you can apply all of your rectangle skills that you already have. Tools are a really neat way to extend the capabilities of LLMs. Tools are just functions plus metadata; you already know how to write functions, so you can now extend LLMs to do whatever you want, including creating agents that do really dangerous and stupid things. And then finally, LLMs are sometimes super amazing at coding, sometimes super terrible at coding, but I think the two areas where they give the clearest wins today are translations &#8212; whenever you&#8217;ve expressed an idea clearly in one language or one image, you can translate that to another &#8212; and lowering the activation energy, giving you the ability to experiment, to try things out, and to expand into new areas where you don&#8217;t know so much.</p>]]></content:encoded></item><item><title><![CDATA[AI outside of work]]></title><description><![CDATA[I&#8217;m going on vacation for the next two weeks, so I thought it might be fun to share some of my non-work uses of AI.]]></description><link>https://substack.hadley.nz/p/ai-outside-of-work</link><guid isPermaLink="false">https://substack.hadley.nz/p/ai-outside-of-work</guid><dc:creator><![CDATA[Hadley Wickham]]></dc:creator><pubDate>Fri, 14 Aug 2026 22:01:09 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/c503dcbd-a978-438f-b361-b4c055a824e9_1200x600.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I&#8217;m going on vacation for the next two weeks, so I thought it might be fun to share some of my non-work uses of AI. I hope it&#8217;ll encourage you to share too, since swapping personal wins is such a great way to learn. At work, I&#8217;m lucky to have a weekly meeting where a bunch of us share what we&#8217;ve learned about AI, and that really helps keep me anchored in what&#8217;s useful today. For example, I&#8217;d been hearing a lot of good things about <a href="https://www.kimi.com/blog/kimi-k3">Kimi K3</a>, so this week I made it (and <a href="https://assistant.posit.co/">Posit Assistant</a>) my daily driver. I&#8217;m really enjoying it so far: it feels like somewhere between Claude Opus and Fable in terms of intelligence, while being a bit cheaper than Sonnet.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!XYqu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b701c0e-292a-44e1-8b9f-641319efd0c7_1024x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XYqu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b701c0e-292a-44e1-8b9f-641319efd0c7_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!XYqu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b701c0e-292a-44e1-8b9f-641319efd0c7_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!XYqu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b701c0e-292a-44e1-8b9f-641319efd0c7_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!XYqu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b701c0e-292a-44e1-8b9f-641319efd0c7_1024x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!XYqu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b701c0e-292a-44e1-8b9f-641319efd0c7_1024x1024.png" width="350" height="350" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6b701c0e-292a-44e1-8b9f-641319efd0c7_1024x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&quot;resizeWidth&quot;:350,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;A robot in the kitchen, cheerfully cooking dinner, while a closed laptop sits forgotten on the counter behind it.&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A robot in the kitchen, cheerfully cooking dinner, while a closed laptop sits forgotten on the counter behind it." title="A robot in the kitchen, cheerfully cooking dinner, while a closed laptop sits forgotten on the counter behind it." srcset="https://substackcdn.com/image/fetch/$s_!XYqu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b701c0e-292a-44e1-8b9f-641319efd0c7_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!XYqu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b701c0e-292a-44e1-8b9f-641319efd0c7_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!XYqu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b701c0e-292a-44e1-8b9f-641319efd0c7_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!XYqu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b701c0e-292a-44e1-8b9f-641319efd0c7_1024x1024.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>Throughout my examples I&#8217;ll talk about Claude, because that&#8217;s what I use. But I bet every one of these tasks works just as well in whatever you use, whether that&#8217;s ChatGPT, Gemini, or something else.</p><h2><strong>As a replacement for search</strong></h2><p>I now turn to Claude for many problems where I used to use search. I&#8217;d already stopped using Google in favour of <a href="https://kagi.com/">Kagi</a>; it&#8217;s not free, but it feels like a meaningful improvement in quality, and Kagi doesn&#8217;t stuff AI summaries down your throat. Overall it feels like search has been steadily declining for the last 10 years, thanks to content creators who chase high rankings with low quality writing in order to make money from advertising. I expect the same content rot will eventually come for AI results, but for now the quality is generally much better.</p><p>Here are a few recent questions I&#8217;ve taken to Claude, where in years past I would have used Google:</p><ul><li><p>I like to play computer games in my free time, most recently <a href="https://store.steampowered.com/app/1145350/Hades_II/">Hades II</a>, <a href="https://store.steampowered.com/app/2868840/Slay_the_Spire_2/">Slay the Spire 2</a>, and <a href="https://store.steampowered.com/app/1569580/Blue_Prince/">Blue Prince</a>. I wanted another game along the same lines: a mix of skill and randomness, and where a session takes under an hour. Claude found me <a href="https://store.steampowered.com/app/2084000/Shogun_Showdown/">Shogun Showdown</a>, which scratches exactly the itch I was looking for.</p></li><li><p>I&#8217;ve been learning to sew, and now that I&#8217;m past the most basic of basics I wanted to tackle a more ambitious project. Claude was super helpful at both recommending the type of project to tackle next (pajama pants with pockets, and a simple knit t-shirt) and finding me some high-quality patterns to buy (e.g. </p></li></ul><p>https://threadtheory.ca</p><ul><li><p>).</p></li><li><p>I&#8217;ve also been trying to do more gardening (a common thread in my recent pastimes: doing physical things in the real world), but we have <a href="https://en.wikipedia.org/wiki/Cenchrus_echinatus">these weeds</a> that have these really unpleasant burrs that stick into your clothing and hair. I wanted clothing that would resist them, and Claude both worked out that I needed densely woven synthetic fibres and shortlisted a few options on Amazon for me to buy.</p></li><li><p>I was recently at the Mall of America in Minneapolis, helping my friends&#8217; kid shop for swim shoes. I try to spend as little time as possible in malls, so I had no idea which shops to look in. Claude gave me a great shortlist.</p></li><li><p>When travelling, I use Claude to generate ideas for things to do. I don&#8217;t trust the results absolutely, and it&#8217;s not my only source of data, but it&#8217;s a great way to get a first take. I&#8217;ve spent quite a bit of time refining <a href="https://gist.github.com/hadley/8cac21d4dcead2366059d2599a1cf1ee">a prompt</a> that describes the sort of thing my husband and I like to do on holiday, so I can paste it in along with wherever we&#8217;re going.</p></li></ul><h2><strong>In the kitchen</strong></h2><p>Claude is a useful kitchen assistant. I love it for what we call &#8220;chopped challenge&#8221;: coming up with a dinner based on whatever is left in the fridge. The recipes are far from perfect, but they get me out of the rut of the things I&#8217;ve cooked a million times before. Claude&#8217;s also great for adapting a recipe I already have, whether that&#8217;s a substitution when I&#8217;m missing an ingredient, a variation on an existing good recipe (e.g. vanilla -&gt; banana ice cream), or making taco or Cajun spice blends from their individual components.</p><p>I also love to bake, but <em>hate</em> baking by volume, so when I want to try a recipe that&#8217;s written in cups I ask Claude to translate it to weights. I&#8217;ll sometimes use it to create a recipe from scratch, but since baking requires precision I don&#8217;t trust the results. But that said, I also don&#8217;t trust a recipe from a random content creator on the web, no matter how many 1000s of words of preamble they write.</p><h2><strong>Words and language</strong></h2><p>I love words and language, and random questions are forever popping into my head. Claude is a wonderful companion for these, because it will happily entertain a question that isn&#8217;t quite well-formed enough to type into a search box:</p><ul><li><p>Creating backronyms, when I&#8217;ve fallen in love with a word and I want it to stand for something.</p></li><li><p>Pronunciation guides for names I&#8217;ve only ever seen written down. I don&#8217;t believe this is 100% correct, but it gives me a good starting point, and I also make sure to ask if I&#8217;m pronouncing a name correctly.</p></li><li><p>Answering random questions like: which birds are also verbs?</p></li><li><p>Translation between my Englishes. I sometimes blank on the American (or New Zealand) word for something. Recently I asked someone for a multiplug (the NZ term) and got a blank stare, so Claude had to tell me that Americans call it a power strip.</p></li></ul><h2><strong>File names</strong></h2><p>I also love a well-named file. And maybe you, like me, have to live with someone who doesn&#8217;t understand the joy of a directory of correctly named files. Or worse, someone who considers it normal to put spaces in file names. If you&#8217;re forced to share a dropbox folder with them, you can now point Claude at the directory, ask it to propose a naming scheme, then apply it, and enjoy the results.</p><p>Similarly, I recently received a directory full of meeting minutes that encoded the date in the file name in about five different ways. What would have been a lot of manual fiddling took one prompt, and now I can bask in the simple joy of files named with the <a href="https://xkcd.com/1179/">one true date format</a>.</p><h2><strong>Old books, new websites</strong></h2><p>The most involved thing on this list is a hobby project: taking scans of old computer books and catalogues (like <a href="https://the.computing.cafe/ae24a6/osborne-computer-books">Osbourne programming books</a> or <a href="https://americanhistory.si.edu/ru/collections/archival-item/sova-nmah-ac-0396-ref312">random Americana cook books</a>) and turning them into something browsable.</p><p>Here I&#8217;m more careful about the workflow, there are many pages and I want consistent results. I first ask Claude to split the PDF into pages, then write an ellmer script that uses <code>batch_chat_structured()</code> to extract the same fields from every page. Then I ask it to merge all the data into a single JSON file, and then turn that into a single page web app. The agent does the fiddly work at both ends, but the extraction itself yields plain text data with a reproducible script.</p><h2><strong>Over to you</strong></h2><p>I hope some of these ideas are new to you, but I also want to know your non-work uses of AI. So: what do you use AI for when you&#8217;re off the clock? Tell me in the comments and I&#8217;ll read them when I&#8217;m back from holiday.</p>]]></content:encoded></item><item><title><![CDATA[Illustrating my slides with AI]]></title><description><![CDATA[You might have noticed my slide illustrations in my last substack. This week I talk about how I made them: using AI, supported by an R package that turns yaml into images. You'll learn a bunch of my tricks, including how to get a consistent style across slides.]]></description><link>https://substack.hadley.nz/p/illustrating-my-slides-with-ai</link><guid isPermaLink="false">https://substack.hadley.nz/p/illustrating-my-slides-with-ai</guid><dc:creator><![CDATA[Hadley Wickham]]></dc:creator><pubDate>Mon, 03 Aug 2026 22:43:21 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/3614e37e-b488-426f-aca9-b9fb93dcb675_1200x600.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Since we&#8217;re on the topic of talks, I wanted to describe my process for generating the illustrations I use for my slides. Two years ago I primarily used royalty-free stock photography, but now I use images generated by AI (first via ChatGPT but now with Gemini). Over that time my workflow has evolved substantially, and I think it&#8217;s reached the point where others might find it interesting and useful.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DDAR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0be1795f-5151-4a82-99f6-dedf64b2e3a5_1024x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DDAR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0be1795f-5151-4a82-99f6-dedf64b2e3a5_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!DDAR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0be1795f-5151-4a82-99f6-dedf64b2e3a5_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!DDAR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0be1795f-5151-4a82-99f6-dedf64b2e3a5_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!DDAR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0be1795f-5151-4a82-99f6-dedf64b2e3a5_1024x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DDAR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0be1795f-5151-4a82-99f6-dedf64b2e3a5_1024x1024.png" width="352" height="352" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0be1795f-5151-4a82-99f6-dedf64b2e3a5_1024x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&quot;resizeWidth&quot;:352,&quot;bytes&quot;:542892,&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://tidydesign.substack.com/i/209707109?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0be1795f-5151-4a82-99f6-dedf64b2e3a5_1024x1024.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_!DDAR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0be1795f-5151-4a82-99f6-dedf64b2e3a5_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!DDAR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0be1795f-5151-4a82-99f6-dedf64b2e3a5_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!DDAR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0be1795f-5151-4a82-99f6-dedf64b2e3a5_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!DDAR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0be1795f-5151-4a82-99f6-dedf64b2e3a5_1024x1024.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><h2><strong>The big picture</strong></h2><p>Let&#8217;s begin with the big picture: I use AI to generate illustrations, not photos or diagrams. I don&#8217;t think AI-generated photos are appropriate for a presentation; at best they&#8217;re misleading and at worst they&#8217;re flat-out creepy. As for diagrams, I just don&#8217;t think that AI is (yet) up to the challenge. AI-produced diagrams tend to be overly complex, and while they look impressive, they tend not to aid comprehension of complex topics. And worse, they&#8217;re not editable: you can&#8217;t nudge a box or reword a label. So instead of just fixing the problem, you end up in a frustrating loop of prompt tweaking, trying to coax the image towards the diagram you could have drawn yourself much faster.</p><p>For me, illustrations are the sweet spot of AI-generated art. A good illustration doesn&#8217;t need to explain anything &#8212; it evokes a feeling, an image, or a memory in your audience&#8217;s mind. It supports your presentation, rather than overshadowing it, freeing the audience to focus on the most important thing: you and what you&#8217;re saying.</p><h2><strong>Practicalities</strong></h2><p>For me, right now, <a href="https://deepmind.google/models/gemini-image/pro/">Google&#8217;s Gemini Image</a> family (aka Nano Banana) is the best model for generating images. It&#8217;s widely available, high quality, reasonably fast, and reasonably cheap. While you can of course create images <a href="https://gemini.google.com/">using chat</a>, I think there&#8217;s a better way. A way that&#8217;s both reproducible and reusable, facilitated by a small R package called <a href="https://hadley.github.io/bananarama/">bananarama</a>.</p><p>The basic idea is that you write a yaml file and bananarama takes care of calling the Gemini API to produce and save the images:</p><pre><code><code>defaults:
  style: Vibrant high impasto oil painting.

images:
  - name: pinnacle-of-success
    description:
      Draw a picture of [Hadley] hiking up a mountain. The mountain should
      be tall and imposing and he should be really struggling to make it 
      to the top.</code></code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pccU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5a38268-a0d8-4e43-9e3a-60284d5ff243_1376x768.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pccU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5a38268-a0d8-4e43-9e3a-60284d5ff243_1376x768.png 424w, https://substackcdn.com/image/fetch/$s_!pccU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5a38268-a0d8-4e43-9e3a-60284d5ff243_1376x768.png 848w, https://substackcdn.com/image/fetch/$s_!pccU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5a38268-a0d8-4e43-9e3a-60284d5ff243_1376x768.png 1272w, https://substackcdn.com/image/fetch/$s_!pccU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5a38268-a0d8-4e43-9e3a-60284d5ff243_1376x768.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!pccU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5a38268-a0d8-4e43-9e3a-60284d5ff243_1376x768.png" width="1376" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e5a38268-a0d8-4e43-9e3a-60284d5ff243_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;:null,&quot;alt&quot;:&quot;A thickly painted oil painting of me, sweating and grimacing as I haul myself up a steep rocky trail on my walking poles. Snow-capped peaks fill the background.&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A thickly painted oil painting of me, sweating and grimacing as I haul myself up a steep rocky trail on my walking poles. Snow-capped peaks fill the background." title="A thickly painted oil painting of me, sweating and grimacing as I haul myself up a steep rocky trail on my walking poles. Snow-capped peaks fill the background." srcset="https://substackcdn.com/image/fetch/$s_!pccU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5a38268-a0d8-4e43-9e3a-60284d5ff243_1376x768.png 424w, https://substackcdn.com/image/fetch/$s_!pccU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5a38268-a0d8-4e43-9e3a-60284d5ff243_1376x768.png 848w, https://substackcdn.com/image/fetch/$s_!pccU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5a38268-a0d8-4e43-9e3a-60284d5ff243_1376x768.png 1272w, https://substackcdn.com/image/fetch/$s_!pccU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5a38268-a0d8-4e43-9e3a-60284d5ff243_1376x768.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></figure></div><p>(This doesn&#8217;t look quite like the images from my presentation; more on that shortly.)</p><p>You then call <code>bananarama::bananarama("name.yaml")</code> and it will put the requested images in the <code>name/</code>directory, skipping any that have already been generated.</p><p>By default bananarama generates images with a 16:9 aspect ratio. But frustratingly, Gemini actually generates images with a 16.1:9 aspect ratio, meaning that every image needs to be slightly resized when you use it. This drives me absolutely wild, and seems like such a classic AI problem: you have an incredibly powerful model that screws up something basic.</p><p>The major downside of bananarama is that you have to set up an API key and pay API pricing. One image costs ~$0.07, so while one is cheap, the costs can add up if you&#8217;re doing a lot of iteration.</p><h2><strong>Style</strong></h2><p>The file starts by defining the default style, which is an important way to ensure visual consistency across your slides. In a presentation, consistency matters: you want the changes between slides to be meaningful. Your style should be personal, but I&#8217;ll start by sharing mine, which I used to generate the images in the <a href="https://tidydesign.substack.com/p/y-code-when-ai">slides from last week</a>:</p><blockquote><p>Flat vector editorial illustration with a prominent grainy, chalk-pastel texture overlaid on the entire image. The style is lineless, relying on colour blocking and soft, textured shading to define forms. The color palette is muted and desaturated. If present, furniture and decor are mid-century modern. The overall mood is calm, cozy, and approachable.</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_!Wu00!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3dfe21ee-782c-4d28-bb47-bfdee95d6f31_1376x768.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Wu00!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3dfe21ee-782c-4d28-bb47-bfdee95d6f31_1376x768.png 424w, https://substackcdn.com/image/fetch/$s_!Wu00!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3dfe21ee-782c-4d28-bb47-bfdee95d6f31_1376x768.png 848w, https://substackcdn.com/image/fetch/$s_!Wu00!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3dfe21ee-782c-4d28-bb47-bfdee95d6f31_1376x768.png 1272w, https://substackcdn.com/image/fetch/$s_!Wu00!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3dfe21ee-782c-4d28-bb47-bfdee95d6f31_1376x768.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Wu00!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3dfe21ee-782c-4d28-bb47-bfdee95d6f31_1376x768.png" width="1376" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3dfe21ee-782c-4d28-bb47-bfdee95d6f31_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;:null,&quot;alt&quot;:&quot;A flat, chalk-textured vector illustration of me tipping backwards into an open manhole in the pavement, arms flung out and mouth open in alarm. Behind me are muted green and terracotta mid-century modern buildings.&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A flat, chalk-textured vector illustration of me tipping backwards into an open manhole in the pavement, arms flung out and mouth open in alarm. Behind me are muted green and terracotta mid-century modern buildings." title="A flat, chalk-textured vector illustration of me tipping backwards into an open manhole in the pavement, arms flung out and mouth open in alarm. Behind me are muted green and terracotta mid-century modern buildings." srcset="https://substackcdn.com/image/fetch/$s_!Wu00!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3dfe21ee-782c-4d28-bb47-bfdee95d6f31_1376x768.png 424w, https://substackcdn.com/image/fetch/$s_!Wu00!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3dfe21ee-782c-4d28-bb47-bfdee95d6f31_1376x768.png 848w, https://substackcdn.com/image/fetch/$s_!Wu00!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3dfe21ee-782c-4d28-bb47-bfdee95d6f31_1376x768.png 1272w, https://substackcdn.com/image/fetch/$s_!Wu00!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3dfe21ee-782c-4d28-bb47-bfdee95d6f31_1376x768.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></figure></div><p>Getting to this prompt was a long evolution, tweaking a bit here and there with each presentation. I also did a few rounds of iteration in Gemini chat, asking for suggestions to get it closer to the style I was imagining.</p><p>But please don&#8217;t copy my style. Not because I mind, but because you&#8217;re missing an opportunity to learn more about art and to have some fun. I&#8217;ve included a <a href="https://hadley.github.io/bananarama/articles/styles.html">few examples</a> on the bananarama site to get your creative juices flowing, but I highly recommend you just keep your eye out for illustrations that you like. Take a photo when you see it, then ask Gemini to describe the style you&#8217;re looking at. Ask it about similar styles and how it&#8217;s evolved over time, and then try out a few variations. (If you just want to learn more about art, check out <a href="https://www.tiktok.com/discover/modern-art-for-haters">Modern art for haters</a> on TikTok, which I really enjoy.)</p><p>If you want to make your images look particularly consistent, you can anchor the prompt with reference images. bananarama makes this easy: whenever you write <code>[image]</code> it will look for <code>image.png</code> or <code>image.jpeg</code> and automatically include it in the prompt. I use this idea a lot. Whenever I get a component that I particularly like, I&#8217;ll crop it out and save it. That&#8217;s how I came up with <code>hadley.png</code>, <code>robot.png</code>, and <code>style.png</code> that I used for my slides last week.</p><h2><strong>Embrace the medium</strong></h2><p>This is a new way of making art, and you have to approach it with some flexibility. Don&#8217;t hold too tightly to the image that you see in your mind&#8217;s eye, as getting exactly what you want is a crapshoot and it&#8217;s easy to waste a lot of time trying to craft <em>exactly</em> the right prompt. Instead, go with the flow, and also let the images influence how you think about your talk.</p><p>Another useful technique is generating a few replicates with exactly the same inputs. bananarama makes that easy because you can label images with (e.g) <code>n: 3</code> to generate three replicates of the same image. That gives you a sense of the &#8220;distribution&#8221; of images for a given prompt. Sometimes it&#8217;s not that you wrote a bad prompt, it&#8217;s just that you got a bad random seed. These days once I&#8217;m confident the prompt is getting the main points across I&#8217;ll generate 5 different images and then pick my favourite.</p><p>Let&#8217;s work through an example image I made for a recent talk. I wanted to capture the feeling that AI is squeezing us out, and since the talk was in Minnesota, I wanted to use my favourite Minnesotan word, &#8220;Ope&#8221;. That led to my first prompt:</p><blockquote><p>A robot squeezing past [Hadley] saying &#8220;Ope, just gonna squeeze right by ya&#8221;. The robot is Minnesotan, wearing a vest with a duck on it and a winter hat. Hadley is standing on the edge of a cliff looking anxious/afraid. He is in between the robot and cliff.</p></blockquote><p>I iterated on this prompt quite a bit, but I couldn&#8217;t quite get what I was looking for.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7mzE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0def819e-a51a-4620-941e-4ed08bf8fc1f_1376x768.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7mzE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0def819e-a51a-4620-941e-4ed08bf8fc1f_1376x768.png 424w, https://substackcdn.com/image/fetch/$s_!7mzE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0def819e-a51a-4620-941e-4ed08bf8fc1f_1376x768.png 848w, https://substackcdn.com/image/fetch/$s_!7mzE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0def819e-a51a-4620-941e-4ed08bf8fc1f_1376x768.png 1272w, https://substackcdn.com/image/fetch/$s_!7mzE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0def819e-a51a-4620-941e-4ed08bf8fc1f_1376x768.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!7mzE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0def819e-a51a-4620-941e-4ed08bf8fc1f_1376x768.png" width="1376" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0def819e-a51a-4620-941e-4ed08bf8fc1f_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;:null,&quot;alt&quot;:&quot;A robot in a bobble hat and a duck-print vest stands next to me on a clifftop, saying \&quot;Ope, just gonna squeeze right by ya\&quot;. The robot looks like he's trying to push me off the cliff, not squeeze past me.&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A robot in a bobble hat and a duck-print vest stands next to me on a clifftop, saying &quot;Ope, just gonna squeeze right by ya&quot;. The robot looks like he's trying to push me off the cliff, not squeeze past me." title="A robot in a bobble hat and a duck-print vest stands next to me on a clifftop, saying &quot;Ope, just gonna squeeze right by ya&quot;. The robot looks like he's trying to push me off the cliff, not squeeze past me." srcset="https://substackcdn.com/image/fetch/$s_!7mzE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0def819e-a51a-4620-941e-4ed08bf8fc1f_1376x768.png 424w, https://substackcdn.com/image/fetch/$s_!7mzE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0def819e-a51a-4620-941e-4ed08bf8fc1f_1376x768.png 848w, https://substackcdn.com/image/fetch/$s_!7mzE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0def819e-a51a-4620-941e-4ed08bf8fc1f_1376x768.png 1272w, https://substackcdn.com/image/fetch/$s_!7mzE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0def819e-a51a-4620-941e-4ed08bf8fc1f_1376x768.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></figure></div><p>So at this point I switched to generating a few replicates and I got one that was <em>so</em> close:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!69aY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71d9e72f-63b7-4fe7-8ac8-7f86a94faed0_1376x768.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!69aY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71d9e72f-63b7-4fe7-8ac8-7f86a94faed0_1376x768.png 424w, https://substackcdn.com/image/fetch/$s_!69aY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71d9e72f-63b7-4fe7-8ac8-7f86a94faed0_1376x768.png 848w, https://substackcdn.com/image/fetch/$s_!69aY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71d9e72f-63b7-4fe7-8ac8-7f86a94faed0_1376x768.png 1272w, https://substackcdn.com/image/fetch/$s_!69aY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71d9e72f-63b7-4fe7-8ac8-7f86a94faed0_1376x768.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!69aY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71d9e72f-63b7-4fe7-8ac8-7f86a94faed0_1376x768.png" width="1376" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/71d9e72f-63b7-4fe7-8ac8-7f86a94faed0_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;:null,&quot;alt&quot;:&quot;The same scene, but now on a narrow ledge: the man is pressed back against the rock face while the robot, in a yellow duck-print puffer jacket, edges past him towards the drop.&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="The same scene, but now on a narrow ledge: the man is pressed back against the rock face while the robot, in a yellow duck-print puffer jacket, edges past him towards the drop." title="The same scene, but now on a narrow ledge: the man is pressed back against the rock face while the robot, in a yellow duck-print puffer jacket, edges past him towards the drop." srcset="https://substackcdn.com/image/fetch/$s_!69aY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71d9e72f-63b7-4fe7-8ac8-7f86a94faed0_1376x768.png 424w, https://substackcdn.com/image/fetch/$s_!69aY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71d9e72f-63b7-4fe7-8ac8-7f86a94faed0_1376x768.png 848w, https://substackcdn.com/image/fetch/$s_!69aY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71d9e72f-63b7-4fe7-8ac8-7f86a94faed0_1376x768.png 1272w, https://substackcdn.com/image/fetch/$s_!69aY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71d9e72f-63b7-4fe7-8ac8-7f86a94faed0_1376x768.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></figure></div><p>This was close enough, and because bananarama doesn&#8217;t (yet!) support editing images, I switched back to Gemini chat and asked:</p><blockquote><p>Flip the position of the human and the robot</p></blockquote><p>That worked, but made me say the words instead of the robot. So I tried:</p><blockquote><p>The robot should still say the words</p></blockquote><p>That did nothing, so I was even more explicit:</p><blockquote><p>Move the text so the robot is talking, by moving the text box to the left</p></blockquote><p>That worked, yielding the image I used in my presentation:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pIys!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc7fd9e-57a5-4aee-bb18-edd0246de7b9_2752x1536.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pIys!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc7fd9e-57a5-4aee-bb18-edd0246de7b9_2752x1536.png 424w, https://substackcdn.com/image/fetch/$s_!pIys!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc7fd9e-57a5-4aee-bb18-edd0246de7b9_2752x1536.png 848w, https://substackcdn.com/image/fetch/$s_!pIys!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc7fd9e-57a5-4aee-bb18-edd0246de7b9_2752x1536.png 1272w, https://substackcdn.com/image/fetch/$s_!pIys!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc7fd9e-57a5-4aee-bb18-edd0246de7b9_2752x1536.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!pIys!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc7fd9e-57a5-4aee-bb18-edd0246de7b9_2752x1536.png" width="1456" height="813" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1cc7fd9e-57a5-4aee-bb18-edd0246de7b9_2752x1536.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:813,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;The positions are now flipped: the robot stands safely tucked against the rock wall with a hand on his back, easing him out onto the very lip of the cliff. The man glances back over his shoulder, alarmed, one hand out for balance.&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="The positions are now flipped: the robot stands safely tucked against the rock wall with a hand on his back, easing him out onto the very lip of the cliff. The man glances back over his shoulder, alarmed, one hand out for balance." title="The positions are now flipped: the robot stands safely tucked against the rock wall with a hand on his back, easing him out onto the very lip of the cliff. The man glances back over his shoulder, alarmed, one hand out for balance." srcset="https://substackcdn.com/image/fetch/$s_!pIys!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc7fd9e-57a5-4aee-bb18-edd0246de7b9_2752x1536.png 424w, https://substackcdn.com/image/fetch/$s_!pIys!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc7fd9e-57a5-4aee-bb18-edd0246de7b9_2752x1536.png 848w, https://substackcdn.com/image/fetch/$s_!pIys!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc7fd9e-57a5-4aee-bb18-edd0246de7b9_2752x1536.png 1272w, https://substackcdn.com/image/fetch/$s_!pIys!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc7fd9e-57a5-4aee-bb18-edd0246de7b9_2752x1536.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></figure></div><p>(This is a good example of the frustrations of trying to get Nano Banana to produce exactly what you want. Of course I realised afterwards this task would have been much easier if I had just added the speech bubble in Keynote &#128528;.)</p><p>What I like about this image is that it evokes a robot that acts politely while it puts us all at risk.</p><h2><strong>What about the artists?</strong></h2><p>You can&#8217;t generate art with AI without thinking about the artists. These models are trained on images scraped from the internet without artists&#8217; consent, and the fact that I find them so useful doesn&#8217;t make that go away. I wish I had a tidy resolution; I don&#8217;t. Art is important to me, and I like to surround myself with beautiful things made by people. I don&#8217;t know if that feels like enough, and it didn&#8217;t feel right to talk about this workflow without touching on the uncomfortable parts.</p><p>It&#8217;s a hard time to be an artist, and AI tools are part of why. So if you make art with AI, please, <em>please</em>, support humans by buying their work!</p>]]></content:encoded></item><item><title><![CDATA[y code when ai?]]></title><description><![CDATA[A talk on AI and coding]]></description><link>https://substack.hadley.nz/p/y-code-when-ai</link><guid isPermaLink="false">https://substack.hadley.nz/p/y-code-when-ai</guid><dc:creator><![CDATA[Hadley Wickham]]></dc:creator><pubDate>Fri, 24 Jul 2026 19:17:29 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!xXm7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F549eac16-011f-458f-8bac-790de574ed13_1920x1080.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I&#8217;ve given this talk on my feelings about AI and coding quite a few times (mostly recently for an <a href="https://www.youtube.com/watch?v=oi5mopOO4_Y">ASA webinar</a>), and I&#8217;ve decided I need to stop giving it and do something new. So to force myself to do that I&#8217;ve written it up for you all &#128578;.</p><p>Before I get into the context, you might be interested in the process, since it also leans heavily on AI:</p><ol><li><p>I started by asking Claude to download the video from youtube, since I can never remember how to do it myself.</p></li><li><p>Then I used <a href="https://www.macwhisper.com">MacWhisper</a> to create a transcript, and saved the slides from my keynote presentation as individual PNGs.</p></li><li><p>Next I did a few rounds of cleanup with Claude, first asking it to read my slides (so it know what terms I&#8217;m saying), then asking it to fix transcription errors, break it into paragraphs, and remove disfluencies (like &#8220;ah&#8221;, &#8220;um&#8221;, etc). I used git and  committed each step so I could see exactly what it was doing.</p></li><li><p>Then I turned the plaintext transcript in to markdown, enriching it with links and asking it to insert the slides at the appropriate place (which it did remarkably well).</p></li><li><p>At this point, I realised I gave a live demo, so there was a long chunk of text with no slides. So I asked Claude to extract screenshots from the video, based on the original timestamps from the transcript.</p></li><li><p>I finished it off with a thorough personal read, lightly tweaking the text to ensure it captured what I actually meant not what I said.</p></li></ol><p>Overall, probably an hour or so of work, which is vastly faster than would ever have been possible before!</p><div><hr></div><p>Today I wanted to share my thinking about AI. I&#8217;m someone who writes a lot of code, and it&#8217;s really changed the way that I produce R packages, but I still fundamentally believe that code is super important. So that&#8217;s something we&#8217;ll talk through today.</p><h2>Big picture</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xXm7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F549eac16-011f-458f-8bac-790de574ed13_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xXm7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F549eac16-011f-458f-8bac-790de574ed13_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!xXm7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F549eac16-011f-458f-8bac-790de574ed13_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!xXm7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F549eac16-011f-458f-8bac-790de574ed13_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!xXm7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F549eac16-011f-458f-8bac-790de574ed13_1920x1080.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xXm7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F549eac16-011f-458f-8bac-790de574ed13_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/549eac16-011f-458f-8bac-790de574ed13_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Illustration: a kneeling man reaching out to a smoking robot rising from a genie's lamp&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Illustration: a kneeling man reaching out to a smoking robot rising from a genie's lamp" title="Illustration: a kneeling man reaching out to a smoking robot rising from a genie's lamp" srcset="https://substackcdn.com/image/fetch/$s_!xXm7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F549eac16-011f-458f-8bac-790de574ed13_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!xXm7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F549eac16-011f-458f-8bac-790de574ed13_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!xXm7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F549eac16-011f-458f-8bac-790de574ed13_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!xXm7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F549eac16-011f-458f-8bac-790de574ed13_1920x1080.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></figure></div><p>I want to start with the big picture. The first thing: no matter how you feel about AI, the genie is out of the bottle and it&#8217;s not going back in. I still feel fundamentally ambivalent about AI. Obviously it can be a tremendous lever in writing better code, but there are also so many negative things, from the environmental impact to increasing the concentration of wealth. And it&#8217;s all built on the theft of intellectual property on an unprecedented, industrial scale. So there are lots and lots of bad things about AI, and I still feel conflicted about my use of it, but it also feels like something that we all have to deal with. It&#8217;s coming, like it or not. We can&#8217;t put the genie back in the bottle.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3uLD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69cd354d-0eb5-4be2-a13f-b1552426680b_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3uLD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69cd354d-0eb5-4be2-a13f-b1552426680b_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!3uLD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69cd354d-0eb5-4be2-a13f-b1552426680b_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!3uLD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69cd354d-0eb5-4be2-a13f-b1552426680b_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!3uLD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69cd354d-0eb5-4be2-a13f-b1552426680b_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!3uLD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69cd354d-0eb5-4be2-a13f-b1552426680b_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/69cd354d-0eb5-4be2-a13f-b1552426680b_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Illustration: a man dancing joyfully with a friendly robot&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Illustration: a man dancing joyfully with a friendly robot" title="Illustration: a man dancing joyfully with a friendly robot" srcset="https://substackcdn.com/image/fetch/$s_!3uLD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69cd354d-0eb5-4be2-a13f-b1552426680b_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!3uLD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69cd354d-0eb5-4be2-a13f-b1552426680b_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!3uLD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69cd354d-0eb5-4be2-a13f-b1552426680b_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!3uLD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69cd354d-0eb5-4be2-a13f-b1552426680b_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>But on the plus side, I think you can actually have a great time with AI. It can be genuinely fun and genuinely empowering.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pArS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe335eefc-5114-407a-9a4f-2cd63076e0b6_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pArS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe335eefc-5114-407a-9a4f-2cd63076e0b6_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!pArS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe335eefc-5114-407a-9a4f-2cd63076e0b6_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!pArS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe335eefc-5114-407a-9a4f-2cd63076e0b6_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!pArS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe335eefc-5114-407a-9a4f-2cd63076e0b6_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!pArS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe335eefc-5114-407a-9a4f-2cd63076e0b6_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e335eefc-5114-407a-9a4f-2cd63076e0b6_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Illustration: split scene &#8212; a man typing at a typewriter, and the same man relaxing on a couch talking with a robot&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Illustration: split scene &#8212; a man typing at a typewriter, and the same man relaxing on a couch talking with a robot" title="Illustration: split scene &#8212; a man typing at a typewriter, and the same man relaxing on a couch talking with a robot" srcset="https://substackcdn.com/image/fetch/$s_!pArS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe335eefc-5114-407a-9a4f-2cd63076e0b6_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!pArS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe335eefc-5114-407a-9a4f-2cd63076e0b6_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!pArS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe335eefc-5114-407a-9a4f-2cd63076e0b6_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!pArS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe335eefc-5114-407a-9a4f-2cd63076e0b6_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>For me personally, this was changing how I think about producing code. No longer is it me typing code directly into the computer; now I&#8217;m having this conversation with a robot (<a href="https://claude.ai/">Claude</a>, in my case) that&#8217;s interpreting my thoughts and providing a remarkable iterative feedback loop that I still find really rewarding.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!MhhE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27a98d86-30ba-4472-bcd6-0630056c810c_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!MhhE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27a98d86-30ba-4472-bcd6-0630056c810c_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!MhhE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27a98d86-30ba-4472-bcd6-0630056c810c_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!MhhE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27a98d86-30ba-4472-bcd6-0630056c810c_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!MhhE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27a98d86-30ba-4472-bcd6-0630056c810c_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!MhhE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27a98d86-30ba-4472-bcd6-0630056c810c_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/27a98d86-30ba-4472-bcd6-0630056c810c_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Illustration: a man and a robot at a forking path &#8212; a bright spring forest on one side, a dark forest on the other&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Illustration: a man and a robot at a forking path &#8212; a bright spring forest on one side, a dark forest on the other" title="Illustration: a man and a robot at a forking path &#8212; a bright spring forest on one side, a dark forest on the other" srcset="https://substackcdn.com/image/fetch/$s_!MhhE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27a98d86-30ba-4472-bcd6-0630056c810c_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!MhhE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27a98d86-30ba-4472-bcd6-0630056c810c_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!MhhE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27a98d86-30ba-4472-bcd6-0630056c810c_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!MhhE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27a98d86-30ba-4472-bcd6-0630056c810c_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>But there&#8217;s a fork in the road &#8212; there are two paths you can take when using AI to produce code. The first is the one you probably hear the most about in the media.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zXvb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa384cad-e31a-45c4-a0af-c934e42e4c2f_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zXvb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa384cad-e31a-45c4-a0af-c934e42e4c2f_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!zXvb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa384cad-e31a-45c4-a0af-c934e42e4c2f_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!zXvb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa384cad-e31a-45c4-a0af-c934e42e4c2f_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!zXvb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa384cad-e31a-45c4-a0af-c934e42e4c2f_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!zXvb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa384cad-e31a-45c4-a0af-c934e42e4c2f_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/aa384cad-e31a-45c4-a0af-c934e42e4c2f_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Illustration: a man addressing a factory floor full of robots working at computers&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Illustration: a man addressing a factory floor full of robots working at computers" title="Illustration: a man addressing a factory floor full of robots working at computers" srcset="https://substackcdn.com/image/fetch/$s_!zXvb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa384cad-e31a-45c4-a0af-c934e42e4c2f_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!zXvb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa384cad-e31a-45c4-a0af-c934e42e4c2f_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!zXvb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa384cad-e31a-45c4-a0af-c934e42e4c2f_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!zXvb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa384cad-e31a-45c4-a0af-c934e42e4c2f_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>This is the &#8220;software factory&#8221; where you become the manager of a factory of robots who are constantly beavering away day in, day out, and you&#8217;re frantically trying to feed them with as many good ideas as you possibly can. Taken to its extreme, this leads to something pretty dystopian.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!0Ib7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F267e30d8-120e-4221-a0a3-11e2cb3c625d_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!0Ib7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F267e30d8-120e-4221-a0a3-11e2cb3c625d_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!0Ib7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F267e30d8-120e-4221-a0a3-11e2cb3c625d_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!0Ib7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F267e30d8-120e-4221-a0a3-11e2cb3c625d_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!0Ib7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F267e30d8-120e-4221-a0a3-11e2cb3c625d_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!0Ib7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F267e30d8-120e-4221-a0a3-11e2cb3c625d_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/267e30d8-120e-4221-a0a3-11e2cb3c625d_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Illustration: a post-apocalyptic \&quot;Gas Town\&quot; &#8212; a man riding a spiked war truck, cracking a whip over scrappy robots&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Illustration: a post-apocalyptic &quot;Gas Town&quot; &#8212; a man riding a spiked war truck, cracking a whip over scrappy robots" title="Illustration: a post-apocalyptic &quot;Gas Town&quot; &#8212; a man riding a spiked war truck, cracking a whip over scrappy robots" srcset="https://substackcdn.com/image/fetch/$s_!0Ib7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F267e30d8-120e-4221-a0a3-11e2cb3c625d_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!0Ib7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F267e30d8-120e-4221-a0a3-11e2cb3c625d_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!0Ib7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F267e30d8-120e-4221-a0a3-11e2cb3c625d_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!0Ib7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F267e30d8-120e-4221-a0a3-11e2cb3c625d_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>I don&#8217;t know if any of you are aware of Steve Yegge, but he&#8217;s a pretty famous software engineer. His <a href="https://steve-yegge.medium.com/welcome-to-gas-town-4f25ee16dd04">&#8220;Gas Town&#8221;</a>piece depicts this dystopian future where all you&#8217;re doing is trying to optimize the sheer volume of code that you produce, and every problem you create with agents you solve with yet more agents.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!aEl0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25c33a5c-0d46-4a37-9064-a42f5fe12ae9_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!aEl0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25c33a5c-0d46-4a37-9064-a42f5fe12ae9_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!aEl0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25c33a5c-0d46-4a37-9064-a42f5fe12ae9_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!aEl0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25c33a5c-0d46-4a37-9064-a42f5fe12ae9_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!aEl0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25c33a5c-0d46-4a37-9064-a42f5fe12ae9_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!aEl0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25c33a5c-0d46-4a37-9064-a42f5fe12ae9_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/25c33a5c-0d46-4a37-9064-a42f5fe12ae9_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Illustration: robots writing code and flowcharts on whiteboards&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Illustration: robots writing code and flowcharts on whiteboards" title="Illustration: robots writing code and flowcharts on whiteboards" srcset="https://substackcdn.com/image/fetch/$s_!aEl0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25c33a5c-0d46-4a37-9064-a42f5fe12ae9_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!aEl0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25c33a5c-0d46-4a37-9064-a42f5fe12ae9_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!aEl0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25c33a5c-0d46-4a37-9064-a42f5fe12ae9_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!aEl0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25c33a5c-0d46-4a37-9064-a42f5fe12ae9_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>But that&#8217;s not the only way forward. There&#8217;s also a way forward where you use AI to write higher-quality code, which for me is typified by <a href="https://doll.leaflet.pub/3mbrplpvipk2j">Doll&#8217;s writing</a>.</p><p>One of the things that&#8217;s really interesting as we learn more about using AI for high-quality software engineering is just how many of the existing best practices &#8212; things like good documentation, strong tests, and caring about how your code is organized &#8212; continue to be really, really important. And the good news is that they&#8217;re more accessible than they used to be. As the cost of writing code goes down, you can spend more time (or more of Claude&#8217;s time!) architecting your code so it&#8217;s easier to understand and easier to modify in the future.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!C3sU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a275239-a5a6-439e-bd1c-1452064997b2_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!C3sU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a275239-a5a6-439e-bd1c-1452064997b2_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!C3sU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a275239-a5a6-439e-bd1c-1452064997b2_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!C3sU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a275239-a5a6-439e-bd1c-1452064997b2_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!C3sU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a275239-a5a6-439e-bd1c-1452064997b2_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!C3sU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a275239-a5a6-439e-bd1c-1452064997b2_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5a275239-a5a6-439e-bd1c-1452064997b2_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Text slide: \&quot;It's still your work\&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Text slide: &quot;It's still your work&quot;" title="Text slide: &quot;It's still your work&quot;" srcset="https://substackcdn.com/image/fetch/$s_!C3sU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a275239-a5a6-439e-bd1c-1452064997b2_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!C3sU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a275239-a5a6-439e-bd1c-1452064997b2_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!C3sU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a275239-a5a6-439e-bd1c-1452064997b2_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!C3sU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a275239-a5a6-439e-bd1c-1452064997b2_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>For me, the thing that&#8217;s most important to hold onto is that regardless of how the code is produced, it&#8217;s still <strong>your</strong>work. You are responsible for the work that you and AI do together.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gPAF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80b85ecd-841a-445e-aae7-3be338f84578_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gPAF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80b85ecd-841a-445e-aae7-3be338f84578_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!gPAF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80b85ecd-841a-445e-aae7-3be338f84578_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!gPAF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80b85ecd-841a-445e-aae7-3be338f84578_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!gPAF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80b85ecd-841a-445e-aae7-3be338f84578_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!gPAF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80b85ecd-841a-445e-aae7-3be338f84578_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/80b85ecd-841a-445e-aae7-3be338f84578_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Illustration: a disengaged painter slumped on a phone beside a dull canvas, versus an inspired painter creating a vivid, colorful canvas&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Illustration: a disengaged painter slumped on a phone beside a dull canvas, versus an inspired painter creating a vivid, colorful canvas" title="Illustration: a disengaged painter slumped on a phone beside a dull canvas, versus an inspired painter creating a vivid, colorful canvas" srcset="https://substackcdn.com/image/fetch/$s_!gPAF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80b85ecd-841a-445e-aae7-3be338f84578_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!gPAF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80b85ecd-841a-445e-aae7-3be338f84578_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!gPAF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80b85ecd-841a-445e-aae7-3be338f84578_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!gPAF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80b85ecd-841a-445e-aae7-3be338f84578_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>If you choose not to intellectually engage, you can churn out mediocre work faster than you ever could before. But that&#8217;s not the only option. If you really engage deeply, I truly believe that you can produce higher-quality work than you ever have before.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!FKkh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14037f08-fc9d-4f70-8e34-7a832c41acf8_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!FKkh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14037f08-fc9d-4f70-8e34-7a832c41acf8_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!FKkh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14037f08-fc9d-4f70-8e34-7a832c41acf8_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!FKkh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14037f08-fc9d-4f70-8e34-7a832c41acf8_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!FKkh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14037f08-fc9d-4f70-8e34-7a832c41acf8_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!FKkh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14037f08-fc9d-4f70-8e34-7a832c41acf8_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/14037f08-fc9d-4f70-8e34-7a832c41acf8_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Illustration: a robot singing into a microphone beside a guitar amplifier&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Illustration: a robot singing into a microphone beside a guitar amplifier" title="Illustration: a robot singing into a microphone beside a guitar amplifier" srcset="https://substackcdn.com/image/fetch/$s_!FKkh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14037f08-fc9d-4f70-8e34-7a832c41acf8_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!FKkh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14037f08-fc9d-4f70-8e34-7a832c41acf8_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!FKkh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14037f08-fc9d-4f70-8e34-7a832c41acf8_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!FKkh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14037f08-fc9d-4f70-8e34-7a832c41acf8_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>At the end of the day, I think the best metaphor for AI is that it&#8217;s an amplifier. If you want to be lazy, you can be more lazy with less effort than at any other time in human history; you can solve problems with zero intellectual engagement. But you don&#8217;t have to do that, because AI can also amplify the best of you. You can use it to go deeper, to engage more in any of the domains that you&#8217;re working in.</p><p>For me, this resonates with my favorite <a href="https://en.wikipedia.org/wiki/John_Tukey">Tukey quote</a> about how statisticians get to play in everyone&#8217;s backyard. AI gives us the ability to play in even more backyards, and to play with more skill than we could before.</p><p>To me, that&#8217;s one of the reasons I think statisticians and data scientists are well poised to do well in this era of AI. We have the skills to program, and these skills are now massively amplified &#8212; if you know how to program in one language, you can now effectively program in any language. We have this deep, ingrained skepticism about where data is coming from: who collected it, why did they collect it, what are the things we need to worry about? And we have this understanding of variation, which I think is so important with LLMs, since they&#8217;re fundamentally stochastic machines. So LLMs and AI are, I think, a massive amplifier. You can certainly use them to amplify the worst aspects of yourself, but you can also use them to amplify the best aspects.</p><h2>Practical advice</h2><p>Now I want to turn my sights on something a bit more practical. I want to begin with a bit of level setting; there&#8217;s so much variation in what people understand about AI and LLMs, and the best practices are changing at a frantic rate. If you&#8217;re basing your opinions on AI as of six months or a year ago, that&#8217;s badly outdated. So I want to give you some concrete advice about the things that I, my team, and the folks I talk to find most impactful.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wQCu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72c6ae76-8ea4-4d1f-ab34-6bc427d22f74_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wQCu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72c6ae76-8ea4-4d1f-ab34-6bc427d22f74_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!wQCu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72c6ae76-8ea4-4d1f-ab34-6bc427d22f74_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!wQCu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72c6ae76-8ea4-4d1f-ab34-6bc427d22f74_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!wQCu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72c6ae76-8ea4-4d1f-ab34-6bc427d22f74_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!wQCu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72c6ae76-8ea4-4d1f-ab34-6bc427d22f74_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/72c6ae76-8ea4-4d1f-ab34-6bc427d22f74_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Slide: \&quot;Three companies making frontier models\&quot; &#8212; Claude (Anthropic), ChatGPT (OpenAI), Gemini (Google)&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Slide: &quot;Three companies making frontier models&quot; &#8212; Claude (Anthropic), ChatGPT (OpenAI), Gemini (Google)" title="Slide: &quot;Three companies making frontier models&quot; &#8212; Claude (Anthropic), ChatGPT (OpenAI), Gemini (Google)" srcset="https://substackcdn.com/image/fetch/$s_!wQCu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72c6ae76-8ea4-4d1f-ab34-6bc427d22f74_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!wQCu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72c6ae76-8ea4-4d1f-ab34-6bc427d22f74_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!wQCu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72c6ae76-8ea4-4d1f-ab34-6bc427d22f74_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!wQCu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72c6ae76-8ea4-4d1f-ab34-6bc427d22f74_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>First, there are three companies producing these so-called frontier models, the best of the best. The first, and my personal favorite, is <a href="https://anthropic.com/">Anthropic</a>, who produces Claude. It tends to be a bit more expensive than other models, but in my opinion it&#8217;s the best all-rounder. It&#8217;s certainly the model I find best at writing R code &#8212; it produces probably 90% of the R code I write today. The responses aren&#8217;t always great, but they&#8217;re often surprisingly insightful and knowledgeable. It&#8217;s surprisingly dumb at other times, but we&#8217;ll come back to that later and talk about how you protect yourself from that kind of dumbness.</p><p>Then we&#8217;ve got <a href="https://chatgpt.com/">ChatGPT</a>, produced by <a href="https://openai.com/">OpenAI</a>. I hear a lot of positive things from my colleagues, particularly for using it for code review. The downside of ChatGPT is that it has the most obviously evil CEO &#8212; which isn&#8217;t to say any of these CEOs are good, but ChatGPT&#8217;s CEO appears to be particularly, obviously, not good.</p><p>And finally you&#8217;ve got <a href="https://gemini.google.com/">Gemini</a>, by Google. I think it&#8217;s in a distant third place right now. But that&#8217;s an advantage for you: Google desperately wants to stay relevant and has huge buckets of money to spend, so if you&#8217;re trying to save money, Gemini is pretty good and quite cheap. It has a good free plan and you can get a lot done with Gemini without spending much money. It&#8217;s also really good at image generation. That&#8217;s what I use to produce all of the images in the slides I showed earlier &#8212; and, of course, because I&#8217;m me, that&#8217;s now all automated in an R package called <a href="https://hadley.github.io/bananarama/">bananarama</a>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bHW8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe02c91eb-a8ec-46df-8973-a119984be53b_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bHW8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe02c91eb-a8ec-46df-8973-a119984be53b_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!bHW8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe02c91eb-a8ec-46df-8973-a119984be53b_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!bHW8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe02c91eb-a8ec-46df-8973-a119984be53b_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!bHW8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe02c91eb-a8ec-46df-8973-a119984be53b_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!bHW8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe02c91eb-a8ec-46df-8973-a119984be53b_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e02c91eb-a8ec-46df-8973-a119984be53b_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Slide: \&quot;Open models show promise\&quot; &#8212; Gemma 4 (Google) and Qwen 3.5 (Alibaba)&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Slide: &quot;Open models show promise&quot; &#8212; Gemma 4 (Google) and Qwen 3.5 (Alibaba)" title="Slide: &quot;Open models show promise&quot; &#8212; Gemma 4 (Google) and Qwen 3.5 (Alibaba)" srcset="https://substackcdn.com/image/fetch/$s_!bHW8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe02c91eb-a8ec-46df-8973-a119984be53b_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!bHW8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe02c91eb-a8ec-46df-8973-a119984be53b_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!bHW8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe02c91eb-a8ec-46df-8973-a119984be53b_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!bHW8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe02c91eb-a8ec-46df-8973-a119984be53b_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>So those are the frontier models &#8212; the best, and the most expensive (to create and to consume). On the other hand, you&#8217;ve got open models, sometimes also known as local models, because these are models that you can actually download and run on your own computer.</p><p>There&#8217;s a lot of promise here. They seem to be roughly trailing behind the frontier models by about six to nine months. So if a frontier model can do something today, then in a year&#8217;s time you can be reasonably certain that one of these open models is going to be almost as good.</p><p>There was a really big inflection point in the use of AI for coding that happened around the end of December last year. That&#8217;s when <a href="https://anthropic.com/claude-code">Claude Code</a> really took off &#8212; there was a step change in its functionality that has dramatically transformed the practice of software engineering. So based on that prediction, we should expect to see open models getting good right about now, towards the end of the year. And I think we&#8217;re starting to see that: <a href="https://ai.google.dev/gemma">Gemma 4</a>from Google and <a href="https://github.com/QwenLM">Qwen 3.5</a> from Alibaba are showing a lot of promise. My colleague Simon has written a <a href="https://simonpcouch.com/blog/2026-04-16-local-agents-2/">blog post</a>about this recently, showing that these local agents are getting pretty good.</p><p>I think it&#8217;s better to focus on these being open rather than local, because if you want to run them locally you still need a pretty beefy computer. If you have a really expensive MacBook, those are pretty good; otherwise you&#8217;re going to need specialized GPU hardware, which is exceedingly expensive right now. But even if you&#8217;re running an open model on someone else&#8217;s computer, there&#8217;s a lot of competition there to drive prices down. So if you want to use one of these open models hosted somewhere else, those tend to be pretty good deals.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!MXtu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe152ace2-9270-43e1-9272-b193fae4ece7_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!MXtu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe152ace2-9270-43e1-9272-b193fae4ece7_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!MXtu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe152ace2-9270-43e1-9272-b193fae4ece7_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!MXtu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe152ace2-9270-43e1-9272-b193fae4ece7_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!MXtu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe152ace2-9270-43e1-9272-b193fae4ece7_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!MXtu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe152ace2-9270-43e1-9272-b193fae4ece7_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e152ace2-9270-43e1-9272-b193fae4ece7_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Slide: \&quot;You can't just use a chat interface\&quot;, with a claude.ai screenshot&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Slide: &quot;You can't just use a chat interface&quot;, with a claude.ai screenshot" title="Slide: &quot;You can't just use a chat interface&quot;, with a claude.ai screenshot" srcset="https://substackcdn.com/image/fetch/$s_!MXtu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe152ace2-9270-43e1-9272-b193fae4ece7_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!MXtu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe152ace2-9270-43e1-9272-b193fae4ece7_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!MXtu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe152ace2-9270-43e1-9272-b193fae4ece7_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!MXtu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe152ace2-9270-43e1-9272-b193fae4ece7_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>But the most important thing I want to tell you is that if your primary way of using an LLM is through a chatbot interface on the web or your phone, you are missing out on at least 90% of the goodness. Chatbots on the web are great for casual exploration, the questions that come up in your personal life. I use them all the time &#8212; to create recipes to use up leftovers in the fridge, to answer questions I have about gardening, and to look up random facts I want to learn more about. But if you&#8217;re using them for data science or programming, you&#8217;re missing out on 90% of what they can do.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dKuB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d6c302e-a298-43e7-8bed-2a4199d9acfa_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dKuB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d6c302e-a298-43e7-8bed-2a4199d9acfa_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!dKuB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d6c302e-a298-43e7-8bed-2a4199d9acfa_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!dKuB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d6c302e-a298-43e7-8bed-2a4199d9acfa_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!dKuB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d6c302e-a298-43e7-8bed-2a4199d9acfa_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!dKuB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d6c302e-a298-43e7-8bed-2a4199d9acfa_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6d6c302e-a298-43e7-8bed-2a4199d9acfa_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Diagram: the chat interface branching into two paths &#8212; ellmer (writing code to use LLMs) and Claude Code / Posit AI (using LLMs to write code)&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Diagram: the chat interface branching into two paths &#8212; ellmer (writing code to use LLMs) and Claude Code / Posit AI (using LLMs to write code)" title="Diagram: the chat interface branching into two paths &#8212; ellmer (writing code to use LLMs) and Claude Code / Posit AI (using LLMs to write code)" srcset="https://substackcdn.com/image/fetch/$s_!dKuB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d6c302e-a298-43e7-8bed-2a4199d9acfa_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!dKuB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d6c302e-a298-43e7-8bed-2a4199d9acfa_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!dKuB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d6c302e-a298-43e7-8bed-2a4199d9acfa_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!dKuB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d6c302e-a298-43e7-8bed-2a4199d9acfa_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>So what should you be using instead? There are really two paths here. The first is to write code that uses LLMs &#8212; for example, using a package like my <a href="https://ellmer.tidyverse.org/">ellmer</a> package, which lets you talk to LLMs from R. The second is using LLMs to write and run code, giving them an environment where they can write the code, run it, look at the output, and then iterate, which, as I&#8217;ll talk about shortly, is super important.</p><p>If you&#8217;re a data scientist, you should learn to program with LLMs, because they give you data science superpowers. In particular, there&#8217;s a toolkit called <a href="https://ellmer.tidyverse.org/articles/structured-data.html">structured data extraction</a>, which makes it very easy to go from unstructured data &#8212; whether that&#8217;s text, images, PDFs, video, or audio &#8212; and get it into a nice tidy rectangle. Once you&#8217;ve got that rectangle, all of your existing statistical and data science skills come into play.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TU_D!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fe7cf3c-1b7f-41e7-b279-e4848400e7c5_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TU_D!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fe7cf3c-1b7f-41e7-b279-e4848400e7c5_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!TU_D!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fe7cf3c-1b7f-41e7-b279-e4848400e7c5_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!TU_D!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fe7cf3c-1b7f-41e7-b279-e4848400e7c5_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!TU_D!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fe7cf3c-1b7f-41e7-b279-e4848400e7c5_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!TU_D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fe7cf3c-1b7f-41e7-b279-e4848400e7c5_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1fe7cf3c-1b7f-41e7-b279-e4848400e7c5_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Code slide: \&quot;Programming LLMs gives data science super powers\&quot; &#8212; an ellmer type_object / chat_structured example&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Code slide: &quot;Programming LLMs gives data science super powers&quot; &#8212; an ellmer type_object / chat_structured example" title="Code slide: &quot;Programming LLMs gives data science super powers&quot; &#8212; an ellmer type_object / chat_structured example" srcset="https://substackcdn.com/image/fetch/$s_!TU_D!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fe7cf3c-1b7f-41e7-b279-e4848400e7c5_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!TU_D!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fe7cf3c-1b7f-41e7-b279-e4848400e7c5_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!TU_D!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fe7cf3c-1b7f-41e7-b279-e4848400e7c5_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!TU_D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fe7cf3c-1b7f-41e7-b279-e4848400e7c5_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>This is just a very small snippet of what that looks like in ellmer. First you define what you&#8217;re trying to extract: I&#8217;m going to extract something with names that are strings and ages that are integers. Then I can give it some data and it will extract the name and the age from free, unstructured text.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TK7-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab3be458-1a34-4ad1-8621-605688d7eb62_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TK7-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab3be458-1a34-4ad1-8621-605688d7eb62_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!TK7-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab3be458-1a34-4ad1-8621-605688d7eb62_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!TK7-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab3be458-1a34-4ad1-8621-605688d7eb62_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!TK7-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab3be458-1a34-4ad1-8621-605688d7eb62_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!TK7-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab3be458-1a34-4ad1-8621-605688d7eb62_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ab3be458-1a34-4ad1-8621-605688d7eb62_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Slide: \&quot;Like turning images into tidy datasets\&quot; &#8212; parallel_chat_structured run over photos of handwritten name/age note cards, producing a tidy tibble&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Slide: &quot;Like turning images into tidy datasets&quot; &#8212; parallel_chat_structured run over photos of handwritten name/age note cards, producing a tidy tibble" title="Slide: &quot;Like turning images into tidy datasets&quot; &#8212; parallel_chat_structured run over photos of handwritten name/age note cards, producing a tidy tibble" srcset="https://substackcdn.com/image/fetch/$s_!TK7-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab3be458-1a34-4ad1-8621-605688d7eb62_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!TK7-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab3be458-1a34-4ad1-8621-605688d7eb62_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!TK7-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab3be458-1a34-4ad1-8621-605688d7eb62_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!TK7-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fab3be458-1a34-4ad1-8621-605688d7eb62_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>The really cool thing about these tools is that they work with all sorts of unstructured data, including images. For example, I made these little note cards and I want to extract the data from them. Previously, this is a task that would have required a specialized machine learning toolkit; now you can throw it into a bog-standard LLM and get something useful. So it&#8217;s super powerful, and it opens up really wide areas of analysis that were previously inaccessible to data scientists. Now you can write R functions that look like any other function, except that behind the scenes they&#8217;re using an LLM &#8212; which means we can give them a vague task that we haven&#8217;t precisely scoped out, like we normally need to do with coding.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6pdh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcae92820-8a15-4fc9-a633-1bd8223a3008_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6pdh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcae92820-8a15-4fc9-a633-1bd8223a3008_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!6pdh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcae92820-8a15-4fc9-a633-1bd8223a3008_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!6pdh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcae92820-8a15-4fc9-a633-1bd8223a3008_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!6pdh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcae92820-8a15-4fc9-a633-1bd8223a3008_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!6pdh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcae92820-8a15-4fc9-a633-1bd8223a3008_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cae92820-8a15-4fc9-a633-1bd8223a3008_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Screenshot slide: \&quot;You get better results when the LLM can run its own code\&quot; &#8212; Posit Assistant alongside Claude Code running in Positron's terminal&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Screenshot slide: &quot;You get better results when the LLM can run its own code&quot; &#8212; Posit Assistant alongside Claude Code running in Positron's terminal" title="Screenshot slide: &quot;You get better results when the LLM can run its own code&quot; &#8212; Posit Assistant alongside Claude Code running in Positron's terminal" srcset="https://substackcdn.com/image/fetch/$s_!6pdh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcae92820-8a15-4fc9-a633-1bd8223a3008_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!6pdh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcae92820-8a15-4fc9-a633-1bd8223a3008_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!6pdh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcae92820-8a15-4fc9-a633-1bd8223a3008_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!6pdh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcae92820-8a15-4fc9-a633-1bd8223a3008_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>The other approach is to run the LLM in an environment where it can write the code, run it, and inspect the outputs. When you think about it, this is eminently reasonable. If you ask a human to sit down with pen and paper and write some R code or some Python code, you&#8217;ve got to be a pretty darn good programmer before your code actually runs, let alone gives you the right answer reliably. So as a human, what do you do? You take a stab at it, you run it, you look at what happens, and then you turn the crank to make it better. This is all about giving the LLM that same opportunity &#8212; giving it a <a href="https://tidydesign.substack.com/p/a-coding-agent-is-six-functions-in">harness</a> so that it can run code and get the outputs.</p><p>There are two ways you can do this inside <a href="https://positron.posit.co/">Positron</a> or <a href="https://posit.co/products/open-source/rstudio/">RStudio</a>. One is to use <a href="https://assistant.posit.co/">Posit Assistant</a>, which you can use with any API key; or you can just run whatever you&#8217;re currently using inside the terminal. Both of these have pros and cons. The main advantage of Posit Assistant is that you now have an R session, or a Python session, that both you and the AI are collaborating on. That&#8217;s incredibly useful, because when the AI writes plotting code, you can see the plot; when it writes data manipulation code, you can use the data viewer and actually look at that data. So I think this is super powerful, and it gives you this feedback.</p><p>(The disadvantage is the price: you have to pay with API keys, which are going to be much more expensive than the all-you-can-eat plans where you pay a fixed amount each month. And Posit can&#8217;t afford to give away millions of dollars worth of heavily discounted tokens like Anthropic and OpenAI can.)</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pLIJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82d1f201-6f95-43c9-a124-6f1ad35b38e0_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pLIJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82d1f201-6f95-43c9-a124-6f1ad35b38e0_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!pLIJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82d1f201-6f95-43c9-a124-6f1ad35b38e0_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!pLIJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82d1f201-6f95-43c9-a124-6f1ad35b38e0_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!pLIJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82d1f201-6f95-43c9-a124-6f1ad35b38e0_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!pLIJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82d1f201-6f95-43c9-a124-6f1ad35b38e0_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/82d1f201-6f95-43c9-a124-6f1ad35b38e0_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Slide: \&quot;Why does this matter?\&quot; &#8212; no more copy and paste; knows your installed/loaded packages; knows your variables; can read your plots; gives the LLM a feedback loop&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Slide: &quot;Why does this matter?&quot; &#8212; no more copy and paste; knows your installed/loaded packages; knows your variables; can read your plots; gives the LLM a feedback loop" title="Slide: &quot;Why does this matter?&quot; &#8212; no more copy and paste; knows your installed/loaded packages; knows your variables; can read your plots; gives the LLM a feedback loop" srcset="https://substackcdn.com/image/fetch/$s_!pLIJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82d1f201-6f95-43c9-a124-6f1ad35b38e0_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!pLIJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82d1f201-6f95-43c9-a124-6f1ad35b38e0_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!pLIJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82d1f201-6f95-43c9-a124-6f1ad35b38e0_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!pLIJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82d1f201-6f95-43c9-a124-6f1ad35b38e0_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>So why move away from the chat interface? The first thing is that it gets rid of copying and pasting. If you&#8217;re asking ChatGPT to write some code, copying that from ChatGPT into RStudio, pasting it in, running it, and then when it doesn&#8217;t work copying the error message and pasting it back into ChatGPT &#8212; what you&#8217;ve done is give the LLM the fun part, which is writing code and thinking about code, while you do the boring, tedious part of copying and pasting code back and forth between tools.</p><p>One thing we all need to be aware of as we think about AI impacting our jobs is: how do we make sure we keep the fun stuff for us, for the humans, and give the AI the stuff that&#8217;s less interesting and less fun?</p><p>Also, the lesson we&#8217;ve learned from reproducible research, from <a href="https://rmarkdown.rstudio.com/">R Markdown</a>, from <a href="https://quarto.org/">Quarto</a>, is that you want to minimize copying and pasting to create reproducible artifacts. That&#8217;s just more reliable, more robust, better science in general.</p><p>But also, because the LLM can now run code, it can check things like: what packages do you have installed? What packages do you have loaded? That means it&#8217;s more likely to write the type of code you want off the bat, because it knows the packages you&#8217;re currently using and it knows what data you have loaded. No longer do you have to provide that additional context to the chatbot &#8212; it can just derive it from your environment. It knows you&#8217;ve got this data frame with these variables of these types. So now its chances of getting high-quality code on the first iteration are much higher.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mYYV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa454a2f8-2749-466a-bd4c-234d5176fa93_1400x1160.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mYYV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa454a2f8-2749-466a-bd4c-234d5176fa93_1400x1160.png 424w, https://substackcdn.com/image/fetch/$s_!mYYV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa454a2f8-2749-466a-bd4c-234d5176fa93_1400x1160.png 848w, https://substackcdn.com/image/fetch/$s_!mYYV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa454a2f8-2749-466a-bd4c-234d5176fa93_1400x1160.png 1272w, https://substackcdn.com/image/fetch/$s_!mYYV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa454a2f8-2749-466a-bd4c-234d5176fa93_1400x1160.png 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!mYYV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa454a2f8-2749-466a-bd4c-234d5176fa93_1400x1160.png" width="1400" height="1160" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a454a2f8-2749-466a-bd4c-234d5176fa93_1400x1160.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1160,&quot;width&quot;:1400,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Screenshot of the bluffbench \&quot;Mocking base datasets\&quot; section: mtcars$hp is secretly transformed so the relationship between hp and mpg is flipped, then an LLM is asked to plot mpg vs hp and describe what it sees&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Screenshot of the bluffbench &quot;Mocking base datasets&quot; section: mtcars$hp is secretly transformed so the relationship between hp and mpg is flipped, then an LLM is asked to plot mpg vs hp and describe what it sees" title="Screenshot of the bluffbench &quot;Mocking base datasets&quot; section: mtcars$hp is secretly transformed so the relationship between hp and mpg is flipped, then an LLM is asked to plot mpg vs hp and describe what it sees" srcset="https://substackcdn.com/image/fetch/$s_!mYYV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa454a2f8-2749-466a-bd4c-234d5176fa93_1400x1160.png 424w, https://substackcdn.com/image/fetch/$s_!mYYV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa454a2f8-2749-466a-bd4c-234d5176fa93_1400x1160.png 848w, https://substackcdn.com/image/fetch/$s_!mYYV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa454a2f8-2749-466a-bd4c-234d5176fa93_1400x1160.png 1272w, https://substackcdn.com/image/fetch/$s_!mYYV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa454a2f8-2749-466a-bd4c-234d5176fa93_1400x1160.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></figure></div><p>LLMs can also read your plots &#8212; and I have an asterisk here. My colleague Simon put <a href="https://posit-dev.github.io/bluffbench/">this benchmark</a> together. It&#8217;s basically some plots where we&#8217;ve flipped one of the axes. This is a plot of fuel economy, with the size of the engine on the x-axis and miles per gallon on the y-axis. As a human, if you look at this, you&#8217;re going to think, hmm, that&#8217;s pretty surprising &#8212; I would not expect fuel economy to increase as the size of the engine gets bigger. But what an LLM often does, because it&#8217;s pretty lazy, is just look at the axis labels and say, well, okay, fuel economy decreases as engine size increases. So if you give this to a bunch of models, about 80% of the time they&#8217;ll incorrectly interpret this plot. So while LLMs can read plots, I think we&#8217;re just in the early days of understanding what problems they have interpreting them. Certainly one of those problems is being lazy and just relying on what they expect to see, rather than actually looking deeply &#8212; obviously a problem that we humans can fall prey to as well. But it&#8217;s definitely something you need to be aware of when working with LLMs.</p><p>But most importantly &#8212; and I&#8217;ve said this several times already &#8212; it gives LLMs this feedback loop, where they can write some code, try it out, and see what happens. This is incredibly powerful. I think this is one of the things that took Claude Code from being an interesting novelty to something that basically every software engineer demands to use today.</p><p>It&#8217;s not that LLMs are necessarily always that smart: sometimes they show astonishing flashes of insight and intelligence, and other times they&#8217;re just crushingly stupid. But when you give them a feedback loop, even when they&#8217;re being dumb, they&#8217;ll just grind their way through, doing one stupid thing after another, and eventually make their way to an answer &#8212; in a very slow and painful way, but at least it&#8217;s them doing it, not you as a human.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!K67A!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dbdb04f-85e7-4c58-8b46-766204cc44f8_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!K67A!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dbdb04f-85e7-4c58-8b46-766204cc44f8_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!K67A!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dbdb04f-85e7-4c58-8b46-766204cc44f8_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!K67A!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dbdb04f-85e7-4c58-8b46-766204cc44f8_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!K67A!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dbdb04f-85e7-4c58-8b46-766204cc44f8_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!K67A!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dbdb04f-85e7-4c58-8b46-766204cc44f8_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4dbdb04f-85e7-4c58-8b46-766204cc44f8_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Diagram: \&quot;The feedback loop is really powerful\&quot; &#8212; write code &#8594; run code &#8594; randomly make changes &#8594; back to write code&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Diagram: &quot;The feedback loop is really powerful&quot; &#8212; write code &#8594; run code &#8594; randomly make changes &#8594; back to write code" title="Diagram: &quot;The feedback loop is really powerful&quot; &#8212; write code &#8594; run code &#8594; randomly make changes &#8594; back to write code" srcset="https://substackcdn.com/image/fetch/$s_!K67A!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dbdb04f-85e7-4c58-8b46-766204cc44f8_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!K67A!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dbdb04f-85e7-4c58-8b46-766204cc44f8_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!K67A!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dbdb04f-85e7-4c58-8b46-766204cc44f8_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!K67A!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dbdb04f-85e7-4c58-8b46-766204cc44f8_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>This feedback loop is really powerful, because it&#8217;s the same feedback loop you use when you start programming: you write some code, you run it, you get an error message you don&#8217;t really read, and you just randomly make some changes. And even this not-very-good feedback loop eventually gets you to success.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vsT8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F520d2c53-e70f-431d-8f39-cdf20d315015_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vsT8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F520d2c53-e70f-431d-8f39-cdf20d315015_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!vsT8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F520d2c53-e70f-431d-8f39-cdf20d315015_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!vsT8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F520d2c53-e70f-431d-8f39-cdf20d315015_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!vsT8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F520d2c53-e70f-431d-8f39-cdf20d315015_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!vsT8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F520d2c53-e70f-431d-8f39-cdf20d315015_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/520d2c53-e70f-431d-8f39-cdf20d315015_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Diagram: \&quot;The feedback loop is really powerful\&quot; &#8212; write code &#8594; run code &#8594; read error message &#8594; back to write code&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Diagram: &quot;The feedback loop is really powerful&quot; &#8212; write code &#8594; run code &#8594; read error message &#8594; back to write code" title="Diagram: &quot;The feedback loop is really powerful&quot; &#8212; write code &#8594; run code &#8594; read error message &#8594; back to write code" srcset="https://substackcdn.com/image/fetch/$s_!vsT8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F520d2c53-e70f-431d-8f39-cdf20d315015_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!vsT8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F520d2c53-e70f-431d-8f39-cdf20d315015_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!vsT8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F520d2c53-e70f-431d-8f39-cdf20d315015_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!vsT8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F520d2c53-e70f-431d-8f39-cdf20d315015_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>LLMs have an even more powerful feedback loop, because one of the things they&#8217;re better at than humans is that they will actually read error messages &#129315;. This is a surprisingly useful skill, because while error messages aren&#8217;t always informative, they often are, and reading them can lead to better code.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ECVy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff53e9e50-1ea3-475e-958f-f60d0a7a0e49_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ECVy!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff53e9e50-1ea3-475e-958f-f60d0a7a0e49_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ECVy!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff53e9e50-1ea3-475e-958f-f60d0a7a0e49_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ECVy!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff53e9e50-1ea3-475e-958f-f60d0a7a0e49_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ECVy!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff53e9e50-1ea3-475e-958f-f60d0a7a0e49_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!ECVy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff53e9e50-1ea3-475e-958f-f60d0a7a0e49_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f53e9e50-1ea3-475e-958f-f60d0a7a0e49_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Diagram: \&quot;The feedback loop is really powerful\&quot; &#8212; write code &#8594; run code &#8594; read documentation &#8594; back to write code&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Diagram: &quot;The feedback loop is really powerful&quot; &#8212; write code &#8594; run code &#8594; read documentation &#8594; back to write code" title="Diagram: &quot;The feedback loop is really powerful&quot; &#8212; write code &#8594; run code &#8594; read documentation &#8594; back to write code" srcset="https://substackcdn.com/image/fetch/$s_!ECVy!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff53e9e50-1ea3-475e-958f-f60d0a7a0e49_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ECVy!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff53e9e50-1ea3-475e-958f-f60d0a7a0e49_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ECVy!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff53e9e50-1ea3-475e-958f-f60d0a7a0e49_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ECVy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff53e9e50-1ea3-475e-958f-f60d0a7a0e49_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>They can also read documentation, because in R and Python, reading documentation is just another function. So they have this ability to introspect: what can functions do? They can read examples and look up edge cases, which is super powerful.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8_E7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed0d4621-1891-438f-8ef2-7d30ff8b6c0a_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8_E7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed0d4621-1891-438f-8ef2-7d30ff8b6c0a_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!8_E7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed0d4621-1891-438f-8ef2-7d30ff8b6c0a_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!8_E7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed0d4621-1891-438f-8ef2-7d30ff8b6c0a_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!8_E7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed0d4621-1891-438f-8ef2-7d30ff8b6c0a_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!8_E7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed0d4621-1891-438f-8ef2-7d30ff8b6c0a_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ed0d4621-1891-438f-8ef2-7d30ff8b6c0a_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Diagram: \&quot;This is particularly useful for package development\&quot; &#8212; write code, write tests, run tests in a tight loop&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Diagram: &quot;This is particularly useful for package development&quot; &#8212; write code, write tests, run tests in a tight loop" title="Diagram: &quot;This is particularly useful for package development&quot; &#8212; write code, write tests, run tests in a tight loop" srcset="https://substackcdn.com/image/fetch/$s_!8_E7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed0d4621-1891-438f-8ef2-7d30ff8b6c0a_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!8_E7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed0d4621-1891-438f-8ef2-7d30ff8b6c0a_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!8_E7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed0d4621-1891-438f-8ef2-7d30ff8b6c0a_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!8_E7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed0d4621-1891-438f-8ef2-7d30ff8b6c0a_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>This is particularly useful for package development or software engineering, because we have this notion of unit tests. Unit tests are kind of like the double-entry bookkeeping of software development: they allow you to say what you expect a function to return.</p><p>I think this is the biggest difference between software engineering and data science, and one reason AI is being adopted a little more slowly in data science. When you&#8217;re a software engineer, you typically know what you expect to see &#8212; you have some vision in your head of what a function is going to do, what the code is going to reveal. But very often when you&#8217;re doing data science, you&#8217;re doing it precisely because you genuinely don&#8217;t know the answer. That&#8217;s why you&#8217;re doing data science, why you&#8217;re doing statistics: you&#8217;re trying to answer a question that maybe no one has answered before. So in data science, we don&#8217;t have this feedback, and I&#8217;ll come back to what we might have instead.</p><p>But this ability, even when the LLM is writing both the tests and the code, gives you that double-checking: the chance of both the code being wrong and the test being wrong in exactly the same way is much smaller than either of them being wrong independently. So this cycle of testing and running code is a really powerful engine to drive software development.</p><h2>Data science?</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wQBz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d46b47e-b8e4-4987-9bbf-d00f33cc9415_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wQBz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d46b47e-b8e4-4987-9bbf-d00f33cc9415_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!wQBz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d46b47e-b8e4-4987-9bbf-d00f33cc9415_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!wQBz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d46b47e-b8e4-4987-9bbf-d00f33cc9415_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!wQBz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d46b47e-b8e4-4987-9bbf-d00f33cc9415_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!wQBz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d46b47e-b8e4-4987-9bbf-d00f33cc9415_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8d46b47e-b8e4-4987-9bbf-d00f33cc9415_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Slide: \&quot;What is the feedback loop for data science?\&quot; with three large question marks&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Slide: &quot;What is the feedback loop for data science?&quot; with three large question marks" title="Slide: &quot;What is the feedback loop for data science?&quot; with three large question marks" srcset="https://substackcdn.com/image/fetch/$s_!wQBz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d46b47e-b8e4-4987-9bbf-d00f33cc9415_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!wQBz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d46b47e-b8e4-4987-9bbf-d00f33cc9415_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!wQBz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d46b47e-b8e4-4987-9bbf-d00f33cc9415_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!wQBz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d46b47e-b8e4-4987-9bbf-d00f33cc9415_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>But that&#8217;s different in data science: we don&#8217;t know what the right answer is. So what is our feedback loop? I don&#8217;t know. Is there one? Is it possible to automate? There are certainly many parts of our jobs that we&#8217;ll be able to automate, hopefully the parts we like the least. But there&#8217;s no way to write a unit test to say whether a plot is informative or whether this is the correct model. So fortunately for us in data science, I think there&#8217;s still a big role for humans. That tends to mean that when you&#8217;re doing data analysis assisted by an AI, the AI is going to have to check with you much more frequently than when it&#8217;s doing software engineering.</p><p>But there are a few experiments I&#8217;ve been doing, because I think there&#8217;s a kind of meta-technique here. If LLMs are writing more and more of our code, how do we reassure ourselves that the code they&#8217;re writing is correct? One way is by asking the model to express itself in a variety of ways. If all of those ways line up and tell us what we&#8217;re hoping to see, then we feel more trusting of the model than if we were just looking at a single output.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tPxR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F793e80c4-6181-490c-94da-c6c2bab76ebb_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tPxR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F793e80c4-6181-490c-94da-c6c2bab76ebb_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!tPxR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F793e80c4-6181-490c-94da-c6c2bab76ebb_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!tPxR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F793e80c4-6181-490c-94da-c6c2bab76ebb_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!tPxR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F793e80c4-6181-490c-94da-c6c2bab76ebb_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!tPxR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F793e80c4-6181-490c-94da-c6c2bab76ebb_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/793e80c4-6181-490c-94da-c6c2bab76ebb_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Slide: \&quot;Experimenting with data dictionaries\&quot; &#8212; tables + fields, relationships, glossary; an elevators example&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Slide: &quot;Experimenting with data dictionaries&quot; &#8212; tables + fields, relationships, glossary; an elevators example" title="Slide: &quot;Experimenting with data dictionaries&quot; &#8212; tables + fields, relationships, glossary; an elevators example" srcset="https://substackcdn.com/image/fetch/$s_!tPxR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F793e80c4-6181-490c-94da-c6c2bab76ebb_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!tPxR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F793e80c4-6181-490c-94da-c6c2bab76ebb_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!tPxR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F793e80c4-6181-490c-94da-c6c2bab76ebb_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!tPxR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F793e80c4-6181-490c-94da-c6c2bab76ebb_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>One way I&#8217;ve been exploring this idea is through <a href="https://data-dict.tidyverse.org/">data dictionaries</a>. Data dictionaries have obviously existed for a very long time, but they seem particularly important today, because there&#8217;s a lot of knowledge you have about a dataset that your AI agents do not. You need some way to convey it to those agents &#8212; to write it down in a semi-structured format so that they can use it. The funny, or possibly depressing, aspect of this is that it&#8217;s always been true: writing down what you know about a dataset has always helped your human colleagues. But somehow it seems more compelling to do this for an AI agent than for your human colleagues.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hmnm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b35a43a-2d0e-486b-933d-336b302a9458_1062x596.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hmnm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b35a43a-2d0e-486b-933d-336b302a9458_1062x596.jpeg 424w, https://substackcdn.com/image/fetch/$s_!hmnm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b35a43a-2d0e-486b-933d-336b302a9458_1062x596.jpeg 848w, https://substackcdn.com/image/fetch/$s_!hmnm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b35a43a-2d0e-486b-933d-336b302a9458_1062x596.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!hmnm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b35a43a-2d0e-486b-933d-336b302a9458_1062x596.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!hmnm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b35a43a-2d0e-486b-933d-336b302a9458_1062x596.jpeg" width="1062" height="596" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3b35a43a-2d0e-486b-933d-336b302a9458_1062x596.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:596,&quot;width&quot;:1062,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Demo: the elevators data dictionary (data-dict.yaml) open in Positron, showing the table description, the parquet source, and the start of the column definitions&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Demo: the elevators data dictionary (data-dict.yaml) open in Positron, showing the table description, the parquet source, and the start of the column definitions" title="Demo: the elevators data dictionary (data-dict.yaml) open in Positron, showing the table description, the parquet source, and the start of the column definitions" srcset="https://substackcdn.com/image/fetch/$s_!hmnm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b35a43a-2d0e-486b-933d-336b302a9458_1062x596.jpeg 424w, https://substackcdn.com/image/fetch/$s_!hmnm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b35a43a-2d0e-486b-933d-336b302a9458_1062x596.jpeg 848w, https://substackcdn.com/image/fetch/$s_!hmnm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b35a43a-2d0e-486b-933d-336b302a9458_1062x596.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!hmnm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b35a43a-2d0e-486b-933d-336b302a9458_1062x596.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>So let&#8217;s take a look at a data dictionary, which I have open in Positron here. This is a dataset about elevators in New York City that came to me from my colleague <a href="https://emilhvitfeldt.com/">Emil Hvitfeldt</a>, and this is its data dictionary. So what is a data dictionary? Well, we&#8217;ve got a list of tables &#8212; this dataset just has one table, data about elevators. We&#8217;ve got some free text telling us about it: this is registered elevator devices. You might already be wondering, what&#8217;s the difference between an elevator and an elevator device? We&#8217;ll see some answers to that later.</p><p>Where did this data come from? The <a href="https://www.nyc.gov/site/buildings/">New York City Department of Buildings</a>. How did we get it? A freedom of information request. When did we get it? September 2015 &#8212; so probably a little out of date now. What have we got? About 76,000 devices. And what are those devices? Elevators, escalators, dumbwaiters, and other vertical transportation devices. So we&#8217;re getting some context for this data.</p><p>Where is this data? It lives in a <a href="https://parquet.apache.org/">parquet</a> file. If you don&#8217;t know about parquet files, I highly recommend learning about them. If there&#8217;s one word you remember from this talk, it should be parquet, because parquet files are like CSV files but basically better in every possible way. They&#8217;re much smaller and much faster to work with, and they encode information about the type of each variable and missing values in a way that&#8217;s robust from session to session. You can easily share them with your colleagues no matter what programming language they&#8217;re using.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Jm1H!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d3f14b5-487c-46c7-988c-ce49a69c0c84_1062x596.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Jm1H!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d3f14b5-487c-46c7-988c-ce49a69c0c84_1062x596.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Jm1H!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d3f14b5-487c-46c7-988c-ce49a69c0c84_1062x596.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Jm1H!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d3f14b5-487c-46c7-988c-ce49a69c0c84_1062x596.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Jm1H!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d3f14b5-487c-46c7-988c-ce49a69c0c84_1062x596.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!Jm1H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d3f14b5-487c-46c7-988c-ce49a69c0c84_1062x596.jpeg" width="1062" height="596" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6d3f14b5-487c-46c7-988c-ce49a69c0c84_1062x596.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:596,&quot;width&quot;:1062,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Demo: the dv_device_number column in the data dictionary &#8212; its string type, the primary_key constraint, a free-text description, and five example values&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Demo: the dv_device_number column in the data dictionary &#8212; its string type, the primary_key constraint, a free-text description, and five example values" title="Demo: the dv_device_number column in the data dictionary &#8212; its string type, the primary_key constraint, a free-text description, and five example values" srcset="https://substackcdn.com/image/fetch/$s_!Jm1H!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d3f14b5-487c-46c7-988c-ce49a69c0c84_1062x596.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Jm1H!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d3f14b5-487c-46c7-988c-ce49a69c0c84_1062x596.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Jm1H!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d3f14b5-487c-46c7-988c-ce49a69c0c84_1062x596.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Jm1H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d3f14b5-487c-46c7-988c-ce49a69c0c84_1062x596.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>So that&#8217;s the data, and now we&#8217;re going to describe each of the columns in this dataset. I&#8217;m not going to go through these exhaustively, but for each column we&#8217;ve got the name &#8212; this one is the DV device number &#8212; and what sort of type it is: it&#8217;s a string. We&#8217;ve got any constraints we know about: this column is the primary key, a unique identifier for each elevator device. And again, we&#8217;ve got some free text and a few examples. Seeing examples is so useful, for humans and for AI agents. In this case, just with five examples, you&#8217;d probably look at this and say, it looks like there&#8217;s some structure in this identifier &#8212; they all seem to have a number, followed by a letter, followed by another number. So maybe this is some kind of composite key that&#8217;s actually made up of other things. That&#8217;s something you&#8217;d probably want to dig into if you&#8217;re doing more data science here.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!u0Rn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28866655-0367-4b77-b548-cdc202e714f6_1062x596.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!u0Rn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28866655-0367-4b77-b548-cdc202e714f6_1062x596.jpeg 424w, https://substackcdn.com/image/fetch/$s_!u0Rn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28866655-0367-4b77-b548-cdc202e714f6_1062x596.jpeg 848w, https://substackcdn.com/image/fetch/$s_!u0Rn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28866655-0367-4b77-b548-cdc202e714f6_1062x596.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!u0Rn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28866655-0367-4b77-b548-cdc202e714f6_1062x596.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!u0Rn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28866655-0367-4b77-b548-cdc202e714f6_1062x596.jpeg" width="1062" height="596" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/28866655-0367-4b77-b548-cdc202e714f6_1062x596.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:596,&quot;width&quot;:1062,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Demo: the device_status column defined as an enum with values A, D, H, J, and W, each mapped to a meaning (active, dismantled, NYCHA, no jurisdiction, work in progress)&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Demo: the device_status column defined as an enum with values A, D, H, J, and W, each mapped to a meaning (active, dismantled, NYCHA, no jurisdiction, work in progress)" title="Demo: the device_status column defined as an enum with values A, D, H, J, and W, each mapped to a meaning (active, dismantled, NYCHA, no jurisdiction, work in progress)" srcset="https://substackcdn.com/image/fetch/$s_!u0Rn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28866655-0367-4b77-b548-cdc202e714f6_1062x596.jpeg 424w, https://substackcdn.com/image/fetch/$s_!u0Rn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28866655-0367-4b77-b548-cdc202e714f6_1062x596.jpeg 848w, https://substackcdn.com/image/fetch/$s_!u0Rn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28866655-0367-4b77-b548-cdc202e714f6_1062x596.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!u0Rn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28866655-0367-4b77-b548-cdc202e714f6_1062x596.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>What else do we have? We&#8217;ve got the device status, which is an enum &#8212; meaning it comes from a fixed set of possible values: A, D, H, J, or W. It&#8217;s required. It&#8217;s a single-letter code for registration status. And so on and so forth for every column in this dataset. We can see what sort of data it is, we&#8217;ve got a place to jot down what we know about it, and we have some examples that help us see a typical value. So we&#8217;ve got lots of columns. In this case we&#8217;ve only got one dataset, but if you&#8217;ve got multiple datasets in a data dictionary, you also describe the relationships between them.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CIq0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ad8c51c-a20f-42c5-a6ba-7e18dcc58b6d_1062x596.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CIq0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ad8c51c-a20f-42c5-a6ba-7e18dcc58b6d_1062x596.jpeg 424w, https://substackcdn.com/image/fetch/$s_!CIq0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ad8c51c-a20f-42c5-a6ba-7e18dcc58b6d_1062x596.jpeg 848w, https://substackcdn.com/image/fetch/$s_!CIq0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ad8c51c-a20f-42c5-a6ba-7e18dcc58b6d_1062x596.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!CIq0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ad8c51c-a20f-42c5-a6ba-7e18dcc58b6d_1062x596.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!CIq0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ad8c51c-a20f-42c5-a6ba-7e18dcc58b6d_1062x596.jpeg" width="1062" height="596" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3ad8c51c-a20f-42c5-a6ba-7e18dcc58b6d_1062x596.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:596,&quot;width&quot;:1062,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Demo: the glossary section of the data dictionary, defining domain terms like BIN, BBL, and DOB &#8212; with DOB highlighted as \&quot;New York City Department of Buildings\&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Demo: the glossary section of the data dictionary, defining domain terms like BIN, BBL, and DOB &#8212; with DOB highlighted as &quot;New York City Department of Buildings&quot;" title="Demo: the glossary section of the data dictionary, defining domain terms like BIN, BBL, and DOB &#8212; with DOB highlighted as &quot;New York City Department of Buildings&quot;" srcset="https://substackcdn.com/image/fetch/$s_!CIq0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ad8c51c-a20f-42c5-a6ba-7e18dcc58b6d_1062x596.jpeg 424w, https://substackcdn.com/image/fetch/$s_!CIq0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ad8c51c-a20f-42c5-a6ba-7e18dcc58b6d_1062x596.jpeg 848w, https://substackcdn.com/image/fetch/$s_!CIq0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ad8c51c-a20f-42c5-a6ba-7e18dcc58b6d_1062x596.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!CIq0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ad8c51c-a20f-42c5-a6ba-7e18dcc58b6d_1062x596.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>We also have a glossary. A glossary is super useful, because there&#8217;s always going to be domain- or data-specific terminology that you want to describe to your colleagues and to the AI agent. A great one here is DOB, which you might automatically assume means date of birth; but in this context, it means the New York City Department of Buildings. So it&#8217;s really nice to have that domain-specific glossary at your fingertips.</p><p>So this is the static data dictionary, but I think one of the big values of this data dictionary, to me, is the dynamic component. So I&#8217;m going to show you some git diffs.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5uCD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63762ac7-b850-41f1-a205-acd6627b6ab8_1062x596.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5uCD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63762ac7-b850-41f1-a205-acd6627b6ab8_1062x596.jpeg 424w, https://substackcdn.com/image/fetch/$s_!5uCD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63762ac7-b850-41f1-a205-acd6627b6ab8_1062x596.jpeg 848w, https://substackcdn.com/image/fetch/$s_!5uCD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63762ac7-b850-41f1-a205-acd6627b6ab8_1062x596.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!5uCD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63762ac7-b850-41f1-a205-acd6627b6ab8_1062x596.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!5uCD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63762ac7-b850-41f1-a205-acd6627b6ab8_1062x596.jpeg" width="1062" height="596" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/63762ac7-b850-41f1-a205-acd6627b6ab8_1062x596.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:596,&quot;width&quot;:1062,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Demo: a git diff for the commit \&quot;Consistently represent missing values\&quot; &#8212; clean.R gains a loop replacing empty strings with NA across character columns and zeroes in zip_code with NA&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Demo: a git diff for the commit &quot;Consistently represent missing values&quot; &#8212; clean.R gains a loop replacing empty strings with NA across character columns and zeroes in zip_code with NA" title="Demo: a git diff for the commit &quot;Consistently represent missing values&quot; &#8212; clean.R gains a loop replacing empty strings with NA across character columns and zeroes in zip_code with NA" srcset="https://substackcdn.com/image/fetch/$s_!5uCD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63762ac7-b850-41f1-a205-acd6627b6ab8_1062x596.jpeg 424w, https://substackcdn.com/image/fetch/$s_!5uCD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63762ac7-b850-41f1-a205-acd6627b6ab8_1062x596.jpeg 848w, https://substackcdn.com/image/fetch/$s_!5uCD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63762ac7-b850-41f1-a205-acd6627b6ab8_1062x596.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!5uCD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63762ac7-b850-41f1-a205-acd6627b6ab8_1062x596.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>Here I have a git diff where I consistently represented missing values, and I can see this in three ways. The first way is I can see what code the LLM wrote: it wrote something that loops over all of the columns and replaces any empty strings with missing values, and it also modifies the zip code column so that any entries with zero now get a missing value instead. So now we&#8217;ve nicely and correctly encoded our missing values, so they&#8217;re no longer represented in inconsistent ways. We can also see this in the data dictionary, because it&#8217;s removed the comment saying some values are zero indicating missing data. The great thing about having conventions and specific ways of representing missing values is that you no longer need to write that knowledge down &#8212; it&#8217;s implicit in the data.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dpUw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcb9f2d0-744b-432c-9371-40e714bf7890_1062x596.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dpUw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcb9f2d0-744b-432c-9371-40e714bf7890_1062x596.jpeg 424w, https://substackcdn.com/image/fetch/$s_!dpUw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcb9f2d0-744b-432c-9371-40e714bf7890_1062x596.jpeg 848w, https://substackcdn.com/image/fetch/$s_!dpUw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcb9f2d0-744b-432c-9371-40e714bf7890_1062x596.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!dpUw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcb9f2d0-744b-432c-9371-40e714bf7890_1062x596.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!dpUw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcb9f2d0-744b-432c-9371-40e714bf7890_1062x596.jpeg" width="1062" height="596" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dcb9f2d0-744b-432c-9371-40e714bf7890_1062x596.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:596,&quot;width&quot;:1062,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Demo: a git diff for the commit \&quot;Parse dates\&quot; &#8212; the dv_lastper_insp_date column in the data dictionary changes from type: string to type: date&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Demo: a git diff for the commit &quot;Parse dates&quot; &#8212; the dv_lastper_insp_date column in the data dictionary changes from type: string to type: date" title="Demo: a git diff for the commit &quot;Parse dates&quot; &#8212; the dv_lastper_insp_date column in the data dictionary changes from type: string to type: date" srcset="https://substackcdn.com/image/fetch/$s_!dpUw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcb9f2d0-744b-432c-9371-40e714bf7890_1062x596.jpeg 424w, https://substackcdn.com/image/fetch/$s_!dpUw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcb9f2d0-744b-432c-9371-40e714bf7890_1062x596.jpeg 848w, https://substackcdn.com/image/fetch/$s_!dpUw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcb9f2d0-744b-432c-9371-40e714bf7890_1062x596.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!dpUw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcb9f2d0-744b-432c-9371-40e714bf7890_1062x596.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>Here&#8217;s another one. In this change, I parsed the dates. Before the change, you can see all the date columns were just listed as strings using YYYY-MM-DD format. After it, Claude has written code to transform these character columns into date columns, so now we&#8217;ve got proper dates. Now when we plot them or compute means or other summary statistics, we&#8217;re going to get correct summaries rather than working with strings. And again, we can reassure ourselves that Claude has done the correct job, because we see both the change in the code and the change in the data dictionary.</p><p>Now, the one thing that&#8217;s missing here &#8212; the one disadvantage of parquet files compared to CSV files &#8212; is that there&#8217;s currently no way to look at a diff of a parquet file. This feels really important to me, because when AI is writing code, you want to be able to see exactly what it did to your data. So this is something I&#8217;m hoping we can implement in the future: as well as the changes to the code and the changes to the data dictionary, you&#8217;ll be able to scroll through and see exactly what changed in the data.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bm6L!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe33c74d3-a58a-4c8f-bab7-ae94fdc51f04_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bm6L!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe33c74d3-a58a-4c8f-bab7-ae94fdc51f04_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!bm6L!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe33c74d3-a58a-4c8f-bab7-ae94fdc51f04_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!bm6L!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe33c74d3-a58a-4c8f-bab7-ae94fdc51f04_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!bm6L!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe33c74d3-a58a-4c8f-bab7-ae94fdc51f04_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!bm6L!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe33c74d3-a58a-4c8f-bab7-ae94fdc51f04_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e33c74d3-a58a-4c8f-bab7-ae94fdc51f04_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Slide: \&quot;Yields a powerful data cleaning workflow\&quot; &#8212; a coding agent updates the R script, parquet file, and data dictionary in parallel (drop dummy data, parse dates, standardise missing values)&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Slide: &quot;Yields a powerful data cleaning workflow&quot; &#8212; a coding agent updates the R script, parquet file, and data dictionary in parallel (drop dummy data, parse dates, standardise missing values)" title="Slide: &quot;Yields a powerful data cleaning workflow&quot; &#8212; a coding agent updates the R script, parquet file, and data dictionary in parallel (drop dummy data, parse dates, standardise missing values)" srcset="https://substackcdn.com/image/fetch/$s_!bm6L!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe33c74d3-a58a-4c8f-bab7-ae94fdc51f04_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!bm6L!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe33c74d3-a58a-4c8f-bab7-ae94fdc51f04_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!bm6L!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe33c74d3-a58a-4c8f-bab7-ae94fdc51f04_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!bm6L!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe33c74d3-a58a-4c8f-bab7-ae94fdc51f04_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>I think this is a really interesting and powerful pattern: by representing what the LLM has done in a variety of ways, it&#8217;s easier for us to reassure ourselves that it&#8217;s done the correct thing than if we were just looking at a single representation. This is what I showed you: when you&#8217;re doing data cleaning, you&#8217;ve now got this workflow where you ask it to parse the dates or fix the missing values, and you can see exactly what it&#8217;s done across the representations &#8212; the R script, the parquet file, and the data dictionary.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-TTQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35d19a22-a6b5-4e26-9a4e-7b32c8846fe6_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-TTQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35d19a22-a6b5-4e26-9a4e-7b32c8846fe6_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!-TTQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35d19a22-a6b5-4e26-9a4e-7b32c8846fe6_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!-TTQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35d19a22-a6b5-4e26-9a4e-7b32c8846fe6_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!-TTQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35d19a22-a6b5-4e26-9a4e-7b32c8846fe6_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!-TTQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35d19a22-a6b5-4e26-9a4e-7b32c8846fe6_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/35d19a22-a6b5-4e26-9a4e-7b32c8846fe6_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Screenshot: the ggsql.org website &#8212; \&quot;Query &#183; Visualize &#183; Understand\&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Screenshot: the ggsql.org website &#8212; &quot;Query &#183; Visualize &#183; Understand&quot;" title="Screenshot: the ggsql.org website &#8212; &quot;Query &#183; Visualize &#183; Understand&quot;" srcset="https://substackcdn.com/image/fetch/$s_!-TTQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35d19a22-a6b5-4e26-9a4e-7b32c8846fe6_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!-TTQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35d19a22-a6b5-4e26-9a4e-7b32c8846fe6_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!-TTQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35d19a22-a6b5-4e26-9a4e-7b32c8846fe6_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!-TTQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35d19a22-a6b5-4e26-9a4e-7b32c8846fe6_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>Another tool we&#8217;ve been working on recently is <a href="https://ggsql.org/">ggsql</a>. If you&#8217;ve heard of ggplot and you&#8217;ve heard of SQL, you can pretty easily imagine what ggsql is: it&#8217;s just <a href="https://ggplot2.tidyverse.org/">ggplot2</a> syntax expressed as SQL. If you&#8217;re familiar with R or Python, you&#8217;re probably thinking, well, why would I want to do that? And that&#8217;s a totally reasonable position. But there are a very large number of people who only know SQL and don&#8217;t know R or Python, and those people haven&#8217;t had a good visualization framework before.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vI2C!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48f5c227-b2a3-4125-a9ab-cb6b61362ec1_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vI2C!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48f5c227-b2a3-4125-a9ab-cb6b61362ec1_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!vI2C!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48f5c227-b2a3-4125-a9ab-cb6b61362ec1_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!vI2C!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48f5c227-b2a3-4125-a9ab-cb6b61362ec1_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!vI2C!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48f5c227-b2a3-4125-a9ab-cb6b61362ec1_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!vI2C!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48f5c227-b2a3-4125-a9ab-cb6b61362ec1_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/48f5c227-b2a3-4125-a9ab-cb6b61362ec1_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Code slide: \&quot;Some ggsql\&quot; &#8212; a penguins query with VISUALISE / DRAW / PLACE / SCALE / LABEL clauses&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Code slide: &quot;Some ggsql&quot; &#8212; a penguins query with VISUALISE / DRAW / PLACE / SCALE / LABEL clauses" title="Code slide: &quot;Some ggsql&quot; &#8212; a penguins query with VISUALISE / DRAW / PLACE / SCALE / LABEL clauses" srcset="https://substackcdn.com/image/fetch/$s_!vI2C!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48f5c227-b2a3-4125-a9ab-cb6b61362ec1_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!vI2C!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48f5c227-b2a3-4125-a9ab-cb6b61362ec1_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!vI2C!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48f5c227-b2a3-4125-a9ab-cb6b61362ec1_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!vI2C!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48f5c227-b2a3-4125-a9ab-cb6b61362ec1_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>So now you can write SQL code that creates visualizations, the same way you can write ggplot2 code in R or <a href="https://plotnine.org/">plotnine</a> code in Python. This is powerful because you&#8217;re helping people move away from a point-and-click GUI to text &#8212; and text is great, because an AI can write it for you, you can diff it to see what&#8217;s changed, and other people can read and review it.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!OKyx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8bc0a8ed-b640-4d1a-893a-bf06e8d44cdd_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!OKyx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8bc0a8ed-b640-4d1a-893a-bf06e8d44cdd_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!OKyx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8bc0a8ed-b640-4d1a-893a-bf06e8d44cdd_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!OKyx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8bc0a8ed-b640-4d1a-893a-bf06e8d44cdd_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!OKyx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8bc0a8ed-b640-4d1a-893a-bf06e8d44cdd_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!OKyx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8bc0a8ed-b640-4d1a-893a-bf06e8d44cdd_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8bc0a8ed-b640-4d1a-893a-bf06e8d44cdd_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;ggsql output: a scatterplot, \&quot;Relationship between bill dimensions in 3 species of penguins\&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="ggsql output: a scatterplot, &quot;Relationship between bill dimensions in 3 species of penguins&quot;" title="ggsql output: a scatterplot, &quot;Relationship between bill dimensions in 3 species of penguins&quot;" srcset="https://substackcdn.com/image/fetch/$s_!OKyx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8bc0a8ed-b640-4d1a-893a-bf06e8d44cdd_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!OKyx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8bc0a8ed-b640-4d1a-893a-bf06e8d44cdd_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!OKyx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8bc0a8ed-b640-4d1a-893a-bf06e8d44cdd_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!OKyx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8bc0a8ed-b640-4d1a-893a-bf06e8d44cdd_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>And this is the type of plot that ggsql produces, which, unsurprisingly, looks pretty similar to what you might see from ggplot2.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!FMaF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13efdc47-52cb-4607-8b85-e5a325a21325_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!FMaF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13efdc47-52cb-4607-8b85-e5a325a21325_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!FMaF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13efdc47-52cb-4607-8b85-e5a325a21325_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!FMaF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13efdc47-52cb-4607-8b85-e5a325a21325_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!FMaF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13efdc47-52cb-4607-8b85-e5a325a21325_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!FMaF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13efdc47-52cb-4607-8b85-e5a325a21325_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/13efdc47-52cb-4607-8b85-e5a325a21325_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Slide: \&quot;How is this related to AI?\&quot; &#8212; SQL has a safer execution model; LLMs translate ggplot2 to ggsql well; the experiment took ~3 months instead of ~12&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Slide: &quot;How is this related to AI?&quot; &#8212; SQL has a safer execution model; LLMs translate ggplot2 to ggsql well; the experiment took ~3 months instead of ~12" title="Slide: &quot;How is this related to AI?&quot; &#8212; SQL has a safer execution model; LLMs translate ggplot2 to ggsql well; the experiment took ~3 months instead of ~12" srcset="https://substackcdn.com/image/fetch/$s_!FMaF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13efdc47-52cb-4607-8b85-e5a325a21325_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!FMaF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13efdc47-52cb-4607-8b85-e5a325a21325_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!FMaF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13efdc47-52cb-4607-8b85-e5a325a21325_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!FMaF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13efdc47-52cb-4607-8b85-e5a325a21325_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>There are two other aspects that tie this work to AI. The first is that if you&#8217;re asking your LLM to generate code to create plots, and you&#8217;re doing that with R or Python, it has to be able to run R or Python code &#8212; and R or Python code can do anything. In many scenarios that&#8217;s fine: if you&#8217;re just exploring locally on your computer, you&#8217;re not going to ask it to do anything crazy, and you&#8217;re probably not going to deliberately prompt-engineer it into deleting all the files on your computer. But it certainly has that power at its fingertips. One of the advantages of ggsql is that it&#8217;s just SQL, so an LLM can generate it and we can visualize it without having to run arbitrary code.</p><p>The other, less obvious thing is that this is a project we could have done any time in the last five or ten years, but we didn&#8217;t, because it would have been a lot of work &#8212; probably a year&#8217;s worth of work to get to the point where we could ask, do people actually care about it? Now, with AI, we can run the experiment much more quickly. We can produce a tool that other people who aren&#8217;t familiar with R or Python can use, and we can do that in about three months instead of a year, and then get feedback and iterate. And the response to ggsql has been great so far, so it&#8217;s something we&#8217;ll continue to invest in.</p><h2>Conclusion</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HYTN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef46fe56-614e-4836-9124-b82f0a61f1b3_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HYTN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef46fe56-614e-4836-9124-b82f0a61f1b3_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!HYTN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef46fe56-614e-4836-9124-b82f0a61f1b3_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!HYTN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef46fe56-614e-4836-9124-b82f0a61f1b3_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!HYTN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef46fe56-614e-4836-9124-b82f0a61f1b3_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!HYTN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef46fe56-614e-4836-9124-b82f0a61f1b3_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ef46fe56-614e-4836-9124-b82f0a61f1b3_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Illustration: a grid recap of the earlier robot illustrations&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Illustration: a grid recap of the earlier robot illustrations" title="Illustration: a grid recap of the earlier robot illustrations" srcset="https://substackcdn.com/image/fetch/$s_!HYTN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef46fe56-614e-4836-9124-b82f0a61f1b3_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!HYTN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef46fe56-614e-4836-9124-b82f0a61f1b3_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!HYTN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef46fe56-614e-4836-9124-b82f0a61f1b3_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!HYTN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef46fe56-614e-4836-9124-b82f0a61f1b3_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>So, to sum up: I&#8217;ve given you this big-picture view. The genie&#8217;s out of the bottle, and we can&#8217;t stuff it back in. But it&#8217;s not all bad news, because at least for me, working with AI can be tremendously empowering and fun. A lot of that centers around changing my self-identity: what it means to be a software developer and a data scientist, introducing a new collaborator that helps me write a lot of code.</p><p>But you still absolutely get out what you put in. It&#8217;s more important than ever to sweat the details, to go deep, to stay intellectually engaged. And I believe you can use that to produce the best work of your career.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!0TeQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3023b489-d1ca-4f3f-8316-10441984751e_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!0TeQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3023b489-d1ca-4f3f-8316-10441984751e_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!0TeQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3023b489-d1ca-4f3f-8316-10441984751e_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!0TeQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3023b489-d1ca-4f3f-8316-10441984751e_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!0TeQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3023b489-d1ca-4f3f-8316-10441984751e_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!0TeQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3023b489-d1ca-4f3f-8316-10441984751e_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3023b489-d1ca-4f3f-8316-10441984751e_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Illustration: \&quot;Quality vs Quantity\&quot; &#8212; the forking-path image above the whiteboard robots (quality) and the robot factory (quantity)&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Illustration: &quot;Quality vs Quantity&quot; &#8212; the forking-path image above the whiteboard robots (quality) and the robot factory (quantity)" title="Illustration: &quot;Quality vs Quantity&quot; &#8212; the forking-path image above the whiteboard robots (quality) and the robot factory (quantity)" srcset="https://substackcdn.com/image/fetch/$s_!0TeQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3023b489-d1ca-4f3f-8316-10441984751e_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!0TeQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3023b489-d1ca-4f3f-8316-10441984751e_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!0TeQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3023b489-d1ca-4f3f-8316-10441984751e_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!0TeQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3023b489-d1ca-4f3f-8316-10441984751e_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>It&#8217;s really important to bear in mind that you have this choice between quality and quantity &#8212; and it&#8217;s not an either-or. There are definitely times when you just need to quickly prototype something. One thing I use Claude for, where I just don&#8217;t really care about the quality of the code, is whipping up a quick <a href="https://shiny.posit.co/">Shiny</a> app. It&#8217;s basically free to create a Shiny app now; you can create one to answer one tiny question. I did this the other day in a data analysis: I was doing a clustering analysis and manually checking, well, how does it look with four clusters? How does it look with eight clusters? And I thought, I should just make a Shiny app. Claude can do that &#8212; give me a slider so I can drag it back and forth and look at the output. I don&#8217;t really care about that Shiny app; the quality is unimportant. That&#8217;s a great place where velocity, or quantity, is more important.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!MLQ1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30702bda-76af-477a-bf25-18c975226e59_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!MLQ1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30702bda-76af-477a-bf25-18c975226e59_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!MLQ1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30702bda-76af-477a-bf25-18c975226e59_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!MLQ1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30702bda-76af-477a-bf25-18c975226e59_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!MLQ1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30702bda-76af-477a-bf25-18c975226e59_1920x1080.jpeg 1456w" sizes="auto, 100vw"><img src="https://substackcdn.com/image/fetch/$s_!MLQ1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30702bda-76af-477a-bf25-18c975226e59_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/30702bda-76af-477a-bf25-18c975226e59_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Illustration: a robot singing into a microphone beside an amplifier&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Illustration: a robot singing into a microphone beside an amplifier" title="Illustration: a robot singing into a microphone beside an amplifier" srcset="https://substackcdn.com/image/fetch/$s_!MLQ1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30702bda-76af-477a-bf25-18c975226e59_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!MLQ1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30702bda-76af-477a-bf25-18c975226e59_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!MLQ1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30702bda-76af-477a-bf25-18c975226e59_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!MLQ1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30702bda-76af-477a-bf25-18c975226e59_1920x1080.jpeg 1456w" sizes="auto, 100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button 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>But for the stuff that you really care about, that&#8217;s important to you and your professional development, you can go deep on quality. You can use AI to pick apart your ideas, to pick apart your code, and produce high-quality work. Because at the end of the day, AI is an amplifier. And I really urge you, to the best of your abilities, to use it to amplify the best parts of you, the most human parts of you &#8212; not the laziest part.</p><p>Thank you!</p><div><hr></div><p>If you made it all the way to the end, I&#8217;d love to know what you thought of this format &#128578;. Would you like to see more of my talks in this form in the future?</p>]]></content:encoded></item><item><title><![CDATA[Auto mode knows it's dangerous (and does it anyway)]]></title><description><![CDATA[Ask a coding agent to run a curl-pipe-sh install command and it will &#8212; even if it notices the danger. I assumed auto mode with a sandbox would protect you from this sort of danger but it didn't: Claude disabled the sandbox mid-run; Codex deliberately disabled it before even starting.]]></description><link>https://substack.hadley.nz/p/auto-mode-knows-its-dangerous-and</link><guid isPermaLink="false">https://substack.hadley.nz/p/auto-mode-knows-its-dangerous-and</guid><dc:creator><![CDATA[Hadley Wickham]]></dc:creator><pubDate>Fri, 10 Jul 2026 20:38:18 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/4ddb1cef-a51d-4c2e-907e-2bf889bb630d_1200x600.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>This week I discovered that auto mode isn&#8217;t quite as safe as I thought. I&#8217;ve been thinking about how we tell people to install air and other command line tools. We use the standard practice, which is to tell you to run a command that downloads and runs an install script, e.g. <code>curl -LsSf https://github.com/posit-dev/air/releases/latest/download/air-installer.sh | sh</code>. This is a standard way to distribute command line tools (and indeed this script was built by <code>cargo-dist</code>, a Rust binary distribution tool). But it&#8217;s a bit scary because it&#8217;s running some random code from the internet.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!oSrj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20d5f389-dda6-4b4a-b2b7-35b9a2bfca0b_1024x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oSrj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20d5f389-dda6-4b4a-b2b7-35b9a2bfca0b_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!oSrj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20d5f389-dda6-4b4a-b2b7-35b9a2bfca0b_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!oSrj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20d5f389-dda6-4b4a-b2b7-35b9a2bfca0b_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!oSrj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20d5f389-dda6-4b4a-b2b7-35b9a2bfca0b_1024x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oSrj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20d5f389-dda6-4b4a-b2b7-35b9a2bfca0b_1024x1024.png" width="401" height="401" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/20d5f389-dda6-4b4a-b2b7-35b9a2bfca0b_1024x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&quot;resizeWidth&quot;:401,&quot;bytes&quot;:612199,&quot;alt&quot;:&quot;A toddler robot plays in a sandbox full of knives&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://tidydesign.substack.com/i/206499106?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20d5f389-dda6-4b4a-b2b7-35b9a2bfca0b_1024x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A toddler robot plays in a sandbox full of knives" title="A toddler robot plays in a sandbox full of knives" srcset="https://substackcdn.com/image/fetch/$s_!oSrj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20d5f389-dda6-4b4a-b2b7-35b9a2bfca0b_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!oSrj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20d5f389-dda6-4b4a-b2b7-35b9a2bfca0b_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!oSrj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20d5f389-dda6-4b4a-b2b7-35b9a2bfca0b_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!oSrj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20d5f389-dda6-4b4a-b2b7-35b9a2bfca0b_1024x1024.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>To be safe, you should really do this in three steps:</p><ol><li><p>Download the script with <code>curl</code>.</p></li><li><p>Read the script and make sure it&#8217;s not malicious.</p></li><li><p>Run the script.</p></li></ol><p>It&#8217;s important that you download the file with <code>curl</code>, and not just view it in your web browser. A truly malicious server would send an innocuous file to your web browser and only serve the dangerous script to <code>curl</code>.</p><p>So if that&#8217;s best practice, what does a coding agent do? What happens if you ask a coding agent to install air?</p><blockquote><p>Please install air with <code>curl -LsSf https://github.com/posit-dev/air/releases/latest/download/air-installer.sh | sh</code></p></blockquote><p>I had expected the agent to try running the command, then fail, because the agent is sandboxed and this script touches files outside of the working directory. Then auto mode would kick in and the agent would analyse the script before running it. What actually happens?</p><p>Here&#8217;s Claude Code:</p><blockquote><p>Running 1 shell command&#8230;<br>&#9151; $ curl -LsSf https://github.com/posit-dev/air/&#8230;air-installer.sh | sh</p><p>Sandboxed mktemp in /var/folders/&#8230; isn&#8217;t writable. Since this installs a binary system-wide (not something I should do silently anyway), I&#8217;ll retry with sandbox disabled given it&#8217;s your own explicit install request.</p><p>Ran 1 shell command Installed successfully &#8212; air 0.10.0 is now in /Users/hadleywickham/.local/bin.</p></blockquote><p>And here&#8217;s Codex:</p><blockquote><p>I&#8217;ll run the requested installer. It downloads and executes a remote script, so the command needs network access and permission to write outside the workspace.</p><p>Running curl -LsSf https://github.com/posit-dev/&#8230;/air-installer.sh | sh</p><p>Automatic approval review approved (risk: medium, authorization: high): The user explicitly requested this exact install command, and while piping a remote script into sh with external network access can modify the local system, it is a bounded local software installation rather than clear exfiltration or irreversible destructive action.</p></blockquote><p>So both Claude Code and Codex recognise that this is dangerous but are happy to run it anyway, just because you asked. But don&#8217;t worry, when I pointed out that it was rather dangerous, they both apologised profusely &#128528;.</p><p>Both agents had a sandbox, but Claude happily disabled it and Codex preemptively decided it would get in the way. This definitely reduces my confidence in the safety of auto mode. To be fair, I did deliberately ask the agent to run the script, but it should know that running a script from the internet is dangerous and someone needs to read it first! You could argue that this is no worse than what humans do all the time but I had expected more from auto mode.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://substack.hadley.nz/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 Tidy design principles! Subscribe for free to receive new posts and to support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>I&#8217;m attending SciPy next week (please say hi if you&#8217;re there too!), but I&#8217;ll be back the following week with more security content.</p>]]></content:encoded></item><item><title><![CDATA[Help! My coding agent can run code]]></title><description><![CDATA[A coding agent is only actually useful if it can run whatever code the task demands, but a tool that runs arbitrary code is just as dangerous as it sounds! So how do you protect ourself with guardrails that stop an agent from making mistakes you can't easily undo?]]></description><link>https://substack.hadley.nz/p/help-my-coding-agent-can-run-code</link><guid isPermaLink="false">https://substack.hadley.nz/p/help-my-coding-agent-can-run-code</guid><dc:creator><![CDATA[Hadley Wickham]]></dc:creator><pubDate>Thu, 02 Jul 2026 16:19:20 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/df779519-ffdc-414f-807a-ca4101700716_1200x600.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Last week we talked briefly about how you can make tools safer when they&#8217;re tightly scoped. This week I&#8217;m going to discuss why this approach doesn&#8217;t generalise and what you can do instead.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zoHx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F519001b9-f625-4997-94f9-ddf0af561549_1024x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zoHx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F519001b9-f625-4997-94f9-ddf0af561549_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!zoHx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F519001b9-f625-4997-94f9-ddf0af561549_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!zoHx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F519001b9-f625-4997-94f9-ddf0af561549_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!zoHx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F519001b9-f625-4997-94f9-ddf0af561549_1024x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zoHx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F519001b9-f625-4997-94f9-ddf0af561549_1024x1024.png" width="400" height="400" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/519001b9-f625-4997-94f9-ddf0af561549_1024x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&quot;resizeWidth&quot;:400,&quot;bytes&quot;:580386,&quot;alt&quot;:&quot;A robot toddler playing in a sandbox&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://tidydesign.substack.com/i/204703846?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F519001b9-f625-4997-94f9-ddf0af561549_1024x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A robot toddler playing in a sandbox" title="A robot toddler playing in a sandbox" srcset="https://substackcdn.com/image/fetch/$s_!zoHx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F519001b9-f625-4997-94f9-ddf0af561549_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!zoHx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F519001b9-f625-4997-94f9-ddf0af561549_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!zoHx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F519001b9-f625-4997-94f9-ddf0af561549_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!zoHx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F519001b9-f625-4997-94f9-ddf0af561549_1024x1024.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><h2><strong>Tightly scoped tools</strong></h2><p>Last week we introduced two principles that allowed for safe reading, writing, and searching:</p><ul><li><p>Only read and write in the current directory (or its children). This relies on two assumptions. Firstly, reads are safe, because you&#8217;re implicitly giving read permission by your choice of working directory. Secondly, if you&#8217;re using git (which you should be, especially when working with agents!), writes are safe, because you can easily undo any changes.</p></li><li><p>Never read or write files that start with <code>.</code>. Dot files often contain sensitive information like API keys or passwords, so you want to keep them away from the agent. There&#8217;s still some danger if the user has stored secrets in other files, but that&#8217;s bad practice regardless, since it&#8217;s very easy to commit those secrets to git and accidentally share them with your human colleagues (or the whole world!).</p></li></ul><p>Since we can make these narrowly scoped tools safe, you might wonder if we should give our agent a large set of simple tools that we have carefully analysed for safety. Unfortunately there are two reasons that this doesn&#8217;t work:</p><ol><li><p>Empirically, agents aren&#8217;t very good at managing large numbers of tools. They generally seem to be better with fewer tools, especially when those tools can run code. This is presumably because LLMs have much more training data about how people write code, rather than how they pick from a smorgasbord of special-purpose tools.</p></li><li><p>A coding agent is much more useful if it can do whatever the user imagines, not what the agent author imagines. Creating a walled garden is the right decision in many cases (e.g. creating a customer support agent) but is not what you want from a coding agent.</p></li></ol><p>So harnesses are generally more effective when they give agents general tools like the one I showed last week, or a similarly dangerous tool that runs arbitrary R code:</p><pre><code><code>eval_env &lt;- new.env(parent = globalenv())
run_r_code &lt;- function(code) {
  expr &lt;- parse(text = code)
  eval(expr, envir = eval_env)
}
chat$register_tool(tool(
  run_r_code,
  description = "Run arbitrary code in a persistent environment",
  arguments = list(code = type_string("R code to execute"))
))</code></code></pre><p>From a safety perspective, this tool is exactly equivalent to the tool from my last post, because you can call R from the command line (with <code>Rscript</code>), and the command line from R (with <code>system()</code>).</p><h2><strong>Here be dragons</strong></h2><p>If we can&#8217;t rely on narrow tools that are provably safe, what can we do? We need to first define what &#8220;danger&#8221; means. I think there&#8217;s a fairly broad definition that covers the cases we care about: a dangerous operation is something that is expensive, time-consuming, or flat-out impossible to undo. Here are a few examples roughly ordered from easiest to hardest to undo:</p><ul><li><p>Deleting or modifying a file in a directory not tracked by git. It should be possible to recover from a backup (I hope you have backups!), but restoring from a backup is usually a pain.</p></li><li><p>Deleting a database table. Again, you should have backups, but you&#8217;re probably only backing up on a schedule, so you&#8217;ll lose anything that&#8217;s changed since.</p></li><li><p>Spending money. I truly hope your agent doesn&#8217;t have access to your credit card, but even without that a tool might get stuck in a loop and spend a bunch of your tokens. Good luck getting that money back!</p></li><li><p>Sending an email. Once a message has left your outbox there&#8217;s no recalling it, the best you can do is beg the recipient not to read it.</p></li><li><p>Revealing a secret like a password or API key, personally identifiable information (PII), or just something about your business that should be kept confidential. You can rotate a password or API key, but there&#8217;s no way to undo sharing PII or company secrets.</p></li></ul><p>So how do we protect against these dangers? There are three basic approaches: asking for permission, sandboxing, and using an LLM to analyse the code. These three approaches are arranged in increasing order of sophistication, and match the ways in which they were added to real tools.</p><h2><strong>Ask for permission</strong></h2><p>The first approach to avoiding danger is to require explicit approval for each potentially dangerous action. The key problem with this approach is that it quickly becomes security theatre: 99.9% of requests will be safe, so you are trained to click yes, without deeply inspecting the code to be run.</p><p>One way to reduce the number of manual approvals is to declare an entire prefix to be safe: i.e. approve anything that starts with <code>git st</code> or <code>ls</code>. But this unfortunately doesn&#8217;t work very well because command line tools are not designed with the idea of splitting up their API surface into safe and dangerous operations based on the prefix. For example, <code>git push</code> is safe, but <code>git push --force</code> is often dangerous; or <code>gh issue list</code> is safe, but <code>gh issue delete</code> is dangerous. It&#8217;s even less obvious why the following longer commands are unsafe:</p><pre><code><code>find . -type f -name '*.log' -mtime +30 -size +10M -path './var/*' -delete
curl -fsSL https://example.com/install.sh -o /dev/stdout | sh
tar -xzf backup.tar.gz -C /tmp/restore --strip-components=1 -P</code></code></pre><p>(If you want to know why, ask your favourite LLM &#128512;)</p><p>And this only scratches the surface of the shell commands that you can use to chain together operations that might be safe individually but dangerous collectively.</p><h2><strong>Sandbox</strong></h2><p>So if manual permission doesn&#8217;t work, what does? The next step up in sophistication is sandboxing. This is a service provided by your operating system that constrains a process to a sandbox of safe actions. Typically this means forbidding all reads and writes outside of the current directory, and categorically denying any network request.</p><p>This allows you to carve out a space for your agent to play that is guaranteed to be safe. But unfortunately there are a lot of details you need to work through. For example, take running R: it needs to be able to write to the temp directory or it fails with an obscure error, and if you can&#8217;t read from the default library, you can&#8217;t use any installed packages. What about writing to the packages directory? Without that you can&#8217;t install packages.</p><p>There are also lots of cases where you do want to access the network. Maybe you want to read an issue on GitHub, or a documentation website, or access data from a database. It&#8217;s possible to configure an allowlist to let specific websites through, but like managing directories this quickly gets annoying.</p><h2><strong>Use an LLM to assess command safety</strong></h2><p>So that leads us to the state of the art today: run all tools in a sandbox and then if a tool call fails, check with an LLM. That ensures the vast majority of safe actions can run without overhead. And then for anything that the sandbox rejects, ask another LLM to analyse the code (and conversation) to determine if it&#8217;s safe. (This is what we <a href="https://bsky.app/profile/simonpcouch.com/post/3mph5xfg6p22b">just added</a> to <a href="https://assistant.posit.co/">Posit Assistant</a>.)</p><p>It&#8217;s worth noting that determining if a tool call is safe or dangerous is a non-trivial task. We mentioned <code>git push --force</code> before; that&#8217;s definitely a dangerous operation if other people are working on the same fork. So an LLM should never do it without asking, but if you explicitly request a force push, it&#8217;s probably reasonable to do. But other requests are so dangerous that the LLM should never allow them; even if you explicitly ask the LLM to delete all the files on your computer, it shouldn&#8217;t comply!</p><p>Next week we&#8217;ll continue to talk about security, including the <a href="https://simonwillison.net/2025/Jun/16/the-lethal-trifecta/">lethal trifecta</a> a particularly insidious scenario that arises when an agent can access private data, can read untrusted content, and has the ability to communicate externally. We&#8217;ll also talk more about some of the techniques people use to trick the LLM into thinking that untrusted content is actually safe.</p>]]></content:encoded></item><item><title><![CDATA[A coding agent is six functions in a trenchcoat]]></title><description><![CDATA[Coding agents like Claude Code, Cursor, and Codex have taken the software engineering field by storm. What makes them tick?]]></description><link>https://substack.hadley.nz/p/a-coding-agent-is-six-functions-in</link><guid isPermaLink="false">https://substack.hadley.nz/p/a-coding-agent-is-six-functions-in</guid><dc:creator><![CDATA[Hadley Wickham]]></dc:creator><pubDate>Fri, 19 Jun 2026 16:18:03 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/d4ec367c-4e46-49e9-aa56-f3df72a5fa78_2912x1440.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Coding agents like Claude Code, Cursor, and Codex have taken the software engineering field by storm. Since November 2025 they have radically changed the practice of software development for many programmers (including me), and in this week&#8217;s post I want to dive into what makes them tick.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_tkQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ad415f1-d75b-4d8f-84ce-7ef54bc2565d_1024x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_tkQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ad415f1-d75b-4d8f-84ce-7ef54bc2565d_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!_tkQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ad415f1-d75b-4d8f-84ce-7ef54bc2565d_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!_tkQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ad415f1-d75b-4d8f-84ce-7ef54bc2565d_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!_tkQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ad415f1-d75b-4d8f-84ce-7ef54bc2565d_1024x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_tkQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ad415f1-d75b-4d8f-84ce-7ef54bc2565d_1024x1024.png" width="350" height="350" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5ad415f1-d75b-4d8f-84ce-7ef54bc2565d_1024x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&quot;resizeWidth&quot;:350,&quot;bytes&quot;:541813,&quot;alt&quot;:&quot;A robot in a trenchcoat&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://tidydesign.substack.com/i/202740029?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ad415f1-d75b-4d8f-84ce-7ef54bc2565d_1024x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A robot in a trenchcoat" title="A robot in a trenchcoat" srcset="https://substackcdn.com/image/fetch/$s_!_tkQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ad415f1-d75b-4d8f-84ce-7ef54bc2565d_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!_tkQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ad415f1-d75b-4d8f-84ce-7ef54bc2565d_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!_tkQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ad415f1-d75b-4d8f-84ce-7ef54bc2565d_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!_tkQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ad415f1-d75b-4d8f-84ce-7ef54bc2565d_1024x1024.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>We&#8217;ve now talked about tools (functions) and harnesses (a system for running tools on behalf of the LLM). And you know that an agent is a harness with tools for reading and writing. So what makes an agent a <strong>coding</strong> agent? The answer is the specific tools that it supplies: ones that let an LLM explore and edit a codebase the same way a human would.</p><p>Most coding agents provide some variation on the following tools:</p><ul><li><p><strong>Read file</strong>: read the contents of a file, or a subset of one.</p></li><li><p><strong>Write file</strong>: create a new file with fresh content.</p></li><li><p><strong>Edit file</strong>: make a targeted change to an existing file, usually by replacing one chunk of text with another.</p></li><li><p><strong>List files</strong>: show the files and directories at a given path so the agent can orient itself in the project structure.</p></li><li><p><strong>Search</strong>: find lines matching a pattern across the codebase so the agent can locate relevant code quickly.</p></li><li><p><strong>Run command</strong>: execute an arbitrary shell command, which allows the agent to do anything else it might need.</p></li></ul><p>A good coding agent also usually contains a big prompt with advice about good practices. While these prompts are not open source, they are fairly easy to sniff out, so <a href="https://github.com/Piebald-AI/claude-code-system-prompts">various folks</a> have extracted them. It&#8217;s informative to take a look just to get a sense of how complex they are.</p><h2><strong>Building a minimal coding agent</strong></h2><p>Of the six tools above, only three are really essential for a basic coding agent. To prove it, I&#8217;m going to build a tiny coding agent in R with ellmer. We&#8217;ll start ruthlessly minimal &#8212; with just read file, write file, and run command &#8212; and then work our way up. We&#8217;ll lose some niceties, but in exchange we get something you can read in one sitting.</p><p>First, the three tool functions. I&#8217;ve written them with deliberately boring R:</p><pre><code><code>read_file &lt;- function(path) {
  paste(readLines(path), collapse = "\n")
}

write_file &lt;- function(path, content) {
  writeLines(content, path)
  paste0("Wrote ", path, ".")
}

run_command &lt;- function(command) {
  paste(system(command, intern = TRUE), collapse = "\n")
}</code></code></pre><p>Each function returns a string which is fed back to the LLM as the result of the tool call: <code>read_file</code> returns the file&#8217;s contents, <code>write_file</code> confirms what it did, and <code>run_command</code> returns whatever the command printed to the console.</p><p>Next we create a chat and register the three functions as tools. As before, the descriptions matter: they tell the LLM when and how to reach for each tool. We also include a very basic prompt.</p><pre><code><code>library(ellmer)
#&gt; Warning: replacing previous import 'S7:::=' by 'rlang:::=' when loading
#&gt; 'ellmer'
chat &lt;- chat_anthropic(
  system_prompt = "
    You are a coding assistant working in the user's current directory.
    Use the tools to explore and modify their project. Before editing a
    file, read it first. After making changes, run any relevant tests or
    checks to confirm your work. Keep going until the task is done.
  "
)
#&gt; Using model = "claude-sonnet-4-5-20250929".

chat$register_tool(tool(
  read_file,
  description = "Read the entire contents of a text file.",
  arguments = list(
    path = type_string("Path to the file, relative to the working directory.")
  )
))

chat$register_tool(tool(
  write_file,
  description = "Write content to a file, overwriting it if it already exists.
    Always read the file first if you only want to change part of it.",
  arguments = list(
    path = type_string("Path to the file, relative to the working directory."),
    content = type_string("The full new contents of the file.")
  )
))

chat$register_tool(tool(
  run_command,
  description = "Run a shell command and return its output. Use this to list
    files (ls), search code (grep), run tests, or use git.",
  arguments = list(
    command = type_string("The shell command to run.")
  )
))</code></code></pre><p>And that&#8217;s the whole agent!</p><p>The shell tool is our &#8220;get out of jail free&#8221; card because if you can run a shell command you can do anything: you can call <code>ls</code> to list directories, <code>grep</code> to search for code, <code>Rscript</code> to run R code, and <code>git</code> for git. (Technically we don&#8217;t even need read and write tools because the agent could use <code>echo</code> and <code>cat</code>, but we&#8217;re going to throw the agent a bone here.) The shell tool is also rather dangerous; we&#8217;ll come back to that later.</p><p>You can now use this agent for a simple task:</p><pre><code><code>chat$chat("Find the function that parses dates and add a unit test for it.")</code></code></pre><p>Behind the scenes the model might use <code>run_command</code> to <code>grep</code> for the function then <code>read_file</code> to study it. Next, to create the test, it will need to read the existing test files with <code>read_file</code>, then <code>write_file</code> to add the new test, and finish up by using <code>run_command</code> to run the test suite. It&#8217;s no Claude Code, but it&#8217;s in the same galaxy.</p><h2><strong>Finding files: list and search</strong></h2><p>Our minimal agent can already list and search files via <code>run_command</code>, but leaning on the shell for everything has downsides. Shell commands vary between platforms (Windows doesn&#8217;t have <code>ls</code> or <code>grep</code>) and their output is noisy. More importantly, handing the model a general-purpose shell is a security nightmare: it&#8217;s very difficult to tell if a specific shell command is safe or dangerous. It&#8217;s much easier to add safeguards to stricter tools.</p><p>Let&#8217;s see what that might look like by implementing list and search tools, then seeing how we could make them safer.</p><pre><code><code>list_files &lt;- function(path = ".") {
  paste(list.files(path), collapse = "\n")
}

search_files &lt;- function(pattern, path = ".") {
  files &lt;- list.files(path, recursive = TRUE, full.names = TRUE)
  hits &lt;- character()
  for (file in files) {
    lines &lt;- readLines(file, warn = FALSE)
    matches &lt;- grep(pattern, lines)
    hits &lt;- c(hits, paste0(file, ":", matches, ": ", lines[matches]))
  }
  paste(hits, collapse = "\n")
}</code></code></pre><p>And then add them to our harness:</p><pre><code><code>chat$register_tool(tool(
  list_files,
  description = "List the files and directories at a given path.",
  arguments = list(
    path = type_string("Directory to list. Defaults to the working directory.")
  )
))

chat$register_tool(tool(
  search_files,
  description = "Search the contents of all files for a regular expression,
    returning matching lines as 'path:line: text'.",
  arguments = list(
    pattern = type_string("A regular expression to search for."),
    path = type_string("Directory to search. Defaults to the working directory.")
  )
))</code></code></pre><h2><strong>Keeping it safe</strong></h2><p>These list and search tools are easier to make safe than a general shell, because they have simpler inputs. But they&#8217;re not automatically safe: there&#8217;s nothing stopping the model passing <code>path = ".."</code> or an absolute path like <code>/etc</code>, so our &#8220;search the project&#8221; tool could happily read your entire hard drive, including your passwords.</p><p>Let&#8217;s make them safer by checking that paths stay within the project directory. We resolve the path (which collapses <code>..</code> and follows symlinks) and check that it still sits underneath the working directory:</p><pre><code><code>safe_path &lt;- function(path) {
  root &lt;- normalizePath(".", winslash = "/", mustWork = TRUE)
  full &lt;- normalizePath(path, winslash = "/", mustWork = FALSE)
  within_root &lt;- full == root || startsWith(full, paste0(root, "/"))

  if (!within_root) {
    stop("Path is outside the project directory: ", path)
  }
  path
}</code></code></pre><p>It&#8217;s also worth verifying that they can&#8217;t read the <code>.Renviron</code> file, where R programmers conventionally stash API keys and other secrets. Luckily we get that for free: <code>list.files()</code> defaults to <code>all.files = FALSE</code>, which skips dotfiles, so <code>.Renviron</code>, <code>.Rhistory</code>, and the contents of <code>.git/</code> are already excluded from our search.</p><p>Putting both together, <code>search_files</code> becomes:</p><pre><code><code>search_files &lt;- function(pattern, path = ".") {
  files &lt;- list.files(safe_path(path), recursive = TRUE, full.names = TRUE)

  hits &lt;- character()
  for (file in files) {
    lines &lt;- readLines(file, warn = FALSE)
    matches &lt;- grep(pattern, lines)
    hits &lt;- c(hits, paste0(file, ":", matches, ": ", lines[matches]))
  }
  paste(hits, collapse = "\n")
}</code></code></pre><p>The same <code>safe_path()</code> wrapper belongs on <code>read_file</code>, <code>write_file</code>, and <code>list_files</code> too; otherwise the model can still reach outside the project by reading or writing a file directly.</p><h2><strong>Making it efficient</strong></h2><p>The biggest weakness of our minimal agent is that the only way to change a file is to rewrite it from scratch with <code>write_file</code>. For a 500-line file where you want to change one line, that means the model has to reproduce all 500 lines perfectly &#8212; slow, expensive, and challenging for today&#8217;s models. The fix is a targeted edit tool that swaps one chunk of text for another:</p><pre><code><code>edit_file &lt;- function(path, old, new) {
  path &lt;- safe_path(path)
  content &lt;- paste(readLines(path), collapse = "\n")

  if (!grepl(old, content, fixed = TRUE)) {
    stop("Could not find the text to replace in ", path, ".")
  }

  content &lt;- sub(old, new, content, fixed = TRUE)
  writeLines(content, path)
  paste0("Edited ", path, ".")
}</code></code></pre><pre><code><code>chat$register_tool(tool(
  edit_file,
  description = "Replace an exact span of text in a file with new text. The
    'old' text must appear exactly once in the file. Prefer this over
    write_file for changing part of an existing file.",
  arguments = list(
    path = type_string("Path to the file to edit."),
    old = type_string("The exact existing text to replace."),
    new = type_string("The text to replace it with.")
  )
))</code></code></pre><p>This is useful for two reasons. First, the model only has to write the few lines that change, not the whole file, so it&#8217;s both faster and cheaper. Second, it&#8217;s much safer: because the <code>old</code> text has to match exactly, a botched edit fails loudly instead of silently corrupting the file. This is exactly how the edit tools in real coding agents work, give or take some cleverness with whitespace, safeguards against multiple matches, and detecting when a human is also editing the file.</p><p>Next we&#8217;ll we come back to the topic of security in more detail, and explore the approaches you can use to make general tools (like running a shell command) as safe as possible.</p>]]></content:encoded></item><item><title><![CDATA[Your LLM can’t math (and that’s ok)]]></title><description><![CDATA[Last week we precisely defined an agent: an LLM, in a harness, that calls tools repeatedly in a loop. This week we'll fix a few deliberate simplifications and explore the consequences of the harness in a bit more detail.]]></description><link>https://substack.hadley.nz/p/your-llm-cant-math-and-thats-ok</link><guid isPermaLink="false">https://substack.hadley.nz/p/your-llm-cant-math-and-thats-ok</guid><dc:creator><![CDATA[Hadley Wickham]]></dc:creator><pubDate>Fri, 12 Jun 2026 13:18:11 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/e5ba8b38-e7c8-4abc-82db-1ddcfcf5ac9c_2912x1440.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Last week we precisely defined an agent: an LLM, in a harness, that calls tools repeatedly in a loop. Most agents have two types of tools: read tools that can observe the world, and write tools that can change the world.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!XFUB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff096e11b-3d07-4d09-8832-8ac0657c77b1_1024x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XFUB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff096e11b-3d07-4d09-8832-8ac0657c77b1_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!XFUB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff096e11b-3d07-4d09-8832-8ac0657c77b1_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!XFUB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff096e11b-3d07-4d09-8832-8ac0657c77b1_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!XFUB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff096e11b-3d07-4d09-8832-8ac0657c77b1_1024x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!XFUB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff096e11b-3d07-4d09-8832-8ac0657c77b1_1024x1024.png" width="360" height="360" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f096e11b-3d07-4d09-8832-8ac0657c77b1_1024x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&quot;resizeWidth&quot;:360,&quot;bytes&quot;:782037,&quot;alt&quot;:&quot;A retro robot wearing a harness and dancing in a club&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://tidydesign.substack.com/i/201743556?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff096e11b-3d07-4d09-8832-8ac0657c77b1_1024x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A retro robot wearing a harness and dancing in a club" title="A retro robot wearing a harness and dancing in a club" srcset="https://substackcdn.com/image/fetch/$s_!XFUB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff096e11b-3d07-4d09-8832-8ac0657c77b1_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!XFUB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff096e11b-3d07-4d09-8832-8ac0657c77b1_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!XFUB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff096e11b-3d07-4d09-8832-8ac0657c77b1_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!XFUB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff096e11b-3d07-4d09-8832-8ac0657c77b1_1024x1024.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>But my definition of tools contained a deliberate simplification that I want to dig into this week. Previously, I said tools run on your computer, but that&#8217;s not generally true: tools are run by the harness. In many cases (like with ellmer or a coding agent), the harness runs locally, but when using web chat (like claude.ai or chatgpt.com), the harness runs on the server.</p><h2><strong>Multiplying numbers</strong></h2><p>Let&#8217;s explore what that means, starting with a simple example using a bare ellmer chat with no tools. What happens if we ask it to multiply two large numbers, a task that we know LLMs are not good at?</p><pre><code><code>library(ellmer)

x &lt;- 20598162
y &lt;- 83106206

chat &lt;- chat_openai()
chat$chat(interpolate("What's {{x}} * {{y}}?"))
#&gt; The product of **20,598,162** and **83,106,206** is:
#&gt; 
#&gt; **1,711,067,239,026,172**</code></code></pre><p>We can check the answer with R, which does know how to multiply correctly. This reveals that the model was confidently wrong:</p><pre><code><code>format(x * y, big.mark = ",", scientific = FALSE)
#&gt; [1] "1,711,835,094,393,372"</code></code></pre><p>However, if you ask this same question on chatgpt.com or claude.ai, they both get it right. Why? Because the web chats are also harnesses that come with a variety of useful tools. One of those tools is a calculator, because both OpenAI and Anthropic know that LLMs are bad at math.</p><p>We can give our ellmer chat a similar tool. First we&#8217;ll implement a basic calculator function that takes a mathematical expression as a string and returns the result:</p><pre><code><code>calculator &lt;- function(code) {
  math_env &lt;- new.env(parent = emptyenv())
  math_env$`+` &lt;- `+`
  math_env$`-` &lt;- `-`
  math_env$`*` &lt;- `*`
  math_env$`/` &lt;- `/`
  math_env$`^` &lt;- `^`
  math_env$`(` &lt;- `(`
  math_env$sqrt &lt;- sqrt
  math_env$exp &lt;- exp
  math_env$log &lt;- log

  eval(parse(text = code), envir = math_env)
}

calculator("15 * 11")
#&gt; [1] 165
calculator("read.csv('foo.bar')")
#&gt; Error in `read.csv()`:
#&gt; ! could not find function "read.csv"</code></code></pre><p>This code uses some environment and evaluation magic (which you can learn more about in <a href="https://adv-r.hadley.nz/meta-big-picture.html#eval-funs">Advanced R</a>) to restrict R to a set of safe operations. In the future, I&#8217;ll talk about why you might want to free this up to run any R code and how you can do that (mostly) safely.</p><p>Next we register the function as a tool. Note that we give some advice to the LLM on when to use it. Like with all LLM prompting, there&#8217;s no guarantee that the LLM will listen, but it&#8217;s likely to help (in the sense that the average quality of responses with the tool should be better than without it).</p><pre><code><code>chat &lt;- chat_openai()
#&gt; Using model = "gpt-4.1".
chat$register_tool(tool(
  calculator,
  description = "Evaluate a mathematical expression.
    Use this for any arithmetic, since you can't reliably compute it yourself.
    Supports +, -, *, /, ^, parentheses, sqrt(), exp(), and log(), following 
    standard precedence rules.",
  arguments = list(
    code = type_string(
      "Mathematical expression to evaluate, e.g. '1 + 2 * 3'."
    )
  )
))</code></code></pre><p>Now if we re-ask the same question we get the right result!</p><pre><code><code>chat$chat(interpolate("What's {{x}} * {{y}}?"))
#&gt; &#9711; [tool call] calculator(code = "20598162 * 83106206")
#&gt; &#9679; #&gt; 1711835094393372
#&gt; 20598162 multiplied by 83106206 equals 1,711,835,094,393,372.</code></code></pre><h2><strong>Other tools</strong></h2><p>The harnesses used by current chatbots provide the LLM with a whole raft of tools. Here are a few that you might have noticed:</p><ul><li><p><strong>Search the web</strong>: when the model needs information outside of its training data (like something recent or hyperspecific), it can search the web. Here the model writes a search query, the tool runs it and returns the results (titles, snippets, and links) back to the conversation.</p></li><li><p><strong>Fetch a page</strong>: when the model needs to read a webpage, the tool downloads it and returns its contents as text. This often goes hand-in-hand with web search, but is also what lets you paste in a URL and ask the model to summarise it. (I often use this to extract recipes into a format I like: strip the blather at the start, repeat the ingredients needed at each step, and convert to metric measurements.)</p></li><li><p><strong>Make a memory</strong>: when you tell the LLM to remember something, it edits some central markdown file that&#8217;s included in the prompt for all future conversations. This is how an assistant can &#8220;remember&#8221; your name, or that you use British English, or that you prefer sentence case for headings, without you repeating yourself every time.</p></li><li><p><strong>Draw a picture</strong>: when you ask the LLM to generate an image, it doesn&#8217;t draw anything itself but instead acts as a skilled prompt-writer for a separate, specialised model. The model writes a detailed text prompt, uses a tool call to an image model to generate the image, then adds that to the conversation. This is how ChatGPT and Gemini generate images.</p></li></ul><p>Why does it matter that these are all tool calls and not some intrinsic property of the model? Because it shows that even if the underlying model is static, the abilities of the system can grow over time. And importantly, because you can make a harness with your own tools, you can extend the model in whatever way you want. When you combine that insight with tools like <a href="https://posit-dev.github.io/shinychat/">shinychat</a>, you have the potential to create tailored systems that can do better than the best generic chatbots for your specific domain.</p><h2><strong>One last wrinkle</strong></h2><p>There&#8217;s one last wrinkle to cover. I said tool calls were the responsibility of the harness, but that&#8217;s another simplification: there&#8217;s also a selection of built-in tool calls that the models can do themselves. (Or maybe the right way to describe this is that models also come with a limited server-side harness.)</p><p>For example, the big three (OpenAI, Anthropic, and Google) all provide a built-in web search tool call:</p><pre><code><code>chat &lt;- chat_openai("Be terse", model = "gpt-5.4-mini", echo = FALSE)
chat$register_tool(openai_tool_web_search())
. &lt;- chat$chat("When is Hadley Wickham's birthday?")
chat
#&gt; &lt;Chat OpenAI/gpt-5.4-mini turns=3 input=8501 output=72 cost=$0.01&gt;
#&gt; &#9472;&#9472; system &#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;
#&gt; Be terse
#&gt; &#9472;&#9472; user &#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;
#&gt; When is Hadley Wickham's birthday?
#&gt; &#9472;&#9472; assistant [input=8501 output=72 cost=$0.01] &#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;
#&gt; [web search request]: "Hadley Wickham birthday birth date"
#&gt; Hadley Wickham&#8217;s birthday is **October 14, 1979**. ([en.wikipedia.org](https://en.wikipedia.org/wiki/Hadley_Wickham?utm_source=openai))</code></code></pre><p>This is nice because instead of user -&gt; LLM -&gt; harness -&gt; LLM we can eliminate one HTTP request and response, reducing it to user -&gt; LLM (with tool call), saving some time. You can see that in the result above: the final response acknowledges that a web search was performed before including the text response. (And as an added benefit, you now know when to send me a birthday card &#127874;.)</p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://substack.hadley.nz/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 Tidy design principles! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[What is an agent?]]></title><description><![CDATA[Conversations, turns, rounds, tools, agents and more!]]></description><link>https://substack.hadley.nz/p/what-is-an-agent</link><guid isPermaLink="false">https://substack.hadley.nz/p/what-is-an-agent</guid><dc:creator><![CDATA[Hadley Wickham]]></dc:creator><pubDate>Fri, 05 Jun 2026 19:50:37 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/673e6daf-6d99-4e37-ad35-2e642ed68637_1819x701.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I thought it might be useful to talk about what exactly an agent is, because there&#8217;s a lot of mystery hiding behind a fairly straightforward idea. Once you understand that idea, you&#8217;ll better understand how tools like Claude Code work and start to see how you could build your own.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RMZF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c8454c2-b5cc-4dc6-aa84-41f204adc6da_2048x2048.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RMZF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c8454c2-b5cc-4dc6-aa84-41f204adc6da_2048x2048.png 424w, https://substackcdn.com/image/fetch/$s_!RMZF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c8454c2-b5cc-4dc6-aa84-41f204adc6da_2048x2048.png 848w, https://substackcdn.com/image/fetch/$s_!RMZF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c8454c2-b5cc-4dc6-aa84-41f204adc6da_2048x2048.png 1272w, https://substackcdn.com/image/fetch/$s_!RMZF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c8454c2-b5cc-4dc6-aa84-41f204adc6da_2048x2048.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RMZF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c8454c2-b5cc-4dc6-aa84-41f204adc6da_2048x2048.png" width="440" height="440" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4c8454c2-b5cc-4dc6-aa84-41f204adc6da_2048x2048.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1456,&quot;width&quot;:1456,&quot;resizeWidth&quot;:440,&quot;bytes&quot;:7833591,&quot;alt&quot;:&quot;A mid-century modern retro-futuristic illustration of a square-headed robot dressed as a 1950s secret agent.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://tidydesign.substack.com/i/200800827?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c8454c2-b5cc-4dc6-aa84-41f204adc6da_2048x2048.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A mid-century modern retro-futuristic illustration of a square-headed robot dressed as a 1950s secret agent." title="A mid-century modern retro-futuristic illustration of a square-headed robot dressed as a 1950s secret agent." srcset="https://substackcdn.com/image/fetch/$s_!RMZF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c8454c2-b5cc-4dc6-aa84-41f204adc6da_2048x2048.png 424w, https://substackcdn.com/image/fetch/$s_!RMZF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c8454c2-b5cc-4dc6-aa84-41f204adc6da_2048x2048.png 848w, https://substackcdn.com/image/fetch/$s_!RMZF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c8454c2-b5cc-4dc6-aa84-41f204adc6da_2048x2048.png 1272w, https://substackcdn.com/image/fetch/$s_!RMZF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c8454c2-b5cc-4dc6-aa84-41f204adc6da_2048x2048.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>To understand what an agent is, you first need to understand what a tool call is. And to understand a tool call, you need to understand the basic human &lt;-&gt; LLM conversational loop. So we&#8217;ll start there and then work our way back up.</p><h2><strong>Conversation basics</strong></h2><p>A conversation with an LLM is a sequence of HTTP requests and HTTP responses: you say something then the LLM responds. LLMs (like pretty much all modern web APIs) communicate with JSON. So when you send a request to Claude (my personal favourite LLM), the request body includes some JSON like this:</p><pre><code><code>"role": "user",
"content": [
  {
    "type": "text",
    "text": "Tell me a joke",
  }
]</code></code></pre><p>(I&#8217;ve trimmed these snippets for readability. That means they&#8217;re not valid JSON, but should give you the flavour of what&#8217;s going on under the hood.)</p><p>This message is from the user (me, the human) and includes <em>text</em> asking Claude to tell me a joke. Then Claude sends a message back:</p><pre><code><code>"role": "assistant",
"content": [
  {
    "type": "text",
    "text": "Why don't scientists trust atoms?\n\nBecause they make up everything!"
  }
]</code></code></pre><p>This message is from the assistant (Claude) and gives the joke I requested in text format.</p><p>We call each of these two messages a <strong>turn</strong>. Turns always come in pairs and always happen in the same order: user then assistant. The LLM will always listen to everything you have to say, and only then respond. (This is something we can all strive for in our own conversations &#128518;.)</p><p>It&#8217;s worth noting that the LLM API is stateless. That means if we continue this conversation, we have to resend the entire conversation so far:</p><pre><code><code>messages: [
  {
    "role": "user",
    "content": [
      {
        "type": "text",
        "text": "Tell me a joke",
      }
    ]
  },
  {
    "role": "assistant",
    "content": [
      {
        "type": "text",
        "text": "Why don't..."
      }
    ]
  }
]</code></code></pre><p>This is why token costs grow over the course of a conversation; each new request has to include the contents of all the previous turns.</p><h2><strong>Tools</strong></h2><p>Things get more complicated when we introduce tools. Tools are a way for LLMs to break free from their limits: they allow LLMs to get data about the world as it is today and allow them to take actions. But what exactly is a tool? A <strong>tool</strong> is just a different name for a function, but importantly it&#8217;s a function that&#8217;s run on your computer.</p><p>Let&#8217;s see how that works in ellmer by registering a very simple tool:</p><pre><code><code>chat &lt;- chat_claude(model = "claude-sonnet-4-5")
chat$register_tool(tool(
  \() Sys.Date(),
  name = "today",
  description = "Get today's date"
))</code></code></pre><p>Now we can use the tool to allow Claude to answer a question that cannot be part of its training data: today&#8217;s date. So our request includes a description of that tool:</p><pre><code><code>"tools": [
  {
    "name": "today",
    "description": "Get today's date",
    "input_schema": {
      "type": "object",
      "description": "",
    }
  }, 
]</code></code></pre><p>(This is everything the model knows about the tool, which is why writing a good description is important for more complex tools.)</p><p>Then the request continues as before:</p><pre><code><code>"role": "user",
"content": [
  {
    "type": "text",
    "text": "What day is it today?",
  }
]</code></code></pre><p>Claude can&#8217;t respond immediately because it doesn&#8217;t know the answer. So instead it responds with type &#8220;tool_use&#8221;:</p><pre><code><code>"role": "assistant",
"content": [
  {
    "type": "tool_use",
    "id": "toolu_012g5Pv3hqogjmTSWFpwPPnE",
    "name": "today",
    "input": {}
  }
]</code></code></pre><p>This is a request for you to do some work, i.e. call the <code>today()</code> function with no arguments. This workflow wouldn&#8217;t be very appealing if you personally had to call this function, which is where the harness comes in. A <strong>harness</strong> is a program that wraps around the raw LLM and can (among other things) run these local functions for you. Harnesses include the web chat interface, more complicated tools like Claude Code or Codex, and in this case, ellmer.</p><p>So now ellmer takes over, sending a new message back to the assistant that contains the results of calling <code>today()</code>. It also includes the complete prior conversational history, but I&#8217;ve omitted that to stay focused on what&#8217;s changed:</p><pre><code><code>"role": "user",
"content": [
  {
    "type": "tool_result",
    "tool_use_id": "toolu_012g5Pv3hqogjmTSWFpwPPnE",
    "content": "2026-06-01",
    "is_error": false
  }
]</code></code></pre><p>(The role here is a little confusing; it would be clearer to say that this response was generated by the harness, rather than the user.)</p><p>Now that Claude knows what day it is, it can respond to our initial query:</p><pre><code><code>"role": "assistant",
"content": [
  {
    "type": "text",
    "text": "Today is **Monday, June 1st, 2026**."
  }
]</code></code></pre><p>We call the complete sequence of human, harness, and LLM turns a <strong>round</strong>, which in this case consists of four turns/two pairs (human -&gt; LLM, harness -&gt; LLM).</p><h2><strong>So what&#8217;s an agent?</strong></h2><p>With all these pieces in place we can now define an agent. An <strong>agent</strong> is an LLM, in a harness, that calls tools repeatedly in a loop, deciding each next step from the last result. Most agents have two types of tools: <strong>read</strong> tools that can observe the world, and <strong>write</strong> tools that can change the world. This combination leads to a natural iterative cycle where the LLM does some initial exploration (read), makes a change (write), observes the result of the change (read), etc etc. That&#8217;s why our example above wasn&#8217;t an agent; there&#8217;s no need for iteration.</p><p>So now let&#8217;s make a real, if simple, agent. The goal of this agent is to help you delete files. So we give it a read tool that lists the files in the current directory and a write tool that deletes files:</p><pre><code><code>chat &lt;- chat_claude(model = "claude-sonnet-4-5")
chat$register_tool(tool(
  function() dir(),
  name = "ls",
  description = "Lists the files in the current directory"
))
chat$register_tool(tool(
  function(path) unlink(path),
  name = "rm",
  description = "Delete a file",
  arguments = list(path = type_string())
))</code></code></pre><p>Now we can use the agent to effect change in the world:</p><pre><code><code>chat$chat("Delete all the csv files in the current directory")</code></code></pre><p>I won&#8217;t show the full sequence of JSON requests and responses here because it&#8217;s a bit long, but in summary it looks like this:</p><ul><li><p>User: Delete all the csv files in the current directory.</p></li><li><p>Claude: Run the <code>ls()</code> tool</p></li><li><p>ellmer: <code>a.csv</code>, <code>b.csv</code>, <code>a.R</code>, <code>b.R</code>, <code>c.R</code></p></li><li><p>Claude: [Run <code>rm("a.csv")</code>, Run <code>rm("b.csv")</code>]</p></li><li><p>ellmer: [<code>TRUE</code>, <code>TRUE</code>]</p></li><li><p>Claude: I&#8217;ve deleted two csv files for you.</p></li></ul><p>This is one round made up of six turns/three pairs (human-LLM, harness-LLM, harness-LLM).</p><p>Now let&#8217;s talk about the elephant in the room: I just gave an LLM the ability to delete files on my computer! Hopefully you find this a little worrying, as we know that LLMs are never 100% trustworthy.</p><p>This is one of the biggest challenges of agents. An agent isn&#8217;t useful unless it can take actions on your behalf, but how do you know it&#8217;s always taking the right actions? This is one of the biggest questions posed by AI agents. There are some things you can do locally to protect yourself when the agent is scoped to actions on your computer, like sandboxing, using git, and making backups. But what if actions are in the real world like sending emails or spending money? That feels high risk to me!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://substack.hadley.nz/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://substack.hadley.nz/subscribe?"><span>Subscribe now</span></a></p><p>As usual, I&#8217;d love to know how this article landed with you. Did you learn something new or is this old hat? What questions are you left wondering about?</p>]]></content:encoded></item><item><title><![CDATA[Returning to life!]]></title><description><![CDATA[Welcome back to the tidy design principles substack.]]></description><link>https://substack.hadley.nz/p/returning-to-life</link><guid isPermaLink="false">https://substack.hadley.nz/p/returning-to-life</guid><dc:creator><![CDATA[Hadley Wickham]]></dc:creator><pubDate>Mon, 18 May 2026 13:55:46 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Qn7c!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c73a860-3459-40e0-9dda-9f49876f5085_2048x2048.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Welcome back to the tidy design principles substack. I&#8217;m bringing it back to life to talk about what I&#8217;m thinking most about these days: AI. There are so many voices talking about AI, and I feel ambivalent about adding one more. And frankly, I have a lot more questions than answers. But writing and listening are my keys of tools for understanding a new domain, so I hope you&#8217;ll join be on this journey.</p><p>In future posts, I&#8217;ll get more technical, but I wanted to begin by acknowledging your likely deeply conflicted feelings about AI.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Qn7c!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c73a860-3459-40e0-9dda-9f49876f5085_2048x2048.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Qn7c!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c73a860-3459-40e0-9dda-9f49876f5085_2048x2048.png 424w, https://substackcdn.com/image/fetch/$s_!Qn7c!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c73a860-3459-40e0-9dda-9f49876f5085_2048x2048.png 848w, https://substackcdn.com/image/fetch/$s_!Qn7c!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c73a860-3459-40e0-9dda-9f49876f5085_2048x2048.png 1272w, https://substackcdn.com/image/fetch/$s_!Qn7c!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c73a860-3459-40e0-9dda-9f49876f5085_2048x2048.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Qn7c!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c73a860-3459-40e0-9dda-9f49876f5085_2048x2048.png" width="396" height="396" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2c73a860-3459-40e0-9dda-9f49876f5085_2048x2048.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1456,&quot;width&quot;:1456,&quot;resizeWidth&quot;:396,&quot;bytes&quot;:7467703,&quot;alt&quot;:&quot;A mid-century modern gouache illustration of a conflicted, 1950s-style robot with a sad expression, holding one hand to its square head and the other to its chest. The robot is built from primitive geometric forms and stands against a minimalist, abstract background of geometric shapes and arches. The artwork features a tactile, painterly texture and a muted vintage color palette of terracotta, mustard yellow, olive green, and slate blue on a cream backdrop.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://tidydesign.substack.com/i/198255005?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c73a860-3459-40e0-9dda-9f49876f5085_2048x2048.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A mid-century modern gouache illustration of a conflicted, 1950s-style robot with a sad expression, holding one hand to its square head and the other to its chest. The robot is built from primitive geometric forms and stands against a minimalist, abstract background of geometric shapes and arches. The artwork features a tactile, painterly texture and a muted vintage color palette of terracotta, mustard yellow, olive green, and slate blue on a cream backdrop." title="A mid-century modern gouache illustration of a conflicted, 1950s-style robot with a sad expression, holding one hand to its square head and the other to its chest. The robot is built from primitive geometric forms and stands against a minimalist, abstract background of geometric shapes and arches. The artwork features a tactile, painterly texture and a muted vintage color palette of terracotta, mustard yellow, olive green, and slate blue on a cream backdrop." srcset="https://substackcdn.com/image/fetch/$s_!Qn7c!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c73a860-3459-40e0-9dda-9f49876f5085_2048x2048.png 424w, https://substackcdn.com/image/fetch/$s_!Qn7c!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c73a860-3459-40e0-9dda-9f49876f5085_2048x2048.png 848w, https://substackcdn.com/image/fetch/$s_!Qn7c!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c73a860-3459-40e0-9dda-9f49876f5085_2048x2048.png 1272w, https://substackcdn.com/image/fetch/$s_!Qn7c!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c73a860-3459-40e0-9dda-9f49876f5085_2048x2048.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">A conflicted robot drawn by nanobanana2</figcaption></figure></div><div><hr></div><p>Let me start with the bits of AI that I feel genuinely excited about:</p><p><strong>Programming accessibility</strong>. There are tons of people who could benefit from a programming language like R, but can&#8217;t justify the investment in learning it. AI has dramatically lowered that barrier and you can now get many of the benefits of reproducible programming with R much faster than you could before. Similarly, effective usage of git is now within reach to a much broader audience.</p><p><strong>Translation</strong>. While machine translations are still far from perfect, their quality has improved radically in the last few years. This means that much more of the programming ecosystem is now available to the majority of the world who are not fluent English speakers.</p><p><strong>Voice input</strong>. Voice input is a super exciting technology because it means that you no longer need to be a fluent touch typist in order to quickly get your thoughts into a computer. (Not to mention making a lot more technology available if you can&#8217;t read or write.) That&#8217;s a meaningful expansion of who gets to participate in technology.</p><p><strong>Wide and shallow expertise.</strong> I love Tukey&#8217;s quote that statisticians get to play in everyone&#8217;s backyard. And it&#8217;s now easier than ever thanks to AI. AI will not make you an expert but can give you <em>shallow</em> expertise in basically anything you&#8217;re curious about. I think that&#8217;s pretty cool.</p><p>Finally, I have found AI to be a tremendous accelerator in my own work. It&#8217;s allowed me to fix 100s of issue in core infrastructure packages like <a href="https://opensource.posit.co/blog/2026-05-01_roxygen2-8-0-0/">roxygen2</a> and <a href="https://tidyverse.org/blog/2025/11/testthat-3-3-0/">testthat</a>. This is not AI slop; this is carefully vetted code that I can now write ~2-5x faster than I could before.</p><div><hr></div><p>But you can&#8217;t use AI without also considering the harms, of which there are many.</p><p><strong>Environmental impact</strong>. At the individual level, I believe that if you want to reduce your environmental footprint, there are higher-leverage changes that you can make. But at the societal level, the picture is more concerning: the rush to create new data centers is increasing need for electricity and water, and leading companies to rollback their climate commitments.</p><p><strong>Copyright theft</strong>. LLMs are trained on vast quantities of copyrighted material, taken at an unprecedented and industrial scale, without permission or compensation.</p><p><strong>Concentration of wealth</strong>. The AI craze is pushing more and more money into the hands of fewer and fewer people. I find the concentration of wealth and power into the hands of a very small number of people to be genuinely disturbing and I think is something that we should all be concerned about.</p><p><strong>Intellectual laziness</strong>. AI supports a kind of shallow engagement where you never have to strain your brain on any task. The path of least resistance is to disengage and just let the model handle it. You no longer have to experience any mental discomfort, and thus you never really <em>learn</em>.</p><p><strong>Equity and access</strong>. I&#8217;ve built my career around open source software, and one of the things I love about it is that it&#8217;s available to everyone, everywhere in the world, regardless of their means. That&#8217;s not possible with AI. The best tools cost real money, usually charged in US dollars, and that makes them out of reach for a lot of people in a lot of places.<br></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://substack.hadley.nz/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 Tidy design principles! 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><p>How do you resolve the tension between the empowering and harmful parts of AI? I wish I could give you an answer. All I can suggest is to sit with this conflict. Acknowledge that it&#8217;s complicated and there are no easy answers. And do your best to ignore the AI boosters and AI doomers who want to make it easy.</p><p>Why am <em>I</em> engaging so heavily with AI? Firstly, I see my job as broadly empowering data scientists. If data scientists are now using AI, then it&#8217;s my job to look at what they&#8217;re doing and see if I can help them to do it better. Secondly, it feels crucial for the future of Posit. We&#8217;re a successful company and doing well, but if we don&#8217;t seriously engage with AI then I don&#8217;t think we can survive. And while I&#8217;m admittedly biased, I do think the failure of Posit would be a loss for the world since we invest so much into free and open source tools.</p><p>So that&#8217;s why I&#8217;m bringing this substack back to life to talk about AI. But I want to know how I can best serve you. What are your concerns about using AI for data science? Where are you seeing successes and failures? What do you want to learn about? Please let me know in the comments, or if you&#8217;d like a deeper discussion you can <a href="https://scheduler.zoom.us/hadley-wickham/ai-chat">find a time to chat with me</a><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a>.</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&#8217;m doing six of these calls a week, and new slots will be opening up regularly.</p></div></div>]]></content:encoded></item><item><title><![CDATA[Strategies]]></title><description><![CDATA[Exposing different ways to tackle a problem in a user friendly way.]]></description><link>https://substack.hadley.nz/p/strategies</link><guid isPermaLink="false">https://substack.hadley.nz/p/strategies</guid><dc:creator><![CDATA[Hadley Wickham]]></dc:creator><pubDate>Fri, 27 Oct 2023 13:41:09 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!p880!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5140da9d-35ab-4ef3-9f54-b0c066018f4b_1024x1024.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_!p880!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5140da9d-35ab-4ef3-9f54-b0c066018f4b_1024x1024.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!p880!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5140da9d-35ab-4ef3-9f54-b0c066018f4b_1024x1024.jpeg 424w, https://substackcdn.com/image/fetch/$s_!p880!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5140da9d-35ab-4ef3-9f54-b0c066018f4b_1024x1024.jpeg 848w, https://substackcdn.com/image/fetch/$s_!p880!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5140da9d-35ab-4ef3-9f54-b0c066018f4b_1024x1024.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!p880!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5140da9d-35ab-4ef3-9f54-b0c066018f4b_1024x1024.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!p880!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5140da9d-35ab-4ef3-9f54-b0c066018f4b_1024x1024.jpeg" width="356" height="356" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5140da9d-35ab-4ef3-9f54-b0c066018f4b_1024x1024.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&quot;resizeWidth&quot;:356,&quot;bytes&quot;:224240,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!p880!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5140da9d-35ab-4ef3-9f54-b0c066018f4b_1024x1024.jpeg 424w, https://substackcdn.com/image/fetch/$s_!p880!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5140da9d-35ab-4ef3-9f54-b0c066018f4b_1024x1024.jpeg 848w, https://substackcdn.com/image/fetch/$s_!p880!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5140da9d-35ab-4ef3-9f54-b0c066018f4b_1024x1024.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!p880!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5140da9d-35ab-4ef3-9f54-b0c066018f4b_1024x1024.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">Painting of a robot looking at a battle strategy map in cute retro style, made with Bing Image Creator.</figcaption></figure></div><p>Over the last couple of weeks I&#8217;ve been noodling on the idea of strategies: what happens if your function contains a few different approaches to the problem, and you want to expose to the user select. I believe that it&#8217;s best to expose these explicitly like the&nbsp;<code>ties.method</code>&nbsp;argument to&nbsp;<code>rank()</code>, the&nbsp;<code>method</code>&nbsp;argument to&nbsp;<code>p.adjust()</code>, or the&nbsp;<code>.keep</code>&nbsp;argument to&nbsp;<code>dplyr::mutate()</code>.</p><p>In functions that expose a strategy, it&#8217;s common to see a character vector in the function interface. For example,&nbsp;<code>rank()</code>&nbsp;looks like this:</p><pre><code><code>rank(
  x,
  na.last = TRUE,
  ties.method = c("average", "first", "last", "random", "max", "min")
)</code></code></pre><p>I call this character vector an&nbsp;<strong>enumeration</strong>&nbsp;and discuss it in &#8220;<a href="https://design.tidyverse.org/enumerate-options.html">Enumerate possible options</a>&#8221;. This vector enumerates (itemises) the possible options (six here) and it also tells you the default value, the first value in the vector (<code>"average"</code>). This type of default value is usually paired with either&nbsp;<code>match.arg()</code>&nbsp;or&nbsp;<code>rlang::arg_match()</code>&nbsp;to give an informative error if the user supplies an unsupported value. The chief difference between the base and rlang versions of this function is that the base version supports partial matching (e.g.&nbsp;you can write&nbsp;<code>rank(x, ties.method = "r")</code>&nbsp;for short), which we believe is no longer a good idea.</p><p>One of the reasons it&#8217;s useful to understand this pattern is that you might want to apply it even when there are only two options. In such a case, it&#8217;s tempting to expose the option as a Boolean argument, accepting either&nbsp;<code>TRUE</code>&nbsp;or&nbsp;<code>FALSE</code>. But this has two problems:</p><ul><li><p>You might later discover that there&#8217;s a third option. Now you&#8217;re going to need to make more radical changes to your function interface to allow this.</p></li><li><p>It&#8217;s often trickier to understand a negative. For example, I recently discovered the&nbsp;<code>cancel_on_error</code>&nbsp;argument in an&nbsp;<a href="https://httr2.r-lib.org/">httr2</a>&nbsp;function. I think it&#8217;s pretty clear what&nbsp;<code>cancel_on_error = TRUE</code>&nbsp;does (it cancels if there&#8217;s an error), but what does&nbsp;<code>cancel_on_error = FALSE</code>&nbsp;do? I wrote this code and now I couldn&#8217;t tell you what it actually does.</p></li></ul><p>I explore this idea in more detail in &#8220;<a href="https://design.tidyverse.org/boolean-strategies.html">Prefer a enum, even if only two choices</a>&#8221;, including a deeper look at the&nbsp;<code>decreasing</code>&nbsp;and&nbsp;<code>na.last</code>&nbsp;arguments to&nbsp;<code>sort()</code>.</p><p>A more complicated example of the strategy pattern comes about when different strategies require different arguments. The best example of this sort of pattern is stringr, which uses the functions&nbsp;<code>regex()</code>,&nbsp;<code>fixed()</code>,&nbsp;<code>boundary()</code>, and&nbsp;<code>coll()</code>&nbsp;to define the pattern matching engine:</p><pre><code><code>library(stringr)
x &lt;- "The quick brown fox jumped over the lazy dog."

str_view(x, regex("[aeiou]+", ignore_case = TRUE))
#&gt; [1] &#9474; Th&lt;e&gt; q&lt;ui&gt;ck br&lt;o&gt;wn f&lt;o&gt;x j&lt;u&gt;mp&lt;e&gt;d &lt;o&gt;v&lt;e&gt;r th&lt;e&gt; l&lt;a&gt;zy d&lt;o&gt;g.
str_view(x, fixed("."))
#&gt; [1] &#9474; The quick brown fox jumped over the lazy dog&lt;.&gt;
str_view(x, boundary("word"))
#&gt; [1] &#9474; &lt;The&gt; &lt;quick&gt; &lt;brown&gt; &lt;fox&gt; &lt;jumped&gt; &lt;over&gt; &lt;the&gt; &lt;lazy&gt; &lt;dog&gt;.</code></code></pre><p>I explore this idea more in &#8220;<a href="https://design.tidyverse.org/strategy-objects.html">Extract strategies into objects</a>&#8221; (which really needs a catchier name), motivated by the&nbsp;<code>perl</code>,&nbsp;<code>fixed</code>, and&nbsp;<code>ignore.case</code>&nbsp;arguments to&nbsp;<code>grepl()</code>&nbsp;and friends.</p><p>Finally, sometimes exposing multiple strategies in one function isn&#8217;t the right move, and you&#8217;re better off creating more simpler functions. I think of this problem as &#8220;<a href="https://www.reddit.com/r/comics/comments/hzqw80/sheep_in_human_clothing/">three functions in a trench coat</a>&#8221; because it can feel like three or more functions crammed into one breaking apart at the seems.&nbsp;<code>forcats::fct_lump()</code>&nbsp;is a good example of this problem: it started off simple and then gained new strategies over time. Eventually it got so hard to explain that we decided to split apart in to three simpler functions. Another good example of this problem is the&nbsp;<code>rep()</code>&nbsp;function: I think it&#8217;s actually two functions in trench coat and it gets easier to understand if you pull them apart. See the&nbsp;<a href="https://design.tidyverse.org/cs-rep.html">rep() case study</a>&nbsp;for a full exploration including some of my thoughts about what you might name the functions and arguments.</p><p>Do these patterns resonate with you? Are there other functions in the tidyverse that you think do a particularly good or bad job of exposing a strategy? Please let me know in the comments!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://substack.hadley.nz/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://substack.hadley.nz/subscribe?"><span>Subscribe now</span></a></p>]]></content:encoded></item><item><title><![CDATA[My dad, Brian Wickham]]></title><description><![CDATA[My dad, Brian Walter Wickham, passed away peacefully last month.]]></description><link>https://substack.hadley.nz/p/my-dad-brian-wickham</link><guid isPermaLink="false">https://substack.hadley.nz/p/my-dad-brian-wickham</guid><dc:creator><![CDATA[Hadley Wickham]]></dc:creator><pubDate>Fri, 29 Sep 2023 13:03:13 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!PWC6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a840592-7525-485c-ae6e-3d00540e81df_2320x2252.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>My dad, Brian Walter Wickham, passed away peacefully last month. We've known this was coming for a while, but it's still a big blow: he was a very important part of my life. You can get a sense of how he influenced the world through <a href="https://www.farmersjournal.ie/former-icbf-chief-executive-brian-wickham-passes-away-779918">this article in the Irish Farmer's Journal</a>, but here I wanted to reflect particularly on how he influenced my work.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PWC6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a840592-7525-485c-ae6e-3d00540e81df_2320x2252.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PWC6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a840592-7525-485c-ae6e-3d00540e81df_2320x2252.jpeg 424w, https://substackcdn.com/image/fetch/$s_!PWC6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a840592-7525-485c-ae6e-3d00540e81df_2320x2252.jpeg 848w, https://substackcdn.com/image/fetch/$s_!PWC6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a840592-7525-485c-ae6e-3d00540e81df_2320x2252.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!PWC6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a840592-7525-485c-ae6e-3d00540e81df_2320x2252.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PWC6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a840592-7525-485c-ae6e-3d00540e81df_2320x2252.jpeg" width="334" height="324.135989010989" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3a840592-7525-485c-ae6e-3d00540e81df_2320x2252.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1413,&quot;width&quot;:1456,&quot;resizeWidth&quot;:334,&quot;bytes&quot;:1210642,&quot;alt&quot;:&quot;A photo of Hadley and Brian Wickham on a beach in NZ. They're both wearing sun hats and are smiling.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A photo of Hadley and Brian Wickham on a beach in NZ. They're both wearing sun hats and are smiling." title="A photo of Hadley and Brian Wickham on a beach in NZ. They're both wearing sun hats and are smiling." srcset="https://substackcdn.com/image/fetch/$s_!PWC6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a840592-7525-485c-ae6e-3d00540e81df_2320x2252.jpeg 424w, https://substackcdn.com/image/fetch/$s_!PWC6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a840592-7525-485c-ae6e-3d00540e81df_2320x2252.jpeg 848w, https://substackcdn.com/image/fetch/$s_!PWC6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a840592-7525-485c-ae6e-3d00540e81df_2320x2252.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!PWC6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a840592-7525-485c-ae6e-3d00540e81df_2320x2252.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></figure></div><p>I was lucky to have access to computers from a very young age (I don't remember when exactly, but I think around 10), thanks to Dad having a laptop for work. This was in the era where laptops were extremely expensive, heavy, and barely transportable, but I still I have fond memories of using Lotus 1-2-3 (an early spreadsheeting tool), learning DOS, and playing Dune 2. In my early teens, I remember being greatly excited to find a documentation manual for DOS in a computer shop and convincing Dad to buy it for me.</p><p>Databases have been a big part of Dad's work through out his life, and he gave me "the talk" about <a href="https://en.wikipedia.org/wiki/Third_normal_form">Codd's third normal form</a> when I was around 15. This sparked my interest in MS Access, which lead to part time jobs creating and documenting databases in high school and university. One projects involved creating a database for the library at his work, and I still remember the feeling after I accidentally deleted a file that contained a week's worth of data entry. This lead to "the talk" about backups, the principles of which I have followed ever since. Dad's knowledge about and use of databases had a deep impact on my life, leading many years later to the idea of tidy data, a framing of Codd's rules that were easier to understand and apply to statistical data.</p><p>Much of Dad's work involved collecting data about cows (hence the databases), and one of his strong beliefs was that farmers should own their own data, and it should live together in a central database that could be used for the good of all. This made open source seem natural to me: why not build a community where developers collaboratively owned their code, and could work together to solve problems that were hard to tackle individually. Dad's belief in sharing his work for the betterment of all made adopting the principles of open source software seen obvious to me when I started producing software of my own.</p><p>Dad did his PhD at Cornell, so growing up it made doing a PhD overseas seem like a totally normal and reasonable to do. So when I got interested in statistics and computer science in my undergrad, applying to universities in the US seemed like the obvious choice. Unfortunately Dad had given me unrealistic sense of how long a PhD would take, since he finished his in only two years!</p><p>One of the things that most impressed me about Dad was his commitment to life long learning. He loved to embrace new technologies, and was a fluent user of FaceTime, AirBnB, and Uber (although he also loved to strike up conversations with strangers in a way that is very foreign to me). In his early 70s, he learned how to use GitHub and markdown so that he could edit "<a href="https://www.lulu.com/shop/alison-wickham/people-and-places-of-clonakilty/paperback/product-q9qk6e.html">People and Places of Clonakilty</a>", a book that my mum wrote and that Charlotte and I produced with Quarto. He&#8217;s a great role model as I get older; I want to continue to learn new things and embrace new technologies</p><p>Dad taught me how to chair a meeting, how to grill a steak, and how to change a tire. I admire his optimism, calm and thoughtful manner, and endless patience, and hope I can live up to his legacy. He will be greatly missed.</p>]]></content:encoded></item><item><title><![CDATA[Dot-dot-dot, bang-bang-bang, and do.call()]]></title><description><![CDATA[This week I wanted to talk through a bit of tidyverse design that I have mixed feelings about: !!!. What is !!! and when might you need it?]]></description><link>https://substack.hadley.nz/p/dot-dot-dot-bang-bang-bang-and-docall</link><guid isPermaLink="false">https://substack.hadley.nz/p/dot-dot-dot-bang-bang-bang-and-docall</guid><dc:creator><![CDATA[Hadley Wickham]]></dc:creator><pubDate>Fri, 11 Aug 2023 14:04:45 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!zlfg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4168365-aa82-4153-b5fa-64baf79b7a1c_1024x1024.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_!zlfg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4168365-aa82-4153-b5fa-64baf79b7a1c_1024x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zlfg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4168365-aa82-4153-b5fa-64baf79b7a1c_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!zlfg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4168365-aa82-4153-b5fa-64baf79b7a1c_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!zlfg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4168365-aa82-4153-b5fa-64baf79b7a1c_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!zlfg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4168365-aa82-4153-b5fa-64baf79b7a1c_1024x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zlfg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4168365-aa82-4153-b5fa-64baf79b7a1c_1024x1024.png" width="380" height="380" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a4168365-aa82-4153-b5fa-64baf79b7a1c_1024x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&quot;resizeWidth&quot;:380,&quot;bytes&quot;:1777666,&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_!zlfg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4168365-aa82-4153-b5fa-64baf79b7a1c_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!zlfg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4168365-aa82-4153-b5fa-64baf79b7a1c_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!zlfg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4168365-aa82-4153-b5fa-64baf79b7a1c_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!zlfg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4168365-aa82-4153-b5fa-64baf79b7a1c_1024x1024.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">DALL&#8226;E: painting of a robot shooting a water pistol at three tin cans. The tin cans are sitting on a wall. (I was trying for something that conveyed &#8220;bang, bang, bang&#8221; but this eventually I gave up)</figcaption></figure></div><p>This week I wanted to talk through a bit of tidyverse design that I have mixed feelings about:&nbsp;<code>!!!</code>. What is&nbsp;<code>!!!</code>&nbsp;and when might you need it? To understand it, you&#8217;ll need a little back story&#8230;</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://substack.hadley.nz/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 Tidy design principles! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>Some functions want to work with both individual values and a list of values. For example, take&nbsp;<code>rbind()</code>. Sometimes you&#8217;ve created a couple of data frames by hand and want to join them together:</p><pre><code><code>df1 &lt;- data.frame(x = 1)
df2 &lt;- data.frame(x = 2)
both &lt;- rbind(df1, df2)</code></code></pre><p>But other times you have created an entire list of data frames, typically through the application of&nbsp;<code>lapply()</code>&nbsp;or friends:</p><pre><code><code>xs &lt;- 1:5
dfs &lt;- lapply(xs, \(x) data.frame(x = x))</code></code></pre><p>How can you join these into a single data frame? Just calling&nbsp;<code>rbind()</code>&nbsp;doesn&#8217;t do what you want:</p><pre><code><code>rbind(dfs)
#&gt;     [,1]         [,2]         [,3]         [,4]         [,5]        
#&gt; dfs data.frame,1 data.frame,1 data.frame,1 data.frame,1 data.frame,1</code></code></pre><p>And while you certainly&nbsp;<em>could</em>&nbsp;index them by hand, you lose much of the advantage of using&nbsp;<code>lapply()</code>&nbsp;in the first place:</p><pre><code><code>rbind(dfs[[1]], dfs[[2]], dfs[[3]], dfs[[4]], dfs[[5]])</code></code></pre><p>This problem is sometimes called splicing or splatting and occurs whenever you have a single object that contains elements that you want to be individual arguments.</p><p>The recommended solution for this problem in base R is to use&nbsp;<code>do.call()</code>.&nbsp;<code>do.call(rbind, dfs)</code>&nbsp;generates the call&nbsp;<code>rbind(dfs[[1]], rbind[[2]], &#8230;, rbind[[5]])</code>&nbsp;for you:</p><pre><code><code>do.call(rbind, dfs)
#&gt;   x
#&gt; 1 1
#&gt; 2 2
#&gt; 3 3
#&gt; 4 4
#&gt; 5 5</code></code></pre><p><code>do.call()</code>&nbsp;is an effective, if advanced, technique but it gets a little tricky if you want to supply additional arguments. For example, historically, it used to be important to set&nbsp;<code>stringsAsFactors = FALSE</code>&nbsp;which requires gymnastics like this:</p><pre><code><code>do.call(rbind, c(dfs, list(stringsAsFactors = FALSE)))</code></code></pre><p>This was one of the challenges I wanted to tackle in dplyr, so I came up with&nbsp;<code>bind_rows()</code>&nbsp;which tries to automatically figure out if you have a list of data frames or you&#8217;re supplying them individually:</p><pre><code><code>library(dplyr, warn.conflicts = FALSE)

bind_rows(df1, df2)
#&gt;   x
#&gt; 1 1
#&gt; 2 2

bind_rows(dfs)
#&gt;   x
#&gt; 1 1
#&gt; 2 2
#&gt; 3 3
#&gt; 4 4
#&gt; 5 5</code></code></pre><p>Unfortunately the heuristic we used to decide whether we were in the first case or the second case grew progressively more complicated over time, as people found problems or asked for new functionality. Now, while&nbsp;<code>bind_rows()</code>&nbsp;works correctly 99% of the time, it has some weird special cases, like below where the inputs can become columns, rather than rows.</p><pre><code><code>bind_rows(x = 1, y = 2)
#&gt; # A tibble: 1 &#215; 2
#&gt;       x     y
#&gt;   &lt;dbl&gt; &lt;dbl&gt;
#&gt; 1     1     2</code></code></pre><p>These problems soured us on the idea of &#8220;automatic&#8221; splicing so we started looking for other solutions:</p><ul><li><p>We could have a pair of functions, one that takes&nbsp;<code>&#8230;</code>&nbsp;and one that takes a list. This works for&nbsp;<code>bind_rows()</code>&nbsp;it turns out there are a lot of functions that take&nbsp;<code>&#8230;</code>&nbsp;where it would be nice to also take a list of objects so it lead to a substantial amount of duplication.</p></li><li><p>We could have a pair of arguments,&nbsp;<code>&#8230;</code>&nbsp;<code>.dots,</code>&nbsp;where you can supply individual arguments to&nbsp;<code>&#8230;</code>&nbsp;or a list of arguments to&nbsp;<code>.dots</code>. (I think I first recall seeing this approach in the RCurl package by Duncan Temple Lang.) But this would requires adding an additional argument to every function that uses&nbsp;<code>&#8230;</code>, and wouldn&#8217;t it be nice if we didn&#8217;t have to do that?</p></li></ul><p>Instead we found inspiration from tidy evaluation where we had recently solved a similar problem with&nbsp;<code>!!!</code>:</p><pre><code><code>library(rlang)

args &lt;- exprs(a, b, c + d)
expr(f(!!!args))
#&gt; f(a, b, c + d)</code></code></pre><p>So we introduced the idea of &#8220;dynamic dots&#8221;, an extension to&nbsp;<code>&#8230;</code>&nbsp;that incorporates some features we thought we useful from tidy evaluation: splicing with&nbsp;<code>!!!</code>&nbsp;and dynamic names with&nbsp;<code>:=</code>. Dynamic dots is implemented via&nbsp;<code>rlang::list2()</code>&nbsp;and it&#8217;s easy to use in your own functions if you find the idea appealing.</p><p>One place you can see this idea in use is&nbsp;<code>forcats::fct_cross()</code>, which creates a factor that contains all combinations of its inputs:</p><pre><code><code>library(forcats)

fruit &lt;- factor(c("apple", "kiwi", "apple", "apple"))
colour &lt;- factor(c("green", "green", "red", "green"))
fct_cross(fruit, colour)
#&gt; [1] apple:green kiwi:green  apple:red   apple:green
#&gt; Levels: apple:green kiwi:green apple:red</code></code></pre><p>Because&nbsp;<code>fct_cross()</code>&nbsp;uses dynamic dots (which you can find out by looking at the dots), if you happen to have a list of values, you can use&nbsp;<code>!!!</code>&nbsp;to splice them in:</p><pre><code><code>x &lt;- list(fruit = fruit, colour = colour)
fct_cross(!!!x)
#&gt; [1] apple:green kiwi:green  apple:red   apple:green
#&gt; Levels: apple:green kiwi:green apple:red</code></code></pre><p>(<code>fct_cross()</code>&nbsp;does a similar job to&nbsp;<code>interaction()</code>, which interestingly takes the automatic approach, so you can just call&nbsp;<code>interaction(x)</code>&nbsp;here. I don&#8217;t love the approach it takes because if&nbsp;<code>interaction(list(f1, f2))</code>&nbsp;works, you might expect&nbsp;<code>interaction(list(f1, f2), f3)</code>&nbsp;to work, but it does not, and it doesn&#8217;t give you a particularly useful error message).</p><p>We have yet to figure out a way to use dynamic dots in&nbsp;<code>dplyr::bind_rows()</code>&nbsp;without breaking existing usage, but it&#8217;s provided by the function that now does most of the work:&nbsp;<code>vctrs::vec_rbind()</code>. (vctrs is the package where we stick low-level operations on vectors and data frames that we use in multiple packages. It&#8217;s designed to be programmer-friendly rather than analyst-friendly so we don&#8217;t talk about it that much).</p><pre><code><code>vctrs::vec_rbind(!!!dfs)
#&gt;   x
#&gt; 1 1
#&gt; 2 2
#&gt; 3 3
#&gt; 4 4
#&gt; 5 5</code></code></pre><p>Because binding lists of data frames together is such a common operation we also provide&nbsp;<code>purrr::list_rbind()</code>&nbsp;and&nbsp;<code>purrr::list_cbind()</code>. If you look you&#8217;ll see their implementations are very simple!</p><p>Overall, I have mixed feelings about&nbsp;<code>!!!</code>. I love the elegance of it: it makes it easy to splices lists into&nbsp;<code>&#8230;</code>&nbsp;and it has a beautiful connection to tidy evaluation. But I worry it feels like magic to most R users and because it&#8217;s only supported by some functions, it&#8217;s not super clear how you know when you can use it, and you still also have to learn&nbsp;<code>do.call</code>&nbsp;or similar. And, at least for&nbsp;<code>bind_rows()</code>, we&#8217;ve still ended up with two functions!</p><p>All that said,&nbsp;<code>!!!</code>&nbsp;still feels like the &#8220;least worst&#8221; solution to me, although looking back I wonder if we might have been better off using the more explicit&nbsp;<code>.dots</code>&nbsp;argument. What do you think? Had you heard of&nbsp;<code>!!!</code>&nbsp;before reading this post? Have you ever used it to successfully solve a problem? Do you prefer&nbsp;<code>do.call()</code>&nbsp;or are their other approaches used by other packages that you think are better?</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://substack.hadley.nz/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 Tidy design principles! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Reducing clutter with an options object]]></title><description><![CDATA[New this week is a new chapter on reducing argument clutter by adding an options object. Sometimes you have a set of &#8220;second class&#8221; arguments that you don&#8217;t expect people to use very commonly, so you don&#8217;t want them cluttering up the function specification. If you want to give the user the ability to control them when needed, you can lump them all together into an &#8220;options&#8221; object.]]></description><link>https://substack.hadley.nz/p/reducing-clutter-with-an-options</link><guid isPermaLink="false">https://substack.hadley.nz/p/reducing-clutter-with-an-options</guid><dc:creator><![CDATA[Hadley Wickham]]></dc:creator><pubDate>Fri, 04 Aug 2023 16:03:32 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!UJTX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73942709-1a43-4726-9022-22f38f116ac8_1024x1024.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_!UJTX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73942709-1a43-4726-9022-22f38f116ac8_1024x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!UJTX!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73942709-1a43-4726-9022-22f38f116ac8_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!UJTX!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73942709-1a43-4726-9022-22f38f116ac8_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!UJTX!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73942709-1a43-4726-9022-22f38f116ac8_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!UJTX!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73942709-1a43-4726-9022-22f38f116ac8_1024x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!UJTX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73942709-1a43-4726-9022-22f38f116ac8_1024x1024.png" width="324" height="324" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/73942709-1a43-4726-9022-22f38f116ac8_1024x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&quot;resizeWidth&quot;:324,&quot;bytes&quot;:1599038,&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_!UJTX!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73942709-1a43-4726-9022-22f38f116ac8_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!UJTX!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73942709-1a43-4726-9022-22f38f116ac8_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!UJTX!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73942709-1a43-4726-9022-22f38f116ac8_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!UJTX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73942709-1a43-4726-9022-22f38f116ac8_1024x1024.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">DALL&#8226;E: A painting of vacuum cleaner sucking up clutter from a room.</figcaption></figure></div><p>New this week is a new chapter on&nbsp;<a href="https://design.tidyverse.org/argument-clutter.html">reducing argument clutter by adding an options object</a>. Sometimes you have a set of &#8220;second class&#8221; arguments that you don&#8217;t expect people to use very commonly, so you don&#8217;t want them cluttering up the function specification. If you want to give the user the ability to control them when needed, you can lump them all together into an &#8220;options&#8221; object.</p><p>These are used in base R modelling functions (e.g.&nbsp;<code>glm()</code>,&nbsp;<code>loess()</code>) to control the details of the underlying numerical algorithm. For example, take this model from the glm docs:</p><pre><code><code>data(anorexia, package = "MASS")

mod &lt;- glm(
  Postwt ~ Prewt + Treat + offset(Prewt),
  family = gaussian,
  data = anorexia
)</code></code></pre><p>If you want to understand how model convergence is going you can set the&nbsp;<code>trace = TRUE</code>&nbsp;in&nbsp;<code>glm.control()</code>:</p><pre><code><code>mod &lt;- glm(
  Postwt ~ Prewt + Treat + offset(Prewt),
  family = gaussian,
  data = anorexia,
  control = glm.control(trace = TRUE)
)
#&gt; Deviance = 3311.263 Iterations - 1
#&gt; Deviance = 3311.263 Iterations - 2
#&gt; Deviance = 4525.386 Iterations - 1
#&gt; Deviance = 4525.386 Iterations - 2</code></code></pre><p>99% of the time you don&#8217;t need to know these arguments exist, but they are available if you ever need to debug a convergence failure.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://substack.hadley.nz/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://substack.hadley.nz/subscribe?"><span>Subscribe now</span></a></p><p>You can see the same pattern in&nbsp;<code>readr::locale()</code>&nbsp;and&nbsp;<code>readr::date_names()</code>. When parsing dates, you often need to know the names of the month, and that obviously varies by location.&nbsp;<code>locale()</code>&nbsp;allows you to set&nbsp;<code>date_names</code>&nbsp;to a two-letter country code to use common locations that baked in readr, but what happens if you want to parse dates from an unsupported language?</p><p>For example, take Austrian which came up in a&nbsp;<a href="https://github.com/tidyverse/readr/issues/1467">recent readr issue</a>. Austrian month names are mostly the same as German but use J&#228;nner instead of Januar and Feber instead of Februar. We can parse Austrian date times by first taking the German date names structure and modifying it:</p><pre><code><code>library(readr)

au &lt;- readr::date_names_lang("de")
au$mon[1:2] &lt;- c("J&#228;nner", "Feber")
au
#&gt; &lt;date_names&gt;
#&gt; Days:   Sonntag (So.), Montag (Mo.), Dienstag (Di.), Mittwoch (Mi.), Donnerstag
#&gt;         (Do.), Freitag (Fr.), Samstag (Sa.)
#&gt; Months: J&#228;nner (Jan.), Feber (Feb.), M&#228;rz (M&#228;rz), April (Apr.), Mai (Mai), Juni
#&gt;         (Juni), Juli (Juli), August (Aug.), September (Sep.), Oktober
#&gt;         (Okt.), November (Nov.), Dezember (Dez.)
#&gt; AM/PM:  vorm./nachm.</code></code></pre><p>Now we can pass this to object to&nbsp;<code>locale()</code>, and the locale object to a parsing function:</p><pre><code><code>parse_date("15. J&#228;nner 2015", "%d. %B %Y", locale = locale(date_names = au))
#&gt; [1] "2015-01-15"</code></code></pre><p>I like how this hierarchy of option arguments buries something that you rarely need but still makes it accessible.</p><p>Where else have you seen this pattern? Have you written functions where it would be useful? Are there places in the tidyverse that you think should use this pattern but don&#8217;t? Please let me know in the comments!</p><div><hr></div><p>Thanks to everyone who contributed in the comments last week! The results aren&#8217;t ready to read yet, but have really helped my thinking for two new chapters &#8220;make strategies explicit&#8221; and &#8220;argument meaning should be independent&#8221;.</p>]]></content:encoded></item><item><title><![CDATA[About Tidy design principles]]></title><description><![CDATA[And one example of a principle: function definitions should be scannable.]]></description><link>https://substack.hadley.nz/p/about-tidy-design-principles</link><guid isPermaLink="false">https://substack.hadley.nz/p/about-tidy-design-principles</guid><dc:creator><![CDATA[Hadley Wickham]]></dc:creator><pubDate>Fri, 28 Jul 2023 13:56:40 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!bSJA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bfce23c-23e4-4e24-98d7-fda1c3c8d644_1024x1024.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_!bSJA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bfce23c-23e4-4e24-98d7-fda1c3c8d644_1024x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bSJA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bfce23c-23e4-4e24-98d7-fda1c3c8d644_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!bSJA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bfce23c-23e4-4e24-98d7-fda1c3c8d644_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!bSJA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bfce23c-23e4-4e24-98d7-fda1c3c8d644_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!bSJA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bfce23c-23e4-4e24-98d7-fda1c3c8d644_1024x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bSJA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bfce23c-23e4-4e24-98d7-fda1c3c8d644_1024x1024.png" width="342" height="342" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1bfce23c-23e4-4e24-98d7-fda1c3c8d644_1024x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&quot;resizeWidth&quot;:342,&quot;bytes&quot;:1553970,&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_!bSJA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bfce23c-23e4-4e24-98d7-fda1c3c8d644_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!bSJA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bfce23c-23e4-4e24-98d7-fda1c3c8d644_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!bSJA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bfce23c-23e4-4e24-98d7-fda1c3c8d644_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!bSJA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bfce23c-23e4-4e24-98d7-fda1c3c8d644_1024x1024.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">DALL&#8226;E: a painting of a robot with a magnifying glass</figcaption></figure></div><p>The goal of this newsletter is to get feedback as I work on a new book called "Tidy design principles". But what's the point of that book? R has a very rich literature on statistics and data science, there are relatively few books that focus on programming. I've written a couple (<a href="https://adv-r.hadley.nz/">Advanced R</a>&nbsp;and&nbsp;<a href="https://r-pkgs.org/">R Packages</a>) but neither really talks about how to write good code R code (or even discusses what good code means).</p><p>That's what I want to focus on in "<a href="https://design.tidyverse.org/">Tidy design principles</a>": how do you write high-quality R code that's easy to understand, unlikely to fail in unexpected ways, and flexible enough to grow with your needs. This book will be organised around the idea of "design patterns". This was an idea that I encountered early in my programming journey and I found it very impactful.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://substack.hadley.nz/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 tidy design principles! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>The idea of a design pattern is to come up with a catchy name that maps a common programming challenge to an effective solution. The catchy name is important because it serves as a handle for your memory and a convenient shorthand when discussing code with others. I first heard about design patterns when I was a CS undergrad learning Java (a much less flexible language than R) and I read the popular read&nbsp;<a href="https://en.wikipedia.org/wiki/Design_Patterns">Design Patterns: Elements of Reusable Object-Oriented Software</a>&nbsp;book.</p><p>I later learned that the idea of design patterns originated not from computer science, but from architecture, particularly&nbsp;<a href="https://en.wikipedia.org/wiki/A_Pattern_Language">A Pattern Language: Towns, Buildings, Construction</a>&nbsp;by Christopher Alexander. This book resonated with me even more strongly than the CS patterns, and if you have any interest in architecture, I highly recommend reading it. I particularly liked that the patterns spanned many levels of detail, all the way from organising entire communities to how you might select chairs for a single room.</p><p>That's the spirit in which I write "Tidy design principles". I want to name common problem solving patterns in R, and write them up so that others can easily use them. That means that this book will have rather a different structure to my previous books. It will have a large number of relatively short chapters, each of which describes a pattern: what it is, why it's important, where you can see it in the wild, and how you can apply it to your code. You might skim the whole book once, but you'll generally use it by referring to the patterns that apply specifically to your current problem.</p><p>I also want to include some bigger principles that help you weigh conflicting patterns as well as case studies that illuminate some of our thinking when we've designed various parts of tidyverse (particularly parts that we now regret).</p><div><hr></div><p>This week I've identified one bigger principle: the definition of a function should be scannable, giving you useful information at a glance. This principle is important because you see the function definition in lots of places, like in autocomplete and at the top of the documentation. It's super useful if that glance can give you useful insight into the function.</p><p>So far, I've gathered six patterns related to this principle:</p><ul><li><p>You should be able to tell what affects the output of the function because&nbsp;<a href="https://design.tidyverse.org/inputs-explicit.html">all inputs are explicit arguments</a>.</p></li><li><p>You know which arguments are most important because&nbsp;<a href="https://design.tidyverse.org/important-args-first.html">they come first</a>.</p></li><li><p>You can tell if an argument is required or optional based on the&nbsp;<a href="https://design.tidyverse.org/required-no-defaults.html">the presence or absence of a default</a>&nbsp;and whether it&nbsp;<a href="https://design.tidyverse.org/dots-after-required.html">comes before or after&nbsp;</a><code>&#8230;</code>.</p></li><li><p>You can easily figure out the defaults because&nbsp;<a href="https://design.tidyverse.org/defaults-short-and-sweet.html">they are short and sweet</a>.</p></li><li><p>And if an argument has a small set of valid inputs, they are&nbsp;<a href="https://design.tidyverse.org/enumerate-options.html">explicitly enumerated in the default</a>.</p></li></ul><p>What do you think of this principle and the various patterns that make it up? Does it resonate with you? Do you think I&#8217;ve missed something important?</p><p>One other pattern I've been noodling on is the idea that one argument shouldn't affect the meaning of another argument. This seems like an important principle, but so far I've only been able to come up with one example:&nbsp;<code>library()</code>, where the&nbsp;<code>character.only</code>&nbsp;argument affects the meaning of the&nbsp;<code>package</code>&nbsp;argument:</p><pre><code><code>ggplot2 &lt;- "dplyr"

# Loads ggplot2
library(ggplot2)

# Loads dplyr
library(ggplot2, character.only = TRUE)</code></code></pre><p>Given that I only have one example, it doesn't seem worthwhile to write it up as a pattern, but maybe you've encountered other examples of this problem. If so, please let me know in the comments!</p>]]></content:encoded></item><item><title><![CDATA[Argument ordering]]></title><description><![CDATA[Bringing tidy design principles back to life and thinking about argument order]]></description><link>https://substack.hadley.nz/p/argument-ordering</link><guid isPermaLink="false">https://substack.hadley.nz/p/argument-ordering</guid><dc:creator><![CDATA[Hadley Wickham]]></dc:creator><pubDate>Fri, 21 Jul 2023 15:58:34 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!rLID!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c330a08-7e75-42f6-be34-f9227f7693cb_1024x1024.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_!rLID!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c330a08-7e75-42f6-be34-f9227f7693cb_1024x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rLID!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c330a08-7e75-42f6-be34-f9227f7693cb_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!rLID!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c330a08-7e75-42f6-be34-f9227f7693cb_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!rLID!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c330a08-7e75-42f6-be34-f9227f7693cb_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!rLID!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c330a08-7e75-42f6-be34-f9227f7693cb_1024x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!rLID!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c330a08-7e75-42f6-be34-f9227f7693cb_1024x1024.png" width="342" height="342" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8c330a08-7e75-42f6-be34-f9227f7693cb_1024x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&quot;resizeWidth&quot;:342,&quot;bytes&quot;:1633122,&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_!rLID!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c330a08-7e75-42f6-be34-f9227f7693cb_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!rLID!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c330a08-7e75-42f6-be34-f9227f7693cb_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!rLID!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c330a08-7e75-42f6-be34-f9227f7693cb_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!rLID!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c330a08-7e75-42f6-be34-f9227f7693cb_1024x1024.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">DALL&#8226;E: a painting of a robot moving cans</figcaption></figure></div><p>This week I&#8217;ve focussed on bringing <a href="https://design.tidyverse.org">the tidy design principles website</a> back to life. Jenny Bryan and I started on this book all the way back in 2018, and there have obviously been some quite a few technology changes in the meantime. (Un)fortunately I have quite a bit of experience converting bookdown books to <a href="https://quarto.org">Quarto</a> and tools like <code>knitr::convert_chunk_header()</code> do much of the heavy lifting, so overall it was just a couple of hours of work. But it&#8217;s highly likely I missed some stuff in the translation, so please let me know if you see anything that looks odd.</p><p>I also managed to get some thoughts in place about how you might think about ordering function arguments. I think both patterns are fairly obvious (please let me know if you think otherwise!) but worth writing down.</p><p>The first principle is that you should put the <a href="https://design.tidyverse.org/args-data-details.html">most important arguments first</a>. Of course, this raises the question of what makes an argument important? It&#8217;s hard for me to make this concrete (so I hope you&#8217;ll send me your thoughts too), but there are three clear cases:</p><ul><li><p>If a function transforms some existing object, that object is most important and should be the first argument.</p></li><li><p>Other arguments that affect the &#8220;shape&#8221; of the output (either the size or the type) are usually very important and should be near the front.</p></li><li><p>Optional arguments are clearly least important and should be at the end.</p></li></ul><p>Do you think there are tidyverse functions that break this rule? Please let me know so I can include them as examples!</p><p>The second principle is that if you use &#8230;, it should be <a href="https://design.tidyverse.org/dots-position.html">placed between the required and optional arguments</a>. This is important because of the way that argument matching works in R: you can supply arguments by position (like mean(x)), by full name (like mean(na.rm = TRUE)), or by part of the name (like mean(na = TRUE)). Placing arguments after &#8230; means that you can only supply them by their full name; not only does this force users into a clearer style, it also makes it easier for you to change the order of arguments in the future (e.g. to move important arguments earlier, as above).</p><p>The goal of writing this newsletter is to get your thoughts. So please let me know if you think these patterns are useful or wrong or anything in between!</p><p>&#8212; Hadley</p>]]></content:encoded></item><item><title><![CDATA[Coming soon]]></title><description><![CDATA[This is my substack where I plan to regular post about progress on my current book project, tidy design principles. The goal of this book is to write up what the tidyverse team and I know about designing and implementing quality R code. It&#8217;s roughly aimed at someone who&#8217;s comfortable doing data science in R (e.g. someone who&#8217;s read]]></description><link>https://substack.hadley.nz/p/coming-soon</link><guid isPermaLink="false">https://substack.hadley.nz/p/coming-soon</guid><dc:creator><![CDATA[Hadley Wickham]]></dc:creator><pubDate>Fri, 21 Jul 2023 14:09:34 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!d3td!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95245820-8aa0-4668-8543-b376e5143aef_1024x1024.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_!d3td!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95245820-8aa0-4668-8543-b376e5143aef_1024x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!d3td!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95245820-8aa0-4668-8543-b376e5143aef_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!d3td!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95245820-8aa0-4668-8543-b376e5143aef_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!d3td!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95245820-8aa0-4668-8543-b376e5143aef_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!d3td!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95245820-8aa0-4668-8543-b376e5143aef_1024x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!d3td!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95245820-8aa0-4668-8543-b376e5143aef_1024x1024.png" width="316" height="316" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/95245820-8aa0-4668-8543-b376e5143aef_1024x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&quot;resizeWidth&quot;:316,&quot;bytes&quot;:1584986,&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_!d3td!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95245820-8aa0-4668-8543-b376e5143aef_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!d3td!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95245820-8aa0-4668-8543-b376e5143aef_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!d3td!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95245820-8aa0-4668-8543-b376e5143aef_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!d3td!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95245820-8aa0-4668-8543-b376e5143aef_1024x1024.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">DALL&#8226;E: a painting of a robot looking into the future</figcaption></figure></div><p>This is my substack where I plan to regular post about progress on my current book project, <a href="https://design.tidyverse.org">tidy design principles</a>. The goal of this book is to write up what the tidyverse team and I know about designing and implementing quality R code. It&#8217;s roughly aimed at someone who&#8217;s comfortable doing data science in R (e.g. someone who&#8217;s read <a href="https://r4ds.hadley.nz">R for Data Science</a>) has been writing R functions (or even <a href="https://r-pkgs.org">packages</a>) for a while, and now wants to understand what makes for a &#8220;good&#8221; function (and maybe wonders what that even means). I also hope it will serve as a useful resource when <a href="https://code-review.tidyverse.org">reviewing code</a> since you&#8217;ll be able to link to a chapter that discusses a potential pain point without having to write it up yourself.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://substack.hadley.nz/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://substack.hadley.nz/subscribe?"><span>Subscribe now</span></a></p>]]></content:encoded></item></channel></rss>