<?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:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Haley Massa on Medium]]></title>
        <description><![CDATA[Stories by Haley Massa on Medium]]></description>
        <link>https://medium.com/@haleymassa?source=rss-9039756d1092------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*MjqiB_rZ038jg0V_FW1vhg.png</url>
            <title>Stories by Haley Massa on Medium</title>
            <link>https://medium.com/@haleymassa?source=rss-9039756d1092------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 04:39:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@haleymassa/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Tokens are Cheap, Turns are Not]]></title>
            <link>https://medium.com/attainable-ai/tokens-are-cheap-turns-are-not-df564a845a6d?source=rss-9039756d1092------2</link>
            <guid isPermaLink="false">https://medium.com/p/df564a845a6d</guid>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[plugins]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Haley Massa]]></dc:creator>
            <pubDate>Fri, 25 Sep 2026 01:36:21 GMT</pubDate>
            <atom:updated>2026-09-25T01:36:21.354Z</atom:updated>
            <content:encoded><![CDATA[<p>I feel like everyone has caught wind of the term <em>tokenomics</em> recently. From customer calls to consultants’ LinkedIn posts, people are becoming more and more aware of AI spend and looking for a better way to quantify it. You can’t price it for teams as a simple per-question price. Instead, we need to think about question complexity and model power. Teams are measuring that complexity by the tokens needed. Makes sense.</p><p>That’s led many cost-wary teams to start building their own token optimizers. Seeing the trend take off, I wanted to dig into one of these examples myself. A few weeks ago, Spotify published a blog post that bounced around Hacker News and Reddit about a Claude Code plugin claiming a 90% cut in tokens. So in this piece, I’m taking you with me as we rebuild it and look under the hood.</p><blockquote>TLDR; Spotify’s token cut is real. With their hook enforced, Claude read 87% fewer lines of big files. But the bill went up 19%, with no measurable change in accuracy. (With the plugin exactly as published, costs rose 8%, too small to separate from chance.) Blocking a read doesn’t remove the need for the information. Claude just takes more turns to get it, and every turn resends the whole conversation.</blockquote><h3>What Spotify Built, and Why</h3><p><strong>The why:</strong> The Spotify team noticed a trend in their Claude Code usage. A huge share of the tokens Claude Code used went toward tasks that didn’t need the frontier-level reasoning power of high-powered LLMs.</p><p>For their use case, Spotify works on a large monorepo. In that repo, most of their questions or work end up falling into:</p><ul><li><strong>Bulk file reads:</strong> loading 700-plus-line files into context just to check a pattern or answer a question about a fraction of it.</li><li><strong>Templated code generation:</strong> writing boilerplate, configs, or scaffolding, where the structure is already known.</li></ul><p>Spotify didn’t want to keep paying frontier prices to carry around the parts of a file nobody asked about.</p><p><strong>The what:</strong> To fix this, Spotify built a more deterministic workflow for these task types. It sends these requests to a smaller, cheaper model (the <em>worker</em>) to process and return the key insights to Claude as context. They chose Gemini 2.5 Flash as the worker: it takes the large file, reads it, and hands back the key context for Claude Code. They published it as a plugin called <em>shunt</em> in their <a href="https://github.com/spotify/portal-ai-plugins/tree/b5ed620c6850f1ea7327b7cd9d0696aae0bf2d89/plugins/shunt">portal-ai-plugins</a> repository.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pKfskW2kHm9WIkYE.png" /><figcaption>Generated by Claude Code. Representative of Spotify Shunt’s Two Delegation Paths</figcaption></figure><p>This is built with two Claude Code primitives working together:</p><ul><li><strong>Skills</strong> load instructions into context only when a task calls for them.</li><li><strong>Hooks</strong> are a checkpoint before a tool call, able to block or redirect it before the model ever sees the result.</li></ul><p>Spotify built two skills, bulk-reader and code-writer, that load when a request matches one of the two workflows above. They’re really just instructions for how to hand a task off to the cheaper model and what to do with what comes back. The hook is what’s supposed to force the choice: a PreToolUse hook checks the file Claude is about to read against a 350-line threshold. If it’s over, the hook blocks the read and points the model to bulk-reader instead. A skill only helps if the model opens it, and the hook is the enforcer that’s meant to make sure it does.</p><p>The assumption they’re making is that fewer tokens sent to the expensive model means a proportionally smaller bill. That equivalence (a token avoided is a dollar saved) is exactly what the rest of this post tests.</p><h3>Our Experiment</h3><p><em>Does cutting tokens actually cut cost? </em>That became the thesis of this evaluation. But as I started experimenting, I wanted a more holistic evaluation of the workflow the team built. I believe every AI workflow (predictive, generative, or agentic) should be judged on the same evaluation triangle: performance, latency, and cost.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zcNJ8iai6Wu55eRn.png" /><figcaption>Image generated by Claude Code. My favorite overused description of areas for evaluation: the triangle.</figcaption></figure><p>To get a fair read on all three, I reproduced Spotify’s setup as closely as an outsider reading a blog post can: their repo, their hook, their two workflows, run against the plain Claude Code baseline they’re implicitly comparing themselves to.</p><h3>Experiment Design</h3><p>Every task ran under three setups:</p><ul><li><strong>Stock:</strong> Claude Code with nothing added.</li><li><strong>As shipped:</strong> stock plus Spotify’s plugin, exactly as published. The published hook has an exception: it still lets Claude read a big file if it asks for a specific range of lines, so Claude can page around the block and read the whole file anyway.</li><li><strong>As described:</strong> the same plugin, but with that exception removed, so the hook blocks it the way Spotify’s post describes.</li></ul><p>Both hook setups use a one-turn call to Claude Haiku in place of Spotify’s hosted Gemini model, since I don’t have access to their internal system, only a Claude subscription ;).</p><p><strong>Why Kafka: </strong>Spotify’s code is private, so I needed a public repo that looks like theirs in the one way the hook cares about: lots of files over 350 lines, in a language their benchmark used. There’s a second, less obvious constraint. Stock Claude Code already refuses to read very large files on its own (anything over about 25,000 tokens gets paged), so the test files have to sit between Spotify’s 350-line threshold and Claude Code’s own limit, or the hook never gets a chance to fire.</p><p>Backstage, Spotify’s own open-source project, was the obvious first pick and lost: only 7.5% of its files clear 350 lines, holding 38% of its code. Apache Kafka has 17% of its files over that line, holding 64% of the code. So the test repo is Kafka, pinned to one commit, in Java and Scala.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gFmKE8aEQL6Rwfv9.png" /><figcaption>Table generated with stats from the experiment; Claude Code generated the format.</figcaption></figure><p>One honest limit: Kafka is a repo the model has seen in training, and Spotify’s code is not. So every session runs offline and sandboxed: no web tools, no network commands, no reading anything outside the checkout, a private empty /tmp folder per session, and a line in the system prompt telling the model to answer from the repository, not memory. That same constraint, Claude Code cut off from the internet, applied to every test.</p><p><strong>Why We Ran It Through Claude: </strong>One interesting thing I found in their code: Spotify’s own benchmark never sends a single request through Claude Code. It just compares the token count of the original file with the token count of Gemini’s summary.</p><p>To test the plugin more thoroughly, this eval runs real Claude Code sessions. Every task runs start to finish in one live, headless (no chat window) claude -p session per task per setup. That’s the real Claude Code model, on the real repo, making its own tool calls, hitting the real hook, and choosing its own next move after a block. That’s how we can see whether the model opens the skills, how it handles the block, what it loads into context, and what all of that costs.</p><p><strong>How it Ran: </strong>So now we have Kafka, and we know we want to run it through Claude. I’m not going to sit and type prompts into my Claude Code window 189 times. Nothing here is interactive: a script starts Claude Code in headless mode with the same files, constraints, and setup for every task.</p><p>This is the actual command, the same for all three setups:</p><blockquote><em>CLAUDE_CODE_ENABLE_TELEMETRY=1 \ OTEL_EXPORTER_OTLP_ENDPOINT=http://127.0.0.1:4318 \ CLAUDE_CODE_PROMPT_CACHE_TTL=5m CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL=5m \ unshare -m bash -c &#39;mount -t tmpfs none /tmp &amp;&amp; exec &quot;$@&quot;&#39; _ \ claude -p &quot;$PROMPT&quot; \ --model claude-sonnet-5 \ --permission-mode acceptEdits \ --settings &quot;$HARNESS/settings.json&quot; \ --append-system-prompt &quot;Answer from the repository checked out in the \ working directory. Do not rely on memory of the upstream project or on \ the internet.&quot; \ --max-turns 40 \ --output-format json</em></blockquote><p>The cache setting at the top makes sure every setup pays the same rate to store a file in the prompt cache (more on caching below), so Claude Code can’t quietly switch billing tiers mid-run and skew the comparison.</p><ul><li>--model: every setup runs on the same baseline Sonnet model.</li><li>--settings: loads the offline sandbox.</li><li>unshare: gives each session its own empty/tmp, so nothing it writes can be found by a later run.</li></ul><p>When a run finishes, the harness collects the cost, token usage, full transcript, and OpenTelemetry trace (a step-by-step log of every request), checks what changed in the repo, grades the answer, and deletes the workspace. The next run starts clean.</p><h3>Evaluation Design</h3><p><strong>Why These Tasks: </strong>As a non-Kafka expert, I’ll admit I cheated and used Claude to help think through which synthetic tasks would make the most sense. I focused on five categories that cover what Spotify named as workflows and future ideas in their blog, with 3–5 tasks each for a small but early sample:</p><ul><li><strong>Spotify’s own benchmark (4 tasks).</strong> Their four tasks, rebuilt on Kafka with the same shapes and file sizes, so the comparison is theirs first.</li><li><strong>Needle reads (4 tasks).</strong> One fact buried in a file of 1,000 to 1,900 lines. This is the exact case Spotify’s post describes (read 700 lines to check one thing), and the case their benchmark never tests.</li><li><strong>Their shapes at real file sizes (5 tasks).</strong> The same kinds of questions as their four, but on files big enough to actually trip the 350-line threshold, which two of theirs never do.</li><li><strong>Harm (5 tasks).</strong> Precise edits and debugging are the two task types Spotify’s own post says the approach isn’t for. The hook only sees a line count, so it fires on these anyway. I wanted to know if that costs anything.</li><li><strong>Controls (3 tasks).</strong> The same shapes on small files, to measure what the plugin costs just by being installed. (On one of them, Claude went looking in a neighboring 700-line file, so the hook fired there too.)</li></ul><p>I ran every task three times, interleaved by setup so time of day never lines up with one setup by coincidence: 189 sessions, about $25 at list price.</p><p><strong>Why These Metrics: </strong>Spotify’s own evaluation used one metric: tokens avoided. I kept it to check their findings against mine, and added the rest of the evaluation triangle, plus one more:</p><ul><li><strong>Performance:</strong> Did the task actually get done? A cheaper answer isn’t great if it’s missing the point. Measured by whether the answer was correct and whether Claude found the right file.</li><li><strong>Cost:</strong> What each Claude Code session actually cost, broken down per turn.</li><li><strong>Latency:</strong> For agents, this usually tracks cost closely, but I was curious what it feels like for the person waiting. Measured by wall-clock time, turns per run, and time per turn.</li><li><strong>Behavior:</strong> What the model did right after a block. Did it call the worker, run a search, or try reading part of the file?</li></ul><p>Behavior earned its spot after my first run, when I realized the published hook wasn’t really blocking. That’s why the third setup exists.</p><h3>Some Things Worth Remembering Before the Results</h3><p>Tokens you already know. Two other mechanics matter for what’s coming.</p><ul><li><strong>No memory between turns.</strong> The model itself remembers nothing between turns. Not here, not in ChatGPT, not anywhere. Every time Claude Code asks it something, it resends the entire conversation so far: every earlier message, every file it’s read, every tool result. A session feels continuous because Claude Code rebuilds and resends everything each turn, not because the model remembers.</li><li><strong>Prompt caching.</strong> A discount, not a memory. If you sent the same content to the model in the last few minutes, sending it again costs a tenth of the normal price. It changes what resending costs. It doesn’t stop the resending.</li></ul><p>We’ll touch on them as we jump into the numbers. But they’re important concepts to keep in mind when thinking about Claude’s performance.</p><h3>Drumroll… Our Results</h3><h3>The Headline Numbers</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9gBiVpl_py63eDZU.png" /><figcaption>Figure Generated by Claude Code</figcaption></figure><p>Here’s how the three setups compare on the evaluation triangle, averaged across all 21 tasks:</p><ul><li><strong>Performance</strong> didn’t change in any way I could measure: 100% of stock runs passed, 98% as shipped, and 97% as described. That’s three failures out of 189, too few to say the hook hurt accuracy.</li><li><strong>Cost</strong> went up. With the hook enforced, a run cost 19% more on average (14.4¢ versus 12.1¢). Comparing each task to itself, the increase was likely somewhere between 7% and 39%, so it’s not a fluke. As shipped, cost rose 8%, but that’s within what chance alone produces here: on tasks where the hook never fired, costs still moved anywhere from 37% lower to 13% higher between setups.</li><li><strong>Latency</strong> went up: 6.1 turns per run for stock (a turn is one request to the model), 7.7 as shipped, and 9.2 as described. Wall time went from 39 seconds to 51.</li><li><strong>Behavior</strong> is where the plan broke down. The enforced hook blocked a read 96 times, and the model opened Spotify’s skill next only 4 times. In 41, it searched with grep instead. In 33, it tried reading a smaller piece of the file, which it also blocked. In 12 it ran a shell command, and several of those used sed to print the same lines the hook had just refused.</li></ul><h3>Fewer Tokens Read, More Tokens Processed</h3><p>So how can the hook cut tokens and still cost more? It depends on which tokens you count. Spotify’s own formula only works when the worker gets called, which happened in 0 of 63 as-shipped runs and 5 of 63 as-described runs. So I counted three things I could measure on every run:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cCFrUQQ2x4PkpR7l.png" /><figcaption>Table Generated by Claude Code. Three ways to count what “90% fewer tokens” could mean, per run across the same 189 sessions.</figcaption></figure><ul><li><strong>Lines of the big file Claude read directly:</strong> down 87% with the hook enforced. This is roughly what Spotify measured with Gemini.</li><li><strong>Anything from the big file that reached the model,</strong> including search results: down 51%. Blocking a read doesn’t stop Claude from searching the same file.</li><li><strong>Total tokens the model processed,</strong> most of them the conversation being resent each turn: up 21% as shipped and 41% as described.</li></ul><p>The first two are what the hook controls. The third is what drives the bill, which rose 8% and 19%. The bill rose less than the token count because most of those extra tokens are cheap, cached resends.</p><h3>Why It Costs More</h3><p>Every turn resends the conversation, and the conversation grows every turn. Each resent token is cheap thanks to caching, but it adds up. Blocking a big read does save a little: about a cent per run less spent storing files in the cache. But every block adds turns. With the hook enforced, those extra turns cost about 1.6¢ more per run in resending, 0.6¢ more in new model output, and 0.3¢ for the worker. The savings from blocking were smaller than the cost of the extra turns.</p><p>Here’s what that looks like on one question: what a function called ready() returns, in a 1,500-line file.</p><ul><li><strong>Stock</strong> searched for the function, read the 35 lines it needed, and answered. That took about 4 turns and, on average, 5.1¢.</li><li><strong>As described,</strong> it searched twice, was blocked trying to read a 30-line piece, was blocked again on a 20-line piece, then searched again. That took about 6 turns and 6.8¢, 34% more for the same answer.</li></ul><p>Stock was already reading just the part it needed. The hook couldn’t make that cheaper. It could only add turns.</p><p>The same thing happens when the answer needs most of a big file. For one question (how the broker lifecycle manager moves between states, answered from a 770-line file), stock read the file and answered in about 4 turns. The hook setups took about 9 to 10 turns and cost about 45% more. Figure D breaks down one run of each by where the money went.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Nh3xeLlvJqXSuvhg.png" /><figcaption>Generated by Claude Code. Looking at the OTel tracing</figcaption></figure><h3>Which Tasks Got Cheaper</h3><p>The hook fired on 16 of the 21 tasks. Whether it saved money came down to one thing: what stock would have done anyway.</p><ul><li><strong>Stock read a whole big file but only needed part of it:</strong> the hook saved 7% to 18% (four tasks). For example, to find which methods lack tests, stock read two whole files (1,412 lines). With the hook, a search did the same job.</li><li><strong>Stock already read just a small piece:</strong> the hook cost 17% to 52% more (six tasks, including the ready() example). The enforced hook blocks any read of a big file, even a 20-line one, so it could only add turns.</li><li><strong>The answer needed most of the file:</strong> the hook cost 42% to 86% more (four tasks, such as listing every config key in a file). The content has to come in one way or another, and the block just adds turns.</li></ul><p>The other two tasks where it fired were a control, where Claude wandered into a big neighboring file, and one of Spotify’s tasks, where a single run went off and cost 46¢ on its own.</p><p>Of Spotify’s own four benchmark tasks, one is the whole-file kind, and two never tripped the hook at all. A line-count threshold can’t see any of this. It knows the file is big, but not whether Claude needs one line of it or all of it, or whether Claude was about to read the whole thing in the first place.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2SAgfKJihe_jCMaC.png" /><figcaption>Generated with Claude Code. Hook cost relative to stock, by category, averaged per task. Spotify’s own four is pulled up by one run that started a background subagent and cost 46¢ on its own.</figcaption></figure><h3>Overall…</h3><h3>Letting Claude Be Claude</h3><p>This wasn’t a crazy idea, and knocking Spotify isn’t the point of this piece. Token spend is one of the most talked-about problems in AI right now. Spotify actually did the work of building in public and sharing, which is the only reason a hobby blogger like me could rebuild it.</p><p>What’s changed is the platform around it. The savings shunt was built to force them to start showing up on their own, in three places:</p><ul><li><strong>In the tokens.</strong> Prompt caching makes resending content you’ve already sent cost a tenth as much.</li><li><strong>In the context window.</strong> Claude Code no longer has to load every tool definition up front. With tool search, MCP tool definitions stay out of context until a task needs them, and Claude loads only those (<a href="https://code.claude.com/docs/en/agent-sdk/tool-search">docs</a>, <a href="https://www.anthropic.com/engineering/advanced-tool-use">Anthropic</a>).</li><li><strong>In the harness.</strong> In my stock runs, with no hook and no instructions, Claude already searched instead of reading whole files on most needle-in-a-haystack tasks.</li></ul><p>Boris Cherny, who leads Claude Code at Anthropic, said something similar at YC Startup School, in a conversation with YC’s Diana Hu: “Every six months, delete your claude.md, delete your skills, delete your hooks, see what the model does, and it might surprise you.” In the same talk, he said his team deleted over 80% of Claude Code’s own system prompt for Opus 5 (<a href="https://www.barath.ai/learnings/boris-cherny-yc-startup-school-2026">write-up</a>, <a href="https://sozai.app/transcript/boris-cherny-cut-80-percent-claude-code-prompt/">transcript</a>). I take a company’s claims about its own product with a grain of salt, but it matches what I saw in my stock runs.</p><p>That’s what I mean by “let Claude be Claude.” It doesn’t mean stop building. Spotify was right to test this. But every optimization is a bet on today’s model, and you need to recheck the bet whenever the model or the harness changes. A hook that paid off on an older model might cost you on a newer one.</p><h3>Claude Plugin Evals</h3><p>Speaking of letting Claude be Claude: while this sat in my drafts for a month, Anthropic beat me to it. In September, it releasedclaude plugin eval, which runs your plugin against a set of test cases, scores each result, and by default runs every case again without the plugin so you can see what the plugin adds. claude plugin eval init will even ask what a good result looks like and draft the test cases for you. The summary shows each case’s score with and without the plugin, the difference, and the cost.</p><p>That’s the same basic comparison this piece makes: plugin versus no plugin, same tasks, cost included. The difference is depth. Plugin eval tells you whether a plugin helped and what it cost. This eval went a level deeper, turn by turn, to see why. For most teams, plugin eval is the right place to start. If the cost column surprises you, that’s when it’s worth digging into the traces.</p><p>And because it’s built in, you can rerun it every time a new model ships. Everyone’s watching tokens right now, but turns are what drive the bill.</p><p>The full write-up, with the deviations table, the metrics as equations, the validation checklist, and all 189 runs, is at <a href="https://github.com/hmassa14/TurnsNotTokens">github.com/hmassa14/TurnsNotTokens</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df564a845a6d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/attainable-ai/tokens-are-cheap-turns-are-not-df564a845a6d">Tokens are Cheap, Turns are Not</a> was originally published in <a href="https://medium.com/attainable-ai">Attainable AI Newsletter</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Computer and The Control Tower]]></title>
            <link>https://medium.com/attainable-ai/the-computer-and-the-control-tower-0f29aa8b767c?source=rss-9039756d1092------2</link>
            <guid isPermaLink="false">https://medium.com/p/0f29aa8b767c</guid>
            <dc:creator><![CDATA[Haley Massa]]></dc:creator>
            <pubDate>Mon, 27 Jul 2026 02:20:14 GMT</pubDate>
            <atom:updated>2026-07-27T02:45:07.523Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve been deep in the cookbooks and agent-building guides from both OpenAI and Anthropic lately, and kept coming back to the same thing. These two seemed to make different early bets about how much of a computer to hand a model … and they’ve ended up in nearly the same place.</p><p>That’s the part I wanted to bring you along on. Not that they converged, but why they were ever that far apart, and what’s left of those original bets now that the frameworks look alike.</p><h3>2026 Agent Thesis</h3><p>By mid-2026, both major model providers ship an “Agent SDK” (or agent development framework) that packages the same three pillars for agent development:</p><ol><li>A <strong>harness</strong> — the loop around the model and its actions</li><li><strong>Code and sandbox execution</strong> — where the model’s actions actually run</li><li><strong>Memory</strong> — what continues across turns and runs</li></ol><p>While we’ll see that there are many similarities in approaches, I found some of the most interesting aspects in understanding not only the differences, but why they exist. It’s my idea that some of the foundational bets these companies made on their journey from research and model provider shops to implementation and enterprise AI platforms helped shape their brand identities as their paths converge:</p><ul><li>Anthropic bet on giving the model a computer early — a terminal, a real file system, the tools an engineer already uses.</li><li>OpenAI bet on keeping the loop and the machine apart, allowing organizations a non-lock-in approach while ensuring strict controls over allowed actions.</li></ul><p>These start to emulate the brand identities these companies are developing for themselves. Anthropic sells you an (ideally fully autonomous) coworker, humanly named Claude, who already has a laptop. Until recently, OpenAI has focused on selling a control tower.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*y8gbStNNDfyW-G5k.png" /><figcaption>Claude Generated via prompt. The three key components for 2026 Coding Agents.</figcaption></figure><p>Now, let’s explore what this journey looked like with agents, before breaking down each pillar.</p><h3>Journey of Agent Development</h3><p>Neither company arrived in April 2026 from a blank page, and the shape of each journey is part of why each company could be seen as “ahead of” or “behind” in different pillars.</p><h3>The OpenAI Journey</h3><p>An early winner in the space, with “chat” or “XYZ GPT” at one point close to becoming a brand identity for general chatbots, like Kleenex for tissues. As common LLM usage moved beyond traditional chatbots, OpenAI took a more unopinionated approach to tooling. Their <a href="https://openai.com/index/new-tools-for-building-agents/">Swarm project</a> described pure orchestration — handoffs between lightweight agents, no opinion about what any one agent’s tools should look like. Their Agents SDK and published <a href="https://openai.com/business/guides-and-resources/a-practical-guide-to-building-ai-agents/">A </a><em>Practical Guide to Building Agents</em> stuck with those core, separate, user-designed foundations. They described an unopinionated framework for building out any agent with three core components:</p><ul><li>Model</li><li>Tools</li><li>Instructions</li></ul><p>Notably, the harness never appears in that decomposition. Orchestration arrives later, as a chapter on patterns you assemble yourself. In their tools design, code was naturally something the model could always reach for and perform — but the Agents SDK kept it exactly there. Teams described specific coding tools and workflows the agent could accomplish. <a href="https://openai.com/index/introducing-codex/">Codex</a>, their coding assistant, behaved a bit differently, naturally placing the model into the full sandbox and file system of the code. That product was a model tuned to live in a larger default action space, reaching out to shell and filesystem by default rather than to code an engineer had explicitly enumerated.</p><p>As we’ll see throughout this, that’s no longer the case with their 2026 model-native release. We can now see OpenAI move from a purposely segmented, strictly specified action mindset into one of greater model autonomy.</p><h3>The Anthropic Journey</h3><p>Anthropic obviously started with their LLMs and Claude models, though competing more on the leaderboards than with individual consumers. Their real breakthrough moment, it seems, was likely Claude Code. Claude Code was an internal coding tool that grew into deep research, note-taking, and eventually the loop behind most of their own agents.</p><p>From this coding project and then product, they also created the Claude Code SDK — a wrapper for executing Claude Code. They found that internally they were using the systematic execution of Claude Code not only on coding-based tasks (like validating a PR), but also finding better performance on general agent tasks (like triaging support tickets). This led to the September 2025 renaming of the Claude Code SDK to the <a href="https://platform.claude.com/docs/en/agent-sdk/overview">Claude Agent SDK</a>.</p><p>The naming history tracks their whole product direction: every agent is a coding agent, and a capable model handed a real computer is what everything else builds on. It formed much of Anthropic’s current stance: “we own the harness, you own the data”.</p><h3>Pillar One: The Harness</h3><p>A raw LLM only generates tokens, and both companies have models that are quite good at that. A harness is the control plane that turns generation into action. It runs the loop, dispatches tools, parses tool calls, handles handoffs, approvals, tracing, and state. It calls the model, sees that the model wants tool X, runs X, feeds the result back, and loops until an exit condition.</p><h3>Anthropic: Give Your Agent a Computer, Batteries Included</h3><p>Anthropic’s agent harness is essentially Claude Code exposed as a standalone library — same tools, same agent loop, same context management. With this, there is no complex framework for developers to assemble; it’s an engine the model can wield out of the box. It comes equipped with core file and execution primitives (bash, read/write/edit, and grep) alongside workflows lifted straight from Claude Code — like web search, subagents, background scheduling, clarifying questions, and safety guardrails through runtime hooks.</p><p>In practice, a working agent is a function call and an options object:</p><pre>from claude_agent_sdk import query, ClaudeAgentOptions<br>async for message in query(<br>    prompt=&quot;Find and fix the bug in auth.py&quot;,<br>    options=ClaudeAgentOptions(allowed_tools=[&quot;Read&quot;, &quot;Edit&quot;, &quot;Bash&quot;])<br>):<br>    print(message)</pre><p>Describing this as a basic set of “coding tools” auto-set up for your agent drastically misses the mark. It isn’t only a passive toolbox; instead, it eliminates the need for the “toolbox” concept. In previous agent setups, an LLM has to pause, send a JSON request back over the wire, and wait for your application to run a tool on its behalf. Now, the model and execution engine live inside the same runtime — allowing it to act on your system directly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*B9dsMYxgSX4VCXUu.png" /><figcaption>Diving deeper into this with the Tools callout later. This looks at some learnings from both Anthropic’s and OpenAI’s harness design around tool usage and context window preservation. A benefit of having the model on the control plane. [Image generated by Claude Code with prompt]</figcaption></figure><p>As someone who has worked at many AI MLOps/LLMOps startups and teams, it’s only a matter of time until a VC wants to describe what you’re building as an “OS for AI.” It’s always been a buzzword the industry has chased. What’s interesting in this agent approach is that the power of the framework comes from almost reversing that framing, letting the harness resemble an operating system that works out how to solve your specific problems.</p><blockquote>Beyond just the required evaluation criteria on real-world use cases, there have been some high-level trends both Anthropic and OpenAI have shown and implemented in proving out the value of bringing the AI to your computer’s control plane.</blockquote><blockquote><strong>Agentic Search &gt; RAG on Code Bases</strong></blockquote><blockquote>Early versions of Claude Code used RAG with a local vector database — chunk the codebase, embed it, semantically retrieve. They tested that against agentic search, where the model greps and globs and reads files on demand, and they deleted the index. Boris Cherny’s stated reasons: it was simpler, and it dropped the <a href="https://x.com/bcherny/status/2017824286489383315">“security, privacy, staleness, and reliability”</a> problems that come with maintaining an index at all.</blockquote><blockquote>For some tasks that require deep semantic mapping and context, RAG may be a framework primitive we should build and keep fresh. But letting the model operate on the code as a filesystem it already has means there is nothing to pre-process and nothing to go stale. The AI builds the retrieval strategy that makes the most sense for the system, and it’s the fact that this is a strategy decision that lets it work so well for coding and non-coding tasks alike.</blockquote><blockquote><strong>Executing MCP Tools — Programmatic Tool Calling</strong></blockquote><blockquote>The same move shows up a level higher, in how tools reach the model at all. As you connect more MCP servers, two costs balloon: every tool definition loads into context up front, and every intermediate result round-trips through the model even when you’re only piping data from one tool to the next.</blockquote><blockquote>Anthropic’s answer, from their <a href="https://www.anthropic.com/engineering/code-execution-with-mcp">Code Execution with MCP</a> work, was to extend the same agentic search philosophy to MCP tools. Rather than loading every tool definition into context, the runtime exposes tools as discoverable artifacts the model can inspect on demand.</blockquote><blockquote>In this example, they present each MCP tool as:</blockquote><blockquote>* a TypeScript file on disk — ./servers/google-drive/getDocument.ts</blockquote><blockquote>* an interface,</blockquote><blockquote>* and an exported function.</blockquote><blockquote>That file costs zero tokens until the agent reads it. The model lists the directory, opens the two modules it needs, imports them, and writes a program that calls them, filtering and joining in code so only the final result comes back. Their worked example takes a workflow that burned roughly 150,000 tokens and lands it near 2,000.</blockquote><blockquote>One honest caveat, because Anthropic makes it themselves: running model-generated code needs a secure execution environment, and carries operational cost and security considerations that direct tool calls avoid. In their own Agent SDK guide, tools remain the primary blocks of execution. The OS bet isn’t “code beats tools always.” It’s that a model with a computer wins on a specific and common shape of problem — lots of tools, large intermediate data, work you’d rather do in a loop than a round trip.</blockquote><blockquote><em>TLDR; Anthropic has an opinionated belief that general agents = coding agents. They’ve made it easy for teams to create these agents by wrapping Claude Code’s functionality (the harness) into an Agent SDK.</em></blockquote><h3>OpenAI: Agent Framework-Based Abstraction</h3><p>OpenAI’s SDK started unopinionated, as covered above: bring whatever orchestration and harness you want, we’ll stay out of the way. Their <a href="https://openai.com/index/the-next-evolution-of-the-agents-sdk/">April “model-native” release</a> is them catching the coding-agent train — filesystem tools modeled on Codex, shell and patch tooling, AGENTS.md, workspace manifests, snapshotting. All of it hangs on a new primitive — the <em>sandbox agent</em>, a distinct object from the plain agent you’d have built before, having its own workspace and capabilities declared up front.</p><p>Codex predates all of this, and OpenAI never lacked a coding agent — what moved is that the shape of a coding agent became the default shape of a general agent in their SDK.</p><pre>from agents import Runner<br>from agents.run import RunConfig<br>from agents.sandbox import SandboxAgent, SandboxRunConfig<br>from agents.sandbox.capabilities import Shell<br>from agents.sandbox.sandboxes.unix_local import UnixLocalSandboxClient<br><br>agent = SandboxAgent(<br>    name=&quot;Renewal Packet Analyst&quot;,<br>    instructions=&quot;Review the workspace before answering.&quot;,<br>    capabilities=[Shell()],<br>)<br>result = await Runner.run(<br>    agent,<br>    &quot;Summarize the renewal blockers.&quot;,<br>    run_config=RunConfig(sandbox=SandboxRunConfig(client=UnixLocalSandboxClient())),<br>)</pre><p>This is a one-way convergence toward a position Anthropic staked out publicly in September 2025 — while OpenAI keeps the one piece of its old identity that never depended on the action-space question: it still talks to more than a hundred model providers through the Chat Completions API. So while they may be “model-native” agents, they definitely aren’t a framework that has fully abandoned provider-agnosticism.</p><blockquote><em>TLDR; With new SandboxAgents, OpenAI has made it easier for teams to build out coding agents. This has aligned/caught up with the industry standard that started with Anthropic’s findings with their Claude Code Agents.</em></blockquote><h3>Pillar Two: The Sandbox</h3><p>If handing an agent the keys to an “AI for OS” makes your governance team nervous, they are not alone. That fear is the whole reason the sandbox exists. A sandbox is an isolated, Unix-like environment — the filesystem, shell, packages, controlled network — the agent can change without touching the host. Once it can run code against real files, the questions arrive: what if it deletes something, leaks credentials, changes a file with no record? Permissions block whole classes of action, but to let the agent work and still sleep at night, you want two boundaries:</p><ul><li><strong>Filesystem isolation</strong> — it touches only the files you’ve granted.</li><li><strong>Network isolation</strong> — it reaches only approved hosts, so it can’t exfiltrate data or pull down malware.</li></ul><p>You need both, or you have neither: without network isolation, a compromised agent reads your SSH keys and phones them home; without filesystem isolation, it escapes the directory and reaches the network anyway. And this isn’t hypothetical. In one <a href="https://www.anthropic.com/engineering/how-we-contain-claude">Anthropic red-team exercise</a>, a phishing message got Claude Code to fetch AWS credentials and ship them off — a direct prompt injection that arrived through the user rather than through tool output, which meant no model-layer defense had anything anomalous to catch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gm7VIz_Qm5vE802n.png" /><figcaption>Visualization of the needed isolation boundary for core governance in Coding Agent deployments. “Brain from the hands” is Anthropic’s framing. [Image Generated by Claude Code with prompt]</figcaption></figure><p>To help solve this, both vendors have converged on the same fix in production. Anthropic’s own framing for it is decoupling <a href="https://www.anthropic.com/engineering/how-we-contain-claude">“the brain (Claude and its harness) from the hands (sandboxes and tools that perform actions).”</a> The harness is the brain; the sandbox is the hands — files, commands, ports, state.</p><h3>Anthropic: Progressive Door-Closure</h3><p>Anthropic’s path is a clear progression from maximum power with maximum risk toward governed, production-grade isolation. And this makes sense; the learned powers of coding agents for non-coding tasks from pillar one do not come from a team siphoning workloads away from the AI. Instead, early Claude Code let the model write, test, and debug on your actual machine, gated only by permissions — approve this write, this command, this network call.</p><p>However, people approved nearly everything (around <a href="https://www.anthropic.com/engineering/how-we-contain-claude">93% of prompts</a>), so review had quietly stopped being review. Fall 2025’s fix was an OS-level sandbox. This allowed users and enterprise security teams to enforce workspace-level permissions (reads and writes allowed, network denied by default) at the OS rather than through the model’s goodwill. It was a large success in appeasing fear, and Anthropic reported it cut permission prompts by <a href="https://anthropic.com/engineering/claude-code-sandboxing">84% internally</a> while increasing safety.</p><p>It still had a pain point, however; the OS sandbox made an individual machine safer, but it did not solve the infrastructure problem of running many durable agent sessions in production.</p><p><em>Take a GitHub PR validation agent. A developer opens a PR. The agent may check out the branch, install dependencies, run the test suite, reproduce a failing test, generate a patch, re-run tests, bring the code in line with the organization’s best practices, and even open an updated PR. In this, our PR validation agent absolutely needs the filesystem, shell, package installation, git, and ephemeral state of a true coding agent.</em></p><p>Running this once on your laptop is easy. Running it on your laptop with a sandbox contains the individual run. Running it hundreds of times per day for every pull request means provisioning isolated environments, cloning repositories, installing dependencies, enforcing network policies, cleaning up state, and making sure one execution can’t interfere with another. At that point, the challenge shifts from managing the agent to managing the infrastructure that executes it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bwHPGsr_BZDOkFPX.png" /><figcaption>A summer 2026 look at Claude Managed Agent sandbox execution. Missing existing local OS execution. [Image generated by Claude Code with prompt]</figcaption></figure><p>This is where <a href="https://claude.com/blog/claude-managed-agents">Managed Agents</a> came into play, launched in April 2026: Anthropic-managed defaults first, then self-hosted “bring your own container” options that let teams fully separate the brain from the hands. The agent reasoning loop stays hosted by Anthropic, but code execution and sensitive data remain within your local security perimeter. <a href="https://claude.com/blog/claude-managed-agents-updates">Self-hosted sandboxes</a> are in public beta, with MCP tunnels in research preview.</p><blockquote><em>TLDR; Anthropic wants to sell AI integrated with a computer. Now, they know they need to allow teams to restrict that computer space. With the new move into self-hosted sandboxes and MCP tunnels, they’re making it easier for enterprise security teams to enforce that computer’s guardrails and use AI for more business (and safety-critical) tasks.</em></blockquote><h3>OpenAI: Portable Execution</h3><p>Before the Agent SDK exposed sandboxing in April 2026, OpenAI was not starting from nothing. Through <a href="https://openai.com/index/introducing-codex/">Codex</a>, it had already demonstrated the pattern of isolated cloud sandboxes. Every coding task executed inside its own ephemeral environment: repositories cloned into isolated filesystems, dependencies installed, tests executed, and the entire environment discarded once the task completed. From a user’s perspective, Codex simply “ran the agent in the cloud.” Architecturally, however, something much more important was happening: the reasoning model had already been separated from the execution environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*J8SSS8IgcHNGrxiy.png" /><figcaption>A quick year in review on the timeline for Sandbox execution between the two. [Claude Code Generated with Prompt]</figcaption></figure><p>In many ways, OpenAI was early in demonstrating this architecture in a production cloud coding agent. Rather than letting the model operate directly against enterprise infrastructure, Codex treated code execution as an isolated, disposable compute environment — a pattern that would later become foundational across modern agent systems.</p><p>The April 2026 release of SandboxAgent brought that same architectural pattern into the Agent SDK. Rather than treating sandboxing as something unique to Codex, OpenAI exposed it as a reusable execution primitive that could run any agent workflow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*s2cQaxUvakDTzCaQ.png" /><figcaption>A look at different Sandbox hosting options for OpenAI SDK Agents. Includes OS execution, along with some example providers to showcase local, self-serve, and third-party managed options. [Image Generated by Claude Code]</figcaption></figure><p>The obvious question then, in looking at OpenAI’s offering, is whether a long provider list is worth anything, or if it’s just a menu. As someone who isn’t an infrastructure expert but has gone through the tenuous process of AI governance approvals, it’s actually a bit interesting. What I think the list actually buys you is modular characteristics for different types of teams: how strong the isolation is, where the compute physically sits, who holds the credentials, and how long a session can stay alive. Those are roughly the four things a security review asks about, and the seven built-in launch partners — Blaxel, Cloudflare, Daytona, E2B, Modal, Runloop, and Vercel — don’t answer them the same way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NS4II19qEDIuvyU2.png" /><figcaption>Providers comparison. Analysis done by Claude Opus, provided starting links from my findings of relevant research pages/company blog posts/marketing doing comparison. Analysis done because I was curious. Validated by Haiku subagents per line. Not validated by my human self reading the Documentation for all providers one by one. This is not official advice; please read the documentation if you plan to purchase.</figcaption></figure><p>So the choice sorts by what your approval process actually asks. If your data can’t leave your perimeter — healthcare, finance, anything with a data residency clause — you’ll probably want the bring-your-own-cloud option, because “where does the data go” becomes “nowhere,” and that’s the best answer that clears review quickly. If you’re executing untrusted or third-party code, you want the microVM, and you pay the cold start for it. If you wrote the code and you control the inputs, Docker is fine, faster, and cheaper. If you’re already all-in on a platform, the sandbox that lives inside it will move through governance fastest simply because there’s no new vendor to review. And if you need GPUs, that narrows the field before you get to weigh anything else.</p><blockquote><em>TLDR; OpenAI has kept model and sandbox execution separate from day one by partnering. They make it easy for teams to choose a managed container architecture (by partnering with multiple container providers) or self-host to maintain this separation.</em></blockquote><p>Both providers have converged on the same architectural principle: the reasoning model should not execute directly against enterprise systems. Where they differ is not in whether they sandbox, but in how they expose sandboxing. Anthropic packages it as part of an integrated managed runtime, while OpenAI exposes it as a reusable infrastructure primitive developers compose with different execution environments. Neither approach is inherently more secure — though in both cases the isolation guarantee comes from the environment underneath, and a container is not a microVM.</p><h3>Pillar Three: Memory</h3><p>Two pillars in, the patterns are similar, but the product instincts are hard to miss. Anthropic repeatedly begins with the model itself — first giving it a computer, then a protected one. OpenAI repeatedly begins with the developer — first a framework, then a reusable execution layer.</p><p>Those instincts become even more interesting in the final pillar. Unlike harness and sandbox, this is not a story of two companies solving the same problem differently. It’s a story of two companies arriving at exactly the same conclusion: <strong>the context window is not memory.</strong></p><h3>Where They’re the Same</h3><p>For years, developers treated larger context windows as if they solved persistence. If the model needed to remember something, we copied more information into the prompt. The approach worked surprisingly well — until agents became long-running. A coding agent doesn’t just need to remember what happened thirty seconds ago. It needs to remember why it made a design decision yesterday, which repositories require special build steps, which coding conventions a team prefers, and which mistakes it has already learned to avoid. None of that belongs permanently inside the context window, which is expensive, finite, and gone when the run ends.</p><p>Both Anthropic and OpenAI now treat the context window as working memory, and put long-term memory somewhere else. The agent retrieves only the information relevant to the current task, reasons over it, and moves on. Memory becomes another tool, not another prompt.</p><p>Both architectures share the same core principles: memory exists outside the model, memory persists across sessions, the agent retrieves memory through tools, only relevant information enters the context window, and the context window remains temporary working memory rather than permanent storage.</p><h3>Where They Still Differ</h3><p>The remaining difference is not where memory lives, but how it is curated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GYsNe_Cqt7JreU9G.png" /><figcaption>Image generated to show the core context path taken by both modeling tools.</figcaption></figure><p><strong>Anthropic: the working model curates memory.</strong> Anthropic’s <a href="https://platform.claude.com/docs/en/agents-and-tools/tool-use/memory-tool">memory tool</a> gives Claude access to a persistent /memories workspace. While solving a task, Claude can decide that something is worth preserving, create or update a memory file using explicit tool calls, and later retrieve those same memories in future sessions. The storage itself remains under the developer’s control — the model requests file operations, while the application decides where those files actually live.</p><p>This follows the pattern established throughout the article. Anthropic repeatedly gives the model an environment to operate within: first a computer, then a sandbox, and now a persistent notebook. Memory becomes part of the reasoning loop itself. Anthropic complements this with <a href="https://platform.claude.com/docs/en/build-with-claude/context-editing">context editing</a>, which automatically removes stale tool results and intermediate state from the active context window while preserving durable information in persistent memory.</p><p><strong>OpenAI: the runtime curates memory.</strong> Its <a href="https://openai.github.io/openai-agents-python/sandbox/memory/">sandbox memory system</a> also stores persistent Markdown artifacts that future runs consume. Reads work by progressive disclosure: memory_summary.md, the compact index, is injected at the start of a run; the agent searches the fuller MEMORY.md when prior work looks relevant, and opens individual rollout summaries only when it needs more detail. After a run completes, the runtime extracts lessons, consolidates recurring patterns across previous runs, and updates those artifacts for later sessions. The active agent can also update memory during execution — when it discovers something stale, or when it’s explicitly asked — but the default lifecycle emphasizes reflection and consolidation around the run rather than note-taking as the run progresses.</p><p>The two shapes produce different learning. A model taking notes mid-task catches the surprise — the repo with the weird build step it just hit — but it can’t notice that the same test has flaked forty times across two hundred runs, because it was never looking at two hundred runs. A runtime consolidating afterward catches exactly that, and loses the one-off insight that only made sense in context.</p><blockquote><em>TLDR; Both companies have the same idea and functionality for memory. The context window is temporary working memory. Persistent knowledge is separated from the model and lives in a queryable index to be retrieved on demand. The core difference is that Anthropic currently encourages the working model to actively curate that index while solving a task. OpenAI surrounds the working model with a runtime that continuously extracts, consolidates, and maintains long-term knowledge.</em></blockquote><h3>In the End…</h3><p>In the end, we’re right back at the beginning. Both companies ship the same three pillars now, and neither is going to un-ship them. But the bets they opened with didn’t disappear — they just moved down a layer. Anthropic still sells you the coworker with a laptop; they’ve only added a lock to it, and let you decide whose building it sits in. OpenAI still sells you the control tower; they just started shipping the plane too, because that turned out to be what everyone needed to get off the ground.</p><p>So the convergence happened above the questions that matter, not through them. Both SDKs will keep looking more alike. The interesting differences have moved underneath — into whose infrastructure is holding the line when the agent does something you didn’t plan for. Which means you’re not really picking a framework. You’re picking who you want holding the keys when it matters.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0f29aa8b767c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/attainable-ai/the-computer-and-the-control-tower-0f29aa8b767c">The Computer and The Control Tower</a> was originally published in <a href="https://medium.com/attainable-ai">Attainable AI Newsletter</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Can the People Building the AI Boom Share in it?]]></title>
            <link>https://medium.com/attainable-ai/can-the-people-building-the-ai-boom-share-in-it-ff47a5e094f0?source=rss-9039756d1092------2</link>
            <guid isPermaLink="false">https://medium.com/p/ff47a5e094f0</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[gpu]]></category>
            <category><![CDATA[labor]]></category>
            <dc:creator><![CDATA[Haley Massa]]></dc:creator>
            <pubDate>Sun, 24 May 2026 22:51:00 GMT</pubDate>
            <atom:updated>2026-05-24T23:35:16.095Z</atom:updated>
            <content:encoded><![CDATA[<p>I’m based in the US, so it is almost debilitating to keep up with every headline… let alone start dipping internationally. So when someone made a throwaway comment this week mentioning the stock implications of the Samsung strike, I almost let it go.</p><p>On the surface, it reads like one of the ever-growing number of labor disputes we’ve learned to file away — factory workers, a pay dispute, all a world away in South Korea. Easy to scroll past. But sitting underneath is a story that actually captured my dwindling attention span. It’s the story about the actual physical infrastructure of AI — where it comes from, who builds it, and what it costs those people. It’s also a story about a shift happening in how technical talent moves, who gets paid, and what happens when the people doing the most physically demanding work in tech finally decide to demand a different arrangement.</p><p>For that reason, this week I decided to pull you down the rabbit hole with me and go deep into what I discovered. Because beyond being interesting, I think anyone building on AI today should understand what’s underneath the hardware they’re waiting on — and why this particular strike, in this particular moment, is more connected to your workflow than it might look.</p><h3>What’s happening with the Samsung Strike and why?</h3><p>Let’s start with the dispute itself, because the details matter much more than the headline.</p><blockquote><em>Samsung’s first and largest labor union (Samsung Electronics Union), representing more than 90,000 employees, spent the last month in an escalating conflict with their management over one thing: a proportional share of the profits their work generates.</em></blockquote><p>To understand why that feels beyond reasonable, you need to follow Samsung’s recent journey as a company. Like most tech / device companies, Samsung rode the COVID consumer boom hard. Everyone is stuck at home, needing to connect to the world through their devices. Those devices need memory. (Samsung $$$) Then, post-COVID, everyone had already bought their laptop. Demand collapsed, memory prices cratered, and <a href="https://www.tomshardware.com/tech-industry/samsungs-last-ditch-union-talks-collapse-eight-days-before-planned-18-day-chip-factory-strike">Samsung posted operating losses for much of the past two years</a>.</p><p>In that time, workers received zero bonuses. Their pay structure runs through something called the EVA formula — described by the union as a black box, with two known features: it deducts capital costs and losses before calculating the bonus pool, which means in a down year, the floor is zero. And the ceiling, in any year, is capped at 50% of base salary.</p><p>Then AI arrived and flipped everything. Data centers started consuming memory at rates the industry, once run by human consumer demand, could never have predicted. Samsung’s profits <a href="https://www.koreaherald.com/article/10742914">went from operating losses to record returns in a matter of quarters</a>. They quickly went from a surplus to a shortage of product, and preorders scheduled for months to a year in advance were in high demand.</p><p>However, this rebound was not seen by Samsung employees. They saw zero in the bad year. And nothing again in the record year… because the black box formula, with its deductions and cap, was stacked against them. This obviously sucks, but it reads like any company story today. Nobody likes to pay.</p><blockquote><em>It’s obviously not fair, but what can any employee do to change that? Unfortunately for Samsung, that’s not an argument their employees have to have in the abstract. The answer is to just go down the street.</em></blockquote><p>SK Hynix — Samsung’s Korean rival, same industry, same job, same country — restructured its compensation last year. 10% of annual operating profit is allocated directly to a worker bonus pool. No deductions. No cap. Written into their contracts for ten years. The formula is public, letting all employees do the math themselves. Based on 2026 projections, that works out to an average bonus of about <a href="https://koreajoongangdaily.joins.com/news/2026-02-04/business/industry/SK-hynix-employees-to-get-largestever-performance-bonuses-this-week-after-chipmakers-recordsetting-year/2516306">$460,000 per worker this year, up from $95,000 in years prior</a>.</p><p>This has obviously caused an exodus at Samsung. The engineer doing the same work, in the same country, for the rival company: $460,000. If they stayed at Samsung: nothing.</p><p>This comparison is what <a href="https://asia.nikkei.com/business/tech/semiconductors/samsung-union-suspends-planned-strike-after-reaching-tentative-pay-deal">brought tensions to a head between Samsung and the union</a>. And it raises a real question: in a corporate landscape that fights this hard against paying people, what is so important about what they’re building that workers — and rival corporations — are starting to fight over them?</p><h3>Why are these workers a bottleneck?</h3><p>To understand really why a labor dispute in Korea connects to your estimated 40-week GPU wait-time, you need to understand what actually comes off that factory floor.</p><p>A modern AI GPU — the H100, the Blackwell, whatever comes next — is not one chip. It’s an assembly. At its center sits the GPU die: the compute engine, the brain, designed by Nvidia or AMD and predominantly manufactured by TSMC in Taiwan. Their main competitor is Samsung Foundry, which has been struggling to keep pace — though that’s a different part of Samsung than the workers we’re talking about today.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tqr6J4xWKVNLTMMA.png" /><figcaption>The AI chip supply chain has three layers. Designers like Nvidia create the blueprints. Manufacturers like TSMC build the compute die. Memory suppliers — led by Samsung — build the HBM that makes the whole thing run. Samsung sits at the intersection of two of those three layers, which is why this labor dispute matters.</figcaption></figure><p>The brain handles the math. But math requires moving data, constantly and fast. So, surrounding that die is a stack of High Bandwidth Memory (HBM). Think of it as the engine’s fuel system. Without it, a Blackwell GPU is a very expensive piece of nothing. HBM also requires significantly more wafer capacity to produce than conventional memory, so the more Samsung shifts production toward HBM4 to meet AI demand, the tighter overall memory supply gets. More demand, more production, less memory for everything else.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2vZkCZSt0qnVPV8G.png" /><figcaption>A modern AI GPU is an assembly, not a single chip. The HBM stacks on either side are produced by Samsung’s workers. Without them, the compute die in the center does nothing.</figcaption></figure><p>Those wafers are what the Samsung workers we’re discussing today build in specialized cleanrooms. (~<a href="https://www.tomshardware.com/tech-industry/artificial-intelligence/samsung-and-sk-hynix-warn-ai-driven-memory-shortages-could-last-until-2027-and-beyond">40% of the world’s DRAM inventory</a> is built by them, to be exact).</p><h3>What makes cleanroom workers irreplaceable?</h3><p>Beyond being likely great people, they know how to operate in a data cleanroom.</p><p>A semiconductor cleanroom is nothing like a typical factory floor. For context, regular room air has about 35 million particles per cubic meter — dust, skin cells, fibers. In an <a href="https://e360.yale.edu/features/toxics_in_the_clean_rooms_are_samsung_workers_at_risk">ISO Class 1 cleanroom</a>, where Samsung’s HBM wafers are made, that number drops to just 10. Even a single stray hair can ruin millions of dollars’ worth of work. Before each shift, workers spend up to 30 minutes getting suited up: full-body coverings, respirators, triple gloves, sealed boots. Once inside, they’re in for twelve-hour shifts day and night in dry, filtered air under yellow lighting, with hardly any chance to eat, drink, or step out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*OuOLGY12JQAsj-Mk.jpeg" /><figcaption>A researcher in a Samsung Electronics chip cleanroom (https://www.kedglobal.com/korean-chipmakers/newsView/ked202503060008)</figcaption></figure><p>And what they do inside those suits is far from mundane or simple assembly work. They operate chemical vapor deposition systems, plasma etching machines, and extreme ultraviolet lithography equipment that costs millions of dollars per unit. And while many may start with a two-year technical degree — the Korean equivalent of an Associate’s or Trade Specialization — the ability to do the job, manage chemicals, use machines, and interpret data takes years to master.</p><blockquote>In many ways, clean room workers are modern-day trade specialists — a high-tech evolution of the blacksmith apprenticeships of yore. The difference between what a seasoned technician has learned on the job and a new hire is the human judgment that determines whether a $2 million wafer batch survives the night shift.</blockquote><p>To top it all off, these technicians are currently working under more pressure than ever before. To keep up with AI demand, Samsung has accelerated its factory expansion in Pyeongtaek by months, with construction and equipment calibration occurring simultaneously on the same floors. Cleanroom staff are keeping everything sterile while construction crews work just next door. The yield requirements for HBM4 are extremely strict, and the factories are running at full capacity around the clock just to meet delivery targets.</p><blockquote><strong>Unsafe Conditions in Clean Rooms are the Reason Korea has Unions at All</strong></blockquote><blockquote>For most of Samsung’s history, there was no union — and that was true across Korea’s chaebol system broadly. In South Korea, your company is closer to an identity than a job. That cultural weight discouraged independent organizing. Samsung went further and actively suppressed it. It took a 2019 court ruling to change that. But the reason clean room workers specifically wanted a union in the first place goes back further and is much more permanent than any pay dispute.</blockquote><blockquote>In 2003, a 19-year-old named Hwang Yu-mi took a job at Samsung’s Giheung chip plant, dipping silicon wafers into chemical baths. By 2005, she was sick. In 2007, she died of acute leukemia in the back of her father’s taxi on the way to the hospital. She was 23. Her father, Hwang Sang-ki — a taxi driver — refused to sign Samsung’s non-disclosure agreement. He spent the next eleven years documenting other cases. The group he helped found, <a href="https://www.npr.org/2018/11/23/670429271/samsung-apologizes-to-ill-workers-promises-to-compensate-them">SHARPS, eventually identified over 200 Samsung workers who had developed leukemia,</a> lymphoma, brain tumors, and miscarriages — most in their 20s and 30s. Seventy-six had died. In 2018, Samsung’s co-president bowed at a press conference and issued a formal apology. Two years later, Jay Y. Lee, Samsung’s Chairman, renounced the no-union policy. Samsung Electronics Union — the company’s first recognized union — was formed.</blockquote><blockquote>This is the same union that is now negotiating for a share in the AI boom for Samsung workers. The direct descendant of what Hwang Sang-ki started in the back of that taxi.</blockquote><h3>… And Back to The Politics of Pay</h3><p>At the beginning of this article, we introduced the challenge posed by the union and the standard set by SK Hynix, which made it impossible to ignore.<em> </em>But zoom out from Korea, and a pattern emerges across every company building this hardware. Compensation has become a strategic weapon.</p><p>TSMC has used <a href="https://www.tomshardware.com/tech-industry/huawei-trying-to-poach-tsmc-employees-with-3x-salary">aggressive base salary increases</a> to fend off poaching from Chinese firms. <a href="https://www.youtube.com/watch?v=AsVrQJ3uHus">Micron’s wage structure was built into its CHIPS Act</a> deal from the start, a condition of $6.1 billion in government funding. China is deploying unlimited state capital and equity packages to recruit engineers it can’t build domestically fast enough. Every company in this ecosystem has made a calculated decision about what these workers are worth — and priced accordingly. Samsung was the last holdout.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tFs4qt4iBfCy1aYf.png" /><figcaption>A look at different companies approaches to competing for cleanroom workers</figcaption></figure><p>Not one of those changes happened because a company decided it was the right thing to do. Every dollar these workers have gained came from a fight — or from a rival making the fight inevitable.</p><p>So can the people physically building the AI boom have a piece of it? It seems that at least for now — yes. The Samsung team has struck a deal with the union in line with the SK Hynix methodology. Not because the industry decided it was fair, but because, in this day and age of GPU waitlists, the most irreplaceable jobs in tech are among the least glamorized and physically demanding. The companies that figured that out first are winning the talent war. The ones that didn’t had to be dragged there.</p><p>So somewhere in Pyeongtaek, on the third shift, someone is tending a wafer that will eventually end up in a data center that will eventually run a model that will eventually generate revenue for a company that will never know their name. And the good news is that this week, that person got a raise.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ff47a5e094f0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/attainable-ai/can-the-people-building-the-ai-boom-share-in-it-ff47a5e094f0">Can the People Building the AI Boom Share in it?</a> was originally published in <a href="https://medium.com/attainable-ai">Attainable AI Newsletter</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Where Does Data Drift Come From? The Assumptions We Make Putting ML Models into Production]]></title>
            <link>https://medium.com/@haleymassa/where-does-data-drift-come-from-the-assumptions-we-make-putting-ml-models-into-production-9d17acafec40?source=rss-9039756d1092------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d17acafec40</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[data-drift]]></category>
            <category><![CDATA[ml-monitoring]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[mlops]]></category>
            <dc:creator><![CDATA[Haley Massa]]></dc:creator>
            <pubDate>Wed, 14 Aug 2024 00:22:38 GMT</pubDate>
            <atom:updated>2024-08-14T00:22:38.770Z</atom:updated>
            <content:encoded><![CDATA[<p>Data distributional drifts have become a common topic of conversation as more organizations focus on machine learning monitoring. However, a lot of the content around distributional drift either requires a technical background or focuses only on a single concept in drift without creating a larger picture of the problem.</p><p>In this blog series, we will help break down what data distributional drift is and where it comes from and start looking at how to deal with it for a more business-minded audience. We’ll start with this article by using a “real world” machine learning example to define key definitions and assumptions made when putting machine learning models into production.</p><h3><strong>ML Example and Assumptions</strong></h3><p>Let’s pretend that we are data scientists at a large financial institution, and we have been tasked to solve the following business problem:</p><blockquote><strong>“Design a real-time fraudulent transaction detection algorithm to be put into production.”</strong></blockquote><p>This is broad, so we first discover more about the problem. We talked with business stakeholders and found that they are looking for a model that will detect fraud at the swipe of a credit card. In other words, when a client makes a transaction, we want the model to either allow the transaction to occur or mark the transaction as possible fraud and alert our customers that they must confirm whether it is genuinely them.</p><p>Now that we know more about the problem we are solving, we can begin working on the next step in the data science process: curating a dataset to help us solve this problem.</p><h3><strong>Curating our Data Set</strong></h3><p>Since we are operating under this example of working at a large financial institution, we will assume that we have access to some historical transaction data. Once we collect enough of this data, we will be able to start curating a dataset to fit our needs, which for our learning will include the following essential parts:</p><blockquote><strong>Target Variables</strong>: What we are trying to predict. In the case of our example, this would be whether or not a transaction was fraudulent.</blockquote><p>After we have found enough transactions for our dataset with labeled targets, we now need to find out information about those transactions. Machine learning is about finding patterns within our data that can help us predict our target variables; we need to collect data or information about each of our transactions that we can explore to find the best pattern and, therefore, prediction. These extra pieces of information are known as our features.</p><blockquote><strong>Features (also commonly called attributes or independent variables)</strong>: characteristics of the target variable</blockquote><p>These features may include things specific to that transaction, such as the time it took place or the amount. Then depending on the amount of data available to the data scientist creating the model, they could also include information they know about the client, such as age or credit score. Finally, they could even include any information they have saved about the store, like whether or not it’s online or the type of goods sold.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NZK78ydft7li-ZK54vw8Bw.png" /></figure><p>These are only a few examples of the type of information that can be collected to define all of the features of our model. Often in real-world modeling, data scientists will use a spectrum of tens, hundreds, to thousands of parts when building out the datasets for different models. No matter how many features a data scientist decides to include in a model, the driving factor for having each feature is the same: the data scientist thinks there is an exciting relationship between the feature and target value that could potentially drive a prediction.</p><h3><strong>Assumptions in Production</strong></h3><p>Now that we have defined the essential components of our machine learning dataset, we can delve into the data and begin exploring different potential features. However, before we as data scientists can delve too far, we must be aware of two critical assumptions that our data must fit for our model to work in production.</p><blockquote><strong>Production: </strong>when the model is deployed and running on real-world data.</blockquote><p>In our example, this would be when the model responds to our customer’s credit card swipe in real time, marking it as fraudulent. Our first fundamental assumption is that our model must have <strong>access</strong> to all the features we have defined in our dataset.</p><blockquote>The first assumption is that the model will have access to all the features it was trained with</blockquote><p>For example, a fraud detection model trained on a dataset that includes information about a particular store’s reviews may be beneficial. “<em>This store stole all of my credit card information. Do not shop here</em>.” However, suppose we cannot get load-up sentiment information about the store when running the model (in those 3 seconds after we swipe a credit card before it gets declined). In that case, these features are no longer beneficial and cannot be used in production.</p><p>Our second fundamental assumption is the crucial assumption that is incredibly important to remember as we discuss data drift. This assumption is that <strong>the world where we train the model is similar to the world where it will run</strong>.</p><blockquote>The second assumption is that <strong>the world where we train the model is similar to the world where it will run</strong>.</blockquote><p>For example, if we trained our credit card fraud model on data, we collected on family-run businesses for a small town in Germany. Our model would not translate very well to predicting fraudulent transactions for all European companies, or at least, without a miracle, it shouldn’t.</p><p>This second fundamental assumption hinges on the idea of generalization. When training a machine learning model, we want the model to generalize or predict well on unseen data — i.e., data that the model wasn’t trained on.</p><blockquote><strong>Generalization</strong>: your model’s ability to adapt properly to new, previously unseen data, drawn from the same distribution as the one used to create the model.</blockquote><p>For a model to be successful in the “real world,” it has to be able to generalize. This is because, while we have spent countless brain power and engineering resources to craft the ideal training dataset, we know that it is unlikely for a person in the real world to act exactly like an example in our dataset. We also emphasize that machine learning models can be considered pattern recognizers or pattern finders.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hTbYnvEyqZvywSCD5KQ1pw.png" /><figcaption><em>For example, our in-production model could encounter an example of a client, Becky ordering a turkey sandwich during her lunch break from her local deli. Even if our model didn’t have a training example the same as Becky’s lunchtime snack, it could draw patterns from similar instances, like Cecilia’s midday deli run or Ricky’s lunchtime subway sandwich, to know that this purchase may not seem too out of the ordinary.</em></figcaption></figure><h3><strong>Testing Before Production</strong></h3><p>Since the ability to generalize is essential for the model’s success, a fundamental part of the data science process is to evaluate how well a data science model generalizes. This is known as the <strong>testing</strong> (or <strong>evaluation</strong>) phase. In this evaluation phase, data scientists will use different data sets that the model was not trained on (often called a <strong>test set</strong>).</p><p>This evaluation phase looks different for every organization, as the phase where the business validates that a model is strong enough to be put into production. Depending on how conservative a data science group is, this phase could include multiple tests, A/B testing against different models, or even a soft launch of the model on a small percentage of the production data.</p><p>No matter the strenuous evaluation methods done within an organization, <strong>the essential purpose of the evaluation phase within any organization is to evaluate the production time assumptions discussed above before putting your model into production. </strong>By assessing your model on your various test sets, you are assessing your model on data it has not seen before, mimicking how it will run in production.</p><p>…. And just like after finishing our evaluations, we have reached the end of our data science workflow! We’ve based numerous rigorous tests and benchmarks for our model, and we are confident it will perform well in production. After reviewing our results with various stakeholders, we can launch our model.</p><h3><strong>Life After Launch</strong></h3><h4><strong>Immediately after launch</strong>:</h4><p>Data science teams often invest a lot of time monitoring or peeking in on the production-level model immediately after launch. They want to ensure that all assumptions made when curating their dataset and testing during their model evaluation are met in production. In this post-deployment monitoring, our model runs at about <strong>93% accuracy</strong>. We’re so excited that our expectations about the production data we evaluated in our testing set match the “real world.”</p><p>After monitoring your model for a few weeks or even a month and ensuring that no surprises occur, this active monitoring can start to dwindle over time. Data science resources are often a commodity at an organization, and data scientists may be pulled onto different projects or research opportunities.</p><h4><strong>Seven months later</strong>:</h4><p>However, since this is a post about data drift, something must disrupt our so-called “perfect” example. Our model has been in production for about seven months, with only a few “updates” required by the engineering team, such as updating Python packages or changing data pipelines. The engineering team works hard to ensure these don’t disrupt the model.</p><p>One day a new intern joins the team, and he decides they want to research more about how the model runs. Their research shows that the model seems to be running at about <strong>78% accuracy.</strong></p><blockquote><strong>Model Decay (or Model Drift): </strong>refers to the degradation of a model’s prediction power over time due to changes in the environment</blockquote><p>At this point, the team typically begins to freak out and try to analyze <em>what happened</em> and <em>when</em>. They begin to hypothesize about what caused this issue in the first place and how to fix it. Someone may suggest we try a different model architecture or engineer more relevant features to the task. Maybe, the model needs to be re-trained on more recent data. Finally, a machine learning skeptic on the team may state that machine learning might not be suitable for this business use case or that the entire problem needs to be reframed.</p><p>All of these are potential answers to the cause of model decay. (And the wide range shows the importance of observability into what actions your model is making and why). However, <strong>data drift is one of the most common causes of model decay in practice</strong>.</p><h3>Data Drift</h3><p>Data drift causes model decay when the second fundamental assumption about our training data being similar to production is no longer accurate.</p><blockquote><strong>Data Drift : </strong>refers to a change in environment where the statistical properties of your data change over time (most importantly for data drift, from the time when your model was trained to when it is actively running in production).</blockquote><p>Even with your model’s ability to generalize, if these changes are significant enough, it will mean that your model is <strong>no longer running in an environment where it was built and tested to succeed</strong>. Instead, you can have unpredictable performance — which is often negative.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sbqiD9T2wT1_EU_X.png" /><figcaption>Taken from Google Images, a look at the relationship that can occur between model performance and the changing environment of your data</figcaption></figure><p>Thanks for reading the first post in this series about data distributional drift. In the next post, I will dive deeper into characterizing different types of data drift.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d17acafec40" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[4 Applied AI Trends to Watch That Aren’t ChatGPT]]></title>
            <link>https://medium.com/@haleymassa/4-applied-ai-trends-to-watch-that-arent-chatgpt-8720786fdf35?source=rss-9039756d1092------2</link>
            <guid isPermaLink="false">https://medium.com/p/8720786fdf35</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[applied-ai]]></category>
            <dc:creator><![CDATA[Haley Massa]]></dc:creator>
            <pubDate>Mon, 21 Aug 2023 17:59:43 GMT</pubDate>
            <atom:updated>2023-08-21T19:49:40.218Z</atom:updated>
            <content:encoded><![CDATA[<p>It is clear from my LinkedIn, and Twitter feeds that 2023 is the year of the large language model. Open AI launched the best marketing campaign possible when they stomached the ____ dollars of releasing Chat GPT for free public access. It has ignited a justified and cool fire for large language models and generative text. However, there are a lot of trends and happenings within “real-world” AI that I am excited about that do not include large language models. So today, I will take you through four trends that I am most excited to watch as a data science practitioner:</p><h3><strong>Pip Install State-of-the-Art ML</strong></h3><p>Although we are starting off by dipping close to LLMs and Chat GPT by kicking off with <a href="https://huggingface.co/">HuggingFace</a>, I think it’s interesting to note the trend that they have started within the ML space overall. HuggingFace is a platform for users to publicly share models and datasets, with a mission of “democratizing AI” — basically making AI easier to use and available to everyone. Within the wider ML community, they are mostly known for this mission and their open-source transformer library. This allows teams to build, tune, and assess models through the HuggingFace APIs and SDKs instead of building models from scratch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3I4xDRJPZ11zUq-w.png" /><figcaption>The examples given in this section point to a push toward democratizing Algorithms and some model development</figcaption></figure><p>And while Transformers may be the most talked about state-of-the-art models in production these days, they certainly aren’t the only complex architectures teams are building from scratch.</p><blockquote>However, it is interesting to watch developers of other complex architectures move towards democratizing access to their architectures through APIs.</blockquote><p>Notably, Ultralytics, the team behind the incredibly popular computer vision architecture <a href="https://docs.ultralytics.com/">YOLO</a>v8, introduced the biggest change to the architecture since it switched from darknet to PyTorch when they created a HuggingFace-esque API and Python SDK for developers. Additionally, NVIDIA aims to democratize recommendation systems with their open-source library <a href="https://developer.nvidia.com/merlin">Merlin</a>, which provides a high-level API for classic and state-of-the-art recommender models.</p><p>With more teams able to access seemingly unattainable architectures, it may actually be the dawn of AI adoption that so many have talked about for years.</p><h3><strong>Data Mesh</strong></h3><p>Typically, actionable and iterative data science cannot exist in organizations without strong data engineering practices. These practices aim to create organized, scalable data storage that can easily and efficiently access and transform for different tasks. Recently, teams moved from individual data warehouses to data lake architectures. Data lakes took these individual silos and put them in a single source of truth storage, easily managed by the data engineering team.</p><p>Recently, especially with the new data-as-a-product talk, there has been a push toward decentralized data management with the data mesh architecture.</p><blockquote><strong>A </strong><a href="https://www.ibm.com/topics/data-mesh#:~:text=the%20next%20step-,What%20is%20a%20data%20mesh%3F,producers%20of%20a%20given%20dataset."><strong>data mesh</strong></a><strong> works to shift ownership to domain-specific teams.</strong> Instead of a centralized data lake, data mesh supports distributed data systems.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TZ6YkCfIs7GQfjH8" /><figcaption>Great Visual of Different Data Architectures taken from <a href="https://www.linkedin.com/pulse/data-warehouse-vs-lake-lakehouse-mesh-ashish-bijawat/">https://www.linkedin.com/pulse/data-warehouse-vs-lake-lakehouse-mesh-ashish-bijawat/</a></figcaption></figure><p>As someone who often talks about data quality, I am excited to learn more about best practices for <a href="https://www.montecarlodata.com/blog-data-mesh-vs-data-lake-whats-the-difference/#:~:text=Data%20mesh%20vs%20data%20lake%3A%20what&#39;s%20the%20difference%3F,manage%20their%20own%20pipelines%20directly.">data observability ownership with a data mesh</a>. While currently, with data lakes, the core data engineering team owns all data quality motions, data mesh empowers different domain teams’ ownership over their data quality. This means that domain teams have a scalable, sustainable, and accessible way to answer better questions they care about — relating to their data ingestion health, schema, or understanding of their upstream or downstream dependencies.</p><h3><strong>Data / System-Centric Organizations</strong></h3><p>In 2022, <a href="https://www.youtube.com/watch?v=06-AZXmwHjo">Andrew Ng ushered in a new phase of applied ML</a> when he showed that focusing more on the data going into your ML system leads to better outcomes than teams focusing on building and iterating on the ML model itself. I completely agree with this data-centric approach, and it leads to a bigger trend within the industry toward building stronger MLOps systems, not just tools.</p><p>This debate has unfolded through the push for data science “generalists.” With so many steps and communications that need to happen between teams to build, productionalize, and test an ML model, thought leaders in the industry have begun to <a href="https://multithreaded.stitchfix.com/blog/2019/03/11/FullStackDS-Generalists/">push for creating data science generalists</a> to own the entire system. This means that instead of handing different steps of the process off to different teams, one individual or team would have oversight over the entire process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T8ebGRaLSndzH_TMEpOHMw.png" /><figcaption>Taken from the Coveo case study in the <a href="https://arxiv.org/pdf/2303.11761.pdf">Metaflow paper</a>. Showcasing how different stages of the Project Lifecycle can be handed off with the adoption of tools (in this case, Metaflow) that enable Data Scientists to own projects end-to-end</figcaption></figure><p>However, this process currently has a lot of steps and ownership because there is a lot of domain knowledge that exists within the cracks of project handoffs between teams.</p><blockquote>As a data scientist, one of my favorite jokes is comparing whether I really want to know how Kubernetes works to the common question, “Would you want to know what time you’re going to die?” There are some things in this world I am not meant to know.</blockquote><p>Organizations will likely require strong ML Platform teams that will obfuscate much of the underlying MLOps infrastructure to move toward data generalist systems, allowing “generalists” to own the system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/771/0*WxU9LQP6iJfBk2H9.png" /><figcaption>Taken from Netflix’s blog about their own experience moving toward this system-centric design <a href="https://netflixtechblog.com/full-cycle-developers-at-netflix-a08c31f83249">https://netflixtechblog.com/full-cycle-developers-at-netflix-a08c31f83249</a>. Showcasing the needs to other specialist teams to build out the required tooling</figcaption></figure><p>Beyond that, it will be incredibly interesting to see the thought leadership from these ML Platform teams as they develop best practices in organizational platforms. As someone deeply invested in data science educational programs and content, I am incredibly excited about the ever-growing maturity in this space. While proper CI/CD and productionalized ML is no longer “state-of-the-art” (as we will see next), in reality, most of this is still tribal knowledge within the space. I am excited by the push of organizations and individuals sharing their knowledge and best practices and hopeful that the next phase of data science curriculums will move beyond the model-centric and into industry / system-centric.</p><h3><strong>Real-Time ML Systems</strong></h3><p>Finally, we are beginning to see ML teams reaching a new MLOps maturity level. Top organizations that have already mastered their CI/CD have begun to build infrastructure to enable real-time ML systems, <a href="https://huyenchip.com/2020/12/27/real-time-machine-learning.html">the gold standard of current MLOps</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*EQWqQZ9MGnWWXHh8.jpg" /><figcaption>Taken from Eugene Yan’s popular blog post on transitioning to Real-Time Recommenders <a href="https://eugeneyan.com/writing/real-time-recommendations/">https://eugeneyan.com/writing/real-time-recommendations/</a></figcaption></figure><p>Real-time ML systems are systems that update and run in “real-time” or “on demand.” This differs from the traditional batch ML model system, where models are often trained and re-trained by some time-cadence or situational trigger. The architecture behind this constant updating has been established, and some would say nearly perfected, by TikTok&#39;s <a href="https://arxiv.org/pdf/2209.07663.pdf">monolith architecture</a>. However, many other big tech leaders like <a href="https://screenrant.com/facebook-compete-tiktok-changing-algorithm/">Facebook</a> have begun to follow suit.</p><p>With Goliaths in the space investing in real-time ML, it will be interesting to see how other ML teams respond. For most teams, there are often other low-hanging fruits in the realm of CI/CD or productional MLOps that they should focus on before an infrastructure overhaul (investing instead in the last sections of system-centric infrastructure focus).</p><blockquote>But, for many industries like advertising or content recommendation, the introduction of real-time ML creates a fundamentally different and better product — think TikTok vs the 2010s Facebook homepage.</blockquote><p>Beyond that, one of the only things I know about boardrooms is that they don’t like to be left behind. So, I am excited to see what organizations forgo maintaining systems for a shiny new one and, depending on the application, whether or not that will be worth it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8720786fdf35" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mapping the Customer Journey for Developer Products]]></title>
            <link>https://medium.com/@haleymassa/mapping-the-customer-journey-for-developer-products-9787935997fb?source=rss-9039756d1092------2</link>
            <guid isPermaLink="false">https://medium.com/p/9787935997fb</guid>
            <category><![CDATA[sales]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[product-led-growth]]></category>
            <category><![CDATA[developer-relations]]></category>
            <category><![CDATA[customer-success]]></category>
            <dc:creator><![CDATA[Haley Massa]]></dc:creator>
            <pubDate>Thu, 03 Aug 2023 22:56:38 GMT</pubDate>
            <atom:updated>2023-11-17T16:34:22.283Z</atom:updated>
            <content:encoded><![CDATA[<p>A little over a year ago, I leaped from a “builder” role to a more customer-facing position. As someone passionate about teaching, I figured it would be a natural (and honestly better-paid) extension of what I loved to do. And, it has been. Through building workshops, tailoring example material for clients, and writing documentation, I have gotten to flex my technical communication muscle.</p><p>However, one of the most exciting parts of the job was one I did not expect. I often joke that my title of <em>Field Data Scientist</em> is put that way so it can be broad enough for me to float between pre-sale and post-sale engagements, allowing me to sit in both sales and solutions engineer territory.</p><p>In this article, I will explain the lessons I learned about building your customer journey for developer tools, from understanding why sales and customer success teams push the traditional customer journey to where that seemed to break down in our engagements with more developer-focused audiences. Finally, we’ll discuss what companies can learn from the open-source community, specifically their Developer Relations branch, to improve communication.</p><h3>What is the Customer Journey?</h3><blockquote>The <strong>customer journey</strong> is the complete map of customers&#39; experiences when interacting with your company and brand.</blockquote><p>Although this article focuses on mapping the customer journey around developer tools, the model tracks the sales/success cycle across all industries. A typical example of the journey for airline industry customers can be seen below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*d1niabkTrGJUjAbH" /></figure><p>Here we can see a typical airlines passenger goes through the five stages of customer engagement:</p><ul><li><strong>Awareness</strong>: How are customers made aware of your brand or Service? This is typically through traditional (or non-traditional) marketing engagements and touchpoints.</li><li><strong>Consideration</strong>: After consumers know about your product, what information do they need to decide on it over another (or from doing nothing)? This typically may involve product demonstrations and evaluation criteria.</li><li><strong>Purchase</strong>: After deciding they are interested, what hoops do customers need to jump through to purchase your product?</li><li><strong>Retention</strong>: After purchasing your product, what is their experience? For our flight example, it may be as simple as taking a single flight. However, as we’ll see for software applications, it may also track a longer development journey.</li><li><strong>Advocacy</strong>: How can you make this a returning or flagship customer? For an airline, this may be joining your rewards program or actively engaging and booking with your airline again. For service-based companies, this may be through public partnership agreements or logos proudly displayed on your website.</li></ul><p>Each step in this journey is not meant to measure the same amount of time. Instead, they capture the user’s intent and last however long it takes for each customer’s intent to change.</p><h4>Why Do Teams Work So Hard to Map This Journey?</h4><p>By laying out the customer journey, teams essentially outline their ideal understanding of customers’ interactions with a business or product. It is often utilized to help identify pain points by understanding where most customers get stuck or give up. But it can also be used to plan out content.</p><h4>Mapping the Customer Journey To Developer Tools</h4><p>However, as we started mapping our customer’s journey for our developer-focused tool, we realized a bottleneck. Most engagements were stuck in our journey’s “Service” (or Retention) category for long periods. We can see this more below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0lGGMDmbiwCHTU8sEwAOpA.png" /><figcaption>Traditional customer journey</figcaption></figure><p>It may be because we are a startup and often state that we are more of an <em>“emerging market tool.”</em> However, I think that even developer products with a clear market fit will run into the same issues, especially within our target audience of data scientists in AI/ML tools.</p><p>This is for several reasons, but a key one is:</p><blockquote>Developers aren’t looking for a turn-key solution to press play on without thought. They are more skeptical and investigative than a “typical” consumer. They not only want, but often need to understand the nuances of your product before they’re willing to test it within their workflow.</blockquote><p>While each step in the process is not meant to be an equal measure of time, the numerous training/evaluation/and enablement actions of Service are so widespread and take up so much time it’s hard to understand what part of Service the bottleneck is happening within. This, in turn, makes it hard to look to your customer journey to help</p><h3>Mapping a Different Journey for Developers</h3><p>With all the abovementioned challenges, I knew this could not be a new problem.</p><blockquote>Open source communities have developed their own mapping to track how developers not only discover and evaluate new technologies, but also setting realistic phases to track their enablement in developing with the solution.</blockquote><p>The Mapping that I used when creating a more developer-focused product lifecycle for our team was taken from <a href="https://www.devrel.agency/book">DevRelBook</a> and can be seen below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BCJuPC1fD0KWN14D.png" /><figcaption>Developer Journey Mapping taken from DevRelBook</figcaption></figure><h4>How does this look for our sales cycle?</h4><p>Taking that insight from the open-source DevRel community, we can easily lay it out to see where it fits within our own customer/developer lifecycle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*a5kNpzN2NkTfT8_b" /><figcaption>On top is the typical customer lifecycle journey. On the bottom is the corresponding section of the open-source developer lifecycle.</figcaption></figure><p>Two key differences to point out before we break down each section of this developer journey for our sales cycle:</p><ul><li><strong>Consideration to Evaluate</strong>: Although taking up the same spot within the lifecycle, switching from consideration to evaluation is a crucial verbiage differentiator. Using yourself as the consumer, would you consider different consideration techniques when deciding between different granola bar brands and different software vendors? Yes. Although some health nuts approach snacks with Excel charts and calorie counters, the word evaluate properly emphasizes the systematic preparation needed in this step.</li><li><strong>Service is Broken Up into Three Sections</strong>: As mentioned above, Service contained far too many pieces, from initial workshops and introductory sessions to get users started with the tool to building out entire workflows. Now, those pieces are broken up into three distinct sections to track better where users face friction.</li></ul><h3>Developer Journey in a Sales Cycle</h3><p>Taking this new Mapping, I decided to look at what a successful sales cycle would look like engaging with developer stakeholders.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CKa1Me_S8ZYDpvOyqFfF2A.png" /><figcaption>Open-Source Developer Journey combined with Sales Touchpoints</figcaption></figure><p>With this new layout, here are some of the critical things to keep in mind for each of the stages:</p><ul><li><strong>Each of the Stages</strong>: Map developer changes in intent and actions; they do not imply equal amounts of time</li><li><strong>Goals of the Stage</strong>: What point do we need to get across within this stage or question to answer to progress to the next stage?</li><li><strong>Key Questions in the Stage</strong>: What are some common other questions that provide solid answers to support our goals?</li><li><strong>Phase in Sales Cycle</strong>: What does this look like in the current sales cycle?</li><li><strong>Content Needed</strong>: What is needed to be built out and maintained to support each phase in the journey?</li></ul><p>Now, we can briefly break down each section to understand more about enabling the developer’s journey within an organization.</p><h4>Discover</h4><p>Similar to the traditional customer journey awareness category, this tracks how developers discover your product. One thing I liked about the original Developer Journey map was the difference between internal and external touchpoints.</p><h4>Evaluate</h4><p>As mentioned briefly above, Evaluate is an analytical process within the sales cycle. A user moves into the Evaluate phase after the initial discovery of the product (or often, even more broadly, the problem your product is solving). This phase works to prove the value of your product and that it is the solution to your issues.</p><blockquote>I’m the tool. The product is the solution. — My Favorite Solutions Engineer</blockquote><h4>Learn</h4><p>After evaluating your tool, they may move forward with it and learn more. Depending on the novelty of your product / and how “emerging” an industry you sit, the Learn phase may require some workshop-like knowledge transfer presentations or technical deep dives. But it’s important to note that:</p><blockquote>Developers love to learn by building.</blockquote><p>Depending on your product, there can sometimes be a lot of hoops to jump through to get the correct permissions or access to the proper infrastructure or data to get started using your product. Providing easy-to-use playground environments or Quickstart examples allows developers to learn more through practicing with your solution.</p><p>In this phase, Developers should interact extensively with your provided examples and documentation. However, that does not mean that you can’t do anything to push the sale along as they explore.</p><ul><li><strong>Value Checklist</strong>: What value does your product bring to your developers’ workflow? Your quickstart examples and sandbox should explicitly touch on each of these values. But, when engaging with clients, it is often helpful to align on the expected value before learning and ensuring they explicitly list what they are looking to achieve.</li></ul><blockquote>Aligning on value helps turn fun open-ended “science experiments” into actual showcases of product value and immediate need</blockquote><ul><li><strong>Touchpoints + Feedback</strong>: Great documentation and guided examples can lead developers to find these explicit values async. But, creating a recommended learning plan and touchpoints for structured feedback ensures clear communication. This information is helpful in both successful Learning phases (for background in future planning of POCs) and unsuccessful phases (for feedback to bring back to product and engineering).</li></ul><h4>Build</h4><p>After getting their hands dirty and hopefully running through a few “Hello World” projects, it is time for our developers to start building their use cases. This is typically called a proof of concept, another word for your product&#39;s first MVP (minimum viable product) working in their system.</p><p>While many teams may know what they would like their first use-case or MVP to be, it is essential to come into MVP discussions with clients with opinions — especially when choosing between multiple first-use cases. Often, developers want to take on challenges, and it is super exciting that they want to solve their most challenging problems with your product. However, the tallest mountain might not be the first one you want to climb.</p><blockquote>When choosing POC use-cases, we want to try our best to optimize for two (often opposing) values — the Speed to a working POC and valuable use-case that can showcase value to both developer and other (typically business) stakeholders in your client’s firm.</blockquote><p>While a strong Build phase focuses predominantly on developing a valuable POC, there are some key pieces that can break down during this section. Support is one of the main things your client is testing in the Build phase. While your product team will want to get to a place where they do not have to hold clients’ hands through all POC processes, do they have dedicated resources to assist them?</p><h4>Scale</h4><p>Finally, after developing their proof of concept, it’s time to look into what this means at a larger scale for your client’s teams. Often, this means actually signing on the dotted line of a larger or longer-term contract.</p><p>Scaling is potentially too big to even be its own section (or even pretend to guess what materials you need). Most of Scale is providing the client with resources to grow with you, which can be through many things like check-ins or feedback on a product roadmap. Companies that Scale well keep strong client partnerships/relationships through customer success functions.</p><h4>Advocate</h4><p>Not listed in the graphic above but brought in from the original customer journey, Advocate is an essential last touchpoint to consider unique to Scale.</p><blockquote>This is when you turn a traditional customer into a partner or public champion of your product.</blockquote><p>This is important as a measure of customer retention and driving new sales. Advocacy stories come in the form of logos, case studies, and public events that can be used for future client discovery.</p><h3>Two Most Important KPIs For Developer Journeys</h3><p>The diagram above lists two important KPIs for building our developer products. These are the “Time to Hello World” and the “Speed to MVP.”</p><p><strong>Time to First Hello World: </strong>This is within the Learn phase of our developer’s journey. It denotes the time it takes for a developer to set up and experience an initial successful interaction with your product. (Example: Setting up and making a first call to your API)</p><p><strong>Speed to MVP: </strong>While the time to hello world measures how long it takes for users to perform their first action with your product, speed to MVP measures their first use-case/workflow deployed with your product.</p><p>Teams need to track these metrics to improve the developer experience consistently. Figuring out where developers are stuck on these journeys can help push future engagements.</p><h3>So … Is This Always The New Journey?</h3><p>A key thing to note is that this mapped a sales cycle/developer success journey for just that … <strong>developers</strong>. This is more of a mapping of technical success for end-user stakeholders. However, just because developers will use your product doesn’t mean they’re your only stakeholders.</p><p>Sales teams leading engagements with executives or other business stakeholders may have different touchpoints driving their cycle. This is known as top-down growth.</p><blockquote>Your desired customer journey will need to revolve around your desired customer.</blockquote><p>However, more teams are beginning to <a href="https://shimont.medium.com/switching-top-down-sales-to-bottom-up-product-led-growth-30be52f7dba7">explore product-led growth strategies (instead of top-down)</a> for developer products. With this push to focus on collecting developers as advocates, it may be time to take a page from the open-source communities book!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9787935997fb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding ML Versioning From a Software Background]]></title>
            <link>https://medium.com/@haleymassa/understanding-ml-versioning-from-a-software-background-649732070dd?source=rss-9039756d1092------2</link>
            <guid isPermaLink="false">https://medium.com/p/649732070dd</guid>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[version-control]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Haley Massa]]></dc:creator>
            <pubDate>Wed, 26 Jul 2023 20:48:45 GMT</pubDate>
            <atom:updated>2023-07-26T20:48:45.735Z</atom:updated>
            <content:encoded><![CDATA[<p>Working at an MLOps startup, we talk a lot about model versioning — whether exploring U.I. visuals, understanding typical validation deployment techniques, or sharing previous work experience horror stories at lunch. As someone with an ML-only background, this controlled chaos that comes with model versioning has become incredibly normal to me. However, it wasn’t until talking with some of our software engineers that I realized how exceptionally confusing it can be.</p><h3><strong>Challenges Within Model Versioning (and MLOps)</strong></h3><p>Like all techniques under the MLOps umbrella, model versioning sits in the blurry middle ground between software engineering and machine learning. Many blog posts and papers help describe this middle ground better, but the typical quick definition for MLOps is “DevOps for Machine Learning systems.”</p><p>Many software engineers know DevOps, even if they’re unaware of the specific title. A great deep dive into DevOps can be found here. To paraphrase, if software engineering aims to create dependable and effective software, DevOps seeks to ensure that this creation is efficient, tracked, and reproducible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*S39iFmOfV1R3DlYI" /></figure><p>MLOps has a similar goal. MLOps hopes to productionalize the development, deployment, and maintenance of machine learning models that teams are putting into production. However, one key difference between machine learning and traditional software engineering is ML projects’ interactive (and, therefore, experimentative) nature.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*It9rxYF99el8vHc7" /></figure><p>Two different branches interact with our “traditional DevOps” cycle. These are model building (experimentation) and real-world data.</p><p><em>Experimentation</em>: Data/research scientists live in a world of constant investigation. These teams continuously evaluate different models/techniques to improve their solutions.</p><p><em>Real World Data</em>: While traditional software interacts with the external world, ML models interact with the world and consider the world around them when making decisions. This means that, unlike conventional software, ML systems can decay (meaning they require updated versions) due to external changes in the world.</p><p>These two additional pieces into the MLOps lifecycle add fundamental ways in which ML models can decay, therefore adding different ways for practitioners to create new versions/updates. (lousy sentence, woof). In practice, the best way to describe these new updates to people with a software engineering background is to compare them to semantic versioning.</p><h3><strong>Semantic Application Versioning Structure Refresh</strong></h3><p>In software engineering, semantic versioning is a method of identifying the changes made to a software project in a standardized way. I have always referred to this structure as the X.Y.Z. method, where each value represents a different version change category:</p><p>Starting from the right to the left:</p><blockquote><strong><em>Version</em></strong><em> X.Y.Z</em></blockquote><blockquote><strong>Version</strong> Major.Minor.Patch</blockquote><p>To review each of these pieces:</p><p><strong>Patch</strong>: In software development, a patch is typically a small bug fix or other minor change made to the software.</p><p><strong>Minor</strong>: A minor development is when a slightly more significant change is made, such as adding a new feature or fixing a more substantial bug.</p><p><strong>Major</strong>: Finally, a major increment occurs when a significant change is made to the software, such as a major rewrite or a notable new feature.</p><h3><strong>Compared to Model Versioning,</strong></h3><p>ML models still have traditional software components and could require bug updates like typical software. In this example, we will ignore all “umm, but what about.” Instead, we are going to focus on understanding the unique ways in which we need to be able to retrain models using semantic versioning.</p><p>We can think of a new model versioning way:</p><blockquote><strong>Version</strong> X.Y.Z</blockquote><blockquote><strong>Use_Case</strong> Model_Architecture_Change.Model_Feature_Change.Data_Iterative_Retrain</blockquote><p><strong>Version</strong>: We must discuss the highest-level concept before breaking down the specific pieces. We can think of versions relating to a particular model use case. For example, a “Real Time Transaction Fraud Model” will be a years-long project with much evolution.</p><p>Starting this time from right to left:</p><p><strong>Data Iterative Retraining = Patch</strong>: We’ve emphasized how real-world data can begin to affect different model types. One technique ML teams will utilize when this occurs (or to stop it from happening) is to retrain their model with new data. This is known as <em>data iterative retraining</em> (or <em>data iterative versioning</em>). While there are a few different strategies that teams will use to decide when they should trigger iterative data retraining, the general format of retraining is the same. Absolutely nothing changes in the model structure. In an ideal MLOps scenario, no one will have to set anything manually, and these data pipelines and scripts could run at the click of a button or even automatically.</p><p><strong>Model Feature Change / Update = Minor: </strong>The next type of change is a minor input/output change within the model. In these scenarios, something has happened that makes the developer want to change the structure of the model, but in reality, only a little bit. Some common examples of this include:</p><ul><li><em>A new output has emerged</em>: Based on the data, a new category we want to evaluate has emerged. Teams may re-label / transform the data they typically use for training to include this new output label.</li><li><em>The team wants to add a new input feature</em>: Through experimentation, it may have developed a new feature to add to the model that helps inform its output.</li><li><em>Updating feature engineering</em>: Teams may choose to update a current feature in their model. A data pipeline issue occurs when unexpected data comes into our data stream. If you purchase data from a vendor that marks missing data as Null, they begin ingesting it as -1.</li></ul><p><strong>Model Architecture Change = Major: </strong>Finally, the last type of change is the most substantial; some may even call it significant, which is the model architecture change. A model architecture change occurs when you use a new algorithm to solve your problem. This is typically done because, through research and experimentation, your team has determined that a different algorithm will outperform the current at the same task.</p><h3><strong>Data Iterative vs. Model Iterative Semantics</strong></h3><p>ML teams use two common phrases to describe model versioning: <em>data </em>and <em>model iterative</em>. While we have already described data iterative, model iterative is when the model has a structural change. The line for what changes can be described as model iterative can be a little blurry. Some teams may say that model feature changes are closer to data iteration because the model has not changed enough to be a “new iteration.” Others may say that the structure of the model has changed, and in conclusion, the model has been iterated on, making the change model iterative.</p><p>It is crucial to remember that when talking to and understanding data science teams. And if you want to join the debate, look at the <a href="https://en.wikipedia.org/wiki/Ship_of_Theseus">Ship of Theseus thought experiment</a>. <em>If you take a boat apart piece by piece, each time replacing each piece with the same wood plank, at what point is it considered a new boat?</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=649732070dd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building LLM Applications for Knowledge Retrieval]]></title>
            <link>https://medium.com/@haleymassa/building-llm-applications-for-knowledge-retrieval-d00674291e2a?source=rss-9039756d1092------2</link>
            <guid isPermaLink="false">https://medium.com/p/d00674291e2a</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[generative-ai-use-cases]]></category>
            <category><![CDATA[llmops]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Haley Massa]]></dc:creator>
            <pubDate>Wed, 26 Jul 2023 20:34:19 GMT</pubDate>
            <atom:updated>2023-07-26T20:34:54.379Z</atom:updated>
            <content:encoded><![CDATA[<p>Since launching our latest suite of <a href="https://www.arthur.ai/blog/announcing-arthur-shield-the-first-firewall-for-llms">LLM-centered products</a>, we have been uniquely positioned to talk with many current and prospective customers about how they’re considering putting LLM applications into production. We’ve noticed exciting similarities across all the industry verticals and scopes of first-use-case MVP LLM projects. Although the exact use cases may differ, overwhelmingly, teams are experimenting with LLMs for knowledge retrieval — a shorthand for the commonly used retrieval-augmentation generation (RAG)¹.</p><p>Whether they are consultants referencing slide decks of relevant research or retail account managers responding to questions about their inventory, organizations have accumulated massive amounts of data that their internal teams need to reference daily. Knowledge retrieval systems solve this problem by augmenting a large language model (LLM) with relevant context on use cases.</p><blockquote><em>Knowledge retrieval applications are typically implemented as productivity boosters within an organization, assisting (and speeding up) the research process of internal teams searching through large document databases for answers.</em></blockquote><p>This blog will work to provide a high-level overview of how these systems are implemented in practice. We start with an overarching view of the end-user experience and “behind-the-curtains” components that make up the general structure of these applications in practice and follow up with some smaller deep dives on choices and concerns organizations often discuss when building these systems.</p><h3>What Makes Up These Applications in Practice</h3><p>One of the best ways to contextualize different pieces of this system is to think about how most people will utilize your application — the end-user experience. Here is a high-level overview of a canonical retrieval-augmented LLM application:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nVn8wQqQJ6tHmpaF.png" /><figcaption><em>LLM knowledge retrieval application workflow showcasing the end-user experience and the behind-the-scenes architecture that powers it. In this diagram, the dashed arrows represent embedding transformations.</em></figcaption></figure><p><strong>End-User Experience</strong>: This is how most people will think about your knowledge retrieval application. This is the “magic” of working with an LLM application that can provide an understandable generated answer to their specific questions.</p><p><strong>‍Behind the Curtains</strong>: These technical pieces make up your application’s “magical” functionality for end users. We will discuss the high-level steps needed to implement this architecture below, but it is important to recognize that the application works through prompt augmentation. This means that most teams add relevant information to answer user questions (i.e., their internal data) into the prompt of off-the-shelf LLM models instead of fine-tuning their own on the task.</p><h3>Why are teams choosing not to fine-tune?</h3><p>When I realized the incredible popularity of knowledge retrieval models in practice, I asked, “What about fine-tuning?” At the beginning of the year, all of the talks around LLMs focused on how quickly teams could fine-tune their own on all of their data.</p><blockquote><em>Fine-tuning an LLM is the process of adapting a pre-trained model to perform better on a use case by providing extra training on a smaller, task-specific dataset.</em></blockquote><p>Fine-tuned LLMs have proven incredibly effective at improving essential metrics for productional ML systems. Namely, they can improve accuracy (by utilizing data for their specific use case) and latency (as they enable the use of smaller models).</p><p>However, teams still turn to data augmentation in practice because of its practical benefits.² Some of these include:</p><ul><li>On the maintenance side, the ability to easily change and update the database of information that LLM can use as context — instead of adding the cost of any new data required to fine-tune again.</li><li>On saving costs in model development, teams can save the time and effort of feature engineering by using the existing data lakes and knowledge bases. Putting together curating prompt/completion pairs for fine-tuning can be a difficult and lengthy task.</li><li>Additionally, it enables teams to build in additional beneficial features to their applications, such as the ability for the LLM to cite which relevant documents it used and personalize data being pulled into the application by user permissions.</li><li>Finally, it is notable that teams are choosing knowledge retrieval as a way to combat hallucinations, as they are less likely to occur when you provide questions on relevant documents instead of relying on the internal knowledge of an LLM. This does not mean that they are a solved problem, however. Poor information retrieval techniques cause LLMs to poorly answer questions on incorrectly sourced raw data. We will define and dive deeper into hallucinations later when addressing challenges in deployment.</li></ul><h3>Steps (and Considerations) in a Knowledge Retrieval Application</h3><p>Now that we’ve seen a brief introduction to the overall architecture, let’s break it down into the high-level steps teams need to take to build out this application.</p><h3>Preparing Input Into LLM</h3><p>In knowledge retrieval scenarios, teams typically use an out-of-the-box LLM application, so most of the engineering work goes into formatting the prompt for their model of choice. These prompts usually contain three values formatted for your application:</p><p><strong><em>User Input</em></strong>: Question the end-user sends into the LLM application for a response.</p><p><strong><em>Prompt Augmentation</em></strong>: Typically done through methods such as paraphrasing or incorporating explicit instructions, this technique is meant to improve the quality and use-case relevance of the LLM application’s response.</p><p><strong><em>Context (Data Augmentation)</em></strong>: Relevant background information sent to the LLM to assist in answering the question. While this could be a stationary corpus of relevant information, typically, there is more information you want to ask detailed questions about than can be submitted as context for all possible questions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PQ1a8M9k3QcuVlcN7vEeyg.png" /><figcaption>Visual showing the difference between all inputs to an LLM application</figcaption></figure><p>For this reason, teams will build out the next step of creating these applications.</p><h3>Create a Process to Search for Relevant Context</h3><p>As mentioned above, teams need to think critically about how they plan to use their knowledge database to augment an LLM. Keep in mind that not only do LLMs have a maximum context window that can be submitted, but if they are using an LLM via an API, the current pricing structure is typically by how many tokens you input in the requests (as well as the model completion/output). This means there is an incentive to encourage either the classical information retrieval system to return an extremely curated set of highly relevant documents or for a subprocess to compress further relevant information returned by the IR system before passing it back to the LLM.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EbiAO-ewGjVO57S7.png" /><figcaption>Understanding the steps of knowledge retrieval</figcaption></figure><p><strong><em>Knowledge Database</em></strong>: A knowledge database is where all the data relevant to your LLM application use case currently lives.</p><p><strong><em>Vector Store</em></strong>: This mechanism optimizes storing and retrieving vectorized representations of words, phrases, or sentences. This specialized text storage is used for LLM applications to improve querying and quick evaluation in production.</p><p><strong><em>Embedding Model</em></strong>: The embedding model transforms the raw text into easily queryable embeddings. These are typically mapped to another large language model embedding, such as BERT.</p><p><strong><em>Query Functionality</em></strong>: A query search is done to find the most relevant documents similar to the embeddings of the user input prompt. This search functionality can be done with various techniques, from simple similarity measures to machine learning.</p><h3>Choosing an LLM</h3><p>With the increasing ease of implementation of available LLMs, choosing which LLM can be more complex than actually using one. When it comes to making that choice, there are several factors that teams need to consider, such as the training data, latency, price, or any technical requirements.³</p><h3>Challenges of Deploying Knowledge Retrieval Systems</h3><p>We touched briefly on some deployment challenges when discussing the choice between fine-tuning and data augmentation; however, there are some key things to remember when deploying LLM models.</p><p><strong>Sensitive Data Leakage</strong>: There are many ways to define sensitive data. The one that comes to mind for most people is personally identifiable information (PII), which in many cases, should be completely blocked from entering or exiting your LLM application. Additionally, teams with established and organized access permissions often rely on existing data user access control to influence what data can be pulled in as context.</p><p>However, one of the hardest pieces to evaluate for sensitive data goes beyond regex checks and access control. It occurs when end users need access to information about the data but not the data itself. For example, a user may be able to ask questions about aggregations, like “What percentage of patients have O-negative blood?” To access this, the model would need all patient blood-type records. However, you do not want your end user to be able to ask specific questions about that data, like a certain patient’s blood type, for example.</p><p><strong>Hallucinations</strong>: One of the most commonly asked-about challenges, hallucinations can be best summed up as mistakes made by the LLM. They occur when the model provides an unsubstantiated (or “made up”) answer to the question it is being asked. We already see the consequences of believing hallucinations across industries, from unrunnable code suggestions to a lawyer in his own legal trouble for blindly believing court citations from ChatGPT.⁴ To improve productivity, end users need to be able to trust their generative assistants, so thinking critically about how to mitigate and detect hallucinations is critical during application development and deployment.</p><p>Arthur has been working on a suite of products that helps teams go from development to safeguarded deployment to active monitoring and continued improvement for LLM systems, including knowledge retrieval. Let us know if your group wants to dive deeper into LLM applications or get started on your own <a href="https://www.arthur.ai/get-started">here</a>.</p><p>‍— — —</p><p>1 Lewis et al., “Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks.”</p><p>2 Bratanic, “Knowledge Graphs &amp; LLMs.”</p><p>3 “GPT-4 Alternatives.”</p><p>4 “Lawyer Apologizes for Fake Court Citations from ChatGPT | CNN Business.”</p><p>______________________________</p><p>This was a post originally posted to the <a href="https://www.arthur.ai/">Arthur</a> blog.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d00674291e2a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Is My Job Title Made Up? Finding Your Role in ML]]></title>
            <link>https://medium.com/attainable-ai/is-my-job-title-made-up-finding-your-role-in-ml-9ea7965cfcbd?source=rss-9039756d1092------2</link>
            <guid isPermaLink="false">https://medium.com/p/9ea7965cfcbd</guid>
            <category><![CDATA[data-scientist-skills]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-scientist]]></category>
            <category><![CDATA[jobs]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Haley Massa]]></dc:creator>
            <pubDate>Tue, 09 May 2023 16:07:17 GMT</pubDate>
            <atom:updated>2023-05-09T16:07:17.588Z</atom:updated>
            <content:encoded><![CDATA[<p>I remember how stressful it was to search for my first data science job. Having just graduated with my Masters, I spent weeks blindly searching LinkedIn and blanketing job postings with applications like <em>resume_(insert job title here).pdf</em>. Fun fact: I received Greenhouse rejections for jobs I didn’t even know I applied to for months after starting my first job.</p><p>While the sheer volume of resumes sent out was most definitely a byproduct of my anxiety, the blanketing of resumes to any job title containing the word “data” was not that far off. There are two scary truths within the world of job searching for data science roles:</p><h3>1. All companies that know what they’re looking for in a role call it something different</h3><p>The most common example of this can be seen below. A product analyst at Google is essentially a “data scientist.” While a data scientist at Facebook may be more like a traditional “data analyst.” Companies will follow their own internal guidelines when setting job titles.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fLBjLMPrccgWkHTD.png" /><figcaption>Comparison between a recent Data Science job posting at Meta and Data Analyst posting at Google</figcaption></figure><h3>2. And companies that don’t … call it Data Scientist</h3><p>Another thing to be wary of when job searching is the vanilla umbrella term of a data scientist. Although your dream data scientist job is probably also titled data scientist, there is a lot of mis-marketing of positions in the ML space right now.</p><p>A <a href="https://sws.informatik.uni-leipzig.de/wp-content/uploads/2023/01/socio-technical-anti-patterns-icse2023.pdf">recent MLOps survey paper</a> called it “<em>headless chicken hiring.</em>” This occurs when organizations know they want to level up their data science and AI capabilities. They need data lakes cleaned, ETL pipelines built, someone to create visualizations and generate reports, and/or any other potential task involving data. And to find people to do it, they utilize the same approach as me, unemployed on LinkedIn in my parent’s basement, just throwing a title with “data” in the name and thinking, “Well, good enough.”</p><p>Taking a “well good enough” titled position when looking for a traditional data scientist role leaves a lot of developers unhappy. It’s one of the reasons that data scientist roles have a turnover rate of <a href="https://towardsdatascience.com/stop-hiring-data-scientists-improve-ml-product-team-retention-8ae04dac406e">55% higher than already high-tech industry standards</a>. So, it is essential to find a position that matches your expectations.</p><h3>That is why, my number one piece of advice for people who know what they are looking for in their job search is to read the job description</h3><p>Bonus points for those that not only evaluate the job description to understand what they are looking for but also tailor their resume to match the wording of the posting to <a href="https://connect.informs.org/careercenter/resources/optimizing-your-resume-for-hiring-algorithms">optimize for resume screening algorithms</a>. (Google Chrome extensions like <a href="https://chrome.google.com/webstore/detail/jobalytics-resume-keyword/fkiljfkkceaopbpfgfmjdnkiejaifkgd?hl=en">Jobalytics</a> will automatically compare your resume to job postings and give you a percent match).</p><p>But … that still leaves those who don’t know exactly what they’re looking for. And for them, my second piece of advice is to …</p><h3>Start by understanding traditional data roles by skills, toolkits, and role in the ML lifecycle</h3><p>When looking at Google’s job posting, you may have noticed that I compared their role to a “traditional data scientist.” As we’ve established, there are quite a few job titles with data in the name. When starting a job search within AI, it’s essential to understand what the traditional breakdown of those roles is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gkGzYhZohgzW3F6F.png" /><figcaption>Quick drawing covering the different Tasks, Skills, and Toolkits needed for each of the major technical roles in ML</figcaption></figure><p>It can be helpful to choose a role you would like to go after and then tailor your resume and/or up-skill to fit into it. You can start with some of the skills/toolkits listed above and cross-check with LinkedIn job postings to ensure they are current.</p><h4>But, all these skills are so different? How are these all AI roles?</h4><p>Another thing to think about when applying to roles in AI is understanding where the position you are applying to fits into the ML ecosystem. While I am sure I will cover the trend of the <a href="https://multithreaded.stitchfix.com/blog/2019/03/11/FullStackDS-Generalists/">“end-to-end” data scientist</a> in a future newsletter, most organizations still operate with a project “handoff” system. All the roles listed above work together to create ML projects.</p><p>Understanding where different roles sit in this system can help job seekers think about the big picture of their future roles:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-4aiMB7n3wR1cZvS.png" /><figcaption>Quick drawing following the ML Lifecycle</figcaption></figure><p>In this image, we can see these handoffs in action. The <strong>data engineer</strong> takes raw data from the “real world” — i.e., any external data source in this case — and transforms it into usable formats. They maintain the data infrastructure, creating data lakes and, in more recent years, feature stores for data scientists/analysts to pull from.</p><p>Next, the analysis and experimentation pipeline begins, as organized data is taken from the data lakes or feature stores. Data analysts/scientists transform that data for business insights/outcomes. <strong>Data analysts </strong>typically focus more on the insights part of that equation. When external stakeholders ask business questions, data analysts transform and analyze the data to provide answers. These answers could be in the form of charts, reports, or even presentations.</p><p>On the other hand, <strong>data scientists</strong>’ experimentation pipeline also starts with data analysis. However, for them, this analysis is rarely driven by answering a question; instead, they are asked to solve a problem. For example, instead of answering the question, “How has the rate of credit card fraud changed from last year to now,” they are asked to improve the system to detect credit card fraud. To do this, they often work with data analysts to explore data related to the problem and use their statistical background and domain knowledge to evaluate solutions. These solutions are often statistical or machine learning models.</p><p>The next handoff occurs after the model is created and ready for production (to be served to end users). While <strong>ML engineers</strong> often have some hand in model experimentation, they are a crucial part of this handoff, taking the finished model from the data scientists. Solutions created after the analysis/experimentation pipeline are part of the productionalized pipeline.</p><p>ML Engineers are in charge of helping evaluate data scientists’ models to ensure they’re ready for production. They then optimize the code, through techniques like data parallelization and the model, through methods like reducing model size. Finally, they own preparation for model deployment from setting up the infrastructure, testing production environments, validating CI/CD pipelines, and maintaining that deployment through monitoring.</p><p>After ML Engineers deploy their model, they provide <strong>backend engineers</strong> or <strong>developers</strong> with an API definition that defines how to interact with their deployed model. With that API, backend developers integrate it into existing backend architecture and infrastructure. They also often assist ML engineers with monitoring and maintaining the ML model, helping with this like debugging data processing or implementing error handling.</p><p>That’s the final hand-off, as the ML model begins to run in production. At this point, it begins making predictions on data. That data, as well as those predictions, are typically stored in the organization’s databases. And the cycle continues …</p><p>All in all, if you’re looking for a technical role building out AI systems, it’s definitely attainable. You just need to know where to start and what skills to build up. While we’ll definitely cover some more specific skills in upcoming newsletters, some great places to start are Coursera, Udemy, and even Youtube (the world’s largest online education platform).</p><p>Also, it’s important to note that these aren’t the only roles available in AI. Teams needs the PMs (product, project and program managers), technical writers, designers and much more to develop their AI systems and products!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9ea7965cfcbd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/attainable-ai/is-my-job-title-made-up-finding-your-role-in-ml-9ea7965cfcbd">Is My Job Title Made Up? Finding Your Role in ML</a> was originally published in <a href="https://medium.com/attainable-ai">Attainable AI Newsletter</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Does the ML Lifecycle Look Like for LLMs in Practice?]]></title>
            <link>https://medium.com/@haleymassa/what-does-the-ml-lifecycle-look-like-for-llms-in-practice-e8c3d6df5e4d?source=rss-9039756d1092------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8c3d6df5e4d</guid>
            <category><![CDATA[ml-lifecycle]]></category>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Haley Massa]]></dc:creator>
            <pubDate>Sun, 07 May 2023 18:08:17 GMT</pubDate>
            <atom:updated>2023-05-07T18:08:17.196Z</atom:updated>
            <content:encoded><![CDATA[<p>I’m not going to say I was a full-blown deep learning denier, but I was stubbornly holding out to avoid getting swept up in the LLM hype. While I find almost all ML research interesting, I am really enamored with ML systems research, dedicated to the practical implementation of ML models. And it seemed like generative AI was being touted around more as a fun toy to “see what it could do” than something feasible to put into production.</p><p>As usual, the LinkedIn posts started to pour in. However, it wasn’t until recently, when those same posts began to shift from “Wow, look at this response” to “Wow, look at this application I built,” that I realized I could no longer keep my head in the sand. I realized that sooner than I was expecting, these applications will be a part of the ML systems work I am so interested in. So, I spent some time trying to find out what makes the development of these models different from typical ML models.</p><h3>What Does the Traditional ML Lifecycle Look Like?</h3><p>Over the years, there have been many different formats that researchers have used to describe the steps teams go through to build an ML model. While I will not detail these steps, please refer to the diagram below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7un-w6IYY5om2QCZ.jpeg" /><figcaption>A drawing of the “Traditional” ML Lifecycle</figcaption></figure><p>We can see in the diagram two core pipelines that work to put ML models into production (and one version-controlled layer that helps to manage them). The first development pipeline is where data scientists and research teams work to develop the model. In the second pipeline, ML Engineers and developers work to take their model at the final stage of development and productionalize it into something that can be used to make real-world predictions.</p><h3>What Does an LLM Lifecycle Look Like?</h3><p>Although LLMs are trying to carve out their own phrase within MLOps (LLMOps), it’s important to remember that they’re still machine learning systems. This means that even if they use different tools or phrases, they still follow most of the same lifecycle and best practices.</p><p>I’ve broken down the LLM lifecycle into three phases, seen in the drawing below. In the following sections, I will give a high-level overview of each phase and how it relates back to the traditional ML lifecycle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*swHsxtwyPG4QjBWC.png" /><figcaption>A drawing of the LLM ML Lifecycle</figcaption></figure><h3>Foundation Models</h3><p>On the left, we can see the most famous aspect of these new LLM systems, the foundation models. Foundation models are large pre-trained language models capable of understanding and generating natural language text. This ability to perform general language tasks well enables these models to serve as the starting point for various <a href="https://www.arthur.ai/model-type/nlp">NLP tasks</a>, such as language translation, text summarization, and question-answering.</p><p>Foundation models are the most significant shift away from the traditional ML lifecycle. API access to foundation models has made it easier for teams to leverage NLP in their operations, regardless of industry or size. They can implement just the API as their production model — skipping most of the ML lifecycle workflow — if they are just looking for general language task capabilities.</p><p>This is a standard route we see organizations go down as a first iteration of putting an LLM into production. However, this is no longer remarkable, as any company can create an OpenAI account. Instead, users seek customized experiences based on the specific use case for the model they interact with. To do this, ML teams need to use many of their existing techniques for ML model development to fine-tune and improve their model based on its specific use case.</p><p><em>Note: Many foundation models have a closed-source nature due to the lack of transparency and accessibility of the code and data used to train them. Verifying the model’s accuracy and biases is difficult without access to this code and data. This can lead to unintended consequences and perpetuate existing biases in the data.</em></p><h3>Development</h3><p>The development phase is where ML practitioners build and improve upon these use case–specific ML models. As we can see from the diagrams above, it exists in both the traditional and LLM lifecycle. However, one key difference is that there are currently fewer development steps for LLMs. For example, teams do not need to select and test different model architectures. While development for LLM models will undoubtedly continue to advance, the workflow is currently streamlined into three main steps:</p><h4>Defining the Use Case</h4><p>While not explicitly listed in the diagram above, the first step to building any worthwhile ML model for production, LLM or not, is to define and understand your use case. Teams will need to spend time with business and product stakeholders to understand the purpose of the model they are putting into production.</p><h4>Data Curation &amp; Model Fine-Tuning</h4><p>Data science teams must curate and clean use case–specific data to build out use case–specific LLMs. This data will be used to train/fine-tune the foundation model’s language understanding to their task requirements.</p><p>Cleaning and curating data is something that data science teams are used to, as it is a part of their traditional ML lifecycle. However, one benefit of using LLM models over traditional ML techniques is that they already have a solid understanding of language due to all the data they were trained on originally. By using data only to fine-tune on top of an existing large model, teams are not required to curate and clean as much data.</p><h4>Qualitative Validation with Prompts</h4><p>Similar to all traditional ML models, these models must be tested and validated before they can interact with the world in production. In traditional ML model lifecycles, this is done with the help of well-established historical benchmarks and metrics. As we will cover in a future post, this is different with LLMs.</p><p>Instead, teams must understand the use case enough to create realistic tests and adversarial prompts to evaluate the model. They then can use metrics built to quantify essential qualities of the text (such as tone or context) against example responses provided for each prompt. Additionally, teams may choose to qualitatively assess the model’s performance based on their understanding of human language and use cases.</p><h3>Application Schema</h3><p>The final block in our LLM lifecycle diagram is the application schema. Referring to how your LLM is implemented and interacted with in production, it is similar to the productionalization process that ML Engineers and developers go through when traditionally implementing ML models.</p><p>In practice, this is often built with prompt orchestration, where multiple prompts are chained together. Before getting into application schemas where multiple prompts interact, let’s look at what this would look like for an application with a single user prompt — like a <a href="https://www.arthur.ai/blog/ask-arthur-episode-1-introduction">chatbot</a>.</p><p>The process of constructing a single prompt is more complicated in production than just taking in the user’s input. One concept of LLMs that is different from traditional ML models is that beyond fine-tuning the model, prompt engineers are able to “fine-tune” users’ inputs to the application at the time of inference with a prompt template.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*InVIHoV_I4qqKSgh.png" /><figcaption><em>Taken from LangChain Prompt Template article mentioned later in this post.</em></figcaption></figure><h4>Prompt Template</h4><p>Prompt engineers write a prompt template as an additional step of model “fine-tuning.” Traditionally, we think of fine-tuning as adding parametric knowledge to the model. This is the knowledge that a model learns at training time and is stored within the model weights (or parameters).</p><p>On the other hand, prompt templates work as source knowledge added to the model. This is knowledge added during inference via inputs to the model. They provide additional information on top of users’ input requests during inference. This information typically includes additional background information, context, and rules for model responses. For a deeper dive into prompt templates, check out <a href="https://www.pinecone.io/learn/langchain-prompt-templates/">this article</a>.</p><h4>Prompt Orchestration</h4><p>Prompt orchestration refers to the chaining of prompts together interactively. Some applications, like chatbots, may be simple enough application-wise to work with one core prompt. However, in production, many LLM use cases are actually much more complex.</p><p><a href="https://www.einblick.ai/blog/what-is-langchain-why-use-it/">This article</a> does a great job introducing LangChain — a popular prompt orchestrator — by using the metaphor of baking a cake. You can ask a chatbot to provide you with the ingredients for the cake, but that’s not actually very useful for your end goal of a finished cake. Instead, models need to be able to use that prompt in conjunction with other prompts and actions to get the end result they are looking for.</p><p>We can also see below for a more “real world” example provided by the article for pulling information from generated SQL queries. For those interested, you can also see a real-world example utilizing Arthur written by one of our ML Engineers, who <a href="https://www.arthur.ai/blog/ask-arthur-episode-1-introduction">built a chatbot to interact with our documentation</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*l1DV-rDFI4jvCLAG.png" /><figcaption><em>Taken from LangChain Prompt Orchestration article mentioned above.</em></figcaption></figure><p><em>Note: In traditional ML models, there has been a push in the community to recognize data pipelines as the logical unit of ML work, and not the model itself. One thing that I find interesting about LLM models in production comparatively is that it seems there will be a push to view prompt orchestration as the logical unit of LLM work.</em></p><p>This would make the chaining together of prompts into practice more similar to that of data engineering orchestrating ETL pipelines. Prompt engineering and application designers will need to spend more time and effort defining how these flowcharts will look and how outputs will be validated and monitored.</p><h4>User Feedback</h4><p>Measuring the performance of generative models in production can be an even greater challenge than the already mentioned challenge of validating the model during development. Teams must navigate practical constraints, such as the infeasibility of scaling human labelers to generate common metrics. One approach that has proven successful for teams is tracking user feedback.</p><p>This feedback provides valuable insights into how well their model is performing, enabling teams to continuously fine-tune and improve model performance. The specific techniques used will depend on the nature of the feedback and desired outcomes for the specific model.</p><h3>Conclusion &amp; A Look Ahead</h3><p>In conclusion, although LLMs are getting their own fancy suite of new tools and job titles, they are still rooted in the best practices and techniques that the ML community has been using for years.</p><ul><li>Foundation Models: serve as a jumpstart for teams to develop strong baseline NLP models</li><li>Development: still the same need to fine-tune and evaluate models for specific end-task, even if there are new techniques and job titles</li><li>Application Schema: process for putting LLMs into production that still needs to be validated and monitored, even if it is reliant on new tools/prompts</li></ul><p>LLMs are most definitely finding their way into production systems near you — and fast. Hopefully, this was an informative first look into how they fit into the frameworks that teams already use for their traditional ML approaches. We’re busy at <a href="https://www.arthur.ai/">Arthur</a> helping folks build with LLMs, so stay tuned for more related content soon.</p><p>This was a post originally posted to the <a href="https://www.arthur.ai/">Arthur</a> blog.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8c3d6df5e4d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>