<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[Signals and Systems]]></title><description><![CDATA[AI as it actually lands inside organizations. Not models and hype -- systems, governance, workforce behavior, and economic outcomes. Written for executives making decisions while the systems are still being built.]]></description><link>https://signalsandsystems.substack.com</link><image><url>https://substackcdn.com/image/fetch/$s_!kQ_e!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc644de99-986a-4b16-a4b7-2f91d87f2a24_1254x1254.png</url><title>Signals and Systems</title><link>https://signalsandsystems.substack.com</link></image><generator>Substack</generator><lastBuildDate>Sat, 23 May 2026 18:14:05 GMT</lastBuildDate><atom:link href="https://signalsandsystems.substack.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Jon Walkenhorst]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[signalsandsystems@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[signalsandsystems@substack.com]]></itunes:email><itunes:name><![CDATA[Jon Walkenhorst]]></itunes:name></itunes:owner><itunes:author><![CDATA[Jon Walkenhorst]]></itunes:author><googleplay:owner><![CDATA[signalsandsystems@substack.com]]></googleplay:owner><googleplay:email><![CDATA[signalsandsystems@substack.com]]></googleplay:email><googleplay:author><![CDATA[Jon Walkenhorst]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Where Authority Must Resolve (Governance Part 15)]]></title><description><![CDATA[How enforcement at bind time prevents consequence without control]]></description><link>https://signalsandsystems.substack.com/p/where-authority-must-resolve-governance</link><guid isPermaLink="false">https://signalsandsystems.substack.com/p/where-authority-must-resolve-governance</guid><dc:creator><![CDATA[Jon Walkenhorst]]></dc:creator><pubDate>Thu, 21 May 2026 02:46:33 GMT</pubDate><enclosure url="https://api.substack.com/feed/podcast/198646328/81398ae57527b952a5a5071004aa28fb.mp3" length="0" type="audio/mpeg"/><content:encoded><![CDATA[<p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://signalsandsystems.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://signalsandsystems.substack.com/subscribe?"><span>Subscribe now</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!D3Oh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81d02e74-4bbe-410b-b57a-bf8382b649e0_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!D3Oh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81d02e74-4bbe-410b-b57a-bf8382b649e0_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!D3Oh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81d02e74-4bbe-410b-b57a-bf8382b649e0_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!D3Oh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81d02e74-4bbe-410b-b57a-bf8382b649e0_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!D3Oh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81d02e74-4bbe-410b-b57a-bf8382b649e0_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!D3Oh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81d02e74-4bbe-410b-b57a-bf8382b649e0_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/81d02e74-4bbe-410b-b57a-bf8382b649e0_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!D3Oh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81d02e74-4bbe-410b-b57a-bf8382b649e0_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!D3Oh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81d02e74-4bbe-410b-b57a-bf8382b649e0_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!D3Oh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81d02e74-4bbe-410b-b57a-bf8382b649e0_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!D3Oh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81d02e74-4bbe-410b-b57a-bf8382b649e0_1536x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em><strong>TL;DR:</strong> The execution boundary is the last control point between intelligence and consequence. Authority, admissibility, and evidence must resolve at this point before action commits, not reconstructed afterward from logs and explanations. This is not post-hoc audit. This is real-time enforcement answering three questions in milliseconds: does this system have authority to act, is this action admissible under current policy, should this action proceed or require escalation. When all three resolve to yes, the system acts. When any resolves to no, the system escalates or refuses. Evidence seals at bind creating cryptographic proof of the decision state. The execution boundary is where AppSec commit-time enforcement meets AI inference workflows. Organizations that engineer this control layer can prove their systems remained in control when boards and regulators ask. Organizations that skip it explain what happened after consequence already occurred.</em></p><div><hr></div><h2>What the Execution Boundary Actually Is</h2><p>The execution boundary is the architectural control point where proposed actions are evaluated for authority and admissibility before they bind to consequence. Not after. Not during incident review. Before the action commits.</p><p>This concept comes directly from security engineering. Code commits require review before merging to production. Database transactions verify authorization before writing. API calls validate credentials before executing. Deployment pipelines check compliance before releasing. Those patterns exist because systems that enforce after problems cost more than systems that prevent problems from occurring.</p><p>AI inference workflows require the same discipline applied at the decision commit point. An agent proposes an action. The execution boundary evaluates whether that action should proceed. Three questions resolve. Authority. Admissibility. Evidence. The outcome is deterministic. Allow, escalate, or refuse.</p><p>Allow means all checks passed and action proceeds immediately. Escalate means uncertainty exists and human judgment is required. Refuse means checks failed and action is blocked entirely. No middle ground. No &#8220;probably fine.&#8221; No &#8220;check the logs later.&#8221; The boundary resolves at bind time and consequence follows only when authorized.</p><h2>Authority Before Execution</h2><p>Authority verification answers whether the system proposing an action has been granted scope to perform that action. Not whether the action is a good idea. Not whether the outcome will be beneficial. Whether the system has the right to act at all.</p><p>A procurement agent requests authorization to place a supply order. The execution boundary queries the authority registry. What scope was this agent granted? The registry returns: procurement authority up to fifty thousand dollars per transaction, vendor relationships with approved suppliers only, commodity categories excluding capital equipment.</p><p>The proposed order is thirty-two thousand dollars. With an approved supplier. For operational materials. Authority check passes. The agent has scope to perform this action.</p><p>If the order were sixty thousand dollars, authority check fails. The agent lacks scope for transactions above fifty thousand. If the supplier were not on the approved list, authority check fails. If the commodity category were capital equipment, authority check fails. In all three failure cases, the boundary refuses or escalates rather than allowing action to proceed beyond granted authority.</p><p>Authority is not static. Delegation chains matter. If Agent A delegates a task to Agent B, Agent B operates under the intersection of its own granted authority and the authority Agent A had available to delegate. If Agent A had authority to commit up to one hundred thousand dollars but delegated a task scoped to twenty thousand, Agent B cannot exceed twenty thousand even if its own authority ceiling is higher.</p><p>Time bounds matter. Authority can expire. An agent granted temporary elevated privileges for a specific operational window loses that authority when the window closes. The execution boundary evaluates authority state at bind time, not at the moment authority was originally granted.</p><h2>Admissibility at Bind</h2><p>Admissibility evaluation answers whether the proposed action should be allowed under current policy even when authority exists. Authority says the system can act. Admissibility says the system should act given present conditions.</p><p>The procurement agent has authority for the thirty-two thousand dollar order. Admissibility evaluation queries operational governance memory. How many orders has this agent placed this quarter? What were the consequence patterns? The memory returns: fifteen recent orders, twelve percent average overage against projected demand, inventory carrying costs rising.</p><p>Policy defines admissibility thresholds. Orders within authority that fall into pattern categories flagged by operational memory trigger escalation even when individual transactions appear routine. This order alone is unremarkable. This order as part of an accumulating pattern requires human review.</p><p>Admissibility is not rules evaluation. Rules are static. Admissibility is dynamic policy resolution against current state. Same action, different admissibility outcome based on execution history, operational context, and real-time conditions that policy written months ago could not anticipate.</p><p>A customer service agent issues a refund. Authority exists. Admissibility queries fraud detection systems. Is this customer account flagged? Has this account requested multiple refunds recently? Are refund requests clustering in suspicious patterns? All checks clear. Admissibility passes. The refund proceeds.</p><p>Next week the same agent issues another refund to a different customer. Authority still exists. But admissibility evaluation now shows this agent has issued refunds thirty percent above historical baseline in the last seven days. Admissibility triggers escalation. Not because individual refunds exceeded limits. Because aggregate pattern suggests investigation before additional refunds proceed.</p><p>The execution boundary evaluates admissibility at bind time using current state, not historical assumptions. This is where governance memory connects to enforcement. Past execution creates context that shapes whether similar future actions remain admissible without escalation.</p><h2>Evidence Sealed at Bind</h2><p>Evidence capture at the execution boundary creates cryptographic proof of the decision state at the moment action was authorized or refused. Not logs written afterward. Not explanations reconstructed from incomplete records. Immutable evidence sealed when the boundary resolved.</p><p>The procurement agent order reaches the execution boundary. Authority verification runs. Scope check passes. Agent identifier, granted authority ceiling, commodity restrictions, timestamp of verification. Cryptographically sealed. Admissibility evaluation runs. Operational memory query, pattern analysis, threshold comparison, escalation decision. Cryptographically sealed. The complete decision context exists as tamper-evident artifact before action commits.</p><p>If the order proceeds, evidence proves authority and admissibility were verified. If regulators ask whether appropriate controls existed, the sealed evidence answers. If audit asks whether the system should have escalated, the admissibility evaluation context shows what factors were considered and why the decision resolved to allow.</p><p>If the order is refused, evidence proves why. Authority check failed at this specific point. Admissibility evaluation triggered this threshold. The system did not act because enforcement prevented it. Post-incident analysis does not reconstruct what probably happened. Evidence shows what actually happened at bind time.</p><p>Evidence sealing is not optional logging. It is governance as operational byproduct. Every execution boundary resolution generates proof automatically. The organization does not document governance after the fact. The architecture produces evidence as systems operate.</p><h2>The Three-Outcome Resolution Model</h2><p>Every execution boundary evaluation resolves to one of three outcomes. Allow, escalate, or refuse. No ambiguity. No &#8220;probably fine.&#8221; Deterministic resolution before consequence occurs.</p><p>Allow means all checks passed. Authority verified. Admissibility confirmed. Evidence sealed. Action proceeds immediately without human intervention. The system acts within its granted scope under conditions where policy permits autonomous operation. This is the green light. Consequence follows because control verified authorization first.</p><p>Escalate means uncertainty exists. Authority may be borderline. Admissibility may require judgment. Context may suggest risk that automated evaluation cannot resolve confidently. The proposed action routes to human review. Not because the system failed. Because the boundary correctly identified situations where human judgment adds value. The system does not guess. It escalates.</p><p>Refuse means checks failed. Authority does not exist for this action. Admissibility evaluation determined this action should not proceed under any circumstances. The boundary blocks execution entirely. No escalation option. No override without explicit authority modification. The system does not act because enforcement prevented unauthorized consequence.</p><p>The three outcomes create organizational clarity. Systems that reach allow have proven their right to act. Systems that escalate have correctly identified judgment calls. Systems that encounter refuse have been stopped before creating exposure. Accountability exists at bind time, not reconstructed after investigation.</p><h2>Building the Execution Boundary Into Inference Workflows</h2><p>The execution boundary is not a separate review step bolted onto finished systems. It is architectural integration at the commitment point where inference decisions become actions with consequence.</p><p>An LLM inference pipeline processes a query. Retrieval returns context. The model generates a response. Before that response routes to the user or triggers downstream action, the execution boundary fires. Does this response fall within granted scope for this agent? Is this response admissible given the query context and operational memory? Should this response proceed or require review?</p><p>If the response is factual information retrieval with no operational impact, the boundary typically allows. If the response includes recommendations that trigger financial transactions, the boundary evaluates whether those transactions fall within authority and admissibility thresholds. If the response appears to contain sensitive data that query context does not justify accessing, the boundary refuses or escalates.</p><p>The boundary layers into existing infrastructure. Not a replacement for RAG pipelines, model serving, or API gateways. An additional control layer at the point where intelligence converts to action. The inference workflow you built in the Models series operates unchanged. The execution boundary adds enforcement without breaking existing functionality.</p><p>This is the discipline security engineering teaches. Defense in depth. Multiple control layers. Enforcement at commit time. Fail-safe design where systems default to refusing rather than allowing when boundary evaluation encounters errors or ambiguity. The execution boundary applies those patterns to autonomous AI systems at the moment decisions bind to reality.</p><h2>What Part 16 Covers</h2><p>The execution boundary establishes where enforcement happens. Part 16 covers how operational governance memory evolves from isolated decisions into accumulated context that shapes future admissibility evaluation. Execution history creates patterns. Consequence reveals what policy frameworks missed. The learning layer that makes governance adaptive rather than static.</p><p>#ExecutionBoundary</p><p>#AIGovernance</p><p>#AuthorityAtBind</p><p>#ContextualBoundaries</p><p>#EnforceBeforeConsequence</p><div><hr></div><p>[AUDIO OPENING]</p><p>A customer service agent receives a refund request. Before the system processes the transaction, three enforcement checks fire in 47 milliseconds. Authority verification. Does this agent have scope to issue refunds? Admissibility evaluation. Is this refund amount within approved limits under current policy? Evidence capture. Cryptographic seal of the decision state at bind. All three pass. The refund processes. The customer sees four-second resolution. The enforcement layer fired three times before action completed. That is the execution boundary working as designed. Not policy documents saying agents can issue refunds. Not logs reconstructing decisions after the fact. Real-time proof the system verified authority before acting. When boards ask who authorized this action before consequence occurred, the answer exists because enforcement happened at bind time, not after problems emerged.</p><p>[END AUDIO OPENING]</p>]]></content:encoded></item><item><title><![CDATA[Engineering Enforcement Into Inference (Governance Part 14)]]></title><description><![CDATA[How decades of security engineering translate to AI systems that can prove their right to act]]></description><link>https://signalsandsystems.substack.com/p/engineering-enforcement-into-inference</link><guid isPermaLink="false">https://signalsandsystems.substack.com/p/engineering-enforcement-into-inference</guid><dc:creator><![CDATA[Jon Walkenhorst]]></dc:creator><pubDate>Fri, 15 May 2026 15:02:05 GMT</pubDate><enclosure url="https://api.substack.com/feed/podcast/197796256/351f219250d475bc1156e6925ebd538d.mp3" length="0" type="audio/mpeg"/><content:encoded><![CDATA[<p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://signalsandsystems.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://signalsandsystems.substack.com/subscribe?"><span>Subscribe now</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SQS8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0df81d50-ebf2-4f54-af56-421f9771558f_1074x716.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SQS8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0df81d50-ebf2-4f54-af56-421f9771558f_1074x716.png 424w, https://substackcdn.com/image/fetch/$s_!SQS8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0df81d50-ebf2-4f54-af56-421f9771558f_1074x716.png 848w, https://substackcdn.com/image/fetch/$s_!SQS8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0df81d50-ebf2-4f54-af56-421f9771558f_1074x716.png 1272w, https://substackcdn.com/image/fetch/$s_!SQS8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0df81d50-ebf2-4f54-af56-421f9771558f_1074x716.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SQS8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0df81d50-ebf2-4f54-af56-421f9771558f_1074x716.png" width="1074" height="716" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0df81d50-ebf2-4f54-af56-421f9771558f_1074x716.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:716,&quot;width&quot;:1074,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1352734,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://signalsandsystems.substack.com/i/197796256?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0df81d50-ebf2-4f54-af56-421f9771558f_1074x716.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!SQS8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0df81d50-ebf2-4f54-af56-421f9771558f_1074x716.png 424w, https://substackcdn.com/image/fetch/$s_!SQS8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0df81d50-ebf2-4f54-af56-421f9771558f_1074x716.png 848w, https://substackcdn.com/image/fetch/$s_!SQS8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0df81d50-ebf2-4f54-af56-421f9771558f_1074x716.png 1272w, https://substackcdn.com/image/fetch/$s_!SQS8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0df81d50-ebf2-4f54-af56-421f9771558f_1074x716.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em><strong>TL;DR:</strong> Contextual Boundaries are not a new framework. They are the practical application of AppSec, DevSecOps, OpSec, and CIAM principles to AI inference workflows. Security engineering learned through decades of fail-and-recover cycles that enforcement happens at commit time, not after consequences occur. Code reviews before deployment, not after production failures. Access controls preventing unauthorized actions, not documenting them afterward. Least privilege limiting blast radius, not explaining damage after incidents. AI systems require the same discipline adapted to inference decision points. CB is enforcement at the moment a decision binds to reality, designed within the specific constraints every enterprise faces. Not generic guardrails. Not narrative governance. The technical and organizational architecture that answers whether a system has the right to act before consequence happens.</em></p><div><hr></div><h2>What Contextual Boundaries Actually Are</h2><p>Contextual Boundaries are enforcement mechanisms embedded into AI inference workflows that answer three questions before a system acts.</p><p>First, is this action within the scope of authority granted to this system?</p><p>Second, does this system have verified access to the data and resources required for this action?</p><p>Third, can this system prove in real time that executing this action is admissible under current policy?</p><p>If the answer to all three is yes, the system acts. If the answer to any is no, the system either escalates to human authority or refuses the action entirely.</p><p>This is not post-hoc review. This is pre-commit enforcement. The same discipline that prevents developers from deploying code without review, blocks users from accessing data without authorization, and limits service accounts to minimum necessary privileges. Applied to the moment an AI system decides to issue a refund, place an order, launch a campaign, or modify a customer record.</p><h2>Why Contextual Matters</h2><p>Every enterprise implements boundaries differently based on constraints that frameworks cannot predict.</p><p>A financial services company enforcing transaction limits for fraud prevention has different boundary requirements than a healthcare system protecting patient data under HIPAA. A manufacturing operation coordinating autonomous supply chain decisions has different needs than a SaaS company managing customer support escalations.</p><p>The three enforcement questions remain constant. The answers change based on regulatory environment, risk tolerance, data sensitivity, operational velocity, and organizational structure. That is why contextual boundaries are engineered, not configured. You design within the constraints you actually have rather than applying generic guardrails and hoping they fit.</p><p>At an EU_based Telecom, compliance boundaries were baked into the deployment pipeline architecture. Access controls were foundational to the infrastructure, not added after security review. When regulatory requirements changed, the architecture adapted without rebuilding because boundaries were engineered for regulatory evolution from the start.</p><p>At an SMB Security provider managing eighty data centers across three continents, operational boundaries generated audit artifacts as byproduct of infrastructure monitoring. Security logs, performance metrics, and compliance reports flowed automatically from systems already built. Enforcement happened in real time. Evidence appeared without additional documentation effort.</p><p>At an SMB company, transforming deployment from annual to biweekly cycles under strict security requirements, approval boundaries matched business velocity. High-risk features got senior oversight. Routine updates got automated validation. The boundaries accelerated deployment rather than blocking it because they were designed for the specific constraints of technology operations under pressure.</p><p>Those patterns transfer. The implementation details do not. That is contextual engineering applied to boundary design.</p><h2>The Three Enforcement Questions in Practice</h2><p>A customer service agent receives a refund request. Before the system processes the transaction, enforcement checkpoints fire.</p><p>Scope validation asks whether issuing refunds falls within this agent&#8217;s granted authority. The agent identifier maps to a role definition. The role includes customer account modification with financial impact limits. The requested refund amount falls within the approved range. Scope check passes.</p><p>Access verification asks whether this agent has legitimate need to access the customer financial record required to process the refund. The agent is assigned to the customer&#8217;s support tier. The customer account is not flagged for fraud review. The agent session is authenticated and current. Access check passes.</p><p>Admissibility evaluation asks whether current policy allows this transaction under present conditions. The customer account is in good standing. The refund reason code matches approved categories. No recent refund activity suggests pattern abuse. The transaction timestamp falls within business hours when human oversight is available if needed. Admissibility check passes.</p><p>All three questions resolve to yes. The system issues the refund. The customer sees resolution in four seconds. The enforcement layer fired three times before action completed. Nothing in the customer experience reveals that boundaries were checked and passed.</p><p>Total enforcement latency was forty-seven milliseconds. Invisible to the user. Automatic for the system. Auditable for compliance review.</p><h2>How This Connects to the Systems You Built</h2><p>The ML infrastructure you built in machine learning series, and the LLM pipeline you built in the model series, both included validation, traceability, and auditability as embedded layers.</p><p>The data pipeline validated schema compliance before ingestion. The feature store tracked provenance from source to training data. The model registry logged which version served which inference request. The monitoring infrastructure detected drift before users experienced degradation. The evaluation framework established quality baselines that production output was measured against continuously.</p><p>Those were contextual boundaries for ML systems. Not called that. Not framed as enforcement. But functionally identical. Checkpoints embedded in the workflow that validated whether actions were safe before consequence occurred. Evidence generated as operational byproduct. Boundaries that enabled velocity by making safe deployment the path of least resistance.</p><p>Contextual boundaries for autonomous AI systems require the same architectural thinking applied to decision commit points. Not bolted onto finished systems. Engineered into the inference pipeline from the start.</p><h2>What&#8217;s Next</h2><p>The remaining articles cover the technical architecture of decision boundaries. How scope, data access, and admissibility checks are implemented as code rather than policy. How the three-outcome model of Allow, Escalate, Refuse resolves at commit time. How boundaries adapt to different agent types, risk profiles, and operational contexts without requiring manual reconfiguration for every use case.</p><p>Enforcement mechanisms that turn contextual engineering from concept into executable control.</p><p>#AIGovernance</p><p>#ContextualBoundaries</p><p>#EnterpriseAI</p><p>#InferenceControl</p><p>#SecurityEngineering</p><div><hr></div><p>[AUDIO OPENING]</p><p>Decades of costly failures have taught security engineering what works. Code reviews before deployment. Access controls preventing unauthorized actions. Least privilege limiting blast radius. These patterns exist because early systems failed when enforcement happened after problems instead of before. Developers committed broken code. Production broke. Systems granted excessive permissions. Data leaked. Services ran with unnecessary privileges. Attackers exploited gaps that should never have existed. The lesson was straightforward. Enforce boundaries at commit time. Prove the right to act before action happens. Generate audit evidence as operational byproduct, not separate documentation. AI agents are making the same mistakes. We applied narrative governance instead of enforcement. Policies saying what systems should do. Logs documenting what systems did. Nothing proving systems had the right to act when decisions bound to reality. Here is what contextual boundaries look like when you engineer them into inference workflows.</p><p>[END AUDIO OPENING]</p>]]></content:encoded></item><item><title><![CDATA[Navigation - Impact]]></title><description><![CDATA[Where to start if you are accountable for adoption, outcomes, or organizational change.]]></description><link>https://signalsandsystems.substack.com/p/navigation-impact</link><guid isPermaLink="false">https://signalsandsystems.substack.com/p/navigation-impact</guid><dc:creator><![CDATA[Jon Walkenhorst]]></dc:creator><pubDate>Fri, 15 May 2026 13:33:53 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!kLE1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F299a8120-756b-47ce-b65f-ea33e50e37c1_1024x1536.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kLE1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F299a8120-756b-47ce-b65f-ea33e50e37c1_1024x1536.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kLE1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F299a8120-756b-47ce-b65f-ea33e50e37c1_1024x1536.png 424w, https://substackcdn.com/image/fetch/$s_!kLE1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F299a8120-756b-47ce-b65f-ea33e50e37c1_1024x1536.png 848w, https://substackcdn.com/image/fetch/$s_!kLE1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F299a8120-756b-47ce-b65f-ea33e50e37c1_1024x1536.png 1272w, https://substackcdn.com/image/fetch/$s_!kLE1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F299a8120-756b-47ce-b65f-ea33e50e37c1_1024x1536.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kLE1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F299a8120-756b-47ce-b65f-ea33e50e37c1_1024x1536.png" width="1024" height="1536" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/299a8120-756b-47ce-b65f-ea33e50e37c1_1024x1536.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1536,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1641418,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://signalsandsystems.substack.com/i/197858090?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F299a8120-756b-47ce-b65f-ea33e50e37c1_1024x1536.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!kLE1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F299a8120-756b-47ce-b65f-ea33e50e37c1_1024x1536.png 424w, https://substackcdn.com/image/fetch/$s_!kLE1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F299a8120-756b-47ce-b65f-ea33e50e37c1_1024x1536.png 848w, https://substackcdn.com/image/fetch/$s_!kLE1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F299a8120-756b-47ce-b65f-ea33e50e37c1_1024x1536.png 1272w, https://substackcdn.com/image/fetch/$s_!kLE1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F299a8120-756b-47ce-b65f-ea33e50e37c1_1024x1536.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2>Impact</h2><p>The model worked. The organization did not.</p><p>That is the most common AI failure mode that never shows up in a post-mortem. The inference was accurate. The system was available. Nobody used it, nobody trusted it, or nobody could prove it was working. The investment stalled not because the technology failed but because the human systems around it were never designed to absorb it.</p><p>AI adoption is a change management problem with a technology layer on top. This bucket covers the human and organizational side: what AI does to jobs and workforce dynamics, how to measure AI effectiveness in real time rather than after the fact, and what product strategy looks like when the product is AI-enabled.</p><p>Three series. Two complete, one active.</p><div><hr></div><h3>Jobs and Workforce | Complete | 18 Articles</h3><p>The broadest series on this publication. Covers AI&#8217;s impact on employment, hiring, organizational design, and the generational dynamics shaping how organizations adopt and resist AI. Includes the skills versus domain paradox, the apprenticeship crisis, credential obsolescence, and a practical arc on how individuals protect and document their own value in an AI-accelerated economy.</p><p>If you lead people, manage talent strategy, or are trying to understand what AI is actually doing to the workforce, start here.</p><p><a href="https://signalsandsystems.substack.com/p/ai-jobs-series-ai-job-part-0">Jobs and Workforce Index</a></p><div><hr></div><h3>Measurement and CQR | Active | 6 Published / 4 Planned</h3><p>CQR stands for Compliance, Quality, and Return. It is a continuous measurement framework built for AI systems that are still evolving after deployment. Most organizations measure AI outcomes after the fact, when the data is stale and the decisions have already been made. CQR measures in motion: whether the system is compliant in real time, whether output quality is driving actual use, and whether the investment is returning measurable value.</p><p>The framework exists because the fundamental barrier to AI adoption is not technical. It is organizational acceptance. CQR gives executives and operators the evidence infrastructure to build that acceptance before the board asks for it.</p><p>Four additional articles planned covering workflow selection, heterogeneous effects, continuous measurement, and when to kill an AI project using the framework.</p><p><a href="https://signalsandsystems.substack.com/p/ai-measurement-is-cqr-measure-part">Measurement and CQR Index</a></p><div><hr></div><h3>Product Management | Nascent | 1 Article</h3><p>Product-market fit has a new variable. This series covers what changes in product strategy, roadmap discipline, and execution when the product is AI-enabled. One article published. More planned.</p><p><a href="https://signalsandsystems.substack.com/p/product-market-fit-in-2025-is-now">Product-Market Fit in the AI Era</a></p><div><hr></div><h2><strong>Where to Start</strong></h2><p>Leading people or managing talent strategy: Jobs and Workforce. Building the case for continued AI investment: Measurement and CQR. Proving ROI to a board or executive sponsor: Measurement and CQR Parts 3 and 5 first. Product leader rethinking strategy for AI-enabled products: Product Management.</p>]]></content:encoded></item><item><title><![CDATA[Navigation - Govern]]></title><description><![CDATA[Where to start if you are responsible for what AI does.]]></description><link>https://signalsandsystems.substack.com/p/navigation-govern</link><guid isPermaLink="false">https://signalsandsystems.substack.com/p/navigation-govern</guid><dc:creator><![CDATA[Jon Walkenhorst]]></dc:creator><pubDate>Fri, 15 May 2026 13:24:51 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!tgy9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf401b61-dd29-42a6-8c78-afe1bc3a156b_1024x1536.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tgy9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf401b61-dd29-42a6-8c78-afe1bc3a156b_1024x1536.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tgy9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf401b61-dd29-42a6-8c78-afe1bc3a156b_1024x1536.png 424w, https://substackcdn.com/image/fetch/$s_!tgy9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf401b61-dd29-42a6-8c78-afe1bc3a156b_1024x1536.png 848w, https://substackcdn.com/image/fetch/$s_!tgy9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf401b61-dd29-42a6-8c78-afe1bc3a156b_1024x1536.png 1272w, https://substackcdn.com/image/fetch/$s_!tgy9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf401b61-dd29-42a6-8c78-afe1bc3a156b_1024x1536.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tgy9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf401b61-dd29-42a6-8c78-afe1bc3a156b_1024x1536.png" width="1024" height="1536" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bf401b61-dd29-42a6-8c78-afe1bc3a156b_1024x1536.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1536,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1620347,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://signalsandsystems.substack.com/i/197856446?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf401b61-dd29-42a6-8c78-afe1bc3a156b_1024x1536.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!tgy9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf401b61-dd29-42a6-8c78-afe1bc3a156b_1024x1536.png 424w, https://substackcdn.com/image/fetch/$s_!tgy9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf401b61-dd29-42a6-8c78-afe1bc3a156b_1024x1536.png 848w, https://substackcdn.com/image/fetch/$s_!tgy9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf401b61-dd29-42a6-8c78-afe1bc3a156b_1024x1536.png 1272w, https://substackcdn.com/image/fetch/$s_!tgy9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf401b61-dd29-42a6-8c78-afe1bc3a156b_1024x1536.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2>Govern</h2><p>AI governance is not a compliance problem. It is an architecture problem.</p><p>Organizations that treat governance as a layer to add before the next audit are building systems that will fail between audits. Authority, identity, and accountability have to be engineered in from the start. Not retrofitted when something goes wrong. Not documented after the fact to satisfy a regulator.</p><p>This bucket covers the control layer. Who decides what AI systems can do. How identity and authorization work when agents are calling other agents at machine speed. What real-time compliance looks like when the system has to enforce policy during inference, not report on it afterward.</p><p>Two series. The governance arc is the most active on this publication and will be the largest when complete.</p><div><hr></div><h3>Governance and Compliance | Active | 14 Published / 20 Planned</h3><p>The most extensive governance series on this publication. Organized in thematic arcs: AI councils and organizational structure, framework design and scaling, lessons from high-stakes industries, the CTO compliance challenge, Center of Excellence architecture, token and context governance, AppSec and DevSecOps for AI pipelines, board accountability, and production incident analysis.</p><p>The series treats governance as an engineering discipline. Policy without enforcement architecture is a document. The articles build toward a capstone: a production system with a full contextual boundary stack.</p><p>Still actively publishing.</p><p><a href="https://signalsandsystems.substack.com/p/ai-governance-and-compliance-series">Governance and Compliance Index</a></p><div><hr></div><h3>CIAM and Identity | Active | 3 Articles</h3><p>Identity is where AI governance gets concrete. When AI systems act on behalf of humans, legacy identity models break. This series covers how customer identity and access management evolves when the principal is an agent, not a person. Covers agent identity architecture, threat models, audit trails, and compliance frameworks for systems that operate without continuous human supervision.</p><p><a href="https://signalsandsystems.substack.com/p/customer-identity-and-access-management">CIAM and Identity Index</a></p><div><hr></div><h2>Where to Start</h2><p>Board or executive sponsor: Governance and Compliance Parts 1 through 4. Compliance, legal, or risk: Parts 7, 8, and 14, then work backward through the framework articles. Technical architects building enforcement into systems: Part 14 forward. Identity and authorization for agent systems: CIAM and Identity.</p>]]></content:encoded></item><item><title><![CDATA[Navigation - Build]]></title><description><![CDATA[Where to start if you are building, connecting, or running AI systems.]]></description><link>https://signalsandsystems.substack.com/p/navigation-build</link><guid isPermaLink="false">https://signalsandsystems.substack.com/p/navigation-build</guid><dc:creator><![CDATA[Jon Walkenhorst]]></dc:creator><pubDate>Fri, 15 May 2026 13:14:43 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!9fa9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a33e27e-1aa2-4d52-9cdf-4c0e803c0f65_1024x1536.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9fa9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a33e27e-1aa2-4d52-9cdf-4c0e803c0f65_1024x1536.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9fa9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a33e27e-1aa2-4d52-9cdf-4c0e803c0f65_1024x1536.png 424w, https://substackcdn.com/image/fetch/$s_!9fa9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a33e27e-1aa2-4d52-9cdf-4c0e803c0f65_1024x1536.png 848w, https://substackcdn.com/image/fetch/$s_!9fa9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a33e27e-1aa2-4d52-9cdf-4c0e803c0f65_1024x1536.png 1272w, https://substackcdn.com/image/fetch/$s_!9fa9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a33e27e-1aa2-4d52-9cdf-4c0e803c0f65_1024x1536.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9fa9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a33e27e-1aa2-4d52-9cdf-4c0e803c0f65_1024x1536.png" width="1024" height="1536" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5a33e27e-1aa2-4d52-9cdf-4c0e803c0f65_1024x1536.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1536,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1687782,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://signalsandsystems.substack.com/i/197854166?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a33e27e-1aa2-4d52-9cdf-4c0e803c0f65_1024x1536.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9fa9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a33e27e-1aa2-4d52-9cdf-4c0e803c0f65_1024x1536.png 424w, https://substackcdn.com/image/fetch/$s_!9fa9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a33e27e-1aa2-4d52-9cdf-4c0e803c0f65_1024x1536.png 848w, https://substackcdn.com/image/fetch/$s_!9fa9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a33e27e-1aa2-4d52-9cdf-4c0e803c0f65_1024x1536.png 1272w, https://substackcdn.com/image/fetch/$s_!9fa9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a33e27e-1aa2-4d52-9cdf-4c0e803c0f65_1024x1536.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2>Build</h2><p>Most AI failures start here. Not in production, not in deployment, not in the boardroom. They start in the stack. Wrong components chosen before the use case was understood. Infrastructure assembled before the data was ready. Tools selected because they were familiar, not because they were right.</p><p>This bucket covers the technical layer. What the components are, how they work in isolation, and how they connect into systems that run under real operational conditions. Five series. Close to one hundred published articles. Start with fundamentals if you are new. Start with the series closest to your current problem if you are not.</p><div><hr></div><h3>AI Field Guide | Complete | 18 Articles</h3><p>The foundational layer. Covers what AI is, how tokenization works, reasoning behavior, multimodal systems, and the strategic decisions that depend on getting the fundamentals right before making commitments. Written for leaders who need to evaluate what they are being sold.</p><p><a href="https://signalsandsystems.substack.com/p/ai-field-guide-index-ai-field-guide">AI Field Guide Index</a></p><div><hr></div><h3>Language Models | Complete | 21 Articles</h3><p>A complete build arc for organizations that cannot send data to a hyperscaler. Covers hardware requirements, data preparation, model selection, RAG pipelines, fine-tuning, deployment, and production monitoring. The full path from first inference to a working model under operational control. If you are building sovereign inference capability, start here.</p><p><a href="https://signalsandsystems.substack.com/p/language-models-models-index">Language Models Index</a></p><div><hr></div><h3>Machine Learning | Complete | 40 Articles</h3><p>The longest series on this publication. ML is the least understood and most underserved primitive in enterprise AI. Agents, language models, and real-time data systems are all downstream from it. None of them function without the infrastructure, data discipline, and operational rigor that ML requires. The series runs in five thematic arcs: infrastructure and operations, data reality, the semantic layer, integration and architecture, and organizational readiness. Read by theme if you have a specific problem. Read front to back if you are building your mental model from scratch.</p><p><a href="https://signalsandsystems.substack.com/p/machine-learning-series-ml-part-0">Machine Learning Index</a></p><div><hr></div><h3>MCP and Connectors | Active | 5 Articles</h3><p>Model Context Protocol is the emerging standard for connecting AI systems to tools, data sources, and external services. This series covers what MCP is, why it matters for product and platform architecture, and how it changes the integration layer for AI-powered systems. Still being written.</p><p><a href="https://signalsandsystems.substack.com/p/mcp-and-agent-series">MCP and Connectors Index</a></p><div><hr></div><h3>Agents | Active | 12 Articles</h3><p>From single-agent foundations to multi-agent systems at production scale. Covers agent construction, memory and coordination, MAS topologies, A2A protocol, deterministic and probabilistic architectures, and what governance looks like when systems operate at machine speed. Still being written.</p><p><a href="https://signalsandsystems.substack.com/p/agent-foundations-agent-part-0">Agent Foundations Index</a></p><div><hr></div><h4>Ops and Security | In Progress</h4><p>Target operating models for AI systems in production. Starts where the build ends. Publishing soon.</p><div><hr></div><h2>Where to Start</h2><p>New to the technical layer: AI Field Guide, then Language Models. Building ML systems from the ground up: Machine Learning. Connecting AI to your existing stack: MCP and Connectors. Designing agent architectures: Agents. Already in production, need operational rigor: Ops and Security (in progress).</p>]]></content:encoded></item><item><title><![CDATA[The Governance Landscape Shift (Governance Part 13)]]></title><description><![CDATA[What changed between late 2024 and early 2026 while you were building upstream frameworks]]></description><link>https://signalsandsystems.substack.com/p/the-governance-landscape-shift-governance</link><guid isPermaLink="false">https://signalsandsystems.substack.com/p/the-governance-landscape-shift-governance</guid><dc:creator><![CDATA[Jon Walkenhorst]]></dc:creator><pubDate>Thu, 14 May 2026 15:02:16 GMT</pubDate><enclosure url="https://api.substack.com/feed/podcast/197609728/9761856d653c44f7821155f688986fe6.mp3" length="0" type="audio/mpeg"/><content:encoded><![CDATA[<p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://signalsandsystems.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://signalsandsystems.substack.com/subscribe?"><span>Subscribe now</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DAQP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76a13033-e1f5-4502-b61b-c59d709553f5_1012x674.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DAQP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76a13033-e1f5-4502-b61b-c59d709553f5_1012x674.png 424w, https://substackcdn.com/image/fetch/$s_!DAQP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76a13033-e1f5-4502-b61b-c59d709553f5_1012x674.png 848w, https://substackcdn.com/image/fetch/$s_!DAQP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76a13033-e1f5-4502-b61b-c59d709553f5_1012x674.png 1272w, https://substackcdn.com/image/fetch/$s_!DAQP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76a13033-e1f5-4502-b61b-c59d709553f5_1012x674.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DAQP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76a13033-e1f5-4502-b61b-c59d709553f5_1012x674.png" width="1012" height="674" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/76a13033-e1f5-4502-b61b-c59d709553f5_1012x674.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:674,&quot;width&quot;:1012,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1319054,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://signalsandsystems.substack.com/i/197609728?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76a13033-e1f5-4502-b61b-c59d709553f5_1012x674.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!DAQP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76a13033-e1f5-4502-b61b-c59d709553f5_1012x674.png 424w, https://substackcdn.com/image/fetch/$s_!DAQP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76a13033-e1f5-4502-b61b-c59d709553f5_1012x674.png 848w, https://substackcdn.com/image/fetch/$s_!DAQP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76a13033-e1f5-4502-b61b-c59d709553f5_1012x674.png 1272w, https://substackcdn.com/image/fetch/$s_!DAQP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76a13033-e1f5-4502-b61b-c59d709553f5_1012x674.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em><strong>TL;DR:</strong> Part 12 summarized what governance was in 2025. The gap between policy and reality is easier to see looking backward. Looking forward reveals a radically expanded challenge surface and an increasing success factor: organizations that plan for and leverage governance as the foundation of truth and transparency will outpace those treating it as compliance overhead. Part 12 promised the remaining articles in this arc would cover how to build execution-layer governance. Here is what that actually means in early 2026. The landscape shifted while upstream governance was being established. New capabilities emerged. New failures taught expensive lessons. Regulatory frameworks moved from guidance to enforcement. The technical and organizational approaches that work now differ significantly from what worked eighteen months ago. This article surveys the territory. The twenty articles that follow unpack each evolution in depth.</em></p><div><hr></div><h2>From Policy Intent to Execution Control</h2><p>The fundamental shift in AI governance is the recognition that policy frameworks alone do not prevent disasters. Organizations learned this through production failures, regulatory audits, and expensive incidents that exposed the gap between what governance said should happen and what systems actually did.</p><p>Mid-2024 governance focused on councils that approved AI initiatives, policies that defined acceptable use, and frameworks that established oversight structures. Those remain necessary. But they proved insufficient the moment autonomous systems started making consequential decisions without human review at the commitment point.</p><p>The execution boundary emerged as the critical control layer. Not policies describing what systems should do. Not logs documenting what systems did. Enforcement mechanisms that answer whether a system has the right to act before consequence occurs. Authority verification, admissibility evaluation, and evidence capture happening at the moment decisions bind to reality.</p><p>This is not new thinking imported from outside domains. This is AppSec, DevSecOps, and OpSec patterns that security engineering learned through decades of expensive failures. Code reviews before deployment, not after production breaks. Access controls preventing unauthorized actions, not documenting them afterward. Least privilege limiting blast radius, not explaining damage after incidents. Those patterns now apply to AI inference workflows at the point where decisions commit.</p><h2>Contextual Boundaries Replace Generic Guardrails</h2><p>Generic guardrails failed because they assumed one-size-fits-all constraints work across different enterprises, risk profiles, and regulatory environments. They do not. A financial services company enforcing transaction limits for fraud prevention has different boundary requirements than a healthcare system protecting patient data or a manufacturing operation coordinating autonomous supply chain decisions.</p><p>Contextual Boundaries emerged as the discipline of engineering enforcement mechanisms designed within the specific constraints each enterprise actually faces. Not configure-and-hope guardrails. Not narrative governance documenting intent without enforcement. The technical and organizational architecture that proves systems have the right to act based on scope verification, access validation, and policy admissibility evaluated at bind time.</p><p>Every enterprise implements boundaries differently. That is contextual engineering. The three enforcement questions remain constant. Is this action within granted authority? Does this system have verified access to required resources? Can this system prove real-time admissibility under current policy? The answers change based on regulatory environment, risk tolerance, data sensitivity, operational velocity, and organizational structure.</p><h2>Operational Governance Memory Changes the Game</h2><p>Isolated defensible decisions gave way to operational governance memory. Past execution creates context that shapes future admissibility evaluation. This is the shift from asking &#8220;was this action admissible at bind?&#8221; to &#8220;does accumulated execution history change whether similar actions remain admissible now?&#8221;</p><p>A procurement agent places its forty-seventh supply order this quarter. Execution boundary fires. Authority check passes. But admissibility evaluation queries operational memory. The last fifteen orders exceeded projected demand by twelve percent. Consequence patterns show inventory carrying costs rising. The boundary tightens. This order requires human review despite falling within approved limits. Not because policy changed. Because execution history accumulated evidence that similar actions trend toward problems.</p><p>This connects to continuous learning model governance covered in Part 4 of this series but adds the enforcement layer. Systems that learn from execution must have boundaries that adapt based on what execution history reveals. Governance memory is not post-hoc logging. It is queryable context at bind time that informs whether actions should be allowed, escalated, or refused based on patterns that policy frameworks written months ago could not anticipate.</p><h2>Agent Identity and Authorization Evolved Beyond API Keys</h2><p>Mid-2024 agent authorization meant API keys and service account credentials. That approach broke when agents started delegating to other agents, spawning sub-agents for specific tasks, and operating with time-bounded authority that expired when context changed.</p><p>Agent identity frameworks emerged addressing non-human actor authorization. Delegation chains tracking which agent authorized which sub-agent for what purpose. Time-bounded authority that expires automatically rather than requiring manual revocation. Role-based access extending to agent types, not just human users. Attestation mechanisms proving an agent&#8217;s granted authority at the moment it acted.</p><p>This is CIAM principles applied to autonomous systems. The third pillar of contextual engineering from Part 10. But the implementation details evolved significantly as production deployments revealed gaps that theory missed. Cross-system agent identity when one AI calls another AI. Authority transfer protocols when agents hand off tasks. Revocation mechanisms when agent behavior deviates from granted scope.</p><h2>Real-Time Policy Engines Replace Batch Validation</h2><p>Policy engines that evaluated rules in batch review cycles could not keep pace with autonomous systems making decisions in milliseconds. Real-time policy evaluation emerged as the infrastructure enabling systems to query &#8220;am I allowed to do this?&#8221; at inference time before action commits.</p><p>These are not configuration files read at startup. These are active evaluation engines that resolve policy questions against current state, operational context, and execution history in sub-second latency. The policy-as-code movement applied to inference workflows. Rules expressed as executable logic rather than documentation that humans interpret.</p><p>Governance APIs became the interface layer enabling systems to query policy engines before acting. Not after-the-fact audit. Not human review loops that break autonomous operation. Machine-queryable governance that returns Allow, Escalate, or Refuse decisions fast enough for real-time inference workflows.</p><h2>Token Management Became Governance Control</h2><p>Token consumption moved from cost management problem to governance enforcement mechanism. Organizations discovered that token budgets, context window allocation, and usage attribution are control layers determining what systems can do at scale.</p><p>Per-agent token limits prevent runaway systems from consuming unlimited resources. Per-use-case allocation creates organizational accountability for AI spending. Context window governance controls what data enters inference and who decides. Token accounting creates audit trails proving which systems consumed what capacity for which purposes.</p><p>This connects to Part 12 of the Models series covering tokens, context, and budgets. But the governance implications only became clear as production deployments revealed token exhaustion as denial-of-service attack vector, context window stuffing as data exfiltration method, and token attribution as organizational control mechanism that upstream policies alone could not enforce.</p><h2>Cross-System Governance for AI Calling AI</h2><p>Mid-2024 governance assumed human-initiated AI interactions. That assumption broke when systems started calling other systems without human involvement. Multi-agent systems, tool-use frameworks like MCP, and autonomous workflows where one AI delegates to another AI created governance gaps that single-system policies did not address.</p><p>Authority transfer protocols emerged. When Agent A calls Agent B, how does granted authority transfer? Does Agent B inherit Agent A&#8217;s scope or operate under its own constraints? How do we prove the delegation chain when auditing downstream actions? What happens when delegated authority should be revoked but the sub-agent has already acted?</p><p>Cross-system governance addresses these questions through technical architecture and organizational policy. Delegation requires explicit authorization, not implicit inheritance. Sub-agents operate under the intersection of delegating agent authority and their own granted scope. Evidence sealed at each delegation point creates immutable audit trail. Revocation propagates through delegation chains automatically rather than requiring manual tracking.</p><h2>Shadow AI Evolved Into Enterprise-Scale Problems</h2><p>Shadow AI in mid-2024 meant employees using ChatGPT without IT approval. By early 2026 shadow AI meant autonomous systems like OpenClaw operating at enterprise scale without governance oversight. Customer service agents deployed without authorization. Procurement systems making purchasing decisions outside approved workflows. Marketing automation running campaigns nobody reviewed.</p><p>These are not individuals bypassing policy. These are autonomous systems operating in production without passing through governance review because business urgency exceeded approval velocity. The death valley between IT governance and business needs covered in Part 9 expanded when autonomous capabilities outpaced governance frameworks.</p><p>Shadow AI governance requires detection mechanisms that identify unauthorized deployments, containment procedures that limit blast radius when discovered, and migration paths that bring systems under governance without destroying business value they created. Not punishment for bypassing process. Organizational recognition that governance velocity must match deployment velocity or systems will route around it.</p><h2>Regulatory Enforcement Moved From Theory to Reality</h2><p>EU AI Act enforcement began. Organizations faced real penalties for non-compliance. US sector-specific guidance hardened in financial services, healthcare, and government contracting. Multi-jurisdictional compliance covered in Part 4 of this series moved from theoretical framework to operational requirement with audit timelines and penalty exposure.</p><p>Regulatory governance evolved from documentation exercises to technical architecture requirements. Audit trails must demonstrate authority verification at bind time, not reconstruct decisions from logs after the fact. Bias testing must happen during inference, not as batch evaluation after deployment. Incident reporting requires evidence of what system did, why it had authority to act, and what governance controls were bypassed if any.</p><p>Compliance-as-code emerged. Regulatory requirements expressed as executable policy that systems query at inference time. Attestation mechanisms proving compliance at the moment decisions committed. Immutable evidence chains that auditors can verify without depending on after-the-fact explanation.</p><h2>Production Incidents Taught Expensive Lessons</h2><p>Public failures revealed what happens when execution boundaries fail. Customer service agents issuing unauthorized credits. Procurement systems committing to expenditures outside approved limits. Marketing automation launching campaigns in sensitive demographics without review. Trading systems executing transactions beyond granted authority.</p><p>These incidents shared common patterns. Systems had policy-level authorization but lacked execution-time enforcement. Logs documented what happened but could not prove authority at bind time. Explanations reconstructed decisions after consequence occurred. Organizational accountability failed because no single human could be identified as responsible for autonomous system actions.</p><p>Incident response frameworks evolved to address autonomous system failures. Kill switches for immediate shutdown. Containment procedures limiting blast radius. Rollback mechanisms reversing actions when authority questions emerge. Post-incident analysis examining not just what system did but whether governance controls should have prevented it and why they did not.</p><h2>Security Engineering Patterns Applied to AI</h2><p>AppSec, DevSecOps, and OpSec principles that security engineering developed over decades now apply to AI inference workflows. Input validation preventing prompt injection. Secure defaults limiting system capabilities unless explicitly expanded. Defense in depth with multiple enforcement layers. Least privilege granting minimum necessary authority. Fail-safe design ensuring systems degrade safely when boundaries trigger.</p><p>These are not new concepts. These are proven patterns adapted to inference decision points. The execution boundary is the commit gate where security controls fire before consequence. Evidence sealed at bind is the audit trail proving controls worked. Operational governance memory is the learning layer improving security posture based on attack patterns and boundary effectiveness.</p><h2>What the Next Two Dozen Articles Cover</h2><p>This survey establishes the landscape. The articles that follow unpack each evolution in depth showing how to build execution-layer governance that works in 2026 reality.</p><p>Contextual boundaries. Execution boundary architecture. Operational governance memory. Agent identity and authorization. Real-time policy engines. Governance APIs. Audit-native architecture. Cross-system governance. Agent workforce management. Runaway agent containment. Shadow AI governance. Regulatory enforcement reality. Production incident lessons. Token budgets as control. Token accounting and attribution. Context window governance. AppSec for AI. DevSecOps for AI pipelines. OpSec for production AI. Building it all into the systems you already constructed.</p><p>Two dozen articles. Each covers one specific evolution. Each shows how to implement that capability within your constraints. Each connects to the ML and Models infrastructure you built in earlier series. The complete arc from upstream governance through execution-layer enforcement to production systems operating autonomously under appropriate control.</p><p>The governance landscape shifted. The next two dozen articles show how to build what works now.</p><p>#AIGovernance</p><p>#ContextualBoundaries</p><p>#ExecutionControl</p><p>#EnterpriseAI</p><p>#GovernanceEvolution</p><div><hr></div><p>[AUDIO OPENING]</p><p>Eighteen months ago when I began this governance series, AI governance meant councils, policies, and frameworks. Upstream work establishing what organizations intended to do with AI systems. That foundation still matters. Without it you get chaos. But the challenge surface expanded dramatically between mid-2024 and early 2026. Autonomous agents moved from experimental to production. Token consumption became a governance problem, not just a cost problem. Systems started calling other systems without human oversight. Shadow AI evolved from consumer ChatGPT usage to enterprise-scale autonomous operations nobody authorized. Regulatory frameworks moved from guidance documents to enforcement actions with real penalties. The EU AI Act went live. Sector-specific requirements hardened in financial services, healthcare, and government contracting. Production incidents taught expensive lessons about what happens when execution boundaries fail. The technical patterns that work now for governing AI at scale look different than what worked when this series started. This article surveys what changed. The articles that follow show how to build governance that works in 2026 reality rather than 2024 theory.</p><p>[END AUDIO OPENING]</p>]]></content:encoded></item><item><title><![CDATA[Scaling Beyond Traditional Frameworks (Governance Part 4)]]></title><description><![CDATA[When basic councils and policies aren't enough for autonomous systems and global operations]]></description><link>https://signalsandsystems.substack.com/p/scaling-beyond-traditional-frameworks</link><guid isPermaLink="false">https://signalsandsystems.substack.com/p/scaling-beyond-traditional-frameworks</guid><dc:creator><![CDATA[Jon Walkenhorst]]></dc:creator><pubDate>Thu, 07 May 2026 04:03:33 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!NhyW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec168c35-26af-44fa-84e4-507d9fab018c_1006x672.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://signalsandsystems.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://signalsandsystems.substack.com/subscribe?"><span>Subscribe now</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!NhyW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec168c35-26af-44fa-84e4-507d9fab018c_1006x672.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!NhyW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec168c35-26af-44fa-84e4-507d9fab018c_1006x672.png 424w, https://substackcdn.com/image/fetch/$s_!NhyW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec168c35-26af-44fa-84e4-507d9fab018c_1006x672.png 848w, https://substackcdn.com/image/fetch/$s_!NhyW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec168c35-26af-44fa-84e4-507d9fab018c_1006x672.png 1272w, https://substackcdn.com/image/fetch/$s_!NhyW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec168c35-26af-44fa-84e4-507d9fab018c_1006x672.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!NhyW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec168c35-26af-44fa-84e4-507d9fab018c_1006x672.png" width="1006" height="672" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ec168c35-26af-44fa-84e4-507d9fab018c_1006x672.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:672,&quot;width&quot;:1006,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1689788,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://signalsandsystems.substack.com/i/196737961?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec168c35-26af-44fa-84e4-507d9fab018c_1006x672.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!NhyW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec168c35-26af-44fa-84e4-507d9fab018c_1006x672.png 424w, https://substackcdn.com/image/fetch/$s_!NhyW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec168c35-26af-44fa-84e4-507d9fab018c_1006x672.png 848w, https://substackcdn.com/image/fetch/$s_!NhyW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec168c35-26af-44fa-84e4-507d9fab018c_1006x672.png 1272w, https://substackcdn.com/image/fetch/$s_!NhyW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec168c35-26af-44fa-84e4-507d9fab018c_1006x672.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>TL;DR - Most organizations start AI governance with councils and policies designed for predictable applications like chatbots and recommendation engines. That foundation breaks when AI systems become autonomous agents making multi-step decisions, continuous learning models that modify their own behavior, or globally distributed deployments navigating different regulatory frameworks in real time. This article covers the governance evolution required for enterprise scale: federated council architectures that prevent bottlenecks, multi-jurisdictional compliance frameworks for operating across EU AI Act, US federal guidance, AIDA, and other emerging regulations, autonomous system risk management across five levels of human oversight, and dynamic governance for systems that learn and change continuously. The frameworks here assume you have basic governance established. They address what comes next when traditional approaches no longer scale to the complexity AI capabilities now demand.</em></p><div><hr></div><h2>The Governance Evolution: From Tools to Autonomous Systems</h2><p>Most organizations start their AI governance journey focused on traditional applications: chatbots, recommendation engines, data analytics tools. These systems are relatively predictable&#8212;they perform specific functions with defined inputs and outputs, much like conventional software applications.</p><p>But AI is rapidly evolving beyond these controlled use cases. We&#8217;re seeing the emergence of:</p><p><strong>Autonomous Agent Systems</strong> that make multi-step decisions without human intervention <strong>Continuous Learning Models</strong> that modify their behavior based on new data <strong>Multi-System Integrations</strong> through frameworks like MCP that connect AI across enterprise ecosystems <strong>Synthetic Data Generators</strong> that create training datasets for other AI systems</p><p>These next-generation AI implementations require fundamentally different governance approaches. The frameworks that work for traditional AI applications become inadequate&#8212;even dangerous&#8212;when applied to autonomous systems.</p><h2>Enterprise-Scale Federated Governance Models</h2><p><strong>When Single Councils Don&#8217;t Scale</strong></p><p>Organizations with multiple business units, geographic regions, or complex regulatory environments quickly discover that a single AI Governance Council becomes a bottleneck. The signs are familiar: council meetings become marathon sessions, decisions get delayed for weeks, and business units start bypassing governance entirely.</p><p>The solution isn&#8217;t bigger councils&#8212;it&#8217;s federated governance architecture.</p><p><strong>Federated Council Architecture</strong></p><p><strong>Central AI Governance Council</strong> (Enterprise Level):</p><ul><li><p><strong>Composition</strong>: C-suite executives, chief risk officer, chief legal officer</p></li><li><p><strong>Authority</strong>: Enterprise-wide AI policy, strategic direction, resource allocation</p></li><li><p><strong>Scope</strong>: Cross-business unit initiatives, major vendor relationships, regulatory compliance</p></li><li><p><strong>Cadence</strong>: Monthly strategic sessions, quarterly business reviews</p></li></ul><p><strong>Business Unit AI Councils</strong> (Operational Level):</p><ul><li><p><strong>Composition</strong>: BU leaders, domain experts, local IT/security representatives</p></li><li><p><strong>Authority</strong>: BU-specific AI implementations within enterprise frameworks</p></li><li><p><strong>Scope</strong>: Customer-facing applications, operational AI, local vendor selection</p></li><li><p><strong>Cadence</strong>: Bi-weekly operational sessions, monthly coordination with central council</p></li></ul><p><strong>Functional AI Councils</strong> (Specialty Areas):</p><ul><li><p><strong>Composition</strong>: Subject matter experts in legal, security, ethics, or technical domains</p></li><li><p><strong>Authority</strong>: Specialized guidance and policy recommendations</p></li><li><p><strong>Scope</strong>: Domain expertise, risk assessment, compliance interpretation</p></li><li><p><strong>Cadence</strong>: As-needed consultation, quarterly framework reviews</p></li></ul><p><strong>Coordination Mechanisms</strong></p><p><strong>Policy Cascading</strong>: Enterprise policies flow down to BU councils with local implementation guidance <strong>Escalation Protocols</strong>: Clear criteria for when BU decisions require central council review <strong>Cross-Pollination</strong>: Regular rotation of members between councils to share knowledge <strong>Shared Resources</strong>: Common tooling, training, and expert consultation across all councils</p><h2>International Compliance and Regulatory Frameworks</h2><p><strong>The Global AI Regulatory Landscape</strong></p><p>AI governance is becoming increasingly complex as different jurisdictions implement varying regulatory requirements. Organizations operating across borders must navigate a patchwork of emerging AI laws while maintaining operational efficiency.</p><p><strong>European Union - AI Act</strong>:</p><ul><li><p>Risk-based approach with prohibited, high-risk, and limited-risk AI systems</p></li><li><p>Mandatory conformity assessments for high-risk AI applications</p></li><li><p>Transparency obligations for general-purpose AI models</p></li><li><p>Significant penalties for non-compliance (up to 7% of global annual turnover)</p></li></ul><p><strong>United States - Emerging Federal Frameworks</strong>:</p><ul><li><p>Executive Order on Safe, Secure, and Trustworthy AI</p></li><li><p>NIST AI Risk Management Framework</p></li><li><p>Sector-specific guidance (financial services, healthcare, transportation)</p></li><li><p>State-level AI regulations (California, New York, others)</p></li></ul><p><strong>Canada - Artificial Intelligence and Data Act (AIDA)</strong>:</p><ul><li><p>Risk assessment requirements for AI systems</p></li><li><p>Mitigation measures for high-impact AI systems</p></li><li><p>Mandatory incident reporting and risk assessment publication</p></li><li><p>Registration requirements for general-purpose AI systems</p></li></ul><p><strong>Other Significant Jurisdictions</strong>:</p><ul><li><p><strong>United Kingdom</strong>: Principles-based approach with sector-specific guidance</p></li><li><p><strong>China</strong>: Algorithm governance and data security requirements</p></li><li><p><strong>Singapore</strong>: Model AI governance framework for private sector adoption</p></li></ul><h2>Multi-Jurisdictional Compliance Framework</h2><p><strong>Regulatory Mapping Matrix</strong>: Create a comprehensive mapping of your AI applications against all applicable jurisdictions:</p><ul><li><p><strong>System Classification</strong>: How each AI system is classified under different regulatory frameworks</p></li><li><p><strong>Compliance Requirements</strong>: Specific obligations for each system in each jurisdiction</p></li><li><p><strong>Risk Assessments</strong>: Jurisdiction-specific risk evaluation criteria</p></li><li><p><strong>Documentation</strong>: Required compliance documentation and audit trails</p></li></ul><p><strong>Global Compliance Coordination</strong>:</p><ul><li><p><strong>Regional Compliance Officers</strong>: Local expertise for major jurisdictions where you operate</p></li><li><p><strong>Centralized Legal Review</strong>: Enterprise-level coordination of compliance strategies</p></li><li><p><strong>Regulatory Change Monitoring</strong>: Systematic tracking of evolving AI regulations</p></li><li><p><strong>Cross-Border Data Flow</strong>: Governance for AI systems that process data across jurisdictions</p></li></ul><h2>Autonomous Systems Governance</h2><p><strong>The Autonomy Spectrum</strong></p><p>Traditional governance assumes human decision-makers can review and approve AI implementations before deployment. Autonomous systems challenge this assumption by making decisions and taking actions without human intervention.</p><p><strong>Level 1 - Human-in-the-Loop</strong>: AI provides recommendations, humans make decisions <strong>Level 2 - Human-on-the-Loop</strong>: AI makes decisions, humans monitor and can intervene <strong>Level 3 - Human-out-of-the-Loop</strong>: AI makes and executes decisions autonomously <strong>Level 4 - Human-in-Command</strong>: AI operates autonomously but within human-defined boundaries <strong>Level 5 - Full Autonomy</strong>: AI operates independently with minimal human oversight</p><p>Each level requires different governance approaches and risk management strategies.</p><p><strong>Autonomous System Risk Framework</strong></p><p><strong>Decision Boundary Management</strong>:</p><ul><li><p><strong>Scope Definition</strong>: Clear boundaries of what decisions the AI can make autonomously</p></li><li><p><strong>Authority Limits</strong>: Financial, operational, or strategic constraints on AI decisions</p></li><li><p><strong>Escalation Triggers</strong>: Conditions that require human intervention or approval</p></li><li><p><strong>Override Mechanisms</strong>: How humans can intervene in or reverse AI decisions</p></li></ul><p><strong>Behavioral Governance</strong>:</p><ul><li><p><strong>Goal Alignment</strong>: Ensuring AI objectives remain aligned with business objectives</p></li><li><p><strong>Value Preservation</strong>: Maintaining organizational values and ethical standards in AI decisions</p></li><li><p><strong>Performance Monitoring</strong>: Real-time tracking of AI decision quality and outcomes</p></li><li><p><strong>Behavior Drift Detection</strong>: Identifying when AI behavior deviates from intended parameters</p></li></ul><p><strong>Emergency Response for Autonomous Systems</strong>:</p><ul><li><p><strong>Kill Switches</strong>: Immediate shutdown capabilities for all autonomous AI systems</p></li><li><p><strong>Containment Procedures</strong>: Limiting the scope of AI actions during incidents</p></li><li><p><strong>Rollback Mechanisms</strong>: Reversing AI decisions or actions when necessary</p></li><li><p><strong>Incident Analysis</strong>: Post-incident review processes for autonomous system failures</p></li></ul><h2>Continuous Learning and Model Evolution Governance</h2><p><strong>The Challenge of Self-Modifying Systems</strong></p><p>Traditional software governance assumes applications remain relatively stable between updates. AI systems that learn continuously challenge this assumption by modifying their behavior in real-time based on new data and interactions.</p><p><strong>Dynamic Governance Framework</strong></p><p><strong>Learning Boundaries</strong>:</p><ul><li><p><strong>Training Data Governance</strong>: Controls on what data the AI can learn from</p></li><li><p><strong>Learning Rate Limits</strong>: Constraints on how quickly AI behavior can change</p></li><li><p><strong>Behavior Constraints</strong>: Hard limits on certain types of decisions or actions</p></li><li><p><strong>Learning Pause Mechanisms</strong>: Ability to stop learning when problematic patterns emerge</p></li></ul><p><strong>Continuous Monitoring and Validation</strong>:</p><ul><li><p><strong>Real-time Performance Tracking</strong>: Ongoing measurement of AI system effectiveness</p></li><li><p><strong>Bias Detection and Correction</strong>: Automated monitoring for discriminatory outcomes</p></li><li><p><strong>Drift Detection</strong>: Identifying when AI behavior significantly changes from baseline</p></li><li><p><strong>A/B Testing Frameworks</strong>: Controlled evaluation of AI behavior changes</p></li></ul><p><strong>Version Control for Learning Systems</strong>:</p><ul><li><p><strong>Model State Snapshots</strong>: Regular capturing of AI system state for rollback purposes</p></li><li><p><strong>Change Documentation</strong>: Tracking what the AI learned and when</p></li><li><p><strong>Approval Workflows</strong>: Human review requirements for significant behavior changes</p></li><li><p><strong>Rollback Procedures</strong>: Returning AI systems to previous states when necessary</p></li></ul><h2>Advanced Risk Management Frameworks</h2><p><strong>Multi-Dimensional Risk Assessment</strong></p><p>Advanced AI systems require risk assessment frameworks that go beyond traditional IT risk categories:</p><p><strong>Technical Risk Dimensions</strong>:</p><ul><li><p><strong>Model Risk</strong>: Accuracy degradation, bias amplification, adversarial attacks</p></li><li><p><strong>Integration Risk</strong>: System failures, data contamination, cascade effects</p></li><li><p><strong>Autonomy Risk</strong>: Unintended decisions, goal misalignment, behavioral drift</p></li><li><p><strong>Learning Risk</strong>: Negative learning, data poisoning, privacy leakage</p></li></ul><p><strong>Business Risk Dimensions</strong>:</p><ul><li><p><strong>Operational Risk</strong>: Business process disruption, customer impact, revenue loss</p></li><li><p><strong>Reputational Risk</strong>: Public perception, brand damage, stakeholder trust</p></li><li><p><strong>Competitive Risk</strong>: Advantage loss, market share impact, innovation gaps</p></li><li><p><strong>Strategic Risk</strong>: Goal misalignment, resource misallocation, opportunity cost</p></li></ul><p><strong>Regulatory and Ethical Risk Dimensions</strong>:</p><ul><li><p><strong>Compliance Risk</strong>: Regulatory violations, audit failures, legal liability</p></li><li><p><strong>Privacy Risk</strong>: Data protection violations, consent issues, international transfer restrictions</p></li><li><p><strong>Fairness Risk</strong>: Discriminatory outcomes, algorithmic bias, equal treatment failures</p></li><li><p><strong>Transparency Risk</strong>: Explainability requirements, stakeholder communication, accountability gaps</p></li></ul><p><strong>Dynamic Risk Scoring</strong></p><p>Unlike traditional systems where risk scores remain relatively stable, AI systems require dynamic risk assessment that adapts to changing conditions:</p><p><strong>Real-time Risk Indicators</strong>:</p><ul><li><p><strong>Performance Metrics</strong>: System accuracy, response times, error rates</p></li><li><p><strong>Usage Patterns</strong>: Volume changes, user behavior shifts, new use cases</p></li><li><p><strong>External Factors</strong>: Regulatory changes, competitive developments, market conditions</p></li><li><p><strong>Technical Indicators</strong>: Model drift, data quality issues, integration problems</p></li></ul><p><strong>Adaptive Risk Thresholds</strong>:</p><ul><li><p><strong>Context-Sensitive Scoring</strong>: Risk assessment that considers current operational context</p></li><li><p><strong>Predictive Risk Modeling</strong>: Anticipating risk changes based on current trends</p></li><li><p><strong>Scenario-Based Assessment</strong>: Risk evaluation under different potential future conditions</p></li><li><p><strong>Continuous Recalibration</strong>: Regular updates to risk models based on new experience</p></li></ul><h2>Governance Automation and AI Operations</h2><p><strong>Policy-as-Code Implementation</strong></p><p>Manual governance processes cannot scale to manage hundreds or thousands of AI systems operating at enterprise scale. Policy-as-code approaches embed governance requirements directly into AI development and deployment pipelines.</p><p><strong>Automated Compliance Checking</strong>:</p><ul><li><p><strong>Development Stage</strong>: Code analysis for compliance with AI governance policies</p></li><li><p><strong>Testing Stage</strong>: Automated bias testing, performance validation, security scanning</p></li><li><p><strong>Deployment Stage</strong>: Compliance verification before production release</p></li><li><p><strong>Runtime Stage</strong>: Continuous monitoring for policy violations during operation</p></li></ul><p><strong>Intelligent Governance Systems</strong>:</p><ul><li><p><strong>Risk-Based Routing</strong>: Automatically directing AI initiatives to appropriate review processes</p></li><li><p><strong>Anomaly Detection</strong>: AI systems monitoring other AI systems for governance violations</p></li><li><p><strong>Predictive Compliance</strong>: Anticipating governance issues before they occur</p></li><li><p><strong>Adaptive Policies</strong>: Governance rules that adjust based on system performance and risk levels</p></li></ul><h2>Enterprise AI Observability</h2><p><strong>Comprehensive Monitoring Dashboards</strong>:</p><ul><li><p><strong>System Performance</strong>: Real-time metrics across all AI systems</p></li><li><p><strong>Compliance Status</strong>: Current compliance posture and violation alerts</p></li><li><p><strong>Risk Indicators</strong>: Dynamic risk scores and trend analysis</p></li><li><p><strong>Business Impact</strong>: ROI, customer satisfaction, operational efficiency metrics</p></li></ul><p><strong>Automated Reporting and Alerting</strong>:</p><ul><li><p><strong>Regulatory Reporting</strong>: Automated generation of compliance reports</p></li><li><p><strong>Executive Dashboards</strong>: High-level AI governance metrics for leadership</p></li><li><p><strong>Incident Response</strong>: Automated alerting and escalation for governance violations</p></li><li><p><strong>Audit Trail Generation</strong>: Complete documentation of AI system decisions and approvals</p></li></ul><h2>Cultural Integration for Advanced Governance</h2><p><strong>Building AI-Native Governance Culture</strong></p><p>Advanced AI governance requires cultural changes beyond traditional IT governance. Organizations must develop comfort with uncertainty, continuous adaptation, and distributed decision-making.</p><p><strong>AI Literacy at Scale</strong>:</p><ul><li><p><strong>Executive Education</strong>: Regular briefings on AI developments and governance implications</p></li><li><p><strong>Technical Training</strong>: Deep AI knowledge for governance practitioners</p></li><li><p><strong>Business User Education</strong>: Understanding AI capabilities and limitations across the organization</p></li><li><p><strong>Continuous Learning</strong>: Ongoing education as AI technology evolves</p></li></ul><p><strong>Governance Mindset Shift</strong>:</p><ul><li><p><strong>From Control to Guidance</strong>: Enabling AI innovation rather than preventing AI adoption</p></li><li><p><strong>From Perfect to Adaptive</strong>: Accepting that governance must evolve with technology</p></li><li><p><strong>From Centralized to Distributed</strong>: Empowering local decision-making within global frameworks</p></li><li><p><strong>From Reactive to Proactive</strong>: Anticipating governance needs rather than responding to problems</p></li></ul><h2>Change Management for Advanced AI Governance</h2><p><strong>Stakeholder Engagement Strategy</strong>:</p><ul><li><p><strong>Executive Champions</strong>: Senior leaders who advocate for advanced AI governance</p></li><li><p><strong>Technical Ambassadors</strong>: Engineering leaders who help implement governance automation</p></li><li><p><strong>Business Advocates</strong>: Department heads who demonstrate governance value</p></li><li><p><strong>User Communities</strong>: Frontline workers who provide feedback on governance effectiveness</p></li></ul><p><strong>Communication and Training Programs</strong>:</p><ul><li><p><strong>Governance Success Stories</strong>: Highlighting how advanced governance enables innovation</p></li><li><p><strong>Best Practice Sharing</strong>: Cross-functional learning from governance experiences</p></li><li><p><strong>Regular Training Updates</strong>: Keeping pace with evolving AI governance requirements</p></li><li><p><strong>Feedback Mechanisms</strong>: Continuous improvement based on stakeholder input</p></li></ul><h2>Measuring Advanced Governance Effectiveness</h2><p><strong>Multi-Dimensional Success Metrics</strong></p><p><strong>Governance Efficiency Metrics</strong>:</p><ul><li><p><strong>Decision Velocity</strong>: Time from AI initiative proposal to deployment approval</p></li><li><p><strong>Automation Rate</strong>: Percentage of governance decisions handled automatically</p></li><li><p><strong>Escalation Frequency</strong>: How often local decisions require central review</p></li><li><p><strong>Process Compliance</strong>: Adherence to governance procedures across the organization</p></li></ul><p><strong>Risk Management Effectiveness</strong>:</p><ul><li><p><strong>Incident Prevention</strong>: AI-related risks identified and mitigated before impact</p></li><li><p><strong>Response Time</strong>: Speed of governance response to emerging AI risks</p></li><li><p><strong>Recovery Effectiveness</strong>: Success in managing AI governance failures</p></li><li><p><strong>Learning Integration</strong>: How quickly governance processes adapt to new risks</p></li></ul><p><strong>Business Enablement Metrics</strong>:</p><ul><li><p><strong>Innovation Velocity</strong>: Rate of AI initiative approval and deployment</p></li><li><p><strong>Business Value</strong>: ROI and business impact of AI systems under governance</p></li><li><p><strong>Competitive Advantage</strong>: Market position improvements attributable to AI governance</p></li><li><p><strong>Stakeholder Satisfaction</strong>: User experience with governance processes</p></li></ul><p><strong>Strategic Alignment Indicators</strong>:</p><ul><li><p><strong>Goal Achievement</strong>: Success in meeting AI strategy objectives</p></li><li><p><strong>Resource Optimization</strong>: Efficient allocation of AI governance resources</p></li><li><p><strong>Capability Development</strong>: Growth in organizational AI governance maturity</p></li><li><p><strong>Future Readiness</strong>: Preparedness for next-generation AI governance challenges</p></li></ul><h2>Looking Forward: The Future of AI Governance</h2><p>Advanced AI governance is itself an evolving discipline. As AI capabilities continue to expand&#8212;moving toward artificial general intelligence, more sophisticated autonomous systems, and deeper integration with business processes&#8212;governance frameworks must anticipate and adapt to new challenges.</p><p><strong>Emerging Governance Challenges</strong>:</p><ul><li><p><strong>AI-to-AI Interactions</strong>: Governance for systems where AI systems communicate and collaborate</p></li><li><p><strong>Cross-Organization AI</strong>: Governance for AI systems that span multiple organizations</p></li><li><p><strong>Societal-Scale AI</strong>: Governance for AI systems with broad social impact</p></li><li><p><strong>Self-Governing AI</strong>: AI systems that participate in their own governance processes</p></li></ul><p><strong>Governance Technology Evolution</strong>:</p><ul><li><p><strong>AI-Powered Governance</strong>: Using AI to govern AI more effectively</p></li><li><p><strong>Blockchain-Based Compliance</strong>: Immutable audit trails for AI governance decisions</p></li><li><p><strong>Federated Learning Governance</strong>: Managing AI systems that learn across organizational boundaries</p></li><li><p><strong>Quantum-Enhanced Security</strong>: Next-generation security for AI governance systems</p></li></ul><p>The organizations that master advanced AI governance today will be best positioned to navigate the even more complex AI landscape of tomorrow. The goal isn&#8217;t perfect governance&#8212;it&#8217;s adaptive governance that evolves as rapidly as the technology it oversees.</p>]]></content:encoded></item><item><title><![CDATA[The Gap Between Policy and Reality (Governance Part 12)]]></title><description><![CDATA[Why upstream governance stops working the moment AI systems start making decisions]]></description><link>https://signalsandsystems.substack.com/p/the-gap-between-policy-and-reality</link><guid isPermaLink="false">https://signalsandsystems.substack.com/p/the-gap-between-policy-and-reality</guid><dc:creator><![CDATA[Jon Walkenhorst]]></dc:creator><pubDate>Mon, 04 May 2026 15:01:34 GMT</pubDate><enclosure url="https://api.substack.com/feed/podcast/196383366/7c14976b03ce0e791118260c7caf81f4.mp3" length="0" type="audio/mpeg"/><content:encoded><![CDATA[<p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://signalsandsystems.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://signalsandsystems.substack.com/subscribe?"><span>Subscribe now</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!coZi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe00a1a22-3734-4cb8-80da-efba9b97a685_780x520.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!coZi!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe00a1a22-3734-4cb8-80da-efba9b97a685_780x520.png 424w, https://substackcdn.com/image/fetch/$s_!coZi!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe00a1a22-3734-4cb8-80da-efba9b97a685_780x520.png 848w, https://substackcdn.com/image/fetch/$s_!coZi!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe00a1a22-3734-4cb8-80da-efba9b97a685_780x520.png 1272w, https://substackcdn.com/image/fetch/$s_!coZi!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe00a1a22-3734-4cb8-80da-efba9b97a685_780x520.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!coZi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe00a1a22-3734-4cb8-80da-efba9b97a685_780x520.png" width="780" height="520" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e00a1a22-3734-4cb8-80da-efba9b97a685_780x520.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:520,&quot;width&quot;:780,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:911022,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://signalsandsystems.substack.com/i/196383366?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe00a1a22-3734-4cb8-80da-efba9b97a685_780x520.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!coZi!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe00a1a22-3734-4cb8-80da-efba9b97a685_780x520.png 424w, https://substackcdn.com/image/fetch/$s_!coZi!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe00a1a22-3734-4cb8-80da-efba9b97a685_780x520.png 848w, https://substackcdn.com/image/fetch/$s_!coZi!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe00a1a22-3734-4cb8-80da-efba9b97a685_780x520.png 1272w, https://substackcdn.com/image/fetch/$s_!coZi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe00a1a22-3734-4cb8-80da-efba9b97a685_780x520.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em><strong>TL;DR:</strong> Parts 8, 9, and 10 established upstream governance - Centers of Excellence, IT versus business tension, and contextual engineering as the framework for breaking AI paralysis. That work matters. It sets direction, creates structure, and establishes accountability. But upstream governance does not prevent downstream disasters. A year ago when organizations were testing early LLMs and running cautious pilots, policy frameworks were enough. Now we are seeing autonomous agents over-provisioned with authority they should not have and enterprises under-deploying systems they cannot trust. The gap exists because governance tells systems what they should do, not what they are allowed to do at the moment a decision binds to reality.</em></p><div><hr></div><h2>What Upstream Governance Actually Accomplished</h2><p>The governance work in Parts 8, 9, and 10 I published six months ago, is not outdated effort. I established the organizational foundation every enterprise needs before AI systems can operate at scale.</p><p>Part 8 introduced Centers of Excellence as the execution engine missing from most AI strategies. The CoE translates board policy into shared platforms, standard patterns, and embedded controls that make innovation safe instead of fragile. Without this structure teams reinvent infrastructure for every project, governance becomes bottleneck theater, and nobody can answer who owns the bridge between compliance and creativity.</p><p>Part 9 named the structural tension killing most AI initiatives. IT-led governance strangles business velocity because IT does not understand customer problems or market timing. Shadow AI explodes when approval processes take ninety days and competitive response requires weeks. The CoE built around business ownership rather than IT infrastructure solves this by putting execution authority closer to customer outcomes.</p><p>Part 10 defined contextual engineering as the constraint-first operating model that turns AI motion into measurable progress. Organizations are not paralyzed. They are moving fast with budgets, vendors, and talent all in motion. But results are not. CE connects policy to delivery by designing within actual constraints rather than hoping frameworks transfer without adaptation.</p><p>That upstream work creates the foundation. It does not create enforcement.</p><h2>The Over-Provision Disaster</h2><p>Enterprises enthusiastic about AI capabilities are discovering what happens when systems are given authority without boundaries.</p><p>Customer service agents are resolving tickets by offering discounts, credits, and service upgrades that nobody in finance authorized. The agent has access to the customer record, the ability to modify accounts, and instructions to solve problems. What it does not have is a mechanism that says you can offer up to this amount and nothing more. The first time a customer asks for a refund outside policy guidelines, the agent complies because nothing stopped it.</p><p>Procurement agents are placing orders with vendors based on inventory predictions and delivery timelines. The agent has access to supplier systems, authorization to create purchase orders, and instructions to maintain stock levels. What it does not have is a boundary that says you can commit to purchases under this threshold automatically and everything above requires human review. The first time a supply chain disruption triggers an unusual order pattern, the agent commits to expenditures that blow the quarterly budget because nothing prevented it.</p><p>Marketing agents are launching campaigns, adjusting ad spend, and targeting audience segments based on performance data. The agent has access to advertising platforms, budget allocation tools, and instructions to optimize conversion rates. What it does not have is enforcement that says you can modify spend within these parameters and campaign changes beyond this scope require approval. The first time an algorithm detects an opportunity in a sensitive demographic or controversial topic area, the agent acts because nothing blocked it.</p><p>These are not malicious AI scenarios. These are capability without constraint. The agents are doing exactly what they were designed to do. Solve problems. Optimize outcomes. Act autonomously. The disaster happens because upstream governance said what the agent should do without defining what the agent is allowed to do at the moment a decision binds to reality.</p><h2>The Under-Deploy Paralysis</h2><p>Enterprises cautious about AI risk are stuck in the opposite failure mode.</p><p>They run pilots that work in controlled environments. The model performs well. The business sponsor is enthusiastic. The ROI projections look convincing. Then the deployment review happens.</p><p>&#222; Legal asks how we prove the system had the right to make this decision if a customer challenges it.</p><p>&#222; Compliance asks how we demonstrate to regulators that appropriate oversight was in place when the action occurred.</p><p>&#222; Security asks how we prevent this system from being manipulated into taking actions outside its intended scope.</p><p>Nobody can answer those questions because upstream governance defined policies, not enforcement mechanisms. The policy says AI systems must operate within approved parameters. It does not say what approved parameters means in executable terms. The policy says human oversight is required for high-risk decisions. It does not define high-risk in a way a system can evaluate in real time. The policy says audit trails must demonstrate accountability. It does not specify what evidence is sufficient to prove the system acted within authority.</p><p>The deployment stalls. Not because the technology failed. Because nobody can prove the system is safe to operate without constant human supervision. The pilot becomes permanent. The business case dies. The team moves on to other projects. The organization adds another data point to the eighty percent AI project failure statistic.</p><h2>Why Post-Hoc Governance Creates Liability</h2><p>The instinct when these failures happen is to add more oversight after the fact.</p><p>&#222; Logs capture what the system did.</p><p>&#222; Audit trails document when actions occurred.</p><p>&#222; Explainability frameworks describe why the system made specific decisions.</p><p>&#222; Review processes examine whether outcomes aligned with policy intent.</p><p>This is governance as homework marking. The system acts. Then humans evaluate whether the action was acceptable.</p><p>That approach worked when AI systems made recommendations that humans executed. A human reviewed the AI output, applied judgment, and took responsibility for the action. If the recommendation was wrong, the human caught it before consequence occurred.</p><p>That approach fails when AI systems make decisions that bind immediately to reality. The customer service agent already issued the credit. The procurement agent already committed to the purchase. The marketing agent already launched the campaign. By the time logs are reviewed and audit trails are examined, the action is complete and consequences are in motion.</p><p>Post-hoc governance does not create control. It creates liability with documentation. You can prove what happened. You cannot prove the system had the right to act in that moment. That distinction matters when regulators ask questions, when customers challenge decisions, and when boards want accountability for autonomous system failures.</p><h2>What the Next Phase Requires</h2><p>The gap between policy and reality closes when governance moves from defining intent to enforcing boundaries at the commitment point.</p><p>Not more policies. Not better councils. Not additional oversight committees. Enforcement mechanisms that answer three questions before a system acts.</p><p>&#222; One, is this action within the scope of authority granted to this system?</p><p>&#222; Two, does this system have verified access to the data and resources required for this action?</p><p>&#222; Three, can this system prove in real time that executing this action is admissible under current policy?</p><p>If the answer to all three is yes, the system acts. If the answer to any is no, the system either escalates to human authority or refuses the action entirely. Not after logging and review. Before consequence.</p><p>This is not new thinking. This is AppSec, DevSecOps, OpSec, and CIAM principles applied to AI inference workflows. Decades of security engineering taught us to enforce boundaries at commit time. Code reviews happen before deployment, not after production failures. Access controls prevent unauthorized actions, not document them after they occur. Least privilege limits blast radius, not explains damage after incidents.</p><p>AI systems require the same discipline adapted to inference decision points. The remaining articles in the mini-arc cover how to build it.</p><p>#AIGovernance #ContextualBoundaries #EnterpriseAI #AIControl #GovernanceReality</p><div><hr></div><p>[AUDIO OPENING]</p><p>Parts 8, 9, and 10 of this governance series covered the upstream layer. Centers of Excellence that bridge policy and execution. The death valley between IT control and business velocity. Contextual engineering as the discipline that turns motion into measurable progress. That foundation matters. Without it you get governance theater, shadow AI, and paralyzed organizations watching competitors move faster. But here is what I have learned watching enterprises deploy autonomous AI systems over the last eighteen months. Upstream governance does not prevent downstream disasters. You can have perfect policies, mature councils, and well-designed CoEs. Then an AI agent gives away services a customer support manager never authorized. Or a deployment sits in pilot purgatory forever because nobody can answer whether the system has the right to act without human oversight. The problem is not lack of governance. The problem is the gap between what policy says should happen and what systems are actually allowed to do when decisions bind to reality. This is where the next phase of AI governance lives.</p><p>[END AUDIO OPENING]</p>]]></content:encoded></item><item><title><![CDATA[A Working Language Model in Production (Models Part 21) ]]></title><description><![CDATA[Twenty articles of infrastructure. One system. Here is what it looks like when everything works.]]></description><link>https://signalsandsystems.substack.com/p/a-working-language-model-in-production</link><guid isPermaLink="false">https://signalsandsystems.substack.com/p/a-working-language-model-in-production</guid><dc:creator><![CDATA[Jon Walkenhorst]]></dc:creator><pubDate>Fri, 01 May 2026 15:00:35 GMT</pubDate><enclosure url="https://api.substack.com/feed/podcast/196079508/ea89eabbba117a5b255d1d2a477edead.mp3" length="0" type="audio/mpeg"/><content:encoded><![CDATA[<p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://signalsandsystems.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://signalsandsystems.substack.com/subscribe?"><span>Subscribe now</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wpIG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4898a2f7-236a-4f51-845a-5a89864d9c38_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wpIG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4898a2f7-236a-4f51-845a-5a89864d9c38_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!wpIG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4898a2f7-236a-4f51-845a-5a89864d9c38_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!wpIG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4898a2f7-236a-4f51-845a-5a89864d9c38_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!wpIG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4898a2f7-236a-4f51-845a-5a89864d9c38_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wpIG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4898a2f7-236a-4f51-845a-5a89864d9c38_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4898a2f7-236a-4f51-845a-5a89864d9c38_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2535987,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://signalsandsystems.substack.com/i/196079508?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4898a2f7-236a-4f51-845a-5a89864d9c38_1536x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wpIG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4898a2f7-236a-4f51-845a-5a89864d9c38_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!wpIG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4898a2f7-236a-4f51-845a-5a89864d9c38_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!wpIG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4898a2f7-236a-4f51-845a-5a89864d9c38_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!wpIG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4898a2f7-236a-4f51-845a-5a89864d9c38_1536x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>TL;DR: This is the capstone. Every layer built across this arc converges here into a single operational narrative. The NOAA storm events pipeline runs from raw data ingestion through monitored production inference. This article does not introduce new tools or new concepts. It shows the complete system working as designed, traces a single query from browser to response and back, and closes the arc with an honest assessment of what you built, what it cost, and where it goes from here.</em></p><h2><strong>The System You Built</strong></h2><p>Twenty articles. One system. Here is every layer in plain language with the article that built it.</p><p>The data layer ingests, normalizes, cleans, formats, and chunks 1.2 million NOAA storm event records covering 2019 through 2023. Parts 5 and 6 built it. The output is 400 token chunks with 50 token overlap stored in data/chunked, ready for embedding.</p><p>The embedding layer converts every chunk into a 384 dimensional vector using sentence-transformers all-MiniLM-L6-v2. Part 14 built it. The output is 1.2 million vectors stored in the Chroma noaa_storm_events collection at data/vectorstore.</p><p>The model layer runs a quantized instruction tuned open-weight model with a NOAA domain adapter loaded via PEFT. Parts 7, 8, 9, 10, and 15 established the conceptual foundation and built the adapter. The model runs under Ollama serving the noaa-storm-model endpoint.</p><p>The orchestration layer assembles every inference call. System prompt first, retrieved chunks ordered by similarity score, conversation history trimmed to a two turn window, user query last, all within a 3,500 token prompt budget. Parts 11, 12, and 14 built it.</p><p>The API layer exposes the pipeline as a FastAPI REST service with session management, input validation, prompt injection filtering, and access logging. Parts 16 and 18 built it.</p><p>The human interface layer runs Open WebUI connected to the noaa-storm-model endpoint on port 3000. Part 18 built it.</p><p>The process management layer runs the pipeline as a managed system service with automatic restart on failure under systemd, launchd, or NSSM depending on platform. Part 18 built it.</p><p>The evaluation layer established the quality baseline with 140 test cases covering retrieval quality, response correctness, and response consistency. Part 19 built it.</p><p>The monitoring layer watches input distribution drift, retrieval drift, response quality trends, and infrastructure health continuously, surfacing degradation before users detect it. Part 20 built it.</p><h2><strong>A Query From End to End</strong></h2><p>A single query traced through every layer shows the system working as a whole rather than as a collection of independently verified components.</p><p>The director opens a browser and navigates to the Open WebUI interface. She selects noaa-storm-model and types: &#8220;What tornado outbreaks caused the most fatalities in Alabama between 2019 and 2023?&#8221;</p><p>Open WebUI formats the query as a POST request to the FastAPI endpoint at /query with a session_id assigned to her browser session.</p><p>The security layer validates the query length at 87 tokens, below the 500 token limit. The prompt injection filter finds no injection patterns. The request passes to the RAG assembly function.</p><p>The token middleware logs the incoming request with timestamp and session identifier.</p><p>The RAG assembly function calls the retrieval module. The query is embedded by all-MiniLM-L6-v2, producing a 384 dimensional vector. The Chroma collection returns the eight chunks with similarity scores above 0.6, ranked by score descending. The top chunk covers the April 2021 Alabama tornado outbreak with a similarity score of 0.847.</p><p>The assembly function calculates the token budget. System prompt at 487 tokens, eight retrieved chunks at 3,104 tokens combined, conversation history at zero tokens for a new session, user query at 87 tokens. Total prompt tokens: 3,678. Within the 3,500 token budget after the two lowest scoring chunks are dropped to fit. Six chunks remain.</p><p>The assembled prompt goes to the Ollama noaa-storm-model endpoint. The fine-tuned model reads the system prompt, six retrieved NOAA storm event records, and the query. It generates a response in 3.2 seconds citing four specific tornado outbreak events with fatality counts, dates, and affected counties drawn directly from the retrieved records. The response includes a confidence assessment of high based on the retrieved context coverage.</p><p>The response object returns to Open WebUI containing the natural language response, six source EVENT_IDs, token component counts, and similarity scores for the retrieved chunks.</p><p>Open WebUI renders the response in the chat window. The director reads a factually grounded answer citing the April 2021 outbreak as the most fatal event in the dataset period with specific county-level detail.</p><p>The token middleware logs the complete request with prompt tokens, completion tokens, and response time.</p><p>The access log records the session identifier, token counts, and source EVENT_IDs.</p><p>The monitoring infrastructure captures the query in the daily distribution log. The retrieval metrics fall within baseline thresholds. The infrastructure log records 3.2 second response time, within the 10 second latency threshold.</p><p>Four seconds from question to answer. Every layer did its job.</p><h2><strong>What This Cost</strong></h2><p>Building this pipeline required hardware, time, and operational attention. Being honest about those costs is part of what makes the arc useful.</p><p>Hardware at the minimum viable tier, an RTX 3060 12GB or equivalent, costs between 400 and 500 dollars on the used market in 2026. Power consumption running continuously adds 15 to 20 dollars per month. Total first year cost at minimum viable hardware is approximately 600 to 700 dollars including power.</p><p>Build time following this arc from scratch runs approximately 40 to 60 hours for a practitioner who reads each article, runs each Claude Code prompt, debugs the inevitable first-attempt failures, and validates each layer before proceeding to the next. That estimate assumes no prior Python pipeline experience. A practitioner with existing Python experience will move faster through the data preparation and serving configuration steps.</p><p>Ongoing operational time runs approximately two to four hours per week for monitoring review, corpus updates when new NOAA data is released, and periodic quality baseline recalibration. That estimate stabilizes as the pipeline matures and the monitoring infrastructure catches issues before they require manual investigation.</p><h2><strong>What You Actually Learned</strong></h2><p>Following this arc to completion produced more than a running pipeline. It produced transferable judgment.</p><p>You understand why the stack has the layers it has. You know what breaks when a layer is missing because the arc named each failure mode before it happened to you. You know how to evaluate a model before committing to it, how to design a system prompt that produces consistent output, how to size a chunk for a token budget, how to detect when a deployed pipeline is degrading, and how to use QLoRA to adapt a model to a domain without a research budget.</p><p>Those capabilities transfer. The NOAA dataset is the throughline. The patterns work on legal documents, medical records, financial filings, technical documentation, and every other domain where your data cannot leave your infrastructure, where your use case requires domain fluency a general model does not have, or where the economics of self-hosted inference beat the alternative.</p><h2><strong>Where This Goes From Here</strong></h2><p>This arc ends here. Three directions are worth naming for what comes next.</p><p>The pipeline you built is a single-user or small-team system. Scaling it to serve a larger organization introduces concurrency management, load balancing, model versioning, and access control complexity that belongs in the Operations and Security series. Series 3 covers that territory.</p><p>The fine-tuning adapter built in Part 15 was trained on automatically generated examples. A production fine-tune trained on curated domain examples produced by subject matter experts will outperform it. The fine-tuning article gave you the infrastructure. The data quality work that makes fine-tuning genuinely powerful is the next frontier.</p><p>The NOAA pipeline retrieves and generates. It does not reason across multiple inference steps, plan a sequence of actions, or coordinate with other systems. That capability belongs to agents. Series 12 covers the architecture. The LLM pipeline you built in this arc is the inference layer that agents call.</p><p>The wall is gone. The door is built. What you do with it from here is the work that matters.</p><p>#InHouseAI #DIYLanguageModel #LLMProduction #RAGPipeline #EnterpriseAI #AIInfrastructure #LanguageModels</p><div><hr></div><p>[AUDIO OPENING]</p><p>Twenty articles ago the premise was simple. The wall between using AI and running AI is gone. This is the proof. A regional emergency management office. A pipeline running on a mid-range GPU. Fifteen years of NOAA storm event records indexed and searchable. A director types a question into a browser. What were the most damaging tornado outbreaks in the Southeast in the last five years. Four seconds later the answer comes back in plain English. Six specific events cited by county, date, and damage assessment. Grounded in the actual NOAA record. Nobody called a vendor. Nobody sent data to an external API. Nobody waited for a procurement cycle. The director does not know what is running under that browser window and does not need to. You do. Twenty articles of infrastructure reduced to a question and an answer. The wall is gone. You built the door.</p><p>[END AUDIO OPENING]</p>]]></content:encoded></item><item><title><![CDATA[Keeping It Honest: Production Monitoring and Drift (Models Part 20) ]]></title><description><![CDATA[A pipeline that was working last week may not be working the same way this week. Here is how you know.]]></description><link>https://signalsandsystems.substack.com/p/keeping-it-honest-production-monitoring</link><guid isPermaLink="false">https://signalsandsystems.substack.com/p/keeping-it-honest-production-monitoring</guid><dc:creator><![CDATA[Jon Walkenhorst]]></dc:creator><pubDate>Fri, 01 May 2026 00:18:50 GMT</pubDate><enclosure url="https://api.substack.com/feed/podcast/196061089/ff1ccb16a2735a04c934875380d50dd0.mp3" length="0" type="audio/mpeg"/><content:encoded><![CDATA[<p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://signalsandsystems.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://signalsandsystems.substack.com/subscribe?"><span>Subscribe now</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fFR5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd57ebf5a-5d88-4553-8366-8c44387095a2_944x630.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fFR5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd57ebf5a-5d88-4553-8366-8c44387095a2_944x630.png 424w, https://substackcdn.com/image/fetch/$s_!fFR5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd57ebf5a-5d88-4553-8366-8c44387095a2_944x630.png 848w, https://substackcdn.com/image/fetch/$s_!fFR5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd57ebf5a-5d88-4553-8366-8c44387095a2_944x630.png 1272w, https://substackcdn.com/image/fetch/$s_!fFR5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd57ebf5a-5d88-4553-8366-8c44387095a2_944x630.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fFR5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd57ebf5a-5d88-4553-8366-8c44387095a2_944x630.png" width="944" height="630" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d57ebf5a-5d88-4553-8366-8c44387095a2_944x630.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:630,&quot;width&quot;:944,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1108823,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://signalsandsystems.substack.com/i/196061089?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd57ebf5a-5d88-4553-8366-8c44387095a2_944x630.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!fFR5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd57ebf5a-5d88-4553-8366-8c44387095a2_944x630.png 424w, https://substackcdn.com/image/fetch/$s_!fFR5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd57ebf5a-5d88-4553-8366-8c44387095a2_944x630.png 848w, https://substackcdn.com/image/fetch/$s_!fFR5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd57ebf5a-5d88-4553-8366-8c44387095a2_944x630.png 1272w, https://substackcdn.com/image/fetch/$s_!fFR5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd57ebf5a-5d88-4553-8366-8c44387095a2_944x630.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>TL;DR: Deployment is not the finish line. It is the starting line for a different set of problems. A language model pipeline in production degrades in ways that are invisible without deliberate monitoring infrastructure. Input distributions shift. Retrieval quality drifts. Response quality declines. The model that performed well against the test suite in Part 19 is operating in a changing environment from the moment it serves its first real user query. This article builds the monitoring infrastructure that surfaces those changes before users do.</em></p><h2>What Can Drift in a Language Model Pipeline</h2><p>Drift is the term for any change in the statistical properties of the data or behavior of the system that was not present when the quality baseline was established. Four drift types apply to the NOAA pipeline specifically.</p><p>Input drift occurs when the distribution of incoming queries changes meaningfully from the distribution used to evaluate the pipeline. The quality baseline in Part 19 was built against a representative sample of the queries the pipeline was expected to receive. When real usage diverges from that sample, the baseline metrics no longer accurately predict response quality. The hurricane season scenario in the opening is input drift. The queries changed. The pipeline did not.</p><p>Retrieval drift occurs when the similarity scores and retrieval patterns for a stable set of queries change over time. This can happen when new documents are added to the corpus, changing the vector space neighborhoods that determine which chunks are nearest to a given query vector. It can also happen when the serving infrastructure changes in ways that affect embedding generation consistency. Retrieval drift is detectable by running the same test queries from Part 19 against the live pipeline periodically and comparing the retrieved EVENT_IDs against the baseline retrieval results.</p><p>Response drift occurs when the pipeline produces responses that diverge from the quality baseline metrics established in Part 19, without any change in the retrieval layer. Response drift is typically caused by changes in the model&#8217;s behavior, which can occur when the base model is updated, when the adapter weights are replaced, or when prompt changes alter the model&#8217;s output patterns in ways that were not anticipated.</p><p>Data drift occurs when the NOAA corpus itself changes in ways that affect pipeline behavior. New annual data ingestion is the primary source of data drift for this pipeline. A corpus that gains 200,000 new storm event records covering a new year will have different vector space density in regions of the embedding space that correspond to the new data, affecting retrieval patterns for queries in those regions.</p><h2>The Monitoring Stack</h2><p>The monitoring infrastructure for the NOAA pipeline has three layers that each address a different drift type.</p><p>The Evidently layer monitors input distribution and data drift. It compares the statistical properties of incoming queries and retrieved chunks against the baseline distributions established during the evaluation phase and alerts when distributions diverge beyond configured thresholds.</p><p>The quality metrics layer monitors retrieval drift and response drift. It runs the automated evaluation suite from Part 19 on a scheduled basis and compares current metrics against the quality baseline thresholds. This layer already exists as the Prefect flow built in Part 19. The monitoring article extends it with alerting and trend analysis.</p><p>The infrastructure layer monitors the serving stack health. Token consumption, request latency, queue depth, GPU memory utilization, and error rates are the operational signals that indicate infrastructure problems distinct from model quality problems. A spike in request latency that coincides with stable quality metrics indicates an infrastructure problem. A decline in quality metrics with stable latency indicates a model or data problem. The two layers together localize failures to the right part of the stack.</p><h2>Building the Stack</h2><p>The five steps that follow build each layer of that monitoring stack in sequence.</p><h3>Step One: Input Distribution Monitoring</h3><p>Claude Code Prompt - Q1 2026:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;markdown&quot;,&quot;nodeId&quot;:&quot;0474252d-42c5-4407-995f-36c2d4fc6fe6&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-markdown">Write a Python monitoring script using Evidently that
tracks input distribution drift for the NOAA LLM pipeline.
Use the queries from data/reports/test_dataset.json as
the reference distribution. For each day of production
operation collect the queries logged in
data/logs/api.jsonl and embed them using the
all-MiniLM-L6-v2 model to produce a current query
distribution. Run an Evidently DataDriftPreset report
comparing the current query embedding distribution
against the reference distribution. Flag days where
the drift score exceeds 0.15 as moderate drift and
days where it exceeds 0.25 as severe drift. Save the
daily drift report as an HTML file in data/reports
named with the current date and append a structured
drift summary to data/logs/drift_log.jsonl including
the date, drift score, drift category, and the
query volume for the day. Add a function that reads
the last 30 entries from drift_log.jsonl and returns
a trend summary showing whether drift is increasing,
stable, or decreasing over the trailing 30 day window.</code></pre></div><p>What you are asking Claude Code to build: a daily input distribution monitoring pipeline that detects when the queries arriving at the pipeline are diverging from the distribution the system was evaluated against. The 30 day trend function is what distinguishes a one-day anomaly from a sustained shift that requires action.</p><p>What success looks like: the daily drift report runs against the api.jsonl log and produces an HTML report. Artificially injecting queries about a topic not represented in the test dataset, coastal flooding events for example, produces a drift score above the moderate threshold. The trend function returns an increasing trend after three consecutive days of elevated drift scores.</p><h3>Step Two: Retrieval Drift Monitoring</h3><p>Claude Code Prompt - Q1 2026:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;markdown&quot;,&quot;nodeId&quot;:&quot;d225089e-269e-44a8-bc4c-8a8281ae5d9d&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-markdown">Write a Python retrieval drift monitoring script that
runs weekly against the NOAA LLM pipeline and detects
changes in retrieval behavior from the quality baseline
stored in data/reports/quality_baseline.json.
Load the retrieval evaluation
baseline from data/reports/quality_baseline.json.
Submit the 20 validation category queries from
data/reports/test_dataset.json to the retrieval
function in scripts/retrieval.py using the
query_noaa_events function and record the returned
EVENT_IDs and similarity scores. Compare current
Recall at 5 and Mean Reciprocal Rank against the
baseline thresholds. Flag any query where the top
retrieved EVENT_ID differs from the baseline top
result as a retrieval shift event. Save the weekly
retrieval drift report to data/reports naming it
with the current date and appending a summary entry
to data/logs/retrieval_drift_log.jsonl. Include a
corpus change detection function that compares the
current vector store document count against the
count recorded in the baseline and flags when new
documents have been added since the baseline was
established.</code></pre></div><p>What you are asking Claude Code to build: a weekly retrieval drift detector that catches changes in which documents the pipeline surfaces for known queries. The corpus change detection function is the mechanism that connects new NOAA data ingestion events to retrieval drift monitoring. When new annual data is added to the corpus the retrieval drift monitor should run immediately rather than waiting for the weekly schedule.</p><p>What success looks like: the weekly report runs and produces consistent results against a stable corpus. Adding new NOAA records to the vector store triggers the corpus change detection flag. A query that previously returned a specific EVENT_ID as its top result but now returns a different one appears in the retrieval shift event log.</p><h3>Step Three: Response Quality Monitoring</h3><p>Claude Code Prompt - Q1 2026:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;markdown&quot;,&quot;nodeId&quot;:&quot;9eeb28ab-f2d0-487e-a1d1-01ae5053259d&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-markdown">Extend the weekly Prefect evaluation flow defined in
scripts/evaluation_flow.py to include response
quality trend monitoring. After each weekly
evaluation run load the current metrics
from data/reports/response_evaluation.json and the
last four weekly evaluation results from
data/reports. Calculate the week over week change
for groundedness rate, coverage score, and consistency
failure count. Flag metrics where the four week trend
shows consistent decline as degrading and metrics
where the four week trend shows consistent improvement
as recovering. Append a trend entry to
data/logs/quality_trend_log.jsonl including the date,
current metrics, baseline thresholds, trend direction
for each metric, and an overall pipeline health
assessment as healthy, degrading, or critical.
Critical status applies when any metric falls below
its baseline threshold. Degrading status applies when
any metric shows a consistent declining trend over
four weeks without yet crossing the threshold.
Healthy status applies when all metrics are stable
or improving above their thresholds.</code></pre></div><p>What you are asking Claude Code to build: a trend-aware quality monitoring layer that distinguishes between a pipeline that is currently below threshold and one that is heading toward threshold. The degrading status is the early warning signal. A pipeline flagged as degrading gives the operator time to investigate and intervene before the critical threshold is crossed.</p><p>What success looks like: the weekly flow produces a quality trend log entry after each run. Artificially reducing response quality by modifying the system prompt produces a degrading trend signal after two consecutive weekly runs. Restoring the original system prompt produces a recovering trend signal in the subsequent run.</p><h3>Step Four: Infrastructure Monitoring</h3><p>Claude Code Prompt - Q1 2026:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;markdown&quot;,&quot;nodeId&quot;:&quot;54cf6b29-c1fc-430f-96e5-141809094862&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-markdown">Write a Python infrastructure monitoring script that
tracks the operational health of the NOAA LLM pipeline
serving stack. Every five minutes collect the following
metrics from the pipeline&#8217;s running processes: request
latency in milliseconds from data/logs/api.jsonl for
the most recent 100 requests, current GPU memory
utilization using the nvidia-smi command line tool,
Ollama request queue depth from the health endpoint
at scripts/health.py using the check_pipeline_health
function, and error rate as the fraction of requests
in the last 100 that returned a non-200 status code.
Append each five minute snapshot to
data/logs/infrastructure_log.jsonl. Generate an alert
entry in data/logs/infrastructure_alerts.jsonl when
any of the following thresholds are exceeded: median
request latency above 10 seconds, GPU memory
utilization above 90 percent, queue depth above 8,
or error rate above 0.05. Add a daily infrastructure
summary function that reports the median and 95th
percentile latency, peak GPU memory utilization,
total requests served, and alert count for the day.</code></pre></div><p>What you are asking Claude Code to build: a five minute interval infrastructure health monitor that tracks the operational metrics that distinguish infrastructure failures from model quality failures. The alert thresholds are conservative starting points calibrated for minimum viable hardware. Adjust them based on the normal operating range observed in the first two weeks of production operation.</p><p>What success looks like: the infrastructure log accumulates entries every five minutes. Simulating a slow response by introducing a delay in the pipeline triggers a latency alert. The daily summary produces accurate aggregates from the log data. The GPU memory alert fires when memory utilization is artificially elevated by loading a second model alongside the pipeline.</p><h3>Step Five: Consolidated Alert Dashboard</h3><p>Four monitoring scripts producing four separate log files create an operational picture that requires reading multiple files to interpret. A consolidated dashboard that surfaces active alerts across all monitoring layers gives the operator a single view of pipeline health.</p><p>Claude Code Prompt - Q1 2026:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;markdown&quot;,&quot;nodeId&quot;:&quot;de97d517-9eff-4c67-83ad-ee9ee2b67a3d&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-markdown">Write a Python dashboard script that reads the four
monitoring logs from data/logs and produces a
consolidated pipeline health report as an HTML file
at data/reports/pipeline_health.html. The dashboard
should display: current pipeline health status as
healthy, degrading, or critical drawn from the most
recent entry in quality_trend_log.jsonl, active alerts
from drift_log.jsonl, retrieval_drift_log.jsonl,
quality_trend_log.jsonl, and infrastructure_alerts.jsonl
sorted by severity and recency, a seven day trend
chart for each quality metric showing current value
against baseline threshold, a 24 hour latency chart
showing median and 95th percentile request latency,
and a corpus status section showing current document
count, date of last ingestion, and whether retrieval
drift was detected after the last ingestion. Refresh
the HTML file every five minutes by running as a
background process. Add a plain text summary function
that outputs the current health status and active
alert count to stdout so the process management
layer can capture it in the system journal.</code></pre></div><p>What you are asking Claude Code to build: a self-refreshing HTML dashboard that consolidates the operational picture from all four monitoring layers into a single view. The plain text summary function is what makes the dashboard&#8217;s output visible in the system journal alongside the other pipeline process logs.</p><p>What success looks like: opening data/reports/pipeline_health.html in a browser shows current pipeline status with active alerts and trend charts. The file refreshes every five minutes with current data. Triggering an alert in any monitoring layer causes it to appear in the dashboard within the next refresh cycle. The plain text summary output appears in the system journal log.</p><h2>When to Act on What Monitoring Tells You</h2><p>Monitoring produces signals. Signals require interpretation before they require action. Three response levels map to the alert categories the monitoring infrastructure produces.</p><p>A moderate drift signal or a degrading quality trend warrants investigation before intervention. Pull the detailed drift report, identify which query categories are driving the drift, and determine whether the shift reflects a genuine change in user behavior or an anomaly in a single day&#8217;s query volume. Investigation first, intervention only if the signal persists across multiple monitoring cycles.</p><p>A severe drift signal or a critical quality status warrants immediate intervention. The pipeline is operating outside its validated envelope. The appropriate response depends on the root cause. Input drift that reflects a genuine shift in user needs requires corpus expansion and baseline recalibration. Retrieval drift following corpus ingestion may require retuning the similarity threshold. Response quality decline following a model update requires rolling back to the previous adapter version while the new version is evaluated.</p><p>An infrastructure alert warrants immediate operational response. High GPU memory utilization that is not resolved by reducing concurrent request load indicates a hardware capacity problem. Sustained high latency that is not correlated with queue depth indicates a serving configuration problem. Error rates above threshold indicate a pipeline component failure that requires log inspection to localize.</p><h2>Recalibrating the Baseline</h2><p>The quality baseline from Part 19 is not permanent. As the pipeline matures, as the corpus grows, and as user behavior stabilizes into consistent patterns, the baseline should be recalibrated to reflect the pipeline&#8217;s current normal operating state rather than its initial deployment state.</p><p>Recalibration means running the full evaluation suite from Part 19 against the current pipeline state and generating a new quality_baseline.json with updated thresholds. Recalibrate when the corpus has grown by more than 20 percent since the last baseline, when a new model adapter has been deployed and validated in production, or when the monitoring infrastructure has been running long enough to establish that current metric levels represent genuine normal operation rather than post-deployment settling.</p><p>Every recalibration should be logged with the conditions that triggered it. A baseline history that records why each recalibration occurred is the audit trail that makes the pipeline&#8217;s evolution reconstructible.</p><h2>What Comes Next</h2><p>The monitoring infrastructure is in place. The pipeline is deployed, tested, and watched. One article remains. The capstone ties every layer built across this arc into a single operational narrative, showing the complete system from raw NOAA data to monitored production inference, the way it works when everything works together.</p><p>#InHouseAI</p><p>#LLMMonitoring</p><p>#DriftDetection</p><p>#ProductionAI</p><p>#DIYLanguageModel</p><p>#EnterpriseAI</p><p>#AIInfrastructure</p><div><hr></div><p>[AUDIO OPENING]</p><p>A pipeline serving a regional emergency management office runs cleanly for four months. Response quality is consistent. Users trust it. Then hurricane season arrives. The query patterns shift dramatically. Users are asking about wind damage, storm surge, and coastal flooding at volumes the previous months never produced. The retrieval layer was tuned against a balanced query distribution. It was never optimized for the concentrated volume of coastal event queries that hurricane season generates. Similarity scores on coastal flood chunk retrievals are lower than the baseline established in Part 19. The pipeline is not broken. It is operating outside the conditions it was evaluated against. Without monitoring infrastructure that detects the input distribution shift, nobody knows until the emergency management director asks why the pipeline keeps returning incomplete answers about storm surge events. Monitoring does not prevent the shift. It surfaces it in time to do something about it.</p><p>[END AUDIO OPENING]</p>]]></content:encoded></item><item><title><![CDATA[Trust But Verify: Inference Testing and Validation (Models Part 19) ]]></title><description><![CDATA[The pipeline returned an answer. That is not the same as the pipeline returning the right answer.]]></description><link>https://signalsandsystems.substack.com/p/trust-but-verify-inference-testing</link><guid isPermaLink="false">https://signalsandsystems.substack.com/p/trust-but-verify-inference-testing</guid><dc:creator><![CDATA[Jon Walkenhorst]]></dc:creator><pubDate>Tue, 28 Apr 2026 19:05:51 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!TpoE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7547794-ca7f-4396-bad1-5f2a3d4d9837_1230x820.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://signalsandsystems.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://signalsandsystems.substack.com/subscribe?"><span>Subscribe now</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TpoE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7547794-ca7f-4396-bad1-5f2a3d4d9837_1230x820.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TpoE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7547794-ca7f-4396-bad1-5f2a3d4d9837_1230x820.png 424w, https://substackcdn.com/image/fetch/$s_!TpoE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7547794-ca7f-4396-bad1-5f2a3d4d9837_1230x820.png 848w, https://substackcdn.com/image/fetch/$s_!TpoE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7547794-ca7f-4396-bad1-5f2a3d4d9837_1230x820.png 1272w, https://substackcdn.com/image/fetch/$s_!TpoE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7547794-ca7f-4396-bad1-5f2a3d4d9837_1230x820.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TpoE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7547794-ca7f-4396-bad1-5f2a3d4d9837_1230x820.png" width="1230" height="820" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a7547794-ca7f-4396-bad1-5f2a3d4d9837_1230x820.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:820,&quot;width&quot;:1230,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1724618,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://signalsandsystems.substack.com/i/195786392?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7547794-ca7f-4396-bad1-5f2a3d4d9837_1230x820.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!TpoE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7547794-ca7f-4396-bad1-5f2a3d4d9837_1230x820.png 424w, https://substackcdn.com/image/fetch/$s_!TpoE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7547794-ca7f-4396-bad1-5f2a3d4d9837_1230x820.png 848w, https://substackcdn.com/image/fetch/$s_!TpoE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7547794-ca7f-4396-bad1-5f2a3d4d9837_1230x820.png 1272w, https://substackcdn.com/image/fetch/$s_!TpoE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7547794-ca7f-4396-bad1-5f2a3d4d9837_1230x820.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>TL;DR: A deployed language model pipeline that has never been systematically tested is a system you are trusting without evidence. Inference testing establishes what good looks like before users discover what bad looks like. This article covers the evaluation framework for the NOAA pipeline, the metrics that matter for a retrieval augmented generation system, how to build a test suite that catches the failure modes identified across this arc, and how to establish a quality baseline before the monitoring article has anything meaningful to monitor.</em></p><h2>What Evaluation Means for a Language Model Pipeline</h2><p>Evaluating a traditional software system is binary. The function returns the correct value, or it does not. Evaluating a language model pipeline is not binary.</p><p>Three dimensions of evaluation apply specifically to the NOAA pipeline.</p><p>1. <strong>Retrieval quality</strong> measures whether the pipeline is surfacing the right chunks for a given query. A response can be well-written and domain-fluent while being grounded in the wrong source documents. Retrieval quality evaluation catches this failure mode before it reaches users.</p><p>2. <strong>Response correctness</strong> measures whether the claims in a response are supported by the retrieved source documents and accurate against the known NOAA record. A response that accurately summarizes three retrieved chunks but misses six relevant events in the corpus has a retrieval-quality problem that the response-correctness evaluation surfaces.</p><p>3. <strong>Response consistency</strong> measures whether the pipeline produces equivalent responses to equivalent queries across multiple runs. A pipeline that answers the same question differently on successive calls has a stability problem that affects user trust regardless of whether either individual response is correct.</p><h2>Building the Test Dataset</h2><p>Evaluation requires a test dataset of queries with known correct answers. For the NOAA pipeline, that means a set of storm-event queries for which the correct answer is verifiable against the source NOAA records directly.</p><p>The fine-tuning validation set from Part 15 is the starting point. It contains 100 examples with known correct outputs. Those examples were held out from fine-tuning training precisely so they could serve as an uncontaminated evaluation set. They are the foundation of the test suite.</p><p>Supplementing the validation set with manually constructed test cases covers failure modes that the automatically generated examples may not include. Three categories of manually constructed cases matter most for the NOAA pipeline.</p><p>A. <strong>Boundary queries</strong> test behavior at the edges of the corpus coverage. A query about a storm event from 2018, one year before the corpus begins, should return a clear out-of-scope acknowledgment rather than a fabricated response. A query about an event type with sparse representation in the corpus should return a low confidence signal rather than a confident response grounded in insufficient evidence.</p><p>B. <strong>Multi-event queries</strong> test the pipeline&#8217;s ability to synthesize across multiple retrieved chunks. A query asking for a comparison of tornado activity across three states in a single year requires the pipeline to retrieve and synthesize chunks from multiple events correctly. Single-event retrieval success does not predict multi-event synthesis quality.</p><p>C. <strong>Adversarial queries</strong> test the security layer from Part 16. Prompt injection attempts, queries designed to elicit responses outside the system prompt boundaries, and queries containing the pipeline&#8217;s own system prompt language confirm that the security configuration is holding under realistic attack conditions.</p><p>Claude Code Prompt - Q1 2026:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;markdown&quot;,&quot;nodeId&quot;:&quot;7cdf7c8b-783e-417a-87fb-3dbf2d9a8de6&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-markdown">Write a Python script that builds a test dataset for
the NOAA LLM pipeline combining three sources. First,
load the 100 example validation set from
data/finetune/validation.jsonl as the foundation.
Second, generate 20 boundary test cases covering
queries outside the 2019 to 2023 date range, queries
about event types with fewer than 50 records in the
corpus, and queries about geographic regions with
sparse coverage. Third, generate 20 multi-event
synthesis queries that require retrieving and
combining information from at least three distinct
storm events to answer correctly. For each test case
store the query, the expected response characteristics
as a structured specification rather than a verbatim
answer, the relevant EVENT_IDs that a correct response
should cite, and the test category as one of validation,
boundary, or synthesis. Save the complete test dataset
as data/reports/test_dataset.json with a summary
showing the count per category.</code></pre></div><p>What you are asking Claude Code to build: a structured test dataset that covers the full range of query types the pipeline will encounter in production, with expected response specifications that make automated evaluation possible without requiring verbatim answer matching.</p><p>What success looks like: 140 test cases across three categories in data/reports/test_dataset.json. The boundary cases include at least five out-of-scope date queries and five sparse coverage queries. The synthesis cases each reference at least three EVENT_IDs in their expected citation list.</p><h2>Retrieval Quality Metrics</h2><p>Retrieval quality evaluation measures whether the chunks the pipeline surfaces for a given query are the right ones. Three metrics cover the retrieval layer specifically.</p><p>I. <strong>Recall at K</strong> measures what fraction of the relevant chunks for a query appear in the top K retrieved results. For the NOAA pipeline with a top-5 retrieval configuration, Recall at 5 measures whether the five chunks returned include the chunks that a correct response requires. A pipeline with high Recall at 5 is surfacing the right evidence. A pipeline with low Recall at 5 is missing relevant records regardless of how well the model reasons over what it does retrieve.</p><p>II. <strong>Mean Reciprocal Rank </strong>measures how highly the most relevant chunk is ranked in the retrieval results. A pipeline that consistently places the most relevant chunk at position one produces better responses than one that buries it at position four, because of the lost in the middle problem covered in Part 12.</p><p>III. <strong>Similarity score distribution</strong> measures the spread of similarity scores across retrieved chunks for a representative query set. A healthy distribution shows meaningful variation between the highest and lowest scored chunks. A distribution where all chunks cluster near the similarity threshold indicates the embedding model is not discriminating effectively between relevant and marginally relevant content.</p><p>Claude Code Prompt - Q1 2026:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;markdown&quot;,&quot;nodeId&quot;:&quot;5b78b064-a1ae-4761-a614-45ad622a6a4f&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-markdown">Write a Python retrieval evaluation script that measures
retrieval quality for the NOAA LLM pipeline against the
test dataset from data/reports/test_dataset.json.
For each test case submit the query to the retrieval
function in scripts/retrieval.py using the
query_noaa_events function and compare the returned
EVENT_IDs against the expected EVENT_IDs in the
test case specification.Calculate Recall at 5 as the fraction of expected
EVENT_IDs appearing in the top 5 retrieved results
across all test cases. Calculate Mean Reciprocal Rank
as the average of the reciprocal rank of the first
relevant chunk across all test cases. Calculate the
similarity score distribution as the mean and standard
deviation of scores across all retrieved chunks for
all test cases. Save the results as
data/reports/retrieval_evaluation.json with per-category
breakdowns showing separate metrics for validation,
boundary, and synthesis test cases.</code></pre></div><p>What you are asking Claude Code to build: a retrieval quality report that surfaces the specific failure modes the test dataset was designed to catch, with per-category breakdowns that tell you whether boundary queries or synthesis queries are driving any quality gaps.</p><p>What success looks like: Recall at 5 above 0.7 on the validation category confirms the retrieval layer is working correctly for well-represented query types. Lower recall on boundary cases is expected and acceptable. Lower recall on synthesis cases indicates chunking strategy gaps that the Part 6 configuration may need to address.</p><h2>Response Quality Metrics</h2><p>Response quality evaluation measures whether the pipeline&#8217;s outputs are correct, complete, and consistent. Three metrics apply to the NOAA pipeline.</p><p>1) <strong>Groundedness</strong> measures whether the claims in a response are supported by the retrieved source documents. A response that makes claims not present in the retrieved chunks is hallucinating. Groundedness evaluation catches this by comparing response content against the source documents cited in the response object.</p><p>2) <strong>Coverage</strong> measures whether the response addresses the full scope of the query, given the available retrieved context. A query about tornado activity in three states that returns a response covering only one state has a coverage failure, even if the single state coverage is accurate.</p><p>3) <strong>Consistency</strong> measures whether equivalent queries produce equivalent responses across multiple runs. Temperature settings in the inference configuration control response randomness. A temperature of zero produces deterministic responses. A temperature above zero introduces variation. For a pipeline where consistency is a requirement, temperature configuration and consistency evaluation go together.</p><p>Claude Code Prompt - Q1 2026:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;markdown&quot;,&quot;nodeId&quot;:&quot;fb491353-0a9e-491b-8330-10bb08ed84b4&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-markdown">Write a Python response quality evaluation script that
submits each query from the validation category of
data/reports/test_dataset.json to the assembled NOAA
LLM pipeline and evaluates the responses on three
dimensions. First, groundedness: for each response
check whether the key claims are present in the
retrieved source chunks returned with the response
and flag responses where claims appear that have no
support in the cited EVENT_ID records. Second,
coverage: compare the EVENT_IDs cited in each response
against the expected EVENT_IDs in the test specification
and calculate the fraction of expected events that
appear in the response. Third, consistency: submit
each query three times and calculate the similarity
between the three responses using cosine similarity
on their embeddings, flagging queries where any pair
of responses falls below 0.85 similarity. Save results
as data/reports/response_evaluation.json with a summary
showing average groundedness rate, average coverage
score, and the number of consistency failures.</code></pre></div><p>What you are asking Claude Code to build: a response quality report covering the three dimensions that determine whether the pipeline is producing trustworthy output. The groundedness check is the hallucination detector. The coverage score is the completeness measure. The consistency check is the stability measure that tells you whether the pipeline behaves predictably under repeated queries.</p><p>What success looks like: groundedness rate above 0.9 means fewer than 10 percent of responses contain unsupported claims. Coverage score above 0.7 means the pipeline is citing most of the relevant events for well-represented queries. Fewer than five consistency failures across the validation set means the pipeline is stable under the current temperature configuration.</p><h2>The Quality Baseline</h2><p>The evaluation results from the retrieval and response quality scripts constitute the quality baseline. Every number produced by these scripts at this moment, before the pipeline has served real user traffic, is the reference point that the monitoring article uses to detect degradation.</p><p>A Recall at 5 of 0.74 today is not just a current measurement. It is the threshold below which the monitoring infrastructure should alert. A groundedness rate of 0.92 today is the floor below which response quality has degraded meaningfully. A consistency failure count of three today is the normal operating baseline against which future counts are compared.</p><p>Claude Code Prompt - Q1 2026:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;markdown&quot;,&quot;nodeId&quot;:&quot;5fcef7aa-e499-4d62-89ac-178f09601481&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-markdown">Write a Python baseline consolidation script that reads
data/reports/retrieval_evaluation.json and
data/reports/response_evaluation.json and produces a
single baseline configuration file at
data/reports/quality_baseline.json. The baseline should
record the following threshold values with a 10 percent
degradation margin applied: Recall at 5 threshold as
the measured value minus 0.07, groundedness threshold
as the measured rate minus 0.09, coverage threshold
as the measured score minus 0.07, and consistency
failure threshold as the measured count plus two.
Include the measurement timestamp, the corpus document
count at measurement time, and the model version and
adapter version from the serving health check. Add a
human readable summary section that states each
threshold in plain language so the baseline is
interpretable without reading the raw numbers.</code></pre></div><p>What you are asking Claude Code to build: a quality baseline file that encodes the degradation thresholds the monitoring infrastructure will use in the next article. The 10 percent degradation margins are conservative starting points. Tighten them as operational experience accumulates and the normal variation range of each metric becomes clear.</p><p>What success looks like: a quality_baseline.json file containing all threshold values with the measurement context preserved. The human readable summary section states each threshold in a sentence a non-technical stakeholder can interpret. The monitoring article ingests this file directly without requiring manual threshold configuration.</p><h2>Establishing a Testing Cadence</h2><p>A test suite run once at deployment is a snapshot. A test suite run regularly is a monitoring instrument. The evaluation scripts above should run on a defined cadence that matches the rate of change in the pipeline&#8217;s operating environment.</p><p>For the NOAA pipeline, a weekly automated test run is the right starting cadence. Weekly frequency catches drift that accumulates gradually without requiring daily evaluation overhead. When new NOAA data is ingested into the corpus, the test suite should run immediately after ingestion, regardless of the weekly schedule, because corpus changes are the most common source of retrieval quality shifts.</p><p>Claude Code Prompt - Q1 2026:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;markdown&quot;,&quot;nodeId&quot;:&quot;51801b45-d802-40a8-9c5f-533efea780cf&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-markdown">Write a Prefect flow that runs the complete evaluation
suite for the NOAA LLM pipeline on a weekly schedule.
The flow should execute the retrieval evaluation script,
the response evaluation script, and the baseline
consolidation script in sequence. After each script
completes compare the current metrics against the
thresholds in data/reports/quality_baseline.json and
generate an alert entry in data/logs/quality_alerts.jsonl
for any metric that falls below its threshold. Produce
a weekly quality report as an HTML file in data/reports
named with the current date showing current metrics,
baseline thresholds, trend direction for each metric
compared to the previous three weekly runs, and any
active alerts. Send the report path to the system
journal log using Python&#8217;s logging module configured
to write to the systemd journal so the process management
service defined in scripts/noaa-pipeline.service captures it.</code></pre></div><p>What you are asking Claude Code to build: an automated weekly evaluation pipeline that runs the full test suite, compares results against the quality baseline, generates alerts for threshold violations, and produces a human-readable trend report. The trend direction tracking is what distinguishes a monitoring instrument from a snapshot. A metric that is declining slowly across four weekly runs is more actionable than a single measurement below threshold.</p><p>What success looks like: the Prefect flow runs on schedule and produces a dated HTML report. Artificially degrading one metric by modifying a retrieval configuration triggers an alert entry in quality_alerts.jsonl. The trend report shows three weeks of historical data after three weekly runs.</p><h2>What Verification Actually Means</h2><p>Testing a language model pipeline does not produce the certainty that testing a deterministic system produces. A test suite that passes completely does not guarantee every future response will be correct. It guarantees that the pipeline meets a defined quality standard on a representative sample of the queries it will encounter.</p><p>That is a meaningful guarantee. It is the difference between deploying a pipeline you have evidence is working and deploying one you hope is working. The evidence is what makes the system trustworthy rather than just functional.</p><p>The quality baseline established in this article is what the monitoring article has to monitor. Without it, the monitoring infrastructure watches metrics without knowing what normal looks like. With it, every alert means something specific has changed from a known good state.</p><h2>What Comes Next</h2><p>Keeping the pipeline honest after deployment: Drift detection, input distribution monitoring, and the operational signals that tell you the pipeline is degrading before your users do.</p><p>#InHouseAI</p><p>#LLMEvaluation</p><p>#RAGTesting</p><p>#InferenceTesting</p><p>#DIYLanguageModel</p><p>#EnterpriseAI</p><p>#AIInfrastructure</p><div><hr></div><p></p><p>[AUDIO OPENING]</p><p>The pipeline is live. Open WebUI is running. The first query returned a response that looked correct. A colleague tried it and got another response that also looked correct. Three weeks later a National Weather Service analyst uses the pipeline to look up damage assessments for a specific county during a 2021 tornado outbreak. The response cites four events. The analyst knows from memory there were nine. The pipeline was never wrong in a way anyone noticed. It was never right in a way anyone verified. Testing is not the activity that happens after something breaks. It is the activity that tells you whether the thing you built does what you think it does before you find out the hard way that it does not.</p><p>[END AUDIO OPENING]</p>]]></content:encoded></item><item><title><![CDATA[Flip the Switch: Deployment and First Inference (Models Part 18) ]]></title><description><![CDATA[The pipeline works on your machine. Here is how you make it work for everyone else.]]></description><link>https://signalsandsystems.substack.com/p/flip-the-switch-deployment-and-first</link><guid isPermaLink="false">https://signalsandsystems.substack.com/p/flip-the-switch-deployment-and-first</guid><dc:creator><![CDATA[Jon Walkenhorst]]></dc:creator><pubDate>Sun, 26 Apr 2026 15:01:03 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!8Eg6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09214c62-50ee-4db3-89e1-5a715aa85ad2_946x630.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://signalsandsystems.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://signalsandsystems.substack.com/subscribe?"><span>Subscribe now</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8Eg6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09214c62-50ee-4db3-89e1-5a715aa85ad2_946x630.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8Eg6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09214c62-50ee-4db3-89e1-5a715aa85ad2_946x630.png 424w, https://substackcdn.com/image/fetch/$s_!8Eg6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09214c62-50ee-4db3-89e1-5a715aa85ad2_946x630.png 848w, https://substackcdn.com/image/fetch/$s_!8Eg6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09214c62-50ee-4db3-89e1-5a715aa85ad2_946x630.png 1272w, https://substackcdn.com/image/fetch/$s_!8Eg6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09214c62-50ee-4db3-89e1-5a715aa85ad2_946x630.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8Eg6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09214c62-50ee-4db3-89e1-5a715aa85ad2_946x630.png" width="946" height="630" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/09214c62-50ee-4db3-89e1-5a715aa85ad2_946x630.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:630,&quot;width&quot;:946,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1066425,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://signalsandsystems.substack.com/i/195482370?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09214c62-50ee-4db3-89e1-5a715aa85ad2_946x630.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8Eg6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09214c62-50ee-4db3-89e1-5a715aa85ad2_946x630.png 424w, https://substackcdn.com/image/fetch/$s_!8Eg6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09214c62-50ee-4db3-89e1-5a715aa85ad2_946x630.png 848w, https://substackcdn.com/image/fetch/$s_!8Eg6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09214c62-50ee-4db3-89e1-5a715aa85ad2_946x630.png 1272w, https://substackcdn.com/image/fetch/$s_!8Eg6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09214c62-50ee-4db3-89e1-5a715aa85ad2_946x630.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>TL;DR: A pipeline that runs locally is not a deployed system. Deployment means the pipeline is accessible to real users, runs reliably under concurrent load, restarts automatically when something fails, and produces consistent responses regardless of who is asking or when. This article covers the deployment steps that take the assembled pipeline from a validated local system to a running service, including serving configuration, process management, and the first real inference call from outside the build environment.</em></p><h2>What Deployment Actually Means</h2><p>Deployment is the set of decisions and configurations that make a pipeline reliable, accessible, and recoverable for users who are not the person who built it.</p><p>Four properties define a deployed service as distinct from a locally running pipeline.</p><p>Accessibility means the pipeline is reachable by its intended users through a stable interface. A command line tool running in a terminal is not accessible to a team of twelve analysts. A served API endpoint with a documented interface is.</p><p>Concurrency means the pipeline handles multiple simultaneous requests without failing or producing degraded responses. A pipeline that processes one query at a time in a single thread will queue requests under load and time out under heavier load. A deployed service configures the serving layer to handle the expected concurrency level explicitly.</p><p>Persistence means the pipeline continues running after the session that started it ends. A process that dies when the terminal closes is not a service. A process managed by a service supervisor that restarts automatically on failure is.</p><p>Observability means the pipeline produces logs, metrics, and health signals that make its operational state visible without requiring someone to query it manually. A deployed service knows whether it is healthy before a user reports that it is not.</p><h2>Choosing a Deployment Target</h2><p>The hardware tier from Part 3 defines what is available. The deployment target defines where the pipeline runs relative to its users.</p><p>Local network deployment runs the pipeline on a machine connected to the same network as its users. The inference server binds to the machine&#8217;s local network address rather than localhost. Users on the same network reach it through that address. This is the right deployment target for a small team using an internal tool on a shared network. It requires no cloud infrastructure, no external service dependencies, and no exposure beyond the local network perimeter.</p><p>Private cloud deployment runs the pipeline on a cloud instance in a virtual private cloud with access controlled by security group rules. The inference server is not publicly accessible. Users reach it through a VPN or private network peering arrangement. This is the right deployment target when the team is distributed, the data sensitivity requires network isolation, or the hardware requirements exceed what is available locally.</p><p>Public endpoint deployment exposes the pipeline through a load balancer or API gateway with authentication enforced at the edge. This configuration is appropriate for production deployments serving a broad user base and requires the most rigorous security configuration. For the NOAA pipeline at this stage of maturity, local network or private cloud deployment is the right target. Public endpoint deployment is the upgrade path when the use case and user base warrant it.</p><h2>Step One: Configure the Serving Layer for Production</h2><p>The Ollama service configured in Part 16 runs in development mode by default. Production deployment requires explicit configuration of the host binding, port, concurrency limits, and request timeout values.</p><p>Claude Code Prompt - Q1 2026:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;markdown&quot;,&quot;nodeId&quot;:&quot;eb4bfcec-9381-4037-95df-948d45be22b9&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-markdown">Write a production serving configuration for the Ollama 
inference service running the noaa-storm-model endpoint. 
Configure the service to bind to the local network 
interface address rather than localhost to make it 
accessible to other machines on the same network. 
Set a maximum concurrent request limit of four to 
match the GPU memory headroom available on minimum 
viable hardware. Set a request timeout of 30 seconds 
to prevent long-running requests from blocking the 
queue. Configure request queuing so that requests 
arriving when all slots are occupied are queued rather 
than immediately rejected, with a maximum queue depth 
of ten. Write a configuration validation script that 
confirms the service is bound to the correct interface, 
reports the current concurrency and queue configuration, 
and submits a test request from a different process 
to confirm external accessibility.</code></pre></div><p>What you are asking Claude Code to build: a production serving configuration that makes the inference endpoint accessible to the network, manages concurrency explicitly, and validates accessibility from outside the process that started it. The concurrency limit of four is conservative for minimum viable hardware. It prevents memory pressure from simultaneous requests without leaving the GPU idle under light load.</p><p>What success looks like: the configuration validation script confirms the correct interface binding. A test request submitted from a separate terminal on the same machine reaches the endpoint and returns a response. The concurrency configuration shows four slots and a ten request queue depth.</p><h2>Step Two: Wrap the Pipeline as a REST API</h2><p>The LLMassembly function from Part 16 runs as a Python function. A deployed service exposes it as a REST API endpoint that any HTTP client can query.</p><p>Claude Code Prompt - Q1 2026:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;markdown&quot;,&quot;nodeId&quot;:&quot;da6b6d57-b6c7-42cf-ab4c-39e7346d5141&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-markdown">Wrap the assembled NOAA LLM pipeline from Part 16 as 
a FastAPI REST API. Define a POST endpoint at /query 
that accepts a JSON request body containing a query 
string and an optional session_id string. The endpoint 
should retrieve or initialize a session history for 
the provided session_id, pass the query and history 
to the LLMassembly function, update the session 
history with the new turn, and return a JSON response 
containing the natural language response, source 
EVENT_IDs, token counts for each prompt component, 
retrieved chunk similarity scores, and the session_id. 
Define a GET endpoint at /health that returns the 
serving layer health check from Part 16 including 
base model version, adapter version, vector store 
document count, and current request queue depth. 
Define a GET endpoint at /metrics that returns the 
daily token usage summary from the middleware in 
Part 12. Add request logging that records the 
session_id, query token count, response token count, 
and response time in milliseconds for every request 
to data/logs/api.jsonl.</code></pre></div><p>What you are asking Claude Code to build: a production REST API that wraps the full pipeline with session management, health monitoring, and metrics exposure. The session_id parameter is what allows multi-turn conversations to maintain history across requests from the same user without storing history in the client. The health and metrics endpoints are what monitoring infrastructure queries to confirm the service is functioning correctly without submitting real queries.</p><p>What success looks like: a POST request to /query returns a complete response object with all fields populated. A GET request to /health returns current system status including model versions and queue depth. A GET request to /metrics returns token usage statistics. The api.jsonl log contains an entry for every request with accurate timing data.</p><h2>Step Three: Add Process Management</h2><p>A FastAPI server started from a terminal dies when the terminal closes. A production service needs a process manager that starts the service automatically, keeps it running, and restarts it when it fails.</p><p>Claude Code Prompt - Q1 2026:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;markdown&quot;,&quot;nodeId&quot;:&quot;fab6612e-1aa0-4a30-bbf8-37b2a28af881&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-markdown">Write a systemd service unit file that manages the 
NOAA LLM pipeline FastAPI server as a system service 
on a Linux deployment host. The service should start 
automatically on system boot, restart automatically 
if the process exits with a non-zero status code, 
wait 10 seconds before restarting to prevent rapid 
restart loops on persistent failures, and log stdout 
and stderr to the system journal. Set the working 
directory to the pipeline root directory and configure 
the environment variables required by the pipeline 
including the model path, vector store path, and 
log directory. Write an installation script that 
copies the service file to the correct systemd 
directory, reloads the systemd daemon, enables the 
service to start on boot, and starts it immediately. 
Write a status check script that confirms the service 
is active, reports the process ID and uptime, and 
submits a health check request to confirm the API 
is responding.</code></pre></div><p>What you are asking Claude Code to build: a systemd service configuration that makes the pipeline a managed system service with automatic startup, restart on failure, and system journal logging. The 10 second restart delay is what prevents a pipeline with a persistent startup failure from consuming system resources in a rapid restart loop. The status check script is what an operator runs to confirm the service survived a system restart or recovered from a failure.</p><p>What success looks like: the service starts automatically on system boot. Killing the process manually causes systemd to restart it after 10 seconds. The status check script confirms the service is active and the health endpoint is responding after the restart.</p><h2>Step Four: Configure for Windows and macOS</h2><p>Not every deployment target runs Linux. The minimum viable hardware tier from Part 3 includes Windows machines and Apple Silicon Macs. Process management on those platforms uses different tooling.</p><p>For Windows deployments, the Windows Task Scheduler or NSSM, the Non-Sucking Service Manager, provides equivalent functionality to systemd for keeping the pipeline running as a managed background process. NSSM wraps any executable as a Windows service with automatic restart on failure.</p><p>For macOS deployments, launchd is the native process manager. A launchd plist file configured with the KeepAlive key set to true provides automatic restart behavior equivalent to systemd&#8217;s restart policy.</p><p>Claude Code Prompt - Q1 2026:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;markdown&quot;,&quot;nodeId&quot;:&quot;5a3ced40-dc16-48ec-bd57-347737678d4e&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-markdown">Write platform-specific process management configurations 
for the NOAA LLM pipeline FastAPI server. Produce three 
files: a systemd unit file for Linux as built in the 
previous step, a launchd plist file for macOS that 
configures the pipeline as a LaunchDaemon with KeepAlive 
set to true and stdout and stderr redirected to log 
files in the pipeline log directory, and an NSSM 
installation script for Windows that registers the 
FastAPI server as a Windows service with automatic 
restart on failure. For each platform write a 
verification command that confirms the service is 
running and the API health endpoint is responding.</code></pre></div><p>What you are asking Claude Code to build: deployment configurations for all three hardware platforms covered in Part 3 so the pipeline can be deployed on whatever hardware the reader has available without platform-specific research.</p><p>What success looks like: the appropriate configuration for the deployment platform starts the service, keeps it running across reboots, and restarts it on failure. The verification command returns a healthy status from the API endpoint.</p><h2>Step Five: Add a Human Interface</h2><p>The REST API from Step Two is the infrastructure layer. It is not how a practitioner interacts with their own pipeline. Open WebUI is a browser-based chat interface that connects directly to Ollama and provides the human interaction surface the pipeline has been building toward.</p><p>Claude Code Prompt - Q1 2026:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;markdown&quot;,&quot;nodeId&quot;:&quot;31a1a8d9-5f57-4d3f-b142-fce5deff9485&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-markdown">Write a setup script that installs and configures Open WebUI 
to connect to the locally running Ollama service serving 
the noaa-storm-model endpoint. The script should pull the 
Open WebUI Docker container, configure the OLLAMA_BASE_URL 
environment variable to point to the local Ollama service 
address, set the default model to noaa-storm-model, and 
start the container bound to port 3000 on the local network 
interface. Write a verification step that confirms Open WebUI 
is running and accessible at http://localhost:3000 and that 
the noaa-storm-model appears in the model selection list.</code></pre></div><p>What you are asking Claude Code to build: a single script that installs and connects Open WebUI to the pipeline in two configuration steps. Docker is the only prerequisite.</p><p>What success looks like: opening a browser at </p><p>http://localhost:3000</p><p> shows the Open WebUI chat interface with noaa-storm-model available in the model selector.</p><h3>The First Real Inference Calls</h3><h4>First: The Human Interface</h4><p>Open a browser on any machine on the same network. Navigate to http://[deployment-host-ip]:3000. Select noaa-storm-model. Type:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;4f4415a1-2792-4d47-83c5-39ee79381420&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">&#8220;What were the most destructive hail events in Texas in 2022?&#8221;</code></pre></div><p>A natural language response grounded in NOAA records comes back in the chat window. Source citations and confidence visible in the response. This is the moment the build pays off. Fourteen articles of infrastructure reduced to a question typed in a browser.</p><h4>Second: The API</h4><p>For practitioners who want to understand the relationship between the human interface and the underlying infrastructure, the same query submitted directly to the API shows what Open WebUI is doing under the hood on every request:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;shell&quot;,&quot;nodeId&quot;:&quot;4f169dd8-4fb4-4b36-b140-9d8a93acd021&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-shell">curl -X POST http://[deployment-host-ip]:8000/query \
  -H "Content-Type: application/json" \
  -d '{"query": "What were the most destructive hail events 
       in Texas in 2022?", "session_id": "test-001"}'</code></pre></div><p>The response is identical in content. The difference is that Open WebUI handled the session management, the request formatting, and the response rendering that the curl command exposes in raw form. The API is the engine. Open WebUI is the dashboard. Both are useful to understand. Only one requires a terminal.</p><h2>What Comes Next</h2><p>The pipeline is deployed and serving real queries. The next article establishes the monitoring infrastructure that keeps it honest. Drift detection, response quality tracking, token budget compliance monitoring, and the operational signals that tell you the pipeline is degrading before users do.</p><p>A deployed pipeline without monitoring is a system running blind. The next article opens the eyes.</p><p>#InHouseAI</p><p>#LLMDeployment</p><p>#FastAPI</p><p>#Ollama</p><p>#DIYLanguageModel</p><p>#EnterpriseAI</p><p>#AIInfrastructure</p>]]></content:encoded></item><item><title><![CDATA[Claude Code Gave You the Code; Now What? (Models Part 17) ]]></title><description><![CDATA[Generated code sitting in a chat window is not running code. Here is how to close that gap if you&#8217;re stuck or don&#8217;t know where to start.]]></description><link>https://signalsandsystems.substack.com/p/claude-code-gave-you-the-code-now</link><guid isPermaLink="false">https://signalsandsystems.substack.com/p/claude-code-gave-you-the-code-now</guid><dc:creator><![CDATA[Jon Walkenhorst]]></dc:creator><pubDate>Sat, 25 Apr 2026 22:45:54 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!UOtg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff74ce4d0-bd6f-402d-9576-16e693de0024_908x606.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://signalsandsystems.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://signalsandsystems.substack.com/subscribe?"><span>Subscribe now</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!UOtg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff74ce4d0-bd6f-402d-9576-16e693de0024_908x606.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!UOtg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff74ce4d0-bd6f-402d-9576-16e693de0024_908x606.png 424w, https://substackcdn.com/image/fetch/$s_!UOtg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff74ce4d0-bd6f-402d-9576-16e693de0024_908x606.png 848w, https://substackcdn.com/image/fetch/$s_!UOtg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff74ce4d0-bd6f-402d-9576-16e693de0024_908x606.png 1272w, https://substackcdn.com/image/fetch/$s_!UOtg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff74ce4d0-bd6f-402d-9576-16e693de0024_908x606.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!UOtg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff74ce4d0-bd6f-402d-9576-16e693de0024_908x606.png" width="908" height="606" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f74ce4d0-bd6f-402d-9576-16e693de0024_908x606.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:606,&quot;width&quot;:908,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:978606,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://signalsandsystems.substack.com/i/195479916?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff74ce4d0-bd6f-402d-9576-16e693de0024_908x606.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!UOtg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff74ce4d0-bd6f-402d-9576-16e693de0024_908x606.png 424w, https://substackcdn.com/image/fetch/$s_!UOtg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff74ce4d0-bd6f-402d-9576-16e693de0024_908x606.png 848w, https://substackcdn.com/image/fetch/$s_!UOtg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff74ce4d0-bd6f-402d-9576-16e693de0024_908x606.png 1272w, https://substackcdn.com/image/fetch/$s_!UOtg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff74ce4d0-bd6f-402d-9576-16e693de0024_908x606.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>TL;DR: Every build article in this arc includes Claude Code prompts that generate working code. What those articles do not cover is the step between generated output and deployed pipeline. This article covers that step. Where the files go, how the directory structure fits together, how to execute each script, what a working result looks like in the terminal, and what the three most common failure modes look like when something does not run on the first attempt.</em></p><h2>The Gap This Article Closes</h2><p>Claude Code generates correct, functional code. It does not place that code in the right directory, create the file structure the pipeline expects, or run the scripts in the right order. That gap is the practitioner&#8217;s job. For someone who has spent a career working with APIs and enterprise systems but has not assembled a Python pipeline from generated components before, that gap is where forward progress stops.</p><p>This article walks through the complete NOAA pipeline file structure, explains how to take Claude Code output from a chat window to an executable file, and covers the execution sequence that brings each layer of the stack to life. Every example uses the actual scripts and directories from this arc. The reader who has followed Parts 6 through 16 has everything they need. This article tells them what to do with it.</p><h2>Before Python, You Need Python</h2><p>Every script in this pipeline runs on Python. Before the virtual environment exists, Python itself needs to be installed correctly. A mismatched version or a system Python installation will break dependencies at the worst possible moment.</p><p>The target version for this arc is Python 3.11. It is the stable, well-supported version that every library in the requirements file is tested against as of Q1 2026. Do not use Python 3.12 or later without checking library compatibility first. Do not use anything below 3.10.</p><p>On a Mac, do not use the Python that ships with the operating system. It is outdated and modifying it can break system tools that depend on it. Install Homebrew first, the package manager that makes installing developer tools on a Mac straightforward:</p><pre><code>/bin/bash -c &#8220;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)&#8221;</code></pre><p>Then install pyenv, the Python version manager that lets you run multiple Python versions without conflict:</p><pre><code>brew install pyenv
pyenv install 3.11
pyenv global 3.11</code></pre><p>On Windows, download the official Python 3.11 installer from python.org. During installation, check the box that says Add Python to PATH before clicking install. Without that checkbox, the terminal will not find Python after installation completes.</p><p>Confirm the correct version is active before proceeding. Run this in a new terminal window:</p><pre><code>python --version</code></pre><p>Expected output: Python 3.11.x</p><p>If the output shows a different version, the PATH is pointing to the wrong Python installation. On a Mac, confirm pyenv is active by running pyenv version. On Windows, confirm the PATH environment variable includes the Python 3.11 installation directory.</p><h2>Setting Up Your Working Environment</h2><p>Before any generated code runs, the working environment needs to exist. Part 6 assumed a Python virtual environment was in place. This article makes that assumption explicit.</p><p>The pipeline runs in a Python virtual environment, an isolated Python installation that keeps the pipeline&#8217;s dependencies separate from everything else on the machine. Creating one requires three terminal commands.</p><p>First, navigate to the directory where the pipeline will live. This is the pipeline root, the top-level directory that contains every script, every data directory, and every configuration file the pipeline uses. Call it noaa-pipeline.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;shell&quot;,&quot;nodeId&quot;:&quot;64a7652e-7b77-496a-8c91-b689e3cb2df7&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-shell">mkdir noaa-pipeline
cd noaa-pipeline</code></pre></div><p>Second, create the virtual environment inside that directory.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:&quot;64b2725b-86d0-4dca-8679-1033e577df3d&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">python -m venv venv</code></pre></div><p>Third, activate it. On Linux and macOS:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;shell&quot;,&quot;nodeId&quot;:&quot;195db560-87e7-48a1-8238-18dbe4fdf6a5&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-shell">source venv/bin/activate</code></pre></div><p>On Windows:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;21b2bfe2-c2da-4015-b96d-da69e3cb06ea&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">venv\Scripts\activate</code></pre></div><p>The terminal prompt changes to show the environment name when activation succeeds. Every subsequent command runs inside this environment until the terminal session ends or the environment is explicitly deactivated. Every time a new terminal session opens to work on the pipeline, the activation command runs again before anything else.</p><h2>The Directory Structure</h2><p>Every Claude Code prompt in this arc assumes a specific directory structure. Generated scripts reference paths like data/raw, data/chunked, data/vectorstore, and models/noaa-adapter. Those paths are relative to the pipeline root. They need to exist before the scripts that write to them run.</p><p>Claude Code Prompt - Q1 2026:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;markdown&quot;,&quot;nodeId&quot;:&quot;a8130986-f8af-4741-bcd8-8fe34de1b205&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-markdown">Write a Python setup script that creates the complete
directory structure for the NOAA LLM pipeline. The
structure should include: data/raw, data/normalized,
data/cleaned, data/formatted, data/chunked,
data/vectorstore, data/finetune, data/logs,
data/reports, models/noaa-adapter, and a config
directory at the pipeline root. Create a .gitignore
file that excludes the data directory and the venv
directory from version control. Create an empty
requirements.txt in the pipeline root. Print a
confirmation message for each directory created
and a final message confirming the structure is
complete.</code></pre></div><p>What you are asking Claude Code to build: a single setup script that creates every directory the pipeline needs before any other script runs. Running this script once at the start of the project means no subsequent script fails because a directory does not exist.</p><p>What success looks like: running the script produces a confirmation message for each directory. Running it a second time produces the same confirmations without error. The .gitignore file is present in the pipeline root.</p><h2>Taking Code From Claude Code to a File</h2><p>Claude Code produces code in a chat window. Getting it into a file requires one of three approaches depending on your working environment.</p><p>The direct copy approach works for any environment. Select the generated code block in the Claude Code chat window, copy it, open a text editor, paste it, and save the file with the correct name in the correct directory. The file name matters. A script saved as ingest.py in the pipeline root is referenced differently than the same script saved in a scripts subdirectory. Every Claude Code prompt in this arc names the file implicitly in what it describes. An ingestion script that reads from data/raw and writes to data/normalized belongs in the pipeline root or a scripts directory at the same level.</p><p>The Claude Code file creation approach is faster. Instead of copying and pasting, ask Claude Code to create the file directly.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;markdown&quot;,&quot;nodeId&quot;:&quot;79ad468d-f427-48fe-ac08-78811537b96b&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-markdown">Save this script as ingest.py in the pipeline root directory.</code></pre></div><p>Claude Code will write the file to the specified location without requiring a copy and paste step. This is the recommended approach for scripts longer than 50 lines where copy and paste introduces formatting risk.</p><p>Note: The notebook approach works for exploratory steps. Jupyter notebooks run in a browser and allow code to be executed cell by cell, which makes them useful for working through the data preparation steps in Parts 6 and 7 where inspecting intermediate outputs is valuable. Production scripts, the serving configuration, the FastAPI wrapper, and the process management files, belong in plain Python files rather than notebooks.</p><h2>Installing Dependencies</h2><p>If you are starting fresh and have not run any scripts yet, this is your starting point. Generate the requirements file first, install it, and then follow the execution sequence from the beginning of this article.<br><br>Every script in the pipeline imports libraries that need to be installed before the script runs. Part 6 specified the full dependency list. Installing them into the virtual environment requires one command run from the pipeline root with the environment activated.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;markdown&quot;,&quot;nodeId&quot;:&quot;7c3424ac-65e1-4d21-9ab7-7639ba24ffb1&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-markdown">pip install -r requirements.txt</code></pre></div><p>If the requirements.txt file is empty because the setup script created it blank, populate it first. Ask Claude Code:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;815f265d-bce3-4854-b540-dc74be1ca8f0&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Generate a requirements.txt file for a complete DIY LLM
stack including all dependencies required to run a full
language model pipeline from data ingestion through
deployment and monitoring. The stack includes data pipeline
orchestration with Prefect, data processing with pandas
and numpy, embedding generation with sentence-transformers,
vector storage with chromadb, language model serving with
ollama, API serving with fastapi and uvicorn, model
fine-tuning with peft, bitsandbytes, trl, and transformers,
drift monitoring with evidently, and token tracking with
sqlite3. Include compatible version numbers for all
packages as of Q1 2026. Add a comment above each package
or package group indicating which part of the stack it
serves so the file is self-documenting for a practitioner
who needs to understand what each dependency does.</code></pre></div><p>Install the generated requirements file and watch the terminal output. A successful installation ends with a line confirming each package was installed or already satisfied. A failed installation produces a red error message naming the package that failed and the reason. The most common reasons are a Python version mismatch, a dependency conflict between two packages, or a package that requires system-level libraries not present on the machine.</p><h2>The Execution Sequence</h2><p>The pipeline has a strict execution sequence. Scripts that depend on outputs from earlier scripts fail if those outputs do not exist. The sequence maps directly to the article order in this arc.</p><ol><li><p><strong>From Part 17</strong> (this article) Run the directory setup script. Everything that follows depends on the directory structure it creates.</p></li><li><p><strong>From Part 6 </strong>- Run the NOAA data download script. This populates data/raw with the source CSV files.</p></li><li><p><strong>From Part 6</strong> - Run the normalization script. This reads from data/raw and writes to data/normalized.</p></li><li><p><strong>From Part 6</strong> - Run the cleaning script. This reads from data/normalized and writes to data/cleaned.</p></li><li><p><strong>From Part 6</strong> - Run the formatting script. This reads from data/cleaned and writes to data/formatted.</p></li><li><p><strong>From Part 6</strong> - Run the chunking script. This reads from data/formatted and writes to data/chunked.</p></li><li><p><strong>From Part 14</strong> - Run the Chroma initialization script. This creates the vector store at data/vectorstore.</p></li><li><p><strong>From Part 14</strong> - Run the embedding ingestion script. This reads from data/chunked and populates the vector store. This step takes the longest of any in the sequence. On minimum viable hardware embedding 1.2 million chunks runs for several hours. The progress logging specified in the <strong>Part 14</strong> prompt shows advancement every 500 documents. If the terminal shows consistent progress the script is running correctly. If it stops advancing for more than ten minutes something has failed silently and the log output will show where.</p></li><li><p><strong>From Part 16</strong> - Start the Ollama service. Before starting, run the production serving configuration script from <strong>Part 18</strong> Step One. That script configures the correct network binding, concurrency limits, and request timeout values before Ollama starts. Then confirm the noaa-storm-model endpoint is responding using the validation script from <strong>Part 16</strong>.</p></li><li><p><strong>From Part 16</strong> - Run the pre-assembly verification script. All six checks should pass before the FastAPI server starts.</p></li><li><p><strong>From Part 18</strong> - Start the FastAPI server. The server script is generated in <strong>Part 18</strong> Step Two. Complete that step first, then start the server from the pipeline root with the environment activated:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;2e81ebd6-2a0d-4222-84e6-a4997310cd6f&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">uvicorn main:app --host 0.0.0.0 --port 8000</code></pre></div></li><li><p><strong>From Part 18</strong> - Run the process management configuration from <strong>Part 18</strong> Steps Three and Four. Step Three covers Linux using systemd. Step Four covers macOS using launchd and Windows using NSSM. Run the configuration for your platform. This is the step that makes the pipeline persist beyond the current terminal session and restart automatically on failure. Do not skip this step if the pipeline is intended to run continuously rather than only during active terminal sessions.</p></li><li><p><strong>From Part 18</strong> - Run the Open WebUI setup script from <strong>Part 18</strong> Step Five. This installs and connects the browser-based chat interface to the noaa-storm-model endpoint. When the script completes navigate to http://localhost:3000 and confirm the interface loads with noaa-storm-model available. This is the primary human interface for querying the pipeline. Everything built across this arc is accessible from that browser window.</p></li><li><p><strong>Finish Part 18 and Run Your First Inference Call.</strong></p><p>Every component is installed, configured, and running. The pipeline is deployed. The human interface is live. <strong>Part 18</strong> closes the build with the first real inference call against the NOAA corpus, both through the browser and through the API. Navigate to <strong>Part 18</strong> and complete the First Real Inference Calls section. That is the moment fourteen articles of infrastructure produce a plain English answer to a plain English question about a real storm event. Everything in this arc was preparation for that moment.</p></li></ol><h2>Reading Terminal Output</h2><p>Terminal output is the primary feedback mechanism for every script in this pipeline. Understanding what it is telling you is the skill that makes the difference between resolving failures quickly and spending hours stuck.</p><p>Three categories of terminal output matter.</p><p>Confirmation output is green text or plain text lines that confirm a step completed successfully. The directory setup script confirmation messages are confirmation output. The embedding ingestion progress logs are confirmation output. When confirmation output appears consistently and matches what the script description said it would produce, the step succeeded.</p><p>Warning output is yellow text or lines prefixed with WARNING that indicate something unexpected occurred but the script continued. Warnings are worth reading. They often indicate a condition that will cause a failure in a later step even though the current step completed. A warning about a missing optional configuration file during Chroma initialization is worth investigating before the embedding ingestion step runs.</p><p>Error output is red text or lines prefixed with ERROR, CRITICAL, or a Python traceback. A traceback is Python&#8217;s way of showing exactly where in the code something failed and why. Reading a traceback from bottom to top is the fastest path to understanding what went wrong. The bottom line of a traceback names the exception type and the specific error message. The lines above it show the sequence of function calls that led to the failure. The combination tells you which script, which function, and which condition produced the error.</p><h2>The Three Most Common Failures</h2><p>Three failure patterns account for the majority of issues practitioners encounter when running generated pipeline code for the first time.</p><ol><li><p>A missing dependency. The script imports a library that is not installed in the virtual environment. The error message names the missing library explicitly: ModuleNotFoundError: No module named &#8216;chromadb&#8217;. The fix is one pip install command with the named library followed by rerunning the script.</p></li><li><p>A path error. The script references a file or directory that does not exist at the expected location. The error message names the path: FileNotFoundError: data/raw/StormEvents_details_2019.csv not found. The fix is either running the script that should have created that file, confirming the file is in the expected location, or checking whether the script was run from the pipeline root directory rather than a subdirectory.</p></li><li><p>A GPU memory error. A script that loads the model or runs embedding generation exhausts available GPU memory. The error message references CUDA out of memory or similar. The fix is closing other applications that are using GPU memory, reducing the batch size in the embedding ingestion script, or confirming that the model quantization configuration from Part 7 is applied correctly before loading.</p></li></ol><h2>When to Ask Claude Code for Help</h2><p>Every failure mode above has a fix that Claude Code can generate if the error message is provided directly. The most effective prompt for a pipeline failure is:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;markdown&quot;,&quot;nodeId&quot;:&quot;c782ea7d-3e93-4e1d-bcdf-5595493b6b38&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-markdown">I am running the NOAA LLM pipeline from the Models
series. I ran [script name] and received this error:
[paste the full error message and traceback]
The script is supposed to [describe what it should do].
What is wrong and how do I fix it?</code></pre></div><p>Providing the full traceback rather than a summary of the error gives Claude Code the specific context it needs to produce an accurate fix rather than a generic suggestion. The script description gives it the intent context that makes the fix specific to this pipeline rather than a general Python debugging answer.</p><h2>What Running Looks Like</h2><p>A pipeline running correctly produces a specific pattern of terminal activity. The Ollama service logs show model loading confirmation and then go quiet until a request arrives. The FastAPI server logs show startup confirmation and then log each incoming request with a timestamp and response code. The Open WebUI container logs show startup confirmation and then go quiet. The token tracking middleware writes to data/logs/api.jsonl silently on each request.</p><p>Silence in the terminal after startup is correct behavior for a running service. It is not an indication that something has stopped. Activity in the logs appears when requests arrive. The absence of red error text in the terminal after startup is the primary signal that the pipeline is running correctly.</p><p>Open a browser. Navigate to http://localhost:3000. Type a question. The response that comes back in plain English grounded in NOAA storm event records is what fourteen articles of infrastructure was built to produce.</p><h3>Next </h3><p>With the pipeline deployed and the workflow understood, the monitoring infrastructure goes in. Drift detection, response quality tracking, and the operational signals that tell you the pipeline is degrading before your users do.</p><p>#InHouseAI </p><p>#ClaudeCode </p><p>#DIYLanguageModel </p><p>#PythonPipeline </p><p>#EnterpriseAI </p><p>#AIInfrastructure </p><p>#LLMDeployment</p>]]></content:encoded></item><item><title><![CDATA[DIY LLM - Final Stack Assembly Layer by Layer (Models Part 16) ]]></title><description><![CDATA[Every component built. This article connects them.]]></description><link>https://signalsandsystems.substack.com/p/diy-llm-final-stack-assembly-layer</link><guid isPermaLink="false">https://signalsandsystems.substack.com/p/diy-llm-final-stack-assembly-layer</guid><dc:creator><![CDATA[Jon Walkenhorst]]></dc:creator><pubDate>Fri, 24 Apr 2026 16:28:26 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!UZ1R!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe715b4c1-b6a0-4d0b-9766-2ce19282e01c_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://signalsandsystems.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://signalsandsystems.substack.com/subscribe?"><span>Subscribe now</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!UZ1R!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe715b4c1-b6a0-4d0b-9766-2ce19282e01c_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!UZ1R!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe715b4c1-b6a0-4d0b-9766-2ce19282e01c_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!UZ1R!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe715b4c1-b6a0-4d0b-9766-2ce19282e01c_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!UZ1R!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe715b4c1-b6a0-4d0b-9766-2ce19282e01c_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!UZ1R!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe715b4c1-b6a0-4d0b-9766-2ce19282e01c_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!UZ1R!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe715b4c1-b6a0-4d0b-9766-2ce19282e01c_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e715b4c1-b6a0-4d0b-9766-2ce19282e01c_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1849091,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://signalsandsystems.substack.com/i/195364100?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe715b4c1-b6a0-4d0b-9766-2ce19282e01c_1536x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!UZ1R!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe715b4c1-b6a0-4d0b-9766-2ce19282e01c_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!UZ1R!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe715b4c1-b6a0-4d0b-9766-2ce19282e01c_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!UZ1R!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe715b4c1-b6a0-4d0b-9766-2ce19282e01c_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!UZ1R!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe715b4c1-b6a0-4d0b-9766-2ce19282e01c_1536x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>TL;DR: This article assembles the full NOAA language model pipeline from the components built across Parts 6 through 15. Each layer gets an opinionated choice with explicit reasoning. Each connection step includes a Claude Code prompt. The article closes with an integration test that confirms every layer is working as a system. By the end the pipeline is running, validated, and ready for the deployment and monitoring articles that follow.</em></p><h2>The DIY Stack You Are Assembling</h2><p>Fourteen articles built the components. This article connects them in the order the stack requires. Before any Claude Code prompt runs, here is my fully opinionated choice at every layer, along with the reasoning that produced it.</p><p>The data layer uses the NOAA storm events corpus covering 2019 through 2023, normalized, cleaned, formatted, and chunked using the pipeline from Part 6. The chunk size is 400 tokens with a 50-token overlap. That size balances narrative coherence against the token budget constraints established in Part 12 on minimum viable hardware.</p><p>The embedding layer uses sentence-transformers all-MiniLM-L6-v2. It produces 384-dimensional vectors, runs on the CPU without requiring a dedicated GPU, and delivers retrieval quality sufficient for the NOAA domain without competing with the inference server for GPU memory on minimum viable hardware.</p><p>The vector store layer uses Chroma in persistent local mode. It stores embeddings on disk, requires no external service dependencies, and integrates cleanly with the Python tooling used throughout the pipeline. The noaa_storm_events collection is configured for cosine similarity search at 384 dimensions matching the embedding model output.</p><p>The model layer uses the instruction-tuned variant of the model family selected in Part 9, loaded in 4-bit quantization via BitsAndBytes to fit within the memory constraints of the minimum viable hardware tier from Part 3. The NOAA domain adapter from Part 15 is loaded alongside the base model using the PEFT library.</p><p>The serving layer uses Ollama for base model inference management. Ollama handles model loading, GPU memory allocation, and the inference API endpoint that the RAG assembly layer calls. It runs as a local service on the inference machine and exposes a REST endpoint that the pipeline queries at inference time.</p><p>The orchestration layer uses the RAG assembly function from Part 14. It embeds the query, retrieves the top five chunks from Chroma above the 0.6 similarity threshold, assembles the context window with the system prompt from Part 11 first and retrieved chunks ordered by similarity score, enforces the 3,500 token prompt budget from Part 12, and submits the assembled prompt to the Ollama endpoint.</p><p>The monitoring layer uses the token-tracking middleware from Part 12 and the Evidently drift-monitoring pipeline introduced in this article. Together, they cover inference cost tracking, context window budget compliance, and input distribution drift detection.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1yN0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffdad916e-4e1e-48d5-9f94-209f39cd5e1b_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1yN0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffdad916e-4e1e-48d5-9f94-209f39cd5e1b_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!1yN0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffdad916e-4e1e-48d5-9f94-209f39cd5e1b_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!1yN0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffdad916e-4e1e-48d5-9f94-209f39cd5e1b_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!1yN0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffdad916e-4e1e-48d5-9f94-209f39cd5e1b_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1yN0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffdad916e-4e1e-48d5-9f94-209f39cd5e1b_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fdad916e-4e1e-48d5-9f94-209f39cd5e1b_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2696278,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://signalsandsystems.substack.com/i/195364100?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffdad916e-4e1e-48d5-9f94-209f39cd5e1b_1536x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!1yN0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffdad916e-4e1e-48d5-9f94-209f39cd5e1b_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!1yN0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffdad916e-4e1e-48d5-9f94-209f39cd5e1b_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!1yN0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffdad916e-4e1e-48d5-9f94-209f39cd5e1b_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!1yN0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffdad916e-4e1e-48d5-9f94-209f39cd5e1b_1536x1024.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2>Step One: Verify All Components</h2><p>Before connecting anything, confirm every component from the previous articles is present and functional in isolation.</p><p>Claude Code Prompt - Q1 2026:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;c267fd3a-c0b8-4cc2-bd5d-0ced9895fad2&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Write a pre-assembly verification script that checks the
following components are present and functional. First,
confirm the data/chunked directory exists and contains
JSON files with the expected schema including EVENT_ID,
chunk_index, text, and metadata fields. Second, confirm
the Chroma vector store at data/vectorstore is accessible
and the noaa_storm_events collection contains a document
count greater than zero. Third, confirm the all-MiniLM-L6-v2
embedding model is available locally and can embed a test
string without error. Fourth, confirm the Ollama service
is running and the target model is loaded by submitting
a single token test prompt and receiving a response.
Fifth, confirm the NOAA adapter weights exist at
models/noaa-adapter and load correctly against the base
model using PEFT. Sixth, confirm the system prompt file
exists and its token count is within the 400 to 600 token
budget specified in Part 11. Report pass or fail for each
check independently so failures are locatable to the
specific component rather than the assembly as a whole.</code></pre></div><p>What you are asking Claude Code to build: a diagnostic that confirms every prerequisite before a single connection is attempted. A failed assembly traced to a missing component wastes time. A pre-assembly verification that fails loudly on the specific missing piece saves it.</p><p>What success looks like: six green checks. Any red check identifies exactly which article&#8217;s output needs attention before assembly proceeds.</p><h2>Step Two: Wire the Retrieval Layer to the Vector Store</h2><p>Claude Code Prompt - Q1 2026:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;ee44b7e5-58a2-4973-8bfb-9e3e6f67410a&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Wire the retrieval module from Part 14 to the Chroma
vector store and run a validation suite of ten queries
against the loaded NOAA corpus. The queries should cover
the five query types from the fine-tuning dataset: damage
assessment, event location and timing, fatality and injury
summary, regional comparison, and forecaster narrative
interpretation. For each query log the number of chunks
returned, the highest and lowest similarity scores, and
whether any chunks were filtered by the 0.6 minimum
threshold. Flag any query that returns fewer than three
chunks above the threshold as a potential coverage gap
in the corpus. Save the validation results as a JSON
report in data/reports/retrieval_validation.json.</code></pre></div><p>What you are asking Claude Code to build: a retrieval validation that confirms the vector store is returning meaningful results across the full range of query types the production pipeline will receive. Coverage gaps surfaced here indicate areas where the corpus may need supplementation before deployment.</p><p>What success looks like: all ten queries return at least three chunks above the similarity threshold. The score distribution shows variation across query types rather than uniform scores, which would indicate the similarity metric is not discriminating effectively. The coverage gap flag does not fire more than once per query.</p><h2>Step Three: Connect the Fine-Tuned Model to the Serving Layer</h2><p>Claude Code Prompt - Q1 2026:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;822f8cc3-fac8-4fd1-847c-6239e774b634&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Configure the Ollama serving layer to load the base
instruction tuned model with the NOAA adapter weights
from models/noaa-adapter using the PEFT library. Write
a serving configuration that loads the adapter at startup
rather than per-request to avoid adapter loading latency
on every inference call. Expose the configured model
as a named endpoint noaa-storm-model that the RAG
assembly layer can call by name rather than by model
path. Write a serving health check function that confirms
the adapter is loaded and returns the base model version
and adapter version as part of the health check response.
Test the endpoint with three domain-specific queries
that require meteorological terminology and confirm
the responses use domain vocabulary correctly.</code></pre></div><p>What you are asking Claude Code to build: a serving configuration that loads the fine-tuned model once at startup with the adapter attached, exposes it as a named endpoint, and provides a health check that confirms both the base model and the adapter are loaded correctly. Named endpoint routing is what allows the deployment article to swap model versions without changing the application code that calls the endpoint.</p><p>What success looks like: the noaa-storm-model endpoint responds to queries with domain-fluent responses. The health check returns both version identifiers. The three domain terminology test queries produce responses that use meteorological vocabulary correctly as confirmed by the terminology check from Part 15.</p><h2>Step Four: Assemble the Full Pipeline</h2><p>Claude Code Prompt - Q1 2026:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;1ae5d816-482e-4250-965c-ce494b389cc5&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Assemble the complete NOAA RAG pipeline by connecting
the RAG assembly function from Part 14 to the
noaa-storm-model serving endpoint from Step Three.
Wrap the assembly function with the token tracking
middleware from Part 12. Configure the pipeline with
the system prompt from Part 11, a top-k retrieval
value of five, a minimum similarity threshold of 0.6,
a maximum prompt token budget of 3,500, and a maximum
conversation history of two turns. Expose the assembled
pipeline as a Python function that accepts a query string
and an optional session history list and returns a
response object containing the natural language response,
the list of source EVENT_IDs, the token counts for each
prompt component, and the similarity scores of the
retrieved chunks. Write a simple command line interface
that accepts queries interactively and displays the
response with source citations and token usage after
each query.</code></pre></div><p>What you are asking Claude Code to build: the complete assembled pipeline as a single callable function with a command line interface for interactive testing. The response object structure, natural language response plus source citations plus token counts plus similarity scores, is the full observability surface for every query the pipeline handles. The command line interface is the first interactive surface for the pipeline before a production interface is built.</p><p>What success looks like: typing a query at the command line returns a natural language response with source EVENT_IDs, token component breakdown, and similarity scores. The token counts stay within the configured budget. The source EVENT_IDs trace back to real NOAA records in the corpus.</p><h2>Step Five: Add Security and Access Control</h2><p>A self-hosted language model pipeline has an attack surface that needs to be addressed before deployment. Three security requirements apply to the NOAA pipeline at minimum.</p><p>The inference endpoint should not be publicly accessible. The Ollama service and the RAG assembly layer should be bound to localhost or a private network interface. Exposure to a public network without authentication creates a prompt injection risk where external actors can query the model directly, bypassing any application-level access controls.</p><p>Input validation should be applied before queries reach the pipeline. A query length limit prevents context window exhaustion attacks where a malicious user submits an extremely long query designed to crowd out the system prompt and retrieved context. A query content filter that rejects inputs containing prompt injection patterns, instructions to ignore the system prompt or reveal its contents, provides a second layer of defense.</p><p>Access logging should record every query with a user identifier, timestamp, and the source EVENT_IDs returned. This is the audit trail that makes the pipeline&#8217;s behavior reconstructible if a response is challenged.</p><p>Claude Code Prompt - Q1 2026:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;e7062059-2069-40d9-b147-9a4774eb4aef&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Add a security layer to the assembled NOAA pipeline.
First, add input validation that rejects queries exceeding
500 tokens with an informative error message and logs
the rejection with a timestamp and the truncated query.
Second, add a prompt injection filter that scans incoming
queries for patterns including ignore previous instructions,
reveal your system prompt, and similar override attempts,
logs detected patterns as security events, and returns
a standard refusal response without passing the query
to the pipeline. Third, add an access log that records
every successful query with a session identifier,
timestamp, query token count, response token count,
and the list of source EVENT_IDs returned. Store the
access log as append-only JSONL in data/logs/access.jsonl.
Write a daily access summary function that reports total
queries, average token consumption, and any security
events detected.</code></pre></div><p>What you are asking Claude Code to build: a security wrapper that enforces input constraints, detects basic prompt injection attempts, and maintains a complete audit trail of pipeline activity. The append-only access log is both a security record and the data source for the monitoring articles that follow.</p><p>What success looks like: an oversized query returns an informative error without reaching the pipeline. A query containing a prompt injection pattern returns a refusal and appears in the security event log. Normal queries appear in the access log with complete metadata. The daily summary produces accurate counts from the log data.</p><h2>Step Six: Integration Test</h2><p>A stack where every layer works independently but the layers do not work together is not a stack. The integration test confirms the end to end flow from query to grounded response with every layer participating.</p><p>Claude Code Prompt - Q1 2026:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;bb02a36e-2d71-4870-835f-7c597710c825&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Write an integration test suite that verifies the full
NOAA RAG pipeline end to end. The test should submit
five queries covering the five query types from the
fine-tuning dataset, verify each response is a non-empty
natural language string, verify each response includes
at least one source EVENT_ID, verify the token counts
for each query stay within the configured budget, verify
the similarity scores for retrieved chunks are all above
the 0.6 threshold, verify the access log contains an
entry for each query, and verify the security layer
correctly rejects a deliberately oversized query and
a deliberately injected prompt. Report a pass or fail
result for each check independently. Log the full
integration test results to data/reports/integration_test.json
with a timestamp and an overall pass or fail verdict.</code></pre></div><p>What you are asking Claude Code to build: a layered integration test that verifies functional correctness, budget compliance, retrieval quality, access logging, and security enforcement in a single executable suite. The per-check pass and fail reporting is what makes this a diagnostic tool rather than a binary result. When a check fails it points to the specific article whose component needs attention.</p><p>What success looks like: all checks pass. The integration test report shows green across every layer. The deliberately injected inputs produce the expected rejections. Running the integration test twice produces identical results confirming the pipeline is deterministic within the bounds of the retrieval and generation process.</p><h2>The Stack Is Assembled</h2><p>The pipeline is running. Every layer from data ingestion through security and access control is connected and verified. The opinionated choices at each layer are documented in the reference map at the top of this article.</p><p>Two articles remain before the capstone. The next article flips the switch, moving the pipeline from a locally tested system to a served deployment accessible to real users. The subsequent article establishes the monitoring and drift-detection infrastructure that keeps the pipeline honest after deployment.</p><p>The build is done. The operation begins.</p><p>#InHouseAI</p><p>#LLMAssembly</p><p>#RAGPipeline</p><p>#DIYLanguageModel</p><p>#EnterpriseAI</p><p>#AIInfrastructure</p><p>#SelfHosted</p>]]></content:encoded></item><item><title><![CDATA[Fine-Tuning When RAG Is Not Enough (Models Part 15) ]]></title><description><![CDATA[RAG gives the model access to your data. Fine-tuning gives the model fluency in your domain.]]></description><link>https://signalsandsystems.substack.com/p/fine-tuning-when-rag-is-not-enough</link><guid isPermaLink="false">https://signalsandsystems.substack.com/p/fine-tuning-when-rag-is-not-enough</guid><dc:creator><![CDATA[Jon Walkenhorst]]></dc:creator><pubDate>Thu, 23 Apr 2026 21:12:09 GMT</pubDate><enclosure url="https://api.substack.com/feed/podcast/195285256/d3dc256fb57466fef4d57618596c3377.mp3" length="0" type="audio/mpeg"/><content:encoded><![CDATA[<p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://signalsandsystems.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://signalsandsystems.substack.com/subscribe?"><span>Subscribe now</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mrH2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F710934fc-8379-42aa-9724-70a628d3cc80_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mrH2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F710934fc-8379-42aa-9724-70a628d3cc80_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!mrH2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F710934fc-8379-42aa-9724-70a628d3cc80_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!mrH2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F710934fc-8379-42aa-9724-70a628d3cc80_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!mrH2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F710934fc-8379-42aa-9724-70a628d3cc80_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mrH2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F710934fc-8379-42aa-9724-70a628d3cc80_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/710934fc-8379-42aa-9724-70a628d3cc80_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!mrH2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F710934fc-8379-42aa-9724-70a628d3cc80_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!mrH2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F710934fc-8379-42aa-9724-70a628d3cc80_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!mrH2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F710934fc-8379-42aa-9724-70a628d3cc80_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!mrH2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F710934fc-8379-42aa-9724-70a628d3cc80_1536x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>TL;DR: RAG solves the information access problem. Fine-tuning solves the domain fluency problem. A model that retrieves the right NOAA storm event records but produces responses that misuse meteorological terminology, misinterpret forecaster shorthand, or structure outputs inconsistently has a weight problem, not a retrieval problem. Fine-tuning adjusts the weights toward your domain using QLoRA, making domain adaptation practical on the hardware tier from Part 3. This article covers when fine-tuning is worth doing, what it actually changes in the model, how to prepare training data from the NOAA corpus, and how to run a QLoRA fine-tune without a research budget.</em></p><h2>What Fine-Tuning Actually Changes</h2><p>Part 7 established that fine-tuning is additional training that adjusts the model&#8217;s weights toward a specific domain. Part 8 established that those adjustments run the same training loop as pretraining, forward pass, loss calculation, backpropagation, weight update, on a smaller domain-specific dataset.</p><p>What that means in practice for the NOAA pipeline is worth being precise about.</p><p>Fine-tuning does not add new facts to the model&#8217;s weights in a retrievable form. It adjusts the model&#8217;s behavior patterns toward the domain. A model fine-tuned on NOAA storm event records and National Weather Service documentation learns the vocabulary, the structural conventions, and the reasoning patterns that domain uses. It learns that EF2 refers to a specific wind speed range on the Enhanced Fujita scale, not a generic damage descriptor. It learns that a forecaster narrative structured as a damage survey follows conventions that differ from a public warning. It learns to produce responses that sound like they come from someone who works in that domain rather than someone who has read about it.</p><p>These are behavioral adjustments, not knowledge injections. The distinction matters because it defines what fine-tuning can and cannot fix. Fine-tuning cannot make the model know about events that occurred after its training cutoff. RAG handles that. Fine-tuning can make the model reason more accurately and communicate more fluently about the domain it was adapted to. RAG cannot do that.</p><h2>When Fine-Tuning Is Worth Doing</h2><p>Three conditions indicate fine-tuning is the right next step after RAG is running.</p><p>First, domain terminology is being mishandled despite correct retrieval. If the model consistently misinterprets specialized vocabulary, abbreviations, or classification systems that appear in the retrieved context, the weights need adjustment toward the domain. Prompt engineering can compensate for some terminology gaps but cannot substitute for weight-level domain adaptation when the gap is systematic.</p><p>Second, output structure is inconsistent despite explicit system prompt guidance. If the model produces responses that deviate from the specified format on a meaningful percentage of queries even with clear system prompt instructions and examples, fine-tuning on correctly structured domain examples recalibrates the weight-level behavior that the system prompt is failing to override.</p><p>Third, the model is hallucinating domain-specific details that do not appear in retrieved context. A model that invents plausible-sounding storm damage figures or fabricates event classifications that were not in the retrieved chunks is filling domain knowledge gaps from its training distribution. Fine-tuning on real domain examples raises the threshold at which the model defaults to fabrication rather than acknowledging uncertainty.</p><p>If none of these three conditions are present after RAG is running in production, fine-tuning is not the next step. The return on fine-tuning investment is highest when the gap it closes is specific and diagnosable. Fine-tuning a model that is already performing well to make it perform slightly better is rarely worth the time and operational complexity.</p><h2>Preparing the Training Dataset</h2><p>Fine-tuning requires a dataset of input-output pairs that demonstrate the behavior you want the model to learn. For the NOAA pipeline that means pairs of storm event queries and correctly structured responses grounded in NOAA records.</p><p>The quality of the training dataset determines the quality of the fine-tuned model more directly than any other variable in the fine-tuning process. A small dataset of high quality examples produces better results than a large dataset of mediocre ones. For domain adaptation of the type this arc requires, 500 to 1,500 carefully constructed examples is the practical target range. Below 500 the model does not see enough variation to generalize the domain patterns reliably. Above 1,500 the returns diminish rapidly for behavioral adaptation tasks and the training time increases without proportional quality improvement.</p><p>Each training example needs three components. The system prompt establishes the context the model will operate in during fine-tuning, which should match the production system prompt from Part 11. The user query is a representative question a real user of the NOAA pipeline would ask. The assistant response is the correctly structured, domain-fluent answer that the fine-tuned model should learn to produce.</p><p>Claude Code Prompt - Q1 2026:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;80f0d850-3c1e-4c9f-b8ac-ca3edfba6a68&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Write a Python script that generates fine-tuning training
examples from the NOAA storm events corpus in data/cleaned.
For each example, sample a random storm event record and
construct a natural language query about that event covering
one of five query types: damage assessment, event location
and timing, fatality and injury summary, comparison with
similar events in the same region, and forecaster narrative
interpretation. Generate a correctly structured response
for each query using the event record&#8217;s actual data fields
and narrative text. Format each example as a chat format
JSON object with system, user, and assistant turns matching
the production system prompt structure from Part 11.
Generate 1000 examples, split into 900 training and 100
validation, and save as train.jsonl and validation.jsonl
in data/finetune. Log the distribution of query types
across generated examples to confirm balanced coverage.</code></pre></div><p>What you are asking Claude Code to build: a training dataset generator that produces balanced, domain-representative examples directly from the NOAA corpus. The five query type distribution ensures the fine-tuned model learns to handle the full range of queries the production pipeline will receive rather than overfitting to a narrow query pattern. The validation split is what tells you during training whether the model is generalizing or memorizing.</p><p>What success looks like: 900 training examples and 100 validation examples in chat format JSONL. The query type distribution log shows roughly equal representation across the five types. Opening ten random examples and reading them confirms the responses are factually grounded in the sampled event records and structurally consistent with the production system prompt requirements.</p><h2>Running the Fine-Tune With QLoRA</h2><p>Part 7 introduced QLoRA as the technique that makes fine-tuning practical on consumer hardware. Part 8 explained why the base weights stay intact while adapter weights encode the domain adjustments. This step runs the actual fine-tuning process against the training dataset prepared above.</p><p>QLoRA requires three configuration decisions before training begins. The rank parameter controls the capacity of the adapter weights. A rank of 16 is the standard starting point for behavioral adaptation tasks. Higher ranks increase adapter capacity and training time. For domain terminology and output structure adaptation, rank 16 is sufficient. The alpha parameter controls the scaling of the adapter&#8217;s contribution to the model&#8217;s output. Setting alpha to twice the rank value, 32 for a rank of 16, is the standard configuration that the research literature consistently supports. The target modules parameter specifies which layers of the model receive adapter weights. Targeting the attention layers produces the best results for the behavioral adaptation this arc requires.</p><p>Claude Code Prompt - Q1 2026:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;fdcb2b96-8b14-46d9-b61f-f9c6beaceea7&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Write a Python fine-tuning script using the Hugging Face
PEFT and TRL libraries that applies QLoRA to the base
instruction tuned model selected in Part 9. Load the model
in 4-bit quantization using BitsAndBytes. Configure LoRA
adapters with rank 16, alpha 32, and dropout 0.05 targeting
the query, key, value, and output projection layers. Train
for three epochs on the train.jsonl dataset from data/finetune
with a learning rate of 2e-4 and cosine learning rate schedule.
Evaluate on validation.jsonl at the end of each epoch and log
training loss and validation loss. Apply early stopping if
validation loss increases for two consecutive epochs. Save
the adapter weights to models/noaa-adapter after training
completes. Produce a training summary showing final training
loss, final validation loss, total training time, and whether
early stopping was triggered.</code></pre></div><p>What you are asking Claude Code to build: a complete QLoRA fine-tuning pipeline that trains adapter weights on the NOAA domain examples, monitors for overfitting through validation loss tracking, applies early stopping to prevent catastrophic forgetting, and saves the adapter weights separately from the base model. Saving adapters separately means the base model remains intact and the adapter can be updated or replaced without touching the base weights.</p><p>What success looks like: training loss decreases across epochs. Validation loss tracks training loss without diverging, which would indicate overfitting. Early stopping does not trigger on the first epoch, which would indicate the learning rate is too high. The adapter weights appear in models/noaa-adapter. The training summary shows final losses in the range of 0.8 to 1.2 for a well-configured domain adaptation run.</p><h2>Loading and Testing the Fine-Tuned Model</h2><p>The adapter weights produced by fine-tuning need to be loaded alongside the base model before the fine-tuned behavior is available for inference. The adapter does not replace the base model. It modifies its output by adding its learned adjustments to the base model&#8217;s computations at the targeted layers.</p><p>Claude Code Prompt - Q1 2026:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;5d70b5e7-feee-409b-b0a2-cafbf9c8c980&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Write a Python script that loads the base instruction tuned
model with the NOAA adapter weights from models/noaa-adapter
using the Hugging Face PEFT library. Run the same three test
queries used to validate the RAG pipeline in Part 14 against
both the base model without the adapter and the fine-tuned
model with the adapter loaded. For each query produce side
by side output showing the base model response and the
fine-tuned model response. Add a domain terminology check
that scans both responses for correct usage of five key
meteorological terms defined in a reference dictionary and
reports which model used each term correctly. Save the
comparison output as a JSON report in data/reports.</code></pre></div><p>What you are asking Claude Code to build: a direct comparison between base model and fine-tuned model behavior on the same queries, with a domain terminology audit that makes the fine-tuning improvement measurable rather than subjective. The side by side comparison is what you show a stakeholder who asks whether fine-tuning was worth doing. The terminology check is what tells you whether the behavioral adjustment targeted the right gap.</p><p>What success looks like: the fine-tuned model uses domain terminology more consistently than the base model on the test queries. The terminology check shows improvement on the meteorological terms the training data emphasized. The responses are structurally consistent with the production system prompt format. The base model responses serve as the baseline that makes the fine-tuning improvement visible.</p><h2>Managing the Fine-Tuned Model in Production</h2><p>A fine-tuned model introduces versioning complexity that the base model deployment does not carry. The base model weights are stable. The adapter weights change every time fine-tuning runs on new data. Managing that complexity before it becomes a production problem requires two operational practices.</p><p>First, treat adapter weights as versioned artifacts. Every fine-tuning run produces a new adapter version. Store adapter versions with the training dataset version, the base model version, and the validation metrics that confirmed the adapter&#8217;s quality. The model registry concept from the ML series applies directly here. An adapter deployed to production without a registry entry is an untracked change to a production system.</p><p>Second, validate the fine-tuned model against the RAG pipeline before deploying the adapter to production. A fine-tuning run that improves domain terminology but degrades retrieval grounding behavior is not an improvement. The comparison script above tests the adapter in isolation. The full pipeline test in Part 16 tests it in context.</p><h2>What RAG and Fine-Tuning Together Produce</h2><p>A pipeline running both RAG and a domain-adapted fine-tuned model has two complementary capabilities. RAG provides current, specific, traceable information from the corpus. Fine-tuning provides the domain fluency to reason over that information accurately and communicate the results in the register the domain requires.</p><p>Neither is complete without the other for a production deployment in a specialized domain. RAG without fine-tuning produces responses that are informationally correct but domain-naive. Fine-tuning without RAG produces responses that are domain-fluent but informationally limited to the training cutoff. Together they produce a pipeline that knows what is in your corpus and knows how to talk about it.</p><p>Next: assembly. Every component built across this arc gets connected into a single running system with opinionated choices at each layer, explicit reasoning for each decision, and the full NOAA pipeline running end to end.</p><p>#InHouseAI #FineTuning #QLoRA #LLMAdaptation #DIYLanguageModel #EnterpriseAI #AIInfrastructure</p><div><hr></div><p>[AUDIO OPENING] The RAG pipeline is returning the right records. The similarity scores are strong. The retrieved chunks contain exactly the information the query requires. The response is still wrong. Not factually wrong. Structurally wrong. The model is paraphrasing forecaster shorthand in ways that change the meaning. It is treating a tornado rating as a damage estimate rather than a wind speed classification. It is producing responses that a National Weather Service forecaster would read and immediately distrust, not because the facts are incorrect but because the domain register is off. The model knows what is in the documents. It does not yet speak the language of the domain. That is a fine-tuning problem.</p><p>[END AUDIO OPENING]</p>]]></content:encoded></item><item><title><![CDATA[Building Your RAG Pipeline (Models Part 14) ]]></title><description><![CDATA[The concept is clear. Here is how you actually build it.]]></description><link>https://signalsandsystems.substack.com/p/building-your-rag-pipeline-models</link><guid isPermaLink="false">https://signalsandsystems.substack.com/p/building-your-rag-pipeline-models</guid><dc:creator><![CDATA[Jon Walkenhorst]]></dc:creator><pubDate>Tue, 21 Apr 2026 17:28:28 GMT</pubDate><enclosure url="https://api.substack.com/feed/podcast/194931363/7ae64eb7987b4d47241c8c102254c9c4.mp3" length="0" type="audio/mpeg"/><content:encoded><![CDATA[<p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://signalsandsystems.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://signalsandsystems.substack.com/subscribe?"><span>Subscribe now</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!k-bf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8de7d3c-4698-44a0-afa8-3979aa3312fb_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!k-bf!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8de7d3c-4698-44a0-afa8-3979aa3312fb_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!k-bf!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8de7d3c-4698-44a0-afa8-3979aa3312fb_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!k-bf!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8de7d3c-4698-44a0-afa8-3979aa3312fb_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!k-bf!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8de7d3c-4698-44a0-afa8-3979aa3312fb_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!k-bf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8de7d3c-4698-44a0-afa8-3979aa3312fb_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a8de7d3c-4698-44a0-afa8-3979aa3312fb_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!k-bf!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8de7d3c-4698-44a0-afa8-3979aa3312fb_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!k-bf!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8de7d3c-4698-44a0-afa8-3979aa3312fb_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!k-bf!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8de7d3c-4698-44a0-afa8-3979aa3312fb_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!k-bf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8de7d3c-4698-44a0-afa8-3979aa3312fb_1536x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>TL;DR: This article builds the retrieval augmented generation pipeline against the NOAA storm event corpus prepared in Parts 6 and 7. The embedding model gets selected and configured. The vector store gets populated. The retrieval layer gets wired to the inference server. The first end to end query runs against real data. By the end of this article the pipeline retrieves relevant storm event records, assembles them into a context window, and generates grounded natural language responses. Every step includes a Claude Code prompt.</em></p><h2>What Gets Built in This Article</h2><p>The RAG pipeline has four components that do not yet exist as connected infrastructure. The embedding model needs to be selected, downloaded, and configured. The vector store needs to be initialized and populated with embeddings generated from the NOAA chunks produced in Part 6. The retrieval layer needs to be built as a queryable interface that takes a natural language query, embeds it, searches the vector store, and returns ranked chunks. The assembly layer needs to connect retrieval output to the inference server with the system prompt and token budget management from Parts 11 and 12.</p><p>Each component gets its own Claude Code prompt. Each prompt connects explicitly to work done in prior articles so the pipeline assembles as a coherent system rather than a collection of independent scripts.</p><h2>Selecting the Embedding Model</h2><p>The embedding model converts text into vectors. Every chunk in the NOAA corpus gets embedded once during ingestion. Every query gets embedded at inference time. The same model must handle both to ensure the query vectors and the document vectors live in the same vector space. A query embedded with one model cannot be compared meaningfully to documents embedded with a different model.</p><p>Two embedding models dominate practical open-weight deployments in 2026 for English language technical text.</p><p>Sentence-transformers all-MiniLM-L6-v2 is the lightweight default. It produces 384 dimensional vectors, runs efficiently on CPU without requiring GPU acceleration, and handles general English text reliably. For a first RAG deployment on minimum viable hardware where GPU resources are shared between the embedding model and the inference server, all-MiniLM-L6-v2 is the right choice. It is fast, well-documented, and its limitations are well understood.</p><p>BGE-large-en-v1.5 from BAAI produces 1,024 dimensional vectors and delivers meaningfully better retrieval quality on technical and domain-specific text at the cost of higher compute requirements. For deployments at the mid-range hardware tier where GPU headroom exists for a larger embedding model, BGE-large is worth the additional resource investment.</p><p>For the NOAA pipeline at minimum viable hardware, all-MiniLM-L6-v2 is the selection. The assembly article at Part 16 confirms this choice with the full stack configuration.</p><h2>Step One: Initialize the Vector Store</h2><p>The vector store holds the embeddings and makes them searchable. Chroma is the right choice for this arc. It runs locally without external dependencies, stores embeddings on disk so they persist across restarts, and integrates cleanly with the Python tooling used throughout the pipeline. Pinecone and Weaviate are strong production alternatives but both introduce external service dependencies that are unnecessary for a first build.</p><p>Claude Code Prompt - Q1 2026:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;4da215ac-d217-4f83-b9db-3123b429dd05&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Set up a Chroma vector store for the NOAA storm events RAG
pipeline. Initialize a persistent Chroma client that stores
its database in a local data/vectorstore directory. Create
a collection named noaa_storm_events configured for
cosine similarity search with 384 dimensional vectors
matching the all-MiniLM-L6-v2 embedding model output.
Write a verification script that confirms the collection
was created successfully, reports the current document
count, and confirms the similarity metric and dimensionality
configuration match the expected values. Add error handling
that reports clearly if the vectorstore directory is not
writable or if the collection configuration conflicts with
an existing collection.</code></pre></div><p>What you are asking Claude Code to build: a persistent vector store initialized with the correct configuration for the embedding model selected above. The verification script is what confirms the store is ready to receive embeddings before the ingestion step runs.</p><p>What success looks like: the data/vectorstore directory exists and contains Chroma&#8217;s database files. The verification script reports zero documents, cosine similarity metric, and 384 dimensional configuration. Running the verification script twice produces the same result.</p><h2>Step Two: Generate and Load Embeddings</h2><p>The chunked NOAA documents from Part 6 need to be embedded and loaded into the vector store. This step runs once during initial setup and again whenever new NOAA data is added to the corpus.</p><p>Claude Code Prompt - Q1 2026:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;d3d256a6-2e42-438f-87df-cfbea9f4a222&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Write a Python ingestion script that reads the chunked NOAA
storm event documents from data/chunked, generates embeddings
for each chunk using the sentence-transformers all-MiniLM-L6-v2
model, and loads the embeddings into the Chroma noaa_storm_events
collection. Use the EVENT_ID and chunk index from each document&#8217;s
metadata as the Chroma document ID to ensure idempotent loading.
Process chunks in batches of 100 to manage memory consumption.
Store the full document text and all metadata fields alongside
each embedding so retrieved chunks include both the text and
the structured fields from the original NOAA records. Log
progress every 500 documents and produce a completion report
showing total documents loaded, total time elapsed, and
average embedding generation time per document.</code></pre></div><p>What you are asking Claude Code to build: a batched ingestion pipeline that embeds every chunk from Part 6 and loads it into Chroma with idempotent document IDs. Idempotent loading means running the script twice does not create duplicate embeddings. The EVENT_ID plus chunk index combination ensures each chunk has a stable unique identifier that traces back to the source NOAA record.</p><p>What success looks like: the vector store document count after ingestion matches the total chunk count from Part 6&#8217;s completion report. The completion report shows consistent embedding generation times across batches. Running the ingestion script a second time produces no change in document count.</p><h3>Step Three: Build the Retrieval Layer</h3><p>The retrieval layer takes a natural language query, embeds it using the same model used for document ingestion, searches the vector store for the nearest neighbor chunks, and returns them ranked by similarity score.</p><p>Claude Code Prompt - Q1 2026:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;88ed5715-b018-4d72-ad0d-42353f20550a&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Build a retrieval module for the NOAA storm events RAG pipeline.
The module should accept a natural language query string and a
configurable top-k parameter defaulting to five. It should embed
the query using all-MiniLM-L6-v2, query the Chroma
noaa_storm_events collection for the top-k most similar chunks,
and return a list of result objects each containing the chunk
text, all metadata fields, the similarity score, and the source
EVENT_ID. Add a minimum similarity threshold parameter defaulting
to 0.6 that filters out chunks below the threshold before
returning results. Add a logging function that records each
query, the number of results returned, the highest and lowest
similarity scores, and whether any results were filtered by
the threshold. Write three test queries against the loaded
NOAA corpus and print the top three results for each to
confirm retrieval is working as expected.</code></pre></div><p>What you are asking Claude Code to build: a retrieval module with configurable depth and quality filtering, plus logging that tracks retrieval quality metrics from the first query forward. The minimum similarity threshold is what prevents the pipeline from surfacing loosely related chunks when no highly relevant content exists in the vector store. A query about an event type not well represented in the corpus should return fewer results with a low confidence signal rather than five weakly relevant chunks presented as authoritative.</p><p>What success looks like: the three test queries return results with similarity scores above the threshold. The logged output shows the score distribution across returned chunks. A query about a specific storm type in a specific region returns chunks from that region at higher similarity scores than chunks from unrelated regions.</p><p><strong>Step Four: Assemble the Full Pipeline</strong></p><p>The assembly layer connects the retrieval module to the inference server, applies the token budget management from Part 12, and invokes the system prompt from Part 11.</p><p>Claude Code Prompt - Q1 2026:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;e8f5d074-a54c-4261-9f79-68538bac2cfe&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Build a RAG pipeline assembly function that connects the
retrieval module from the previous step to a locally served
language model via the Ollama API. The function should accept
a natural language query and an optional session history list.
It should retrieve the top five chunks using the retrieval
module, calculate the total token count of the system prompt
plus retrieved chunks plus session history plus the query,
and trim the oldest session history turns if the total exceeds
3,500 tokens to preserve a 596 token response budget on a
4,096 token context window. Assemble the final prompt with
the system prompt first, retrieved chunks second ordered by
similarity score descending, session history third, and the
user query last. Submit the assembled prompt to the Ollama
inference endpoint and return the model response along with
the list of source EVENT_IDs from the retrieved chunks.
Log the token counts for each prompt component on every call.</code></pre></div><p>What you are asking Claude Code to build: a complete RAG assembly function that enforces the token budget from Part 12, orders retrieved context to mitigate the lost in the middle problem by placing the highest scoring chunk first, and returns source event citations alongside the response. The token component logging is what makes budget drift visible before it becomes a production failure.</p><p>What success looks like: a natural language query returns a natural language response grounded in retrieved NOAA content with source EVENT_IDs listed. The token log shows each component&#8217;s cost. A multi-turn session trims history correctly when the budget ceiling is approached. A query about events not in the corpus returns a response that acknowledges the limitation rather than fabricating an answer.</p><p><strong>The First Real Query</strong></p><p>With all four steps complete the pipeline is ready for its first end to end query against real NOAA data. A representative first query for the NOAA corpus:</p><p>&#8220;What were the most significant tornado events in Alabama in April 2021?&#8221;</p><p>This query tests retrieval against a well-documented event period, the April 2021 tornado outbreak was one of the most active severe weather periods in the dataset. High similarity scores on the retrieved chunks confirm the embedding model and vector store are working correctly. A response that cites specific EVENT_IDs and matches the known record of that outbreak confirms the full pipeline is functioning as designed.</p><p>What the response should look like: a clear natural language summary of the retrieved tornado events, specific location and damage details drawn from the NOAA narratives, source event citations by county and date, and a confidence acknowledgment if the retrieved context does not cover the full scope of the query.</p><p>What a failure looks like: a response that describes Alabama tornado history from general training knowledge without citing specific retrieved events, a response that returns no results because the similarity threshold filtered everything, or a response that cites EVENT_IDs that do not correspond to Alabama tornado records. Each failure mode points to a specific layer of the pipeline that needs adjustment.</p><p><strong>Updating the Pipeline With New Data</strong></p><p>Part 13 established that RAG keeps knowledge living by accepting new documents without retraining. The ingestion script from Step Two is the update mechanism. When NOAA releases new annual data, the update process is three steps. Download the new annual file, run it through the normalization, cleaning, formatting, and chunking pipeline from Part 6, and run the ingestion script against the new chunks. The vector store gains the new embeddings. The retrieval layer surfaces them on the next relevant query. The model weights do not change. The knowledge base does.</p><p>This update cycle is what the receiving dock analogy from Part 13 described. New data enters the dock, gets indexed, and becomes immediately retrievable. The model does not need to be retrained to know about the 2024 storm season. It needs the 2024 records in the vector store.</p><p><strong>What Comes Next</strong></p><p>The RAG pipeline is running. For many use cases it is enough. For cases where the model&#8217;s baseline domain capability is the limiting factor rather than information access, fine-tuning is the next step. The next article covers what fine-tuning buys you, when it is worth doing, and how QLoRA makes it executable on the hardware tier from Part 3.</p><p>#InHouseAI #RAG #RetrievalAugmentedGeneration #VectorStore #Chroma #DIYLanguageModel #EnterpriseAI #AIInfrastructure</p><div><hr></div><p>[AUDIO OPENING] Thirteen articles. A hardware decision. A dataset downloaded and cleaned. Chunks sized to a token budget. A model running on local infrastructure. A system prompt that defines exactly how the model should behave. All of it has been preparation for a single moment. A natural language question typed into a prompt. A pipeline that retrieves the right records from 1.2 million rows of storm event data. A response grounded in what actually happened in Jefferson County, Alabama on a specific day in April 2021. Not what the model guesses happened. Not what the training weights suggest probably happened. What the NOAA record says happened, cited by event ID, returned in plain English. That moment either arrives in this article or it does not. The difference between the two outcomes is in the text version. Four steps. Every one of them is there. [END AUDIO OPENING]</p>]]></content:encoded></item><item><title><![CDATA[What RAG Is and Why It Comes First (Models Part 13) ]]></title><description><![CDATA[The model knows what it was trained on. RAG is how it knows what you need it to know.]]></description><link>https://signalsandsystems.substack.com/p/what-rag-is-and-why-it-comes-first</link><guid isPermaLink="false">https://signalsandsystems.substack.com/p/what-rag-is-and-why-it-comes-first</guid><dc:creator><![CDATA[Jon Walkenhorst]]></dc:creator><pubDate>Mon, 20 Apr 2026 22:11:41 GMT</pubDate><enclosure url="https://api.substack.com/feed/podcast/194850612/6d8d6f3fb256f47e9dad1b8fb5673681.mp3" length="0" type="audio/mpeg"/><content:encoded><![CDATA[<p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://signalsandsystems.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://signalsandsystems.substack.com/subscribe?"><span>Subscribe now</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ntZT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb99281bd-e485-4f66-aee5-d4431422d8a6_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ntZT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb99281bd-e485-4f66-aee5-d4431422d8a6_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!ntZT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb99281bd-e485-4f66-aee5-d4431422d8a6_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!ntZT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb99281bd-e485-4f66-aee5-d4431422d8a6_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!ntZT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb99281bd-e485-4f66-aee5-d4431422d8a6_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ntZT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb99281bd-e485-4f66-aee5-d4431422d8a6_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b99281bd-e485-4f66-aee5-d4431422d8a6_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ntZT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb99281bd-e485-4f66-aee5-d4431422d8a6_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!ntZT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb99281bd-e485-4f66-aee5-d4431422d8a6_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!ntZT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb99281bd-e485-4f66-aee5-d4431422d8a6_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!ntZT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb99281bd-e485-4f66-aee5-d4431422d8a6_1536x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>TL;DR: Retrieval Augmented Generation is the architectural pattern that connects a language model to information it was never trained on. It does not change the model&#8217;s weights. It does not require fine-tuning. It gives the model access to your data at inference time by retrieving relevant documents and placing them in the context window before the model generates a response. For most purpose-built language model pipelines RAG is the right first move, delivers the majority of the domain performance improvement you are looking for, and is faster to implement, easier to update, and more transparent than fine-tuning. This article covers what RAG is, how it works, where it fails, and why it comes before fine-tuning in this arc.</em></p><h2>The Problem RAG Solves</h2><p>A language model&#8217;s weights encode what it learned during training. That training had a cutoff date. Everything that happened after that date is invisible to the model unless it is provided at inference time. For a pipeline built on a dataset like NOAA storm events, which is updated continuously and covers specific operational records the model was never trained on, the training cutoff is not a minor limitation. It is a fundamental architectural gap.</p><p>The gap has a second dimension beyond recency. Even for events that occurred before the training cutoff, a model trained on general internet text has shallow coverage of specialized operational datasets. The NOAA storm events database contains granular county-level records, specific damage assessments, and forecaster narratives that did not appear in the model&#8217;s training corpus in any meaningful volume. The model knows what a tornado is. It does not know what happened in Jefferson County, Alabama on April 27, 2021 unless that specific event was in its training data, which it almost certainly was not at the level of detail your pipeline requires.</p><p>RAG closes both gaps simultaneously. It makes post-training information available by retrieving it at inference time. It makes specialized operational data available by building a retrieval index over your specific corpus. Neither capability requires touching the model&#8217;s weights.</p><h2>How RAG Works</h2><p>RAG connects three components that earlier articles in this arc built independently. The embedding model from the stack article, the vector store from the data pipeline, and the language model from the serving layer combine into a single inference flow that runs on every query.</p><p>When a query arrives, the first step is query embedding. The same embedding model that processed the NOAA documents during ingestion processes the user query and produces a vector representation of the query&#8217;s meaning. This is the bridge between natural language and the vector space where retrieval happens.</p><p>The second step is retrieval. The query vector goes to the vector store, which finds the stored document chunk vectors most similar to it. Similarity in vector space means similarity in meaning. A query about hail damage in the Texas Panhandle produces a query vector that sits close in the vector space to chunk vectors from NOAA records describing hail events in that region. The vector store returns the nearest neighbors, the chunks whose meaning is most similar to the query, ranked by similarity score.</p><p>The third step is context assembly. The retrieved chunks are placed in the context window after the system prompt and before the user query. The model now has access to the specific storm event records most relevant to the question being asked. The token budget management from Part 12 governs how many chunks fit and in what order they are placed.</p><p>The fourth step is generation. The model reads the system prompt, the retrieved context, and the user query, and generates a response grounded in what the retrieved documents contain. The weights determine how the model reasons over the context. The context determines what the model has to reason over.</p><p>This four step flow, embed the query, retrieve relevant chunks, assemble context, generate response, is what RAG means in practice. The concept is straightforward. The implementation decisions within each step are where the complexity lives.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Ss0d!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6edd0e6-2fde-409c-8295-16f0ea00abd2_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ss0d!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6edd0e6-2fde-409c-8295-16f0ea00abd2_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!Ss0d!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6edd0e6-2fde-409c-8295-16f0ea00abd2_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!Ss0d!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6edd0e6-2fde-409c-8295-16f0ea00abd2_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!Ss0d!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6edd0e6-2fde-409c-8295-16f0ea00abd2_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ss0d!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6edd0e6-2fde-409c-8295-16f0ea00abd2_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f6edd0e6-2fde-409c-8295-16f0ea00abd2_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Ss0d!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6edd0e6-2fde-409c-8295-16f0ea00abd2_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!Ss0d!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6edd0e6-2fde-409c-8295-16f0ea00abd2_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!Ss0d!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6edd0e6-2fde-409c-8295-16f0ea00abd2_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!Ss0d!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6edd0e6-2fde-409c-8295-16f0ea00abd2_1536x1024.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2>Why RAG Before Fine-Tuning</h2><p>Part 7 established the conceptual distinction between RAG and fine-tuning. RAG gives the model access to information it was not trained on. Fine-tuning makes the model better at reasoning over a specific domain. The distinction matters for sequencing.</p><p>RAG is faster to implement. The data pipeline built in Parts 6 and 7 is the foundation. Adding an embedding model and a vector store to the serving infrastructure is a day of work, not a month. Fine-tuning requires preparing a training dataset, running a training process that takes hours on consumer hardware, evaluating the fine-tuned model against the base model, and managing the resulting weights as a new model version. The time investment ratio between RAG and fine-tuning for a first deployment is roughly one to ten.</p><p>RAG is easier to update. When new NOAA data becomes available, updating the RAG pipeline means ingesting the new records into the vector store. The model weights do not change. The update is additive and reversible. Updating a fine-tuned model with new domain data requires retraining, which risks degrading the adjustments the previous fine-tuning produced if the new training data is not carefully balanced against the original.</p><p>RAG is more transparent. A RAG response cites the specific documents that informed it. The source event records that contributed to a response are identifiable and verifiable. A fine-tuned model&#8217;s domain knowledge is encoded in weight adjustments that cannot be traced back to specific training examples at inference time. For a use case where response provenance matters, RAG provides it by design. Fine-tuning does not.</p><p>RAG has a ceiling. It can only reason over what it retrieves. If the relevant information is not in the vector store, or if the retrieval step fails to surface it, the model answers from its training weights or acknowledges the gap. Fine-tuning raises the floor by improving the model&#8217;s baseline capability in the domain regardless of what retrieval surfaces. The right production system uses both. RAG first because it delivers most of the value fastest. Fine-tuning later when RAG alone is not enough.</p><h2>Where RAG Fails</h2><p>RAG is not a complete solution and understanding its failure modes before building it is what separates a pipeline that works in a demo from one that works in production.</p><p>Retrieval quality ceiling is the primary failure mode. The RAG pipeline is only as good as what it retrieves. If the embedding model produces poor vector representations of domain-specific content, or if the chunking strategy fragments documents in ways that lose context, the retrieval step surfaces the wrong chunks. The model then generates a response grounded in irrelevant or incomplete context. The response will be coherent. It will not be correct. This failure mode is invisible without evaluation against known correct answers.</p><p>Chunk boundary problems occur when relevant information spans a chunk boundary. A NOAA storm event narrative that describes a tornado&#8217;s path across three counties may be split across two chunks by the chunking strategy from Part 6. A query about the full path retrieves one chunk and misses the other. The 50 token overlap specified in Part 6 mitigates this but does not eliminate it. Events with unusually long narratives or complex multi-county paths are candidates for this failure.</p><p>Context window competition occurs when multiple retrieved chunks contain partially relevant information and the most relevant content ends up in the middle of the context window where model attention is weakest. The lost in the middle problem from Part 12 is a RAG failure mode as well as a budget management problem. Retrieval ranking by similarity score does not guarantee that the highest ranked chunk is the most useful one for the specific query. Reranking strategies that apply a second relevance filter after initial retrieval mitigate this at the cost of additional inference latency.</p><p>Contradictory context occurs when retrieved chunks contain conflicting information. NOAA records for the same event updated across multiple annual files may contain revised damage assessments that contradict earlier figures. The model receives both versions in the context window and must either reconcile them, which it may do incorrectly, or surface the contradiction explicitly, which requires the system prompt to instruct it to do so. The data pipeline&#8217;s deduplication step from Part 6 reduces but does not eliminate this failure mode.</p><h2>The Embedding Model Decision</h2><p>RAG requires an embedding model to convert text into vectors. The embedding model is a separate component from the language model and deserves explicit selection rather than default acceptance of whatever the framework suggests.</p><p>Two properties matter most for embedding model selection in the NOAA pipeline. First, the embedding model should be trained on text that resembles the domain. General-purpose embedding models trained on web text produce reasonable vectors for most content. Embedding models trained or fine-tuned on scientific and technical text produce better vectors for domain-specific terminology. Second, the embedding model&#8217;s vector dimensionality and the vector store&#8217;s index configuration must match. An embedding model that produces 1,536-dimensional vectors requires a vector store index configured for 1,536 dimensions.</p><p>For the NOAA pipeline, a general-purpose embedding model is the right starting point. The domain-specific terminology in NOAA narratives is specialized but not so far from general English that a general-purpose embedding model produces meaningfully degraded vectors. The assembly article at Part 16 makes the specific selection with full reasoning.</p><p>Next: The RAG pipeline against the NOAA corpus with Claude Code prompts at each step. The embedding model gets selected and configured. The vector store gets populated with the chunks from Part 6. The retrieval layer gets wired to the serving infrastructure from Part 16. The first end-to-end query runs against real NOAA data.</p><p>The concept is clear. The next article makes it executable.</p><p>#InHouseAI</p><p>#RAG</p><p>#RetrievalAugmentedGeneration</p><p>#LLMArchitecture</p><p>#DIYLanguageModel</p><p>#EnterpriseAI</p><p>#AIInfrastructure</p><div><hr></div><p>[AUDIO OPENING] Every library in the world contains books a librarian has never read. Ask the librarian where to find information about a specific topic and they do not need to have read the book to provide a trusted answer. They need to know how the library is organized. A language model without RAG is a librarian who has read everything in the building up until the day training ended. Consider that new content is being delivered continuously. Every new document, article, image, and volume that arrives after the last training date sits in a receiving dock, unread, inaccessible, as if it does not exist. RAG is the receiving dock with a retrieval system attached. New content arrives, gets indexed, and becomes immediately available for the next query. The librarian does not need to reread the entire library to know what came in this week. The retrieval system handles that. The model&#8217;s weights do not change. What the model can reach does. The documents in the receiving dock stay there, available at retrieval time, until the next training run when they move from the dock into the librarian&#8217;s permanent memory. RAG keeps the knowledge living. Training makes it resident. [END AUDIO OPENING]</p>]]></content:encoded></item><item><title><![CDATA[Tokens, Context, and Why Budgets Matter (Models Part 12) ]]></title><description><![CDATA[The context window is not infinite. How you fill it determines everything the model can see when it answers.]]></description><link>https://signalsandsystems.substack.com/p/tokens-context-and-why-budgets-matter</link><guid isPermaLink="false">https://signalsandsystems.substack.com/p/tokens-context-and-why-budgets-matter</guid><dc:creator><![CDATA[Jon Walkenhorst]]></dc:creator><pubDate>Sun, 19 Apr 2026 01:05:23 GMT</pubDate><enclosure url="https://api.substack.com/feed/podcast/194655531/debb8e9119f845af8df3cb3fd578f376.mp3" length="0" type="audio/mpeg"/><content:encoded><![CDATA[<p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://signalsandsystems.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://signalsandsystems.substack.com/subscribe?"><span>Subscribe now</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8wEs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83a1e844-ca18-4c05-a2b5-df8e4c814ab4_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8wEs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83a1e844-ca18-4c05-a2b5-df8e4c814ab4_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!8wEs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83a1e844-ca18-4c05-a2b5-df8e4c814ab4_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!8wEs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83a1e844-ca18-4c05-a2b5-df8e4c814ab4_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!8wEs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83a1e844-ca18-4c05-a2b5-df8e4c814ab4_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8wEs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83a1e844-ca18-4c05-a2b5-df8e4c814ab4_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/83a1e844-ca18-4c05-a2b5-df8e4c814ab4_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8wEs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83a1e844-ca18-4c05-a2b5-df8e4c814ab4_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!8wEs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83a1e844-ca18-4c05-a2b5-df8e4c814ab4_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!8wEs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83a1e844-ca18-4c05-a2b5-df8e4c814ab4_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!8wEs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83a1e844-ca18-4c05-a2b5-df8e4c814ab4_1536x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>TL;DR: Every inference call has a fixed budget measured in tokens. That budget has to cover the system prompt, the retrieved documents, the conversation history, and the response. How you allocate that budget determines what the model can see when it generates an answer. A model that cannot see the relevant context because the budget was exhausted before retrieval results arrived will produce a confident response from incomplete information. Token budget management is not a performance optimization. It is a correctness requirement.</em></p><h2>What the Context Window Actually Is</h2><p>The context window is the total amount of text a model can process in a single inference call. Everything the model sees at inference time, the system prompt, the retrieved documents, the conversation history, and the user query, must fit within this limit simultaneously. The model has no memory of previous calls. It has no access to information outside the current context window. Every inference call starts fresh with only what the context window contains.</p><p>Context window size is measured in tokens. A 4,096 token context window holds roughly 3,000 words of English text. A 128,000 token context window holds roughly 96,000 words. Larger context windows give the model more to work with but do not eliminate the budget management problem. They change the scale of it.</p><p>The critical property of the context window is that the model attends to all of it simultaneously when generating each token. A document at the beginning of the context window is as accessible as a document at the end, with one important caveat. Research across multiple model families has consistently shown that models attend more reliably to information at the beginning and end of the context window than to information in the middle. For a pipeline that retrieves five documents and places them sequentially in the context window, the documents in the middle positions are statistically less likely to influence the response than the ones at the edges. This is called the lost in the middle problem and it affects retrieval quality independently of how good your embeddings are.</p><h2>The Four Budget Consumers</h2><p>Every token in the context window belongs to one of four categories. Understanding what each category costs and what it contributes is the foundation of deliberate budget management.</p><p>The system prompt is the first budget consumer and the only fixed cost. It pays the same token cost on every inference call regardless of what the user asks. A system prompt that runs 800 tokens costs 800 tokens on a query about a single tornado and 800 tokens on a query that requires synthesizing fifteen storm events. Designing the system prompt to be as concise as possible while retaining its behavioral specification is not cosmetic economy. It is budget allocation discipline.</p><p>Retrieved context is the second budget consumer and the most variable. The RAG pipeline retrieves document chunks from the vector store and places them in the context window between the system prompt and the user query. Each chunk costs tokens. A retrieval configuration that returns five chunks at 400 tokens each costs 2,000 tokens before the user query arrives. A configuration that returns ten chunks at the same size costs 4,000 tokens. The number of chunks retrieved, the size of each chunk, and the order they are placed in the context window are all budget decisions with direct consequences for response quality.</p><p>Conversation history is the third budget consumer and the one most commonly responsible for the failure pattern in the opening scenario. Multi-turn applications that retain prior conversation turns in the context window accumulate token cost with every exchange. A ten-turn conversation where each turn averages 200 tokens adds 2,000 tokens of history to every subsequent inference call. Without a strategy for managing history length, context window exhaustion is a when problem, not an if problem.</p><p>The user query and the response are the fourth budget consumer. The query is typically small, rarely more than 100 tokens for a focused question. The response budget needs to be explicitly reserved. A model given no guidance on response length will generate until it reaches a natural stopping point, which may consume more tokens than the budget can accommodate after the first three categories have taken their share.</p><h2>Budget Allocation for the NOAA Pipeline</h2><p>The NOAA pipeline runs against a model with a 4,096 token context window at the minimum viable hardware tier. That budget allocates as follows across the four consumers.</p><p>The system prompt designed in Part 11 targets 400 to 600 tokens. Call it 500 as the budget figure. That leaves 3,596 tokens for everything else.</p><p>The response reservation should be explicit. A detailed storm event analysis response that covers multiple events with citations and a confidence assessment runs between 300 and 500 tokens. Reserve 400. That leaves 3,196 tokens for retrieved context and conversation history combined.</p><p>If the application maintains no conversation history, the full 3,196 tokens is available for retrieved context. At 400 tokens per chunk that accommodates eight chunks comfortably. Eight storm event chunks covering a single query is generous retrieval coverage for most questions.</p><p>If the application maintains conversation history, the history budget needs an explicit ceiling. A two-turn history window at 200 tokens per turn costs 400 tokens, leaving 2,796 for retrieved context. A two-turn history window means the pipeline retains the two most recent exchanges between the user and the model, one user query plus one model response counts as one turn, and discards anything older. It is a sliding window that moves forward with each new exchange, keeping recent context available to the model while preventing history from accumulating without bound.</p><p>A five-turn window costs 1,000 tokens, leaving 2,196. Setting an explicit maximum history length and truncating or summarizing older turns when the limit is reached is not optional for a production pipeline that runs multi-turn sessions.</p><h2>Chunking Strategy Revisited</h2><p>Part 6 made chunking decisions based on document structure. Part 3 specified the minimum viable hardware. Token budget management adds a second constraint to those decisions.</p><p>A chunk size of 400 tokens was specified in Part 6 based on the coherence of NOAA storm event narratives. That chunk size also fits the budget allocation mentioned above, with room for meaningful retrieval coverage. The two constraints, document coherence and budget fit, happen to align for the NOAA dataset. They will not always align for every dataset. When they conflict, the budget constraint wins. A chunk that is too large to allow sufficient retrieval coverage in the available context window is worse than a slightly less coherent chunk that fits.</p><p>Retrieval coverage means the number of distinct chunks the pipeline can surface into the context window for a single query. If a chunk is 800 tokens and the available retrieval budget is 2,400 tokens, the model sees three chunks. If the same content is chunked at 400 tokens, the model sees six chunks covering twice the ground. A response synthesized from six relevant chunks is more complete than one synthesized from three, even if each of the three was slightly more internally coherent. Coverage wins over coherence when the budget forces a choice.</p><p>The 50 token overlap specified in Part 6 costs tokens at the boundary of every chunk. For eight chunks with 50 token overlaps the overlap cost is 400 tokens spread across the retrieved context. That cost is worth paying for the context preservation it provides at chunk boundaries, but it needs to be accounted for in the budget rather than discovered as an unexpected drain on available context.</p><h2>Hardware Equals Larger Context Windows</h2><p>The minimum viable hardware tier uses models with 4,096 to 8,192 token context windows. Mid-range hardware accommodates models with context windows ranging from 32,000 to 128,000 tokens. The budget management discipline described above applies at every context window size. The numbers change. The principles do not.</p><p>A 128,000 token context window does not eliminate the lost in the middle problem. It expands the middle. A retrieval pipeline that surfaces 50 documents into a large context window faces a more severe version of the positional attention problem than one surfacing 8 documents into a small window. Larger context windows enable more ambitious retrieval strategies but require more deliberate management of document ordering and relevance filtering to ensure the model attends to what matters.</p><p>For the NOAA pipeline, the minimum viable context window is sufficient for the query types this dataset supports. The upgrade path to larger context windows is available when the use case requires it and the hardware supports it. The budget discipline learned at 4,096 tokens transfers directly.</p><h2>Tracking Token Consumption in Production</h2><p>Every inference framework that serves language models exposes token consumption metrics. Ollama, vLLM, and the serving infrastructure covered in Part 17 all report prompt tokens, completion tokens, and total tokens per inference call.</p><p>Logging these metrics from day one is not optional instrumentation. It is the data that tells you when conversation history is accumulating toward context exhaustion, whether your chunk size and retrieval count are consuming the budget as planned, and whether response length is staying within the reserved allocation.</p><p>Claude Code Prompt - Q1 2026:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;da8f0e61-7a25-4fc2-b279-a935f7387414&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Write a Python middleware layer that wraps inference calls to
a locally served language model and tracks token consumption
per call. The middleware should log prompt tokens, completion
tokens, and total tokens for each inference call to a local
SQLite database with a timestamp and session identifier.
Add a budget enforcement function that accepts a maximum
context token limit and raises a warning when prompt tokens
exceed 80 percent of the limit before the completion begins.
Add a conversation history manager that maintains a rolling
window of prior turns and truncates the oldest turns when
the history token count exceeds a configurable maximum.
Include a daily summary function that reports average token
consumption per call, peak consumption, and the number of
calls that triggered the budget warning.</code></pre></div><p>What you are asking Claude Code to build: a token tracking and budget enforcement layer that sits between your application and the inference server, logging consumption, enforcing limits, and managing conversation history automatically. The daily summary is what tells you whether your budget allocations from this article are holding in production or drifting over time.</p><p>What success looks like: every inference call produces a log entry with token counts. The budget warning fires on calls where prompt tokens exceed the threshold. The history manager truncates correctly when the rolling window limit is reached. The daily summary produces numbers that match manual inspection of the log database.</p><p>Next: With the system prompt designed and the token budget understood, the pipeline has everything it needs to add retrieval. The next article covers what RAG actually is, why it is the right first move before fine-tuning, and how the retrieval layer connects the vector store to the model at inference time.</p><p>#InHouseAI #TokenManagement #ContextWindow #LLMInference #DIYLanguageModel #EnterpriseAI #AIInfrastructure</p><div><hr></div><p>[AUDIO OPENING]</p><p>A storm event pipeline running smoothly for three weeks starts producing incomplete responses. Queries that previously returned detailed multi-event analyses now return summaries covering only one or two events. Nothing changed in the model. Nothing changed in the retrieval layer. Nothing changed in the data. What changed was the conversation history. The application was accumulating prior turns in the context window on every call. By week three the system prompt plus conversation history was consuming 3,200 tokens of a 4,096 token context window before a single retrieved document arrived. The retrieval layer was returning five relevant storm event chunks. The model was seeing one. The budget ran out before the evidence did.</p><p>[END AUDIO OPENING]</p>]]></content:encoded></item><item><title><![CDATA[Prompts Are Not an Afterthought (Models Part 11) ]]></title><description><![CDATA[The model is only as useful as the instructions you give it. Most people get this wrong.]]></description><link>https://signalsandsystems.substack.com/p/prompts-are-not-an-afterthought-models</link><guid isPermaLink="false">https://signalsandsystems.substack.com/p/prompts-are-not-an-afterthought-models</guid><dc:creator><![CDATA[Jon Walkenhorst]]></dc:creator><pubDate>Thu, 16 Apr 2026 17:40:46 GMT</pubDate><enclosure url="https://api.substack.com/feed/podcast/194431517/dd7e74877eec3c7c1b17221f19b4ba2e.mp3" length="0" type="audio/mpeg"/><content:encoded><![CDATA[<p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://signalsandsystems.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://signalsandsystems.substack.com/subscribe?"><span>Subscribe now</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qXlg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ee6bfee-9a52-4f40-9c58-83810df3b8e3_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qXlg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ee6bfee-9a52-4f40-9c58-83810df3b8e3_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!qXlg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ee6bfee-9a52-4f40-9c58-83810df3b8e3_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!qXlg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ee6bfee-9a52-4f40-9c58-83810df3b8e3_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!qXlg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ee6bfee-9a52-4f40-9c58-83810df3b8e3_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qXlg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ee6bfee-9a52-4f40-9c58-83810df3b8e3_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9ee6bfee-9a52-4f40-9c58-83810df3b8e3_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!qXlg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ee6bfee-9a52-4f40-9c58-83810df3b8e3_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!qXlg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ee6bfee-9a52-4f40-9c58-83810df3b8e3_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!qXlg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ee6bfee-9a52-4f40-9c58-83810df3b8e3_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!qXlg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ee6bfee-9a52-4f40-9c58-83810df3b8e3_1536x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>TL;DR: A prompt is not a question. It is an instruction set that shapes everything the model produces. System prompts define the model&#8217;s role, constraints, output format, and behavioral boundaries before a user query ever arrives. Prompt design is the layer between the model&#8217;s weights and the results your application produces. Getting it wrong means the best model selection and the most carefully built pipeline produces output nobody can use. This article covers system prompt architecture, prompt structure for a purpose-built pipeline, and the design decisions that determine whether your model behaves consistently at scale.</em></p><h2>What a Prompt Actually Is</h2><p>A prompt is the full text the model receives before it generates a response. It is not just the user&#8217;s question. It is everything the model sees at inference time, assembled in a specific order, that shapes what it produces.</p><p>A well-structured prompt for a purpose-built pipeline has three distinct components. The system prompt defines the model&#8217;s role, behavioral constraints, output format requirements, and how it should handle edge cases. It is written once, lives in your application code, and arrives at the top of every inference call before any user input. The context window contains the retrieved documents from the RAG pipeline, the information the model draws on to answer the query. The user query is what the user actually asked, arriving last, after the model already knows its role and has the relevant context in front of it.</p><p>Most practitioners who struggle with prompt design are treating the user query as the entire prompt. The system prompt and the context window are doing most of the work. The user query is the trigger.</p><h2>System Prompt Architecture</h2><p>A system prompt for a purpose-built language model pipeline is not a single instruction. It is a structured document with specific sections that each do a different job.</p><p>The role definition comes first. It tells the model what it is, what it is for, and who it is serving. For the NOAA pipeline the role definition establishes the model as a storm event analysis assistant operating over a specific dataset with a specific purpose. A model that knows its role precisely produces responses that stay within that role. A model given a vague role definition will fill the ambiguity with behavior drawn from its training distribution, which may or may not match what your application requires.</p><p>The capability boundary comes second. It defines explicitly what the model should and should not do. Should it answer questions outside the NOAA dataset scope? Should it speculate when the retrieved context is incomplete? Should it refuse queries that fall outside its defined purpose? These boundaries prevent the model from producing confident responses to questions it cannot answer well. A model without defined boundaries will answer everything with equal confidence regardless of whether its retrieved context supports the response.</p><p>The output format specification comes third. For most queries a human user submits, the model should respond in clear, well-structured natural language. A response that reads naturally, cites the specific storm events it draws on by location and date, and acknowledges gaps in the retrieved context is the right default. JSON output is appropriate when the pipeline is serving a downstream application that parses responses programmatically, or when a query explicitly requests structured data. The system prompt should specify natural language as the default and define the JSON schema as an available mode rather than a requirement. A model that defaults to JSON for every response is optimized for machine consumption, not human use.</p><p>The example behavior section comes fourth and is the most commonly skipped. Providing two or three examples of correct responses to representative queries in the system prompt is the single highest leverage improvement available for most production pipelines. The model learns the pattern from examples more reliably than it learns it from instructions alone. A system prompt that tells the model what to do and shows it what that looks like produces more consistent output than a system prompt that only tells.</p><p>The edge case handling section comes last. It defines what the model should do when retrieved context is insufficient, when the query falls outside the defined scope, or when the model cannot produce a response that meets the output format specification. Without explicit edge case handling the model defaults to its training distribution behavior, which typically means generating plausible sounding responses to questions it cannot actually answer from the available context.</p><h2>Prompt Structure for the NOAA Pipeline</h2><p>The NOAA storm event pipeline has specific prompt design requirements that follow directly from its architecture.</p><p>The model needs to know it is operating over a specific dataset with a defined scope. Storm events in the United States between 2019 and 2023. Queries outside that scope should be acknowledged as outside scope rather than answered from training knowledge. A user asking about a 2015 tornado should receive a clear response that the dataset covers 2019 through 2023 rather than a response drawn from the model&#8217;s general knowledge about 2015 weather events.</p><p>The model needs output format guidance that matches downstream application requirements. If the pipeline surfaces responses to a structured interface that displays event type, location, date, and narrative separately, the system prompt must specify that format explicitly. If it does not, the model will produce well-written paragraphs that the application cannot parse into those fields.</p><p>The model needs explicit guidance on confidence and sourcing. When a response is drawn directly from retrieved context, it should indicate that. When retrieved context is incomplete or ambiguous, the response should acknowledge the limitation rather than fill the gap with inference. This is the behavior that makes the pipeline trustworthy rather than just functional.</p><p><strong>Claude Code Prompt - Q1 2026:</strong></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;6ac1b0e1-ce5d-4639-b022-855c7c846ed4&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Write a system prompt for a NOAA storm events analysis assistant 
that operates over storm event records from 2019 through 2023. 
The system prompt should include: a role definition establishing 
the assistant's purpose and dataset scope, a capability boundary 
specifying the assistant should only answer questions grounded 
in retrieved context and should acknowledge when queries fall 
outside the dataset scope, an output format specification that 
defaults to natural language responses citing source events by 
location and date, with JSON output available when explicitly 
requested or when the downstream application requires structured 
data. Include two examples of correct natural language responses 
to representative storm event queries. Include explicit 
instructions for handling queries where retrieved context is 
insufficient to answer confidently.</code></pre></div><p>You are asking Claude Code to build a production-pattern system prompt that defines role, boundaries, output format, examples, and edge case handling as a single structured document. The JSON output format with source event IDs is what makes responses auditable. A response that cites specific EVENT_IDs from the NOAA dataset can be verified against the source records. A response that does not can only be evaluated on whether it sounds correct.</p><p>Success Looks like Natural language queries return that are readable, well-structured prose responses that cite source events by location and date. Requests for structured output return consistent JSON. Queries outside the dataset scope return a clear acknowledgment. The confidence behavior varies meaningfully across queries. Both output modes work without changing the system prompt.</p><h2>Token Budget and the System Prompt</h2><p>System prompt length consumes context window space before the retrieved documents and user query arrive. A system prompt that runs to 2,000 tokens on a model with a 4,096 token context window leaves 2,096 tokens for retrieved context and the user query combined. That constraint shapes how much context the RAG pipeline can surface per query.</p><p>This is the first direct connection between prompt design and the token management article that follows. The system prompt is a fixed cost paid on every inference call. Understanding that cost before designing the prompt is what allows you to make deliberate tradeoffs between system prompt richness and retrieval context volume rather than discovering the constraint after the pipeline is built.</p><p>A well-designed system prompt for the NOAA pipeline runs between 400 and 600 tokens. That leaves substantial context window space for retrieved storm event documents while maintaining the role definition, output format, examples, and edge case handling that make responses consistent. Longer is not better. A system prompt that says precisely what the model needs to know in the minimum tokens necessary is the right target.</p><h2>What Prompt Engineering Is and Is Not</h2><p>Prompt engineering is the discipline of designing prompts that produce consistent, useful output from a language model. It is not a workaround for a poorly selected model. It is not a substitute for fine-tuning when the model genuinely lacks domain capability. It is not magic.</p><p>What it is: the application of structured thinking to the instructions you give a model, with the same rigor you would apply to any other interface specification in a production system. A system prompt is a specification. It tells the model what to do, how to do it, and what to do when it cannot. Writing it carelessly and then debugging inconsistent output downstream is the same mistake as writing a vague API specification and then debugging integration failures.</p><p>The model&#8217;s weights determine what it can do. The prompt determines what it does with that capability in your specific application. Both matter. Neither substitutes for the other.</p><p>Next: token budgets, context window management, and why the decisions you make about how to fill the context window determine output quality as much as model selection does.</p><p>#InHouseAI</p><p>#PromptEngineering</p><p>#SystemPrompts</p><p>#LLMDesign</p><p>#DIYLanguageModel</p><p>#EnterpriseAI</p><p>#AIInfrastructure</p><div><hr></div><p>[AUDIO OPENING] </p><p>A NOAA storm event pipeline running Qwen 2.5 on a properly configured inference stack. Six weeks of build time. Clean data, validated embeddings, production-ready retrieval. First query from a real user: &#8220;What were the most destructive tornado events in the Southeast in 2021?&#8221; The model returns a confident, well-structured response citing three events. The actual answer is eleven. The retrieval worked. The embeddings were accurate. The vector store returned the right chunks. The model had everything it needed to answer correctly. The system prompt never told it what to do when retrieved context was partial. So it used what it had and presented it as complete. Six weeks of correct engineering. One missing instruction. Eleven tornadoes became three.</p><p>[END AUDIO OPENING]</p>]]></content:encoded></item><item><title><![CDATA[The Commercial Self-Hosted Option (Models Part 10) ]]></title><description><![CDATA[Open-weight is not the only path to infrastructure you control. Here is what the commercial lane actually looks like.]]></description><link>https://signalsandsystems.substack.com/p/the-commercial-self-hosted-option</link><guid isPermaLink="false">https://signalsandsystems.substack.com/p/the-commercial-self-hosted-option</guid><dc:creator><![CDATA[Jon Walkenhorst]]></dc:creator><pubDate>Wed, 15 Apr 2026 00:24:24 GMT</pubDate><enclosure url="https://api.substack.com/feed/podcast/194246829/f97fbaf095b6d43896b34d5daebf4f3f.mp3" length="0" type="audio/mpeg"/><content:encoded><![CDATA[<p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://signalsandsystems.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://signalsandsystems.substack.com/subscribe?"><span>Subscribe now</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hQgK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0e5bef5-7150-4ebc-8fb3-305481c26d6d_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hQgK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0e5bef5-7150-4ebc-8fb3-305481c26d6d_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!hQgK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0e5bef5-7150-4ebc-8fb3-305481c26d6d_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!hQgK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0e5bef5-7150-4ebc-8fb3-305481c26d6d_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!hQgK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0e5bef5-7150-4ebc-8fb3-305481c26d6d_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hQgK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0e5bef5-7150-4ebc-8fb3-305481c26d6d_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b0e5bef5-7150-4ebc-8fb3-305481c26d6d_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!hQgK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0e5bef5-7150-4ebc-8fb3-305481c26d6d_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!hQgK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0e5bef5-7150-4ebc-8fb3-305481c26d6d_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!hQgK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0e5bef5-7150-4ebc-8fb3-305481c26d6d_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!hQgK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0e5bef5-7150-4ebc-8fb3-305481c26d6d_1536x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>TL;DR: Commercial self-hosted models occupy the space between public API dependencies and the full operational overhead of open-weight model management. You get vendor support, guaranteed update paths, and in some cases compliance certifications that open-weight models cannot provide out of the box. You pay for it in licensing cost and reduced flexibility. This article maps the commercial self-hosted landscape, the tradeoffs that matter operationally, and the conditions under which commercial self-hosted is the right call over open-weight.</em></p><h2><strong>What Commercial Self-Hosted Actually Is</strong></h2><p>Commercial self-hosted is a licensing and deployment arrangement where a model vendor provides weights, tooling, and support under a commercial contract, and those weights run on infrastructure you control rather than on the vendor&#8217;s servers.</p><p>The distinction from a public API is straightforward. With a public API your inference traffic leaves your infrastructure and lands on the vendor&#8217;s servers. With commercial self-hosted the model runs on your hardware or your cloud tenancy. The vendor provides the weights and the support contract. You provide the compute and the operational management.</p><p>The distinction from open-weight is less obvious but equally important. An open-weight model gives you the weights under a license that may or may not permit your use case and comes with no vendor accountability for performance, updates, or security patches. A commercial self-hosted arrangement gives you the weights under a contract that specifies what the vendor will and will not do, for how long, and at what service level.</p><p>For organizations that need the data sovereignty of self-hosted inference and the contractual accountability of a vendor relationship, commercial self-hosted is the only option that provides both simultaneously.</p><h2><strong>What the Landscape Looks Like</strong></h2><p>The commercial self-hosted market has matured significantly since 2023. Several providers now offer enterprise deployment arrangements that cover the full range of organizational requirements from startup to regulated enterprise.</p><p>Cohere offers its Command family of models under enterprise licensing arrangements that include on-premises and private cloud deployment options. Command R and Command R+ are optimized for retrieval augmented generation workloads, which makes them directly relevant to the pipeline this arc builds. Cohere&#8217;s enterprise contracts include data processing agreements, SLA commitments, and dedicated support. For organizations building RAG pipelines in regulated industries, the alignment between the model&#8217;s optimization target and the deployment requirement is worth the licensing cost evaluation.</p><p>Mistral AI offers enterprise licensing for its models beyond the open-weight Apache 2.0 releases. The enterprise tier includes private deployment options, dedicated support, and fine-tuning services. For organizations that want Mistral&#8217;s performance profile with contractual accountability rather than community support, the enterprise path is the same model family with a different relationship structure around it.</p><p>IBM&#8217;s Granite model family is designed explicitly for enterprise deployment with compliance requirements. Granite models are trained on curated datasets with documented provenance, which matters for regulated industries where the training data composition of a deployed model is subject to audit. IBM offers these under enterprise licensing with the full weight of IBM&#8217;s support and compliance infrastructure behind them. For organizations in financial services, healthcare, or government where training data provenance is a compliance requirement rather than a preference, Granite is the only open-weight adjacent option with documented answers to those questions.</p><p>NVIDIA&#8217;s NIM, Neural Interface Microservices, is a deployment platform rather than a model family. NIM packages optimized model weights from multiple providers, including Llama, Mistral, and others, into containerized inference microservices with enterprise support from NVIDIA. For organizations that want open-weight model performance with enterprise deployment tooling and vendor accountability, NIM offers a middle path between raw open-weight deployment and a fully commercial model relationship.</p><h2><strong>The Tradeoffs</strong></h2><p>Four tradeoffs define the commercial self-hosted decision. Each one resolves differently depending on your organizational context.</p><p>Cost is the most visible tradeoff. Commercial self-hosted licensing adds cost that open-weight deployment does not carry. That cost buys vendor accountability, support, and in some cases compliance certifications. Whether the cost is justified depends on what the alternative actually costs when you factor in the engineering time required to manage open-weight deployments without vendor support, the risk exposure of operating without a documented vulnerability management process, and the compliance cost of building certifications from scratch rather than inheriting them from a vendor relationship. For a small technical team deploying internally, open-weight is almost always cheaper in total cost. For an enterprise deployment in a regulated industry, the calculus frequently reverses.</p><p>Flexibility is the second tradeoff. Open-weight models can be fine-tuned, modified, and extended within the terms of their license using any tooling the team chooses. Commercial self-hosted arrangements typically restrict what you can do with the weights and how. Fine-tuning may be permitted, prohibited, or available only as a vendor-managed service. If your use case requires aggressive domain adaptation through fine-tuning, verify that the commercial license permits it before signing a contract.</p><p>Update cadence is the third tradeoff and the one most commonly overlooked during vendor evaluation. An open-weight model community releases updates when the research warrants it. A commercial vendor releases updates on a schedule governed by their development cycle and support commitments. For some organizations a predictable, tested update cadence with advance notice is worth more than the latest model weights available immediately. For others the ability to adopt new open-weight releases as they appear is the priority. Neither preference is wrong. The mismatch between organizational update tolerance and vendor update cadence is a common source of commercial self-hosted dissatisfaction.</p><p>Compliance certification is the fourth tradeoff and the one that most clearly defines when commercial self-hosted is the right call. SOC 2, HIPAA, FedRAMP, and similar compliance frameworks require documented evidence of security controls, vulnerability management, and operational procedures. An open-weight deployment requires you to produce that evidence yourself. A commercial self-hosted arrangement from a vendor with existing certifications transfers a significant portion of that documentation burden to the vendor relationship. For organizations facing compliance audits on a defined timeline, the documentation inheritance from a certified commercial vendor is frequently the deciding factor.</p><h2><strong>When Commercial Self-Hosted Is the Right Call</strong></h2><p>Three conditions indicate commercial self-hosted over open-weight for a given deployment.</p><p>First, when contractual accountability is a requirement rather than a preference. If your organization needs a signed agreement specifying what the model vendor will do when something goes wrong, open-weight does not provide that. Community forums and GitHub issues are not a support contract.</p><p>Second, when compliance certification inheritance reduces audit burden materially. If you are building toward a SOC 2 audit or operating under HIPAA and the vendor&#8217;s existing certifications cover your deployment architecture, the documentation you inherit is worth evaluating against the licensing cost directly.</p><p>Third, when internal operational capacity for open-weight model management is genuinely constrained. Managing open-weight model updates, monitoring for security vulnerabilities in model weights and serving infrastructure, and maintaining deployment tooling without vendor support requires engineering capacity that not every organization has. Commercial self-hosted transfers that operational burden to the vendor relationship.</p><p>If none of those three conditions apply to your deployment context, open-weight is the right path. The capability gap between commercial self-hosted and open-weight models at equivalent parameter counts is not large enough in 2026 to justify the cost and flexibility tradeoffs on capability grounds alone.</p><h2><strong>What This Arc Uses and Why</strong></h2><p>The build articles in this arc use open-weight models. The NOAA pipeline does not operate in a regulated industry context, does not require compliance certification inheritance, and the reader following this arc is building toward operational understanding rather than enterprise production deployment on day one.</p><p>The commercial self-hosted landscape matters for this arc because the reader building this pipeline today may be deploying it in a regulated context tomorrow. Understanding when to switch lanes is part of building the judgment that makes a self-hosted deployment durable rather than just functional.</p><p>Next: before the build articles begin, two conceptual foundations remain. How you instruct the model shapes its output as much as the model itself. Prompt design and system prompt architecture are not afterthoughts. They are the layer between the model&#8217;s weights and the results your application produces.</p><p>#InHouseAI</p><p>#CommercialLLM</p><p>#SelfHosted</p><p>#EnterpriseAI</p><p>#LLMStrategy</p><p>#AICompliance</p><p>#DIYLanguageModel</p><div><hr></div><p>[AUDIO OPENING] A compliance officer at a regional bank approves an internal language model deployment on one condition. The model vendor must provide a signed Business Associate Agreement covering the inference infrastructure. The data cannot leave the building. The model must have a documented update and vulnerability management process. And someone with a phone number must be accountable when something goes wrong at two in the morning. The team evaluating open-weight models has no answer for any of those requirements. Not because open-weight models cannot meet them technically. Because nobody is contractually obligated to help them meet them. Three weeks later the team is in a commercial self-hosted evaluation. The open-weight path was not wrong. It was incomplete for that specific deployment context. [END AUDIO OPENING]</p>]]></content:encoded></item></channel></rss>