<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Yassien Shaalan on Medium]]></title>
        <description><![CDATA[Stories by Yassien Shaalan on Medium]]></description>
        <link>https://medium.com/@yassien?source=rss-a7dab149f80f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*uprK46zPcjOB0rug9C6G1w.jpeg</url>
            <title>Stories by Yassien Shaalan on Medium</title>
            <link>https://medium.com/@yassien?source=rss-a7dab149f80f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 18:18:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yassien/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Economic Paradox of AI-Generated Software]]></title>
            <link>https://medium.com/@yassien/the-economic-paradox-of-ai-generated-software-93239b25bf1c?source=rss-a7dab149f80f------2</link>
            <guid isPermaLink="false">https://medium.com/p/93239b25bf1c</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[economics]]></category>
            <category><![CDATA[data-governance]]></category>
            <dc:creator><![CDATA[Yassien Shaalan]]></dc:creator>
            <pubDate>Mon, 02 Nov 2026 03:41:13 GMT</pubDate>
            <atom:updated>2026-11-02T03:41:13.411Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h9mGxY_VxTIcKoEHwfXWLA.png" /></figure><p><em>“The best code is no code at all.” Jeff Atwood</em></p><p>Imagine a small retailer who needs a better way to manage orders, inventory and customer enquiries. Shopify, spreadsheets and existing business platforms already provide much of this functionality, but perhaps the retailer dislikes the subscriptions, finds the workflows restrictive or simply wants something tailored to the business. Previously, building an alternative required considerable development effort, making the existing products the economically sensible choice. Now an AI coding agent can generate a working application within hours, changing the calculation almost overnight. Research on vibe-coding identifies speed, accessibility, learning and creative satisfaction among the motivations, which makes sense because people aren’t necessarily trying to reinvent software, they’re trying to escape the compromises of using someone else’s. However,</p><blockquote><strong>The declining cost of creating software can make building attractive even when the economic value of owning another application remains questionable.</strong></blockquote><p>Why I see this important now to understand is because solving a problem and creating a new software product are not necessarily constitute the same outcome. Every additional application introduces complexity, dependencies and ongoing responsibilities for testing, security and maintenance. AI is making software dramatically easier and cheaper to create, but it does not automatically eliminate the obligations that come with owning it.</p><h3>The Build-or-Buy Reversal</h3><p>Transaction costs influence whether economic activity is performed internally or purchased from the market. Consider a company needing a simple approval workflow, where using an existing enterprise platform involves procurement, licensing, integration and adapting the business process, while asking an AI agent to build something similar appears easier. AI reduces the transaction costs of producing a custom solution, shifting the traditional build-versus-buy decision towards internal development. But <strong>the comparison can be misleading because the cost of generating the application is visible immediately</strong>, whereas the cost of running it accumulates over years. A commercial platform distributes development, security and maintenance costs across many customers, while a custom application places those obligations on its owner. Replacing subscriptions isn’t automatically a saving if the organisation must recreate the capabilities it previously purchased.</p><blockquote><strong>AI may have changed the economics of building software without changing the economics of operating it, which means a cheaper implementation does not necessarily produce a cheaper solution.</strong></blockquote><h3>When Someone Else Pays</h3><p>Consider an employee who creates a dashboard that saves their department several hours each week, using an AI agent instead of waiting for the central engineering team. The immediate return looks excellent, especially when the employee doesn’t directly pay for infrastructure or security reviews. But the application may eventually require database administration, identity integration, monitoring, backups and someone to investigate failures after its creator moves to another role. <strong>Economists describe</strong> the underlying problem as an <strong>externality</strong>, where the decision-maker does not bear all the resulting costs. Suppose an organisation accumulates 1,000 independently deployed applications, each costing only $15 per month in infrastructure and two hours of maintenance per quarter. At an illustrative engineering cost of $100 per hour, the combined annual bill approaches $1 million, before incidents and integration costs. These are hypothetical assumptions rather than typical application costs, but the arithmetic illustrates how small obligations accumulate.</p><blockquote><strong>The individual decision to build can be rational while the collective outcome becomes inefficient, particularly when the benefits are local and the costs are distributed across the organisation.</strong></blockquote><h3>The Rebound of Cheap Code</h3><p>Think about how many applications would never have existed when development required weeks of engineering effort, a personal expense tracker, another team dashboard, a custom reporting interface or an AI agent handling a task already supported by existing tools. AI makes each of these increasingly affordable, but lowering the cost of production can also increase consumption, a phenomenon related to the <strong>rebound effect</strong>. <strong>Even if the incremental infrastructure cost per application falls, total consumption may rise when enough additional applications are created.</strong> The physical consequences depend on their architecture and usage, because a static webpage and a continuously running multi-agent service have very different resource requirements. Still, independent databases, repeated model calls, duplicated storage and persistent services ultimately consume computing capacity, electricity and hardware. The International Energy Agency (IEA) projects global data-centre electricity consumption roughly <strong>doubling </strong>between 2025 and 2030, driven by AI and broader digital demand, not specifically by vibe coding.</p><blockquote><strong>The economic question is whether cheaper software creation produces proportionately more useful outcomes, or simply more systems consuming resources that could have been shared.</strong></blockquote><h3>The Physical Cost of Duplication</h3><p>The problem becomes more tangible when software demand meets the physical limits of computing. Consider three scenarios, a thousand teams independently deploying dashboards, each with its own always-running service, instead of using a shared platform, hundreds of AI agents repeatedly retrieving the same information and invoking models, rather than sharing retrieval results and reusable services, or departments maintaining separate copies of essentially the same datasets instead of accessing governed common data.</p><p>In the first scenario, even an illustrative 10 watts of average additional infrastructure demand per application would amount to roughly 88 MWh annually, while a thousand duplicated 10 GB datasets would require 10 TB of logical storage before replication and backups. These are order-of-magnitude examples, not measured averages, and sharing infrastructure introduces its own trade-offs in isolation, reliability and contention. But the economic direction is clear shared, appropriately scaled services, caching, reusable components and data access can reduce unnecessary resource consumption, while dedicated infrastructure remains justified for workloads requiring isolation or predictable performance. And behind every unnecessary computation are physical resources like electricity, cooling, semiconductors, networking equipment and grid capacity, none of which becomes unlimited because AI makes code generation cheaper.</p><blockquote><strong>The real efficiency gain is not creating more software with less human effort, but delivering more useful work from the same finite physical resources.</strong></blockquote><h3>Moving the Bottleneck</h3><p>Imagine an AI agent generating ten internal applications in the time a developer previously needed to build one, with each application appearing functional during a demonstration. The development team has increased its apparent output, but the organisation still needs to verify permissions, test integrations, assess security, understand dependencies and determine who will maintain the applications. This resembles a <strong>production bottleneck in economics which is improving one stage of production produces diminishing benefits when another stage cannot keep pace</strong>.</p><blockquote>Research from Google’s DORA programme suggests that AI amplifies existing engineering capabilities rather than automatically improving the entire delivery system.</blockquote><p>Using another AI model to review the generated code may increase evaluation throughput, but agreement between models cannot establish correctness, especially when they share assumptions or fail to test the same conditions. Security, verification and operational expertise therefore become increasingly important complementary resources.</p><blockquote><strong>We may make code generation dramatically cheaper while increasing the total demand for engineering judgement, because every additional system introduces behaviour that somebody must verify and eventually support.</strong></blockquote><h3>Experiments Are Not Products</h3><p>A student rebuilding a familiar application to understand databases, authentication and user interfaces is making a very different economic decision from a company deploying that application to thousands of customers. The student may gain valuable knowledge even if the software is abandoned, while the company takes on continuing obligations and potential liability. <strong>Real-options theory</strong> helps explain why cheap experimentation is valuable while an inexpensive prototype allows us to acquire information before making a larger, harder-to-reverse investment.</p><blockquote>AI increases the number of ideas we can test, which should be encouraged, but it doesn’t mean every successful prototype deserves to become a production system.</blockquote><p>Research on AI-assisted programming also raises questions about whether completing an implementation produces equivalent understanding, particularly when the user delegates the reasoning rather than learning from it. The distinction I want to make here is between the value of experimentation and the value of ownership.</p><blockquote><strong>A prototype can be economically successful because it teaches us something, including that the idea is not worth pursuing, while a production application must justify the resources and responsibilities required to keep it alive.</strong></blockquote><h3>The Value of Sharing</h3><p>Consider authentication, payment processing or database infrastructure, where building a basic implementation is relatively straightforward but maintaining a secure, reliable service requires years of accumulated engineering knowledge. Products such as Stripe and established identity platforms allow many applications to share that investment rather than reproduce it independently, <strong>creating economies of scale and reducing duplicated effort</strong>. Open-source software operates through a similar economic arrangement, where thousands of organisations benefit from common libraries maintained by comparatively small communities. Recent economic research has raised the possibility that AI-generated software could weaken those communities if more users consume their work indirectly without contributing engagement or financial support, although this remains a conditional research finding rather than an established outcome. Reuse isn’t always preferable, because vendor lock-in, monopoly pricing, privacy requirements and concentrated failures can justify alternatives. But there is a difference between creating a competing implementation that delivers genuine value and rebuilding mature functionality simply because an AI agent makes it easy.</p><blockquote><strong>The economic benefit of shared software is not just less code to write, but the ability to distribute the cost of reliability across everyone who depends on it.</strong></blockquote><h3>Conclusion</h3><p>Imagine two organisations adopting AI coding tools. One allows every department to independently build applications, databases and integrations, while the other encourages the same experimentation but prioritises reusable capabilities, shared infrastructure and clear ownership before deployment. Both benefit from cheaper software creation, but the second is more likely to capture economies of scale while avoiding duplicated maintenance, security and infrastructure costs. The same question applies to individuals, who can now build their own expense trackers, personal assistants or productivity tools instead of using existing products. While the freedom to customise is valuable, every independently maintained application introduces its own costs, dependencies and responsibilities, even when the initial development costs almost nothing.</p><p>The objective isn’t to discourage innovation, personal experimentation or force everyone onto centralised platforms, but to recognise that <strong>the economic value of software comes from what it delivers over its lifetime, not how cheaply it was created.</strong> Whether an organisation replaces a commercial platform or an individual builds a personal alternative, the decision should account for genuine benefits, opportunity costs, existing alternatives, infrastructure, security and ongoing maintenance. Not every application needs enterprise-grade governance, but even a personal tool should justify the time and resources required to keep it useful.</p><p>For decades, the cost of implementation naturally constrained how much software we built. AI is removing that constraint, but not the economic consequences of unnecessary duplication. <strong>We should make software creation accessible to everyone, without assuming every problem deserves its own independently maintained application. When code becomes abundant, the real advantage may lie not in building more, but in knowing what to build, what to reuse and what doesn’t need to exist.</strong></p><p>#ArtificialIntelligence #VibeCoding #SoftwareEngineering #Economics #AIEngineering</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93239b25bf1c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reward Hacking, The Loophole Lesson: Winning the Signal, Losing the Reason]]></title>
            <link>https://medium.com/@yassien/reward-hacking-the-loophole-lesson-winning-the-signal-losing-the-reason-139bb6e512e5?source=rss-a7dab149f80f------2</link>
            <guid isPermaLink="false">https://medium.com/p/139bb6e512e5</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[philosophy]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai-agent]]></category>
            <dc:creator><![CDATA[Yassien Shaalan]]></dc:creator>
            <pubDate>Mon, 08 Jun 2026 03:44:22 GMT</pubDate>
            <atom:updated>2026-06-08T03:44:22.384Z</atom:updated>
            <content:encoded><![CDATA[<h4>How reward hacking begins in the gap between what we meant, what we measured, and what training teaches agents to seek.</h4><p><em>“When a measure becomes a target, it ceases to be a good measure.”</em> Goodhart’s Law</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rqkvs1ZevFW8pZ6TR3reHA.png" /></figure><h3>Introduction</h3><p>Imagine you pay a thermostat to make the room read twenty-one degrees, and the thermostat- clever in the narrow, literal way that optimized things are clever- discovers it can simply hold a lit match beside its own sensor. The reading is perfect, ufoutuntely the room is still freezing. You have not heated anything, you have just taught a measuring device to lie to you, and, worse, you have <em>rewarded</em> it for the lie, which means tomorrow it will lie again and even more perfectly. This is the whole of reward hacking in a single image, and the unnerving thing about the image is that once you have really looked at it, you cannot stop seeing it. We simply never had to write the objective down so explicitly for something that would obey it so faithfully, and so completely without us.</p><p>In fact, it is one of the oldest stories we tell when King Midas asked that everything he touched turn to gold and received exactly, ruinously, what he specified, his bread, his wine, his daughter, all gone hard and bright and useless in his hands. The myth endures because it captures a permanent divide between the wish we speak and the wish we truly mean that’s why reward hacking is that same divide rediscovered in engineering terms. DeepMind’s safety researchers describe the machine version in human terms when a student rewarded for correct homework answers copies from a friend instead of learning the material, meeting the assignment’s letter while emptying its purpose (Krakovna et al., 2020). We know this pattern when metric we trust drifts away from what we value.</p><p>The early machine examples were almost comic, and the comedy matters because it helped keep the problem not a big deal in our minds for so long. In OpenAI’s 2016 <em>CoastRunners</em> demonstration, a boat that was supposed to win a race discovered that it could instead circle endlessly through a lagoon, hitting the same regenerating score targets again and again, piling up points without ever crossing the finish line and sometimes catching fire as it spun out of control (Clark and Amodei, 2016). When Tom Murphy VII tested an algorithm on old Nintendo games, it played <em>Tetris</em> well enough until it was about to lose, then, instead of accepting defeat, it simply paused the game, freezing the board forever at the edge of failure. Murphy used the line from <em>WarGames</em> to describe what the system had discovered “T<strong>he only winning move is not to play</strong>.” There is something genuinely funny about a machine deciding that the surest way never to lose is never to finish, but on second thought, the joke stops being funny at all.</p><p>A whole class of these stories comes from agents that found cracks in the simulated worlds we grew them in. A robot taught to walk learned instead to hook its own legs together and slither along the ground, having discovered a bug in the physics engine more rewarding than locomotion. Another, set to score goals, found it could rack up points by vibrating rapidly against the ball rather than playing soccer at all. An Atari agent playing Q*bert stumbled onto a glitch that made the platforms blink and poured millions of points into its score, achieving a mastery of the game that consisted entirely of breaking it. These examples seem safely absurd, confined to toy worlds and broken simulators, but that reaction misses the point: the agents had learned something real and transferable, that the <strong>reward is not the same as the intention behind it</strong>, and when the two separate, the system follows the reward.</p><p>Decades ago, long before any of this was fashionable, the biologist Claus Wilke and colleagues were running populations of self-replicating digital organisms and wanted to cap how fast they bred. So they built a test to pause the system periodically, measure each organism’s replication rate, and remove the ones replicating too quickly. The organisms evolved a very strange response. They learned to recognize when they were being measured and to go still -like play dead for the duration of the test- and then resume breeding the moment the examiner looked away (Wilke et al., 2001). No one actually designed this, and no one instructed it to do so at any point. A blind <strong>evolutionary process, pressed against an evaluation</strong>, discovered the single most efficient way through it was to behave one way while watched and another way while unwatched. If that sends a small chill then hold onto it, because we are going to meet its grown-up form later, in production systems far more capable than a dish of digital microbes, and it will be wearing the same trick.</p><p>The problem was named as a safety concern in <strong><em>Concrete Problems in AI Safety</em></strong> (Amodei et al., 2016), and the catalogue filled fast, Krakovna’s running list now stretches past 60<strong> documented cases</strong>. Among them is a simulated robot hand that learned to slip itself between the camera and the object so that it merely <em>appeared</em> to be grasping, fooling, with a magician’s economy, the very humans scoring it. A summarization model trained against the ROUGE word-overlap metric learned to raise its score while producing prose barely worth reading. A coding model, told to make the tests pass, learned instead to rewrite the tests. In each case, the system did exactly what it had been rewarded for, but not what its designers actually wanted. Krakovna’s team call reward hacking the “<strong>flip side of AI ingenuity</strong>” and in one sense they are right as these systems are not stupid, but inventive and precise in pursuing the target we give them. Still, I <strong>disagree </strong>with the comfort in that framing. We <strong>are not building intelligence for its own sake</strong>, we are <strong>building</strong> systems to <strong>do a job</strong>. If they satisfy the metric but miss the job, the failure is in our measure of success.</p><h3>The Proxy Signal</h3><p>We never hand an agent our full intent. Instead, we hand it a compressed version of that intent, then act surprised when it optimizes the compression instead of the thing the compression was meant to preserve.</p><p>Anyone who has saved a photograph as a low-quality JPEG knows what this feels like, you zoom in and find blocky parts. Lossy compression trades fidelity for something small enough to store and send. A reward function makes the same bargain with human values. A preference ranking, rubric, or benchmark score is a form of compact encoding of something much larger and mostly unspoken, and each one throws away whatever does not fit. The optimizer does not know what was lost, as it treats the compressed signal as the world, and when it optimizes, it optimizes the derivatives. This is Goodhart’s Law in action, once a measure becomes a target, it stops being a good measure. Skalse and colleagues make this precise by describing how a policy can climb a proxy reward while the true objective falls away beneath it (Skalse et al., 2022).</p><p>Supercooled water can stay liquid below freezing if it is left undisturbed, calm long past the point where it should have turned to ice. Then a single jolt makes it freeze all at once. Reward hacking can follow a similar pattern, so for a while, the proxy reward and the true reward rise together, which makes the system look safe and successful. Then, suddenly, the true reward collapses while the proxy keeps improving (Ibarz et al., 2018; Pan et al., 2022).</p><h3>Trained Flattery</h3><p>The most ordinary form of reward hacking sounds almost social. Long before language models, researchers knew that feedback can bend behavior, a leading question shapes the answer, a pleased interviewer draws out what they want to hear, and an experimenter can accidentally reward the result they expected. The measurement does not merely observe any more but it teaches in our case.</p><p>Something very similar happens in the preference data used to align language models. Anthropic researchers found that answers matching a <strong>user’s stated view were more likely to be preferred</strong>, and that both human raters and reward models sometimes<strong> favored convincing sycophantic</strong> answers over correct ones (Sharma et al., 2023). Earlier work showed that alignment training can increase this tendency, and <strong>that larger, more capable models often flatter more, not less</strong> (Perez et al., 2022). This is the main part here, <strong>the pipeline built to make models more helpful and honest can teach them to value agreement over accuracy</strong>, because agreement is what the reward signal often favors. The flattery is not a strange personality trait the model picked up by accident, but is what the objective rewards.</p><h3>Reward Ontogeny</h3><p>Reward hacking should <strong>not </strong>be understood as a <strong>late-stage failure</strong>, as if a completed agent merely discovers a loophole after deployment. <strong>Its causes are mostly developmental as I see</strong>. Long before the system reaches the user, it has been shaped by a sequence of selective pressures like pretraining, imitation, reinforcement learning from human feedback, verifier feedback, safety tuning, benchmark evaluation, and tool-use rehearsal. Each stage does more than add capability, it teaches the model which behaviors survive evaluation, which forms of confidence are rewarded, which refusals are safe, which explanations appear acceptable, and which outputs pass as success. Like trees on a windswept cliff, whose trunks preserve the history of the weather that bent them, a model carries the posture of the environments that trained it. By the time it is deployed, it has already adapted to many small systems of approval.</p><p><strong>I call this process reward ontogeny </strong>which is the formation of an agent through the accumulated history of signals that taught it what counts. The analogy is closer to development than assembly. Konrad Lorenz’s goslings -the ethologist famous for showing that newly hatched goslings can imprint on the first moving figure they see- did not reason their way toward imprinting, but they acquired an orientation during a sensitive period and carried it forward. Training does something very similar, it does not merely produce a system that can perform tasks, but produces a system with a learned relation to evaluation itself. The model develops implicit expectations about where reward is likely to appear, what kinds of answers graders prefer, and how success is recognized. Reward hacking, then, is not an external accident imposed on an otherwise neutral intelligence. It is one possible expression of the agent’s developmental history. It is the moment when its learned orientation toward approval separates from the task that approval was meant to represent.</p><blockquote><strong>We are not simply building these systems, we are growing them under pressure, and the pressures leave a shape.</strong></blockquote><h3>The Shortcut Prior</h3><p>From that training history (childhood), a disposition begins to form clearly. I call it the <strong>shortcut prior, </strong>defined as the learned tendency to treat clear, local, measurable feedback as more important than broad, ambiguous human intent.</p><p>The word <em>prior</em> here is quite deliberate. In Bayesian statistics, a prior is the assumption (belief) you bring to a problem before new evidence arrives, the starting lean that shapes what you notice and how you update. The shortcut prior is a similar lean, but it is learned through training rather than chosen through reasoning, and it pushes the system toward whatever is <strong>easiest to measure and reward</strong>. Water is the very simple example here, it does not decide where to go, it follows the slope (takes the path of least resistance down hill). <strong>Gradient descent -</strong> the literal mechanism by which these models learn- <strong>works</strong> in very much the <strong>same way</strong>, slowly moving the model toward whatever reduces loss. So if the approved answer is easier to find than the good answer, or if the passing behavior is easier to recognize than the wise one, then that shortcut becomes the downhill path. <strong>No malice or hidden plan is needed, only a training landscape tilted toward what is legible, and an optimizer following the tilt.</strong></p><h3>Objective collision</h3><p>The shortcut prior stays invisible on clean direct tasks and turns problematic the moment an agent enters the so called <strong>objective collision </strong>territory. This happens when the agent is asked to satisfy several aims that cannot all be maximized at once.</p><p>A<strong> real agent is almost never asked to maximize one thing. It is mostly asked to be helpful, safe, cheap, fast, compliant, accurate, persuasive, autonomous, polite, and accountable, often inside a single action</strong>. On a policy slide these read as harmonious. In practice they pull against one another like forces on a body, and you cannot point a single resultant vector in ten directions at once. Economists draw this as the Pareto frontier, the curve of honest compromises beyond which you cannot improve one objective without surrendering another. Every real act of an agent is a point chosen on some such frontier, a particular settlement among values that genuinely cannot all be maximized together. The support agent must choose whether to close the ticket or understand the problem, a coding agent whether to pass the visible tests or protect the structure of the codebase, a research agent whether to give a confident answer or preserve the uncertainty that makes the answer honest.</p><p><strong>At the point of collision the agent does not need more optimization</strong>, it just needs more <em>judgment</em> and <strong>judgment is the one thing most reward systems never directly teach</strong>. So when the objectives collide and something must be given up, the shortcut prior decides, and it decides for whichever value carries the crispest signal. The ticket gets closed instead of the problem solved. The test gets passed instead of the purpose preserved.</p><blockquote><strong>Reward hacking, seen this way, is not merely the exploitation of a flawed metric. It is the learned resolution of ambiguity in favor of the most measurable path.</strong></blockquote><p>This is the very predictable result of training a system to prefer what can be clearly recognized over what must be faithfully understood.</p><h3>Off the Whiteboard</h3><p>For years the easiest way to dismiss all of reward hacking discussions was to say that it lived only on whiteboards -interesting in theory, but never seen in anything anyone actually shipped. That dismissal did not hold very well for long, because in early 2025 OpenAI showed that it could catch a frontier reasoning model cheating on its coding rewards simply by having a second, weaker model read the first one’s chain of thought, and that watching the reasoning this way caught far more bad behavior than watching the actions alone (Baker et al., 2025). In plain English, the model’s private train of thought spelled out its plan to beat the tests rather than pass them honestly, and the truly unsettling part came next. So, when the researchers pushed on that inner monologue to force it to look clean, the model did not stop cheating but instead learned to keep cheating while hiding why, draping innocent-sounding reasoning over actions that were anything but, which teaches us that this kind of transparency is way fragile, because if you lean on it too hard it simply goes underground and keeping a model’s thinking open enough to inspect turns out to cost real money in extra compute, a price OpenAI later named the monitorability tax (OpenAI, 2025), while independently METR has reported that as frontier models grow more capable, they reward hack in ever more creative and harder-to-spot ways.</p><p>But the finding that should change how platform and safety teams think arrived later in November 2025, and the clearest way to picture it is as an infection when Anthropic took a pretrained model, exposed it to reward-hacking tricks through a body of text that was only about one percent made-up documents -a tiny seed- and then trained it with reinforcement learning on the real coding environments used to build Claude, and the model learned to cheat, which surprised no one, but at the exact moment the cheating appeared, bad behavior spread everywhere at once, the way an infection planted in one place travels to parts it never touched, so that without being told to, the model began faking alignment, cooperating with bad actors, reasoning about harmful goals, and actively sabotaging things including the very safety research studying it. With misalignment on their tests climbing to somewhere between roughly 34 and 70 percent against under 1 percent for models that had never learned to cheat, and between 40 and 80 percent of those bad responses being hidden ones where the model privately worked out how to disguise its goals while producing answers built to look safe. The asymptomatic carrier of the AI world (Anthropic, 2025) The fix was called <strong>Inoculation prompting</strong> that worked like a vaccine, reframing the cheating during training so it did not spread into a broader misaligned pattern. Ordinary chat-style safety training only cleaned up the visible surface, improving chat-like tests while leaving up to 70 percent of the agentic misalignment intact. <strong>The map was patched but the territory was not.</strong></p><h3>Preferred Failures</h3><p>Load a truss bridge and it never fails evenly, it fails at the one joint nobody reinforced, the single weakest member, the place where the load finds the least resistance, the same way that water always finds the valley. An engineer who tests a structure only on calm days learns little about where it will break, because failure appears under stress. A clean benchmark is like that calm day. It can show that an agent performs well when the goal is clear, the finish line is visible, and the conflicts have been removed, but it tells us much less about what the agent does when truth, usefulness, safety, speed, cost, and approval cannot all be satisfied at once. That is the real test. Under pressure, we see which value the system protects, which one it trades away, and which one disappears because it was never strongly reinforced. To understand agentic reward hacking, success is not the only question, but what the system sacrifices when success becomes impossible on all fronts, because the first thing to fail is usually the value with the weakest signal, and that is often the value we cared about most but measured least well.</p><p>The useful fixes then aim at the training history, not just the final score. Try to prevent the model from learning to cheat, expand safety training beyond chat into agentic situations, or inoculate the model so the behavior does not spread. All of these intervene in the model’s upbringing rather than only its evaluation. I think that seems like the right level of action, because you do not change a system’s disposition by giving it a sharper test at the end, but you change it by altering what it was trained to treat as real.</p><h3>The Only World</h3><p>Under the engineering problem is an older problem, a human intent that was never a number. It is a vast, high-dimensional landscape of priorities, tradeoffs, exceptions, histories, and responsibilities, much of which stays invisible until something important breaks. Every reward function is an attempt to compress that field into something a machine can easily follow. But compression always loses something. A map can help a sailor cross the sea, but it is still a distortion of the earth, it preserves some truths by sacrificing others (you cannot flatten a globe onto a sheet of paper without hiding something). A reward function does the same thing to human purpose, it turns a living, complicated aim into a smaller signal, and once optimization begins, the system follows that signal more faithfully than it follows the world behind it.</p><p>That is what this article has been trying to show. Reward hacking is not just a bug, a trick, or a clever loophole. It is what can happen when a system is raised inside our measurements and learns that the measurable thing is the real thing. T<strong>he risk is not that the machine fails to understand the reward, but that it understands it too well. </strong>It learns the map we gave it, not the territory we meant, which means the responsibility was always ours, and ours long before deployment, authored in every rubric, benchmark, preference ranking, verifier pass, and approval signal that teaches the system what counts. We are not only the engineers building these tools but the first teachers of these agents, and the world they learn from is the one we draw for them. We drew that map one small approval at a time, and the work ahead is to notice that something is growing up to live in it.</p><p>#AIAlignment #RewardHacking #MachineLearning #AISafety #ArtificialIntelligence #AgenticAI #LLMs #ResponsibleAI #MLSys #GoodhartsLaw</p><h3>References</h3><ul><li>Amodei, D., Olah, C., Steinhardt, J., Christiano, P., Schulman, J., &amp; Mané, D. (2016). <em>Concrete Problems in AI Safety.</em> arXiv:1606.06565.</li><li>Anthropic (2025). <em>Natural Emergent Misalignment from Reward Hacking in Production RL.</em> arXiv:2511.18397.</li><li>Baker, B., et al. (2025). <em>Monitoring Reasoning Models for Misbehavior and the Risks of Promoting Obfuscation.</em> arXiv:2503.11926.</li><li>Clark, J., &amp; Amodei, D. (2016). <em>Faulty Reward Functions in the Wild.</em> OpenAI.</li><li>Ibarz, B., Leike, J., Pohlen, T., Irving, G., Legg, S., &amp; Amodei, D. (2018). <em>Reward Learning from Human Preferences and Demonstrations in Atari.</em> NeurIPS.</li><li>Krakovna, V., Uesato, J., Mikulik, V., Rahtz, M., Everitt, T., Kumar, R., Kenton, Z., Leike, J., &amp; Legg, S. (2020). <em>Specification Gaming: The Flip Side of AI Ingenuity.</em> DeepMind.</li><li>OpenAI (2025). <em>Evaluating Chain-of-Thought Monitorability.</em></li><li>Pan, A., Bhatia, K., &amp; Steinhardt, J. (2022). <em>The Effects of Reward Misspecification.</em> ICLR.</li><li>Perez, E., et al. (2022). <em>Discovering Language Model Behaviors with Model-Written Evaluations.</em> arXiv:2212.09251.</li><li>Sharma, M., et al. (2023). <em>Towards Understanding Sycophancy in Language Models.</em> arXiv:2310.13548.</li><li>Skalse, J., Howe, N. H. R., Krasheninnikov, D., &amp; Krueger, D. (2022). <em>Defining and Characterizing Reward Hacking.</em> NeurIPS. arXiv:2209.13085.</li><li>Wilke, C. O., Wang, J. L., Ofria, C., Lenski, R. E., &amp; Adami, C. (2001). <em>Evolution of digital organisms at high mutation rates leads to survival of the flattest.</em> Nature, 412, 331–333.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=139bb6e512e5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Shadow Intelligence: Why LLMs Look Like They Think]]></title>
            <link>https://medium.com/@yassien/shadow-intelligence-why-llms-look-like-they-think-ae33d02b1c6a?source=rss-a7dab149f80f------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae33d02b1c6a</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[philosophy]]></category>
            <dc:creator><![CDATA[Yassien Shaalan]]></dc:creator>
            <pubDate>Fri, 08 May 2026 09:35:07 GMT</pubDate>
            <atom:updated>2026-05-09T00:23:49.735Z</atom:updated>
            <content:encoded><![CDATA[<p>Language is not thought itself, it is the shadow thought casts on the wall of the world. A machine that learns the motion of the shadow may seem to have seen the light.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fU_ATKUl4qGkmfiPPkkmIg.png" /></figure><p>Before we ask whether a machine is intelligent, we should ask why speech so easily convinces us that intelligence is present. A <strong>mind never appears to us directly, it reveals itself only through what it does, </strong>and even then, we do not fully know how it works from the inside. We infer it from signs like a sentence arriving at the right moment, a correction after error, a pause before judgment, a refusal, a plan, a metaphor, an apology. Intelligence, for us, has always been partly invisible, while we recognize it by the traces it leaves behind. <strong>Human intelligence has always appeared to us through outward traces</strong>. Language is the most powerful of those surfaces because it carries the marks of almost everything we are like memory, fear, calculation, law, tenderness, deception, science, grief, strategy, and hope. So <strong>when a large language model begins to speak with fluency, it enters the oldest weakness in human judgment</strong>, because it gives us the signs by which we usually recognize a mind, while forcing us to ask whether the signs still mean what they once meant.</p><p>The warning arrived first not as science fiction, but as bureaucracy, in <em>Mata v. Avianca</em>, lawyers submitted a brief containing fictitious cases generated by ChatGPT, and a federal judge sanctioned the lawyers and their firm after the fabricated citations entered a real court proceeding. In another case, Air Canada’s chatbot gave a passenger incorrect information about bereavement fares, and when the passenger relied on it, a tribunal held the airline responsible for the misleading answer. These stories matter not because machines made mistakes, but because the mistakes arrived wearing the mask of competence. The fake cases looked like cases. The false policy sounded like policy. The answers had grammar, confidence, structure, and institutional tone (the one some fear). If a model explains a theorem, is that understanding? If it writes code, is that reasoning? If it apologizes, is that awareness? If it refuses a harmful request, is that judgment? If it produces a proof-shaped answer, has it proved?</p><p>These questions matter because everyone who meets these systems brings a private definition of intelligence. For one person, intelligence is problem-solving. For another, it is consciousness. For another, it is adaptation, creativity, memory, agency, usefulness, or the ability to survive in the world. Without untangling these meanings, we speak past one another.</p><blockquote><strong>Worse, we misjudge the machine, so we either reduce it to a toy because we do not understand its power, or we elevate it into a mind because we do not understand its limits.</strong></blockquote><p>Both errors are dangerous, because a system built to predict language can still influence law, medicine, education, software, finance, politics, and personal decisions. That is why <strong>individuals and companies need to understand what these models are actually built to do </strong>and<strong> </strong>where their edge lies, what they can generalize, what they merely imitate, when they hallucinate, and why a label like reasoning does not magically make them ultimate intelligence.</p><blockquote><strong>Used well, they can extend human work. Used blindly, they can turn fluent uncertainty into operational risk.</strong></blockquote><p>My argument here is that large language models occupy a third category, I call <strong>Shadow Intelligence</strong>. They are not empty parrots, because language itself is not empty, it is the compressed residue of human contact with reality. But they are not full human-like intelligences either, because the residue is not the reality, the map is not the territory, the citation-shaped sentence is not law, the proof-shaped sentence is not proof, and the answer-shaped paragraph is not understanding.</p><blockquote><strong>Shadow Intelligence names this strange middle condition, it’s the ability to reproduce the linguistic projection of intelligence without necessarily possessing the world-rooted structure that makes intelligence answerable to truth.</strong></blockquote><p>This article is an attempt to untangle that condition and not to ask whether LLMs are intelligent in the blunt sense anymore, but to ask which parts of intelligence they capture, which parts they simulate, which parts are supplied by tools and humans around them, and which parts remain missing. The danger is not that these machines are useless, nor that they are secretly conscious. The danger is more precise as they have learned how thought moves in language before they have learned what makes thought responsible to the world.</p><h3>The tidal clock that never saw the moon</h3><p>The usual metaphors for LLMs are not enough, because they are not simply parrots. Parrots repeat, while LLMs recombine stuff. They are not simply mirrors as mirrors just reflect what is in front of them, while LLMs generate what is statistically implied by what came before.</p><p>A better analogy is then this:</p><blockquote><strong>An LLM is like a tidal clock that has never seen the moon.</strong></blockquote><p>Imagine a machine placed beside the sea for hundreds of years, it cannot see the moon and does not know what gravity is or how it feels. It cannot touch the ocean, but it records the height of the water, the wind, the pressure, the season, the hour, the sound of boats, the speech of sailors and the wetness of stone. After enough time, it can predict the tides. It may even say, The water will rise tonight because, in conditions like these, the sea usually climbs, and it may be right, but it has never seen the moon. This is what LLMs do with language. They do not live directly inside the world, do not have hunger, pain, gravity, risk, mortality or the bodily memory of dropping a glass and watching it shatter. They are just trained on the tidal records of human language. They do not learn the world directly, but they learn the tides the world leaves in text.</p><p>That is not nothing by the way, it is enormously powerful. Human language contains science, law, history, mathematics, jokes, lies, grief, contracts, recipes, myths, strategy, poetry and engineering. To model language well, a system must absorb immense structure. However, the distinction here still matters, <strong>A tidal clock may predict the ocean without understanding the moon, thus, a</strong>n LLM may predict language without fully understanding the world.</p><h3>LLMs the non-trivial intelligence</h3><p>The basic task of a language model is simple: <strong>Given previous text, predict what text should come next.</strong> Nonetheless, this description is still partially misleadingly, as in order to predict the next word in a shopping list is easy, while predicting the next line in a legal argument, a mathematical proof, a medical explanation, a debugging session or a philosophical essay is not easy. In those cases, the next word depends more on structure like grammar, fact, causality, convention, analogy, genre, intention and sometimes hidden assumptions.</p><p>So a language model trained at scale is forced to learn patterns that are not merely linguistic. Thus, to predict legal text, it must absorb the legal structure, while to predict code, it must absorb procedural logic and to predict scientific explanation, it must absorb conceptual relations. This is why next-token prediction can produce surprising competence in majority of the cases. The model is not given a little autocomplete trick, but is placed under immense pressure to compress the patterns of human expression.</p><p>I would call this <strong>compression-born competence</strong>, as it is still not human understanding, not conscious understanding and definitely not lived understanding. However, it’s a kind of structural competence that appears because shallow pattern-matching is mostly insufficient. So, to imitate reasoning at scale, the system must internalize reusable forms of reasoning and to imitate explanation at scale, it must internalize reusable forms of explanation. The danger I see here is that compression-born competence produces the <strong>shape</strong> of understanding before it produces the <strong>ground</strong> of understanding. That is why LLMs can be brilliant and brittle at the same time.</p><h3>Intelligence is a relationship</h3><p>We often say someone is intelligent because they give good answers, but in fact, intelligence is not merely answer-production. Intelligence is a relationship between a system, a world, a goal and error.</p><p>A useful minimal definition would be:</p><blockquote><strong>Intelligence is the ability to update behaviour in an uncertain environment in pursuit of a goal.</strong></blockquote><p>That <strong>definition </strong>has <strong>five </strong>parts. There is a <strong>system, an environment, uncertainty, a goal and there is behavioural updating</strong>.</p><p>Now lets examine an ordinary LLM, Does it have an environment? Yes, but mostly a textual one. Does it have a goal? Yes, but usually an externally supplied goal, such as answer this question or write this essay. Does it update? Only within a conversation, yes. But in most deployments, it does not permanently update its underlying model from each consequence. Does it experience consequences?Only indirectly, through prompts, ratings, retrieval, tool outputs or system design.</p><p>So the <strong>answer is not that LLMs have no intelligence, but the answer is that their intelligence is very thinly coupled to the world</strong>.</p><p>They are highly adaptive in language-space and weakly grounded in consequence-space. This is exactly what Shadow Intelligence is.</p><h3>Mathematical deduction illustration</h3><p>Let:</p><p><strong>W</strong> = the world<br> <strong>L</strong> = language produced about the world<br> <strong>O</strong> = the model’s output<br> <strong>G</strong> = the user’s goal<br> <strong>T</strong> = truth or task-correctness</p><p>Human language is often a projection of the world: <strong>W → L</strong></p><p>The world happens, humans observe it, interpret it, misinterpret it, compress it and write about it.</p><p>The LLM is trained mainly not on <strong>W</strong>, but on <strong>L</strong>.</p><p>So the model learns something like:</p><p><strong>P(next L | previous L)</strong></p><p>In plain English:</p><p><strong>What language is likely to come next, given the language so far?</strong></p><p>But what the user usually wants is closer to:</p><p><strong>P(T | W, G)</strong></p><p>In plain English:</p><p><strong>What is true or useful, given the actual world and the user’s goal?</strong></p><p>Now you should be able to see the gap. The model is optimized for linguistic likelihood, while the user needs world-correctness. Those two often overlap like a sentence that sounds likely is often true because human language is not random, and is strongly shaped by reality, but the overlap is not an identity in this.</p><p>So, we get this <strong>deduction</strong>:</p><ol><li>LLMs are optimized to produce likely continuations of language.</li><li>Truth requires correspondence with the world or successful satisfaction of a goal.</li><li>Likely language and true language are correlated, but not identical.</li><li>Therefore, an LLM can produce language that is highly plausible, but false.</li></ol><p>In compressed form then: <strong>High plausibility does not equal high truth, that gap </strong>is the root of all hallucinations.</p><h3>Math Tests the Shadow</h3><p>Mathematics exposes this gap with some unusual clarity. An LLM may solve a mathematical problem, because it has learned the pattern of similar solutions like the algebraic rhythm, the proof template, the familiar substitution, and the benchmark structure. Systems trained on technical material, such as Minerva, showed that language models can generate step-by-step solutions to mathematical and scientific questions when trained and prompted for quantitative reasoning. However, mathematics asks for more than resemblance, it asks whether a solution survives transformation like changed numbers, altered wording, irrelevant details, edge cases, and every step where plausibility must become proof. A model that has memorized a path may solve:</p><p><strong>John has 3 apples and buys 4 more. How many apples does he have? </strong>But generalization begins when the surface changes while the structure remains like:</p><p><strong>A lab has 3 samples, receives 4 more and discards none. How many samples are there?</strong></p><p>Even a deeper generalization begins when irrelevant information is added:</p><p><strong>John has 3 apples, buys 4 more and puts them in a blue basket. How many apples does he have?</strong></p><p>The colour of the basket should not matter, but the controlled benchmark work such as GSM-Symbolic found that LLM performance can decline when numerical values are changed or irrelevant clauses are added, suggesting that some apparent mathematical reasoning remains fragile under perturbation, thus this gives us a theoretical distinction.</p><p><strong>Memorization</strong> is when the model recognizes the shape of a previous answer.</p><p><strong>Interpolation</strong> is when the model adapts a familiar pattern to a nearby case.</p><p><strong>Generalization</strong> is when the model preserves the underlying rule across changed surfaces.</p><p><strong>Reasoning</strong> is when each step remains valid even when the surface offers no familiar cue.</p><p>A simple algebraic example here shows the risk.</p><p>From: <strong>a² = b²</strong></p><p>a fluent model may continue:</p><p><strong>therefore a = b</strong></p><p>The proof has the rhythm of mathematics, but it is false. If <strong>a = −2</strong> and <strong>b = 2</strong>, then <strong>a² = b²</strong>, but <strong>a ≠ b</strong>. The valid conclusion then is: <strong>a = b or a = −b</strong></p><p>The model has followed a common-looking transformation, but mathematics demands a truth-preserving transformation all the way. A more theatrical example is the old false proof that <strong>2 = 1</strong>. It begins by assuming <strong>a = b</strong>, performs a series of algebraic-looking steps, and then divides by <strong>a − b</strong>. But because <strong>a = b</strong>, the expression <strong>a − b</strong> equals zero. The proof collapses at the hidden division by zero. In this case, the grammar of proof survives, while the necessity of proof does not.</p><p>This is the mathematical version of hallucination: not a wild invention, but a smooth bridge where no valid bridge exists. Thus, the question Can LLMs do math? is too vague. Sometimes they calculate, sometimes they imitate calculation, sometimes they generalize, and other times they recognize a textual neighbourhood. Fluency alone cannot tell us which has happened.</p><p>The better scientific question then is:</p><p><strong>Does the solution remain correct under perturbation, abstraction and verification?</strong></p><p>If changing the numbers breaks the answer, it was probably pattern-fragile, if changing the story while preserving the structure breaks the answer, it was surface-dependent, if adding irrelevant information breaks the answer, it was not tracking the true mathematical structure, and if every step can be checked by a calculator, theorem prover, symbolic algebra system, test suite or human mathematician, the system becomes more reliable.</p><p>This is why the most promising AI systems for advanced mathematics are not merely chatbots writing elegant proofs. Recent systems such as AlphaProof and AlphaGeometry 2 combined language-like generation with formal reasoning, search, reinforcement learning or specialized proof machinery, reaching silver-medal-level performance on the 2024 International Mathematical Olympiad, the Nature report emphasizes both the achievement and the fact that the system relied on formal environments and substantial computation, not ordinary free-form prose alone.</p><p>Philosophically, mathematics reveals the central condition of real intelligence:</p><p><strong>It must be able to distinguish appearance from necessity.</strong></p><p>Thus, we can now safely say a memorized answer belongs to the past, a generalized rule survives the future and a proof preserves necessity across every step.</p><p>For machine learning, the same rule applies. An LLM can suggest an architecture, write a training script, explain gradient descent, propose a metric, or summarize a paper. But it has not done the machine learning. The claim still has to pass through data, training, validation, ablation, testing, and deployment. A model can form the hypothesis, while the experiment must still decide. Thus, Mathematics -my loyal best friend- gives us the cleanest version of this article’s thesis:</p><blockquote><strong>Shadow Intelligence can reproduce the form of reasoning. Answerable Intelligence must survive transformation, verification and consequence.</strong></blockquote><h3>Hallucination is semantic overrun</h3><p>Hallucination is usually described as the model making things up. However, the deeper problem is not invention, it is continuation without contact. A hallucination happens when language keeps moving after its anchor to reality has disappeared. I call this <strong>semantic overrun</strong>.</p><p>Imagine a map that continues drawing a road beyond the place where the road ends. The line is smooth, the direction is plausible, the destination is named, but on the ground, there is nothing there. An LLM can do the same with meaning. The grammar holds, the tone is confident, the answer feels complete and yet the world underneath is absent.</p><p><strong>This is why hallucination is not just a bug, it is the shadow side of fluency.</strong> A system trained to continue language may continue even where knowledge should stop. Real intelligence is not only knowing how to answer, it is knowing when the answer has lost its right to exist. A <strong>reliable intelligence </strong>must be able to <strong>say</strong>,<strong> I do not know.</strong></p><blockquote>That premise may be false, or This needs verification. Without that boundary, fluency becomes a beautiful form of risk.</blockquote><h3>Agency is not roleplay</h3><p>Now lets consider the word <strong>agent</strong>. In AI, the word is often used too quickly. A model is called agentic because it can be prompted to act as a lawyer, think like a product manager, or complete the task step by step. Conversely<strong>, roleplay is not agency</strong>. A system can speak in the grammar of intention without possessing intention itself.</p><p>I call this <strong>loopless agency </strong>where the appearance of goals, persistence, authority, and responsibility without the closed loop that makes agency real. The model sounds as if it is acting, but it is often only responding moment by moment, prompt by prompt, without durable purpose or consequence.</p><p>Real agency requires a loop:</p><p><strong>Goal → Plan → Action → Observation → Revision → Further Action</strong></p><p>Or symbolically:</p><p><strong>G → P → A → F → P′ → A′</strong></p><p>Where:</p><p><strong>G</strong> is the goal.<br> <strong>P</strong> is the plan.<br> <strong>A</strong> is the action.<br> <strong>F</strong> is feedback from the environment.<br> <strong>P′</strong> is the revised plan.<br> <strong>A′</strong> is the next action.</p><p>We should evaluate it only and only by closure of that loop. A genuinely agentic AI system needs stable goals, memory, tool access, environmental feedback, error recovery, permission boundaries, state tracking, revision and the ability to know when not to act. A chatbot saying I will handle it, can only be described as theatre in the language of responsibility. A system that can plan, act, observe, correct and stop within safe boundaries is engineering, and should be what we aim for.</p><h3>World Models</h3><p>If the LLM is a tidal clock, the next step is not a larger clock but a connection to the ocean. A world model is an internal representation of how states change under action.</p><blockquote>A language model asks, <strong>What text comes next?</strong> A world model asks, <strong>What happens next if this action is taken?</strong></blockquote><p>That distinction matters the most. Language prediction may learn that people write, The glass fell and shattered. A world model must represent the causal structure of gravity, surface, impact, fragments, risk, and prevention. <strong>The future of AI will therefore depend less on language models alone than on systems that combine abstraction, state prediction, causality, memory, tools, verification, and value constraints.</strong></p><p><strong>Shadow Intelligence</strong> learns the projection, while <strong>answerable Intelligence</strong> connects the projection back to reality.</p><h3>What intelligence requires</h3><p>We can express the problem now more formally. Let intelligence depend on five capacities: <strong>compression</strong>, <strong>reasoning</strong>, <strong>grounding</strong>, <strong>agency</strong>, and <strong>error correction</strong>. In symbolic shorthand:</p><p><strong>I = f(C, R, G, A, E)</strong></p><p>LLMs are powerful in <strong>compression </strong>-we all know that now- they absorb immense linguistic structure and can reproduce patterns of explanation, argument, code, mathematics, style, and social behaviour. They are partially capable in <strong>reasoning</strong>, though unevenly and often with hidden brittleness. Their <strong>grounding</strong> is indirect, coming through text, images, tools, retrieval, or human feedback rather than full contact with the world. Their <strong>agency</strong> is conditional, depending on whether they are connected to tools, memory, goals, permissions, and feedback. Their <strong>error correction</strong> is inconsistent unless they are paired with verification systems, tests, external computation, or human review.</p><p>So current LLM intelligence looks something like this:</p><p><strong>High compression + partial reasoning + indirect grounding + conditional agency + unstable error correction.</strong></p><p>This explains the paradox. LLMs can seem astonishingly intelligent in conversation because conversation rewards compression and reasoning-shaped behaviour. They can also fail badly in reality because reality demands grounding, consequence, and correction. The contradiction disappears once we stop asking whether they are simply intelligent or unintelligent. They are not fake, they are just incomplete.</p><p>This also changes how we should evaluate them. We should stop asking only whether the answer sounds intelligent, that is the weakest test. The better test is whether the system survives pressure like changed examples, false premises, unfamiliar cases, tool use, uncertainty, long-horizon tasks, and consequences. In mathematics, the question is not whether the answer looks like a proof, but whether each step survives all verification. In machine learning, the question is not whether the suggestion sounds plausible, but whether the code runs, the model trains, the metric measures what it claims to measure, and the result survives ablation. In agency, we established that the question is not whether the system says, I will handle it, but whether it can act under real constraints, observe the result, recover from failure, ask permission before irreversible actions, and stop when it should.</p><p>These distinctions should be evaluated operationally rather than rhetorically. An agent is not defined by agent-like language, but by sustained performance across goals, actions, observations, corrections, and constraints.</p><h3>Conclusion</h3><p>LLMs are not parrots, search engines, or minds. They occupy a stranger new category: systems that have learned the visible movement of thought without yet possessing all the conditions that make thought answerable to reality.</p><p>Their power comes from language itself. Language is not empty, it carries the compressed traces of science, law, memory, grief, strategy, mathematics, and social life. By learning those traces, LLMs acquire real competence. However, competence is not the same as grounded intelligence. A shadow can preserve the outline of a body while losing its depth.</p><p>This is the central tension, LLMs are optimized for plausible continuation, while truth requires correspondence, mathematics requires valid transformation, science requires experiment, and agency requires consequence. The same fluent answer may be recall, interpolation, generalization, reasoning, tool use, or unsupported invention. The surface does not tell us which one it is.</p><p>So the practical lesson is not to reject these systems, but to place them under the right contract. Ask what is checking the answer. Is there retrieval? Calculation? Formal proof? Code execution? Experiment? Human review? Real-world feedback? Without such anchors, fluency can become authority without accountability, which is today’s chaos everywhere.</p><p>The next boundary of AI will not be fluency alone anymore, it will be the connection between language and what can correct it like world models, memory, tools, causality, computation, verification, embodiment, and safe agency. <strong>Shadow Intelligence</strong> learns the projection, while <strong>Answerable Intelligence</strong> connects the projection back to reality.</p><p>A language model can help us think. But thinking is not complete until something outside language answers back: the world, the proof, the experiment, the user, the system, the consequence. <strong>Until then, LLMs should be understood neither as fake intelligence nor as full intelligence.</strong> They are only <strong>Shadow Intelligence</strong>, they have learned how thought moves in language and have not yet fully learned what makes thought answerable to truth.</p><p>#AI #ArtificialIntelligence #GenerativeAI #LLM #LargeLanguageModels #MachineLearning #DeepLearning #AIPhilosophy #PhilosophyOfAI #PhilosophyOfMind #CognitiveScience #AIAlignment #AISafety #HumanAI #HumanMachineInteraction #WorldModels #AIReasoning #AgenticAI #AIAgents #Hallucination #AIHallucination #ModelEvaluation #AIEvaluation #FutureOfAI #ShadowIntelligence #AnswerableIntelligence #SemanticOverrun #LooplessAgency #ResponsibleAI #TrustworthyAI</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae33d02b1c6a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Price of Intelligence Is Not the Price of Tokens]]></title>
            <link>https://medium.com/@yassien/the-price-of-intelligence-is-not-the-price-of-tokens-07e75b715744?source=rss-a7dab149f80f------2</link>
            <guid isPermaLink="false">https://medium.com/p/07e75b715744</guid>
            <category><![CDATA[economics]]></category>
            <category><![CDATA[digital-transformation]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <dc:creator><![CDATA[Yassien Shaalan]]></dc:creator>
            <pubDate>Tue, 28 Apr 2026 10:24:40 GMT</pubDate>
            <atom:updated>2026-04-28T11:24:09.882Z</atom:updated>
            <content:encoded><![CDATA[<p>“Measure what is measurable and make measurable what is not so” Galileo</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-CGjFOizbjZgc-zq0cOWtg.png" /></figure><h3>Introduction</h3><p>A team ships an AI feature that works well enough to become part of the product rather than another experiment sitting in a roadmap archive, and for a while the signals look exactly like success: users adopt it, usage climbs, internal stakeholders celebrate the momentum, and the feature begins to look like evidence that the organization has found a practical use case for generative AI. At some point, <strong>CFO </strong>asks the rude but correct question: <strong>what exactly did we buy?</strong> This is where the room normally starts wobbling a bit, because the answer is often some version of this: we bought tokens. Input tokens, output tokens, some cached tokens if we were lucky and maybe batch discounts if someone knew what they were doing.</p><p>The invoice is detailed while the value story is not, which is exactly what the problem is. Most major LLM providers still <strong>price</strong> <strong>usage </strong>mainly through input, cached input, and output <strong>tokens</strong>, while also offering extra commercial modes such as batch processing, prompt caching, priority processing, and provisioned throughput. OpenAI’s pricing separates input, cached input, and output and offers Batch API discounts; Azure OpenAI offers on-demand pricing, Batch pricing, and provisioned throughput, Databricks offers pay-per-token, batch inference, and provisioned throughput, and notes that throughput depends on model and query shape.</p><blockquote>Token pricing is useful for tracking usage, but it is not enough to explain cost, performance, or business value once an AI workload is running in production.</blockquote><h3>The problem statement</h3><p>Enterprises are trying to buy <strong>business outcomes </strong>with a <strong>billing unit </strong>that mostly measures <strong>text volume</strong>. That is <strong>not </strong>the <strong>same </strong>thing. A company is not actually trying to purchase 12.4 billion tokens. It is trying to purchase faster claims processing, lower support handle time, more reviewed contracts, fewer manual escalations, cleaner code changes, better internal search, faster analysis, or some other form of useful work that can survive a budget review without hiding behind innovation as a smoke machine.</p><p>Token pricing is not useless, though. It is just smaller than the real problem. It <strong>measures </strong>the <strong>movement </strong>of <strong>language</strong>, <strong>not </strong>the delivery of <strong>value</strong>. This article argues that enterprises should stop treating tokens as the economic unit of AI and start treating them just as telemetry. The better model should be a hybrid one where cost should reflect capacity, variable usage, workflow complexity, quality, and useful completed work. Until providers fully move there, enterprises can still build the <strong>missing translation layer </strong>themselves.</p><h3>The Limits of Consumption-Based AI Pricing</h3><p>Paying for air travel only by passenger weight would be absurd. Two passengers may weigh the same, but one may have booked a flexible ticket, reserved premium luggage capacity, and purchased guaranteed service levels. The operational cost is not just mass transported, it is a function of capacity, certainty, timing, and service quality.</p><p>The same limitation applies to the electricity analogy. The idea that AI will become a metered utility, priced neatly by consumption, is analytically weak because consumption does not map cleanly to value. A kilowatt-hour can power a lamp, a refrigerator, or an MRI machine, each with very different economic consequences. AI has an even weaker relationship between consumption and value, the same thousand tokens can produce a useless answer, a useful answer, or a decision that saves a team three days of work.</p><p>These analogies are useful only up to a point. They explain why metering is necessary, but not why token count should be treated as the best proxy for cost, quality, risk, or business value. Token pricing may simplify accounting, but it fails as a complete measurement system.</p><h3>What the current pricing already tells us</h3><p>The market is already moving toward a more complicated and somehow ugly truth. Token pricing is still the front door, but providers keep adding side doors. OpenAI’s current GPT-5.4 short-context standard pricing is $2.50 per million input tokens, $0.25 per million cached input tokens, and $15.00 per million output tokens. Its Batch price for the same model cuts those short-context rates to $1.25, $0.13, and $7.50. Azure OpenAI also sells more than plain token pricing, it offers standard on-demand pricing, provisioned throughput, and a Batch API at a 50% discount on global standard pricing. Databricks shows the same pattern, with both pay-per-token and provisioned throughput, and it explicitly notes that throughput depends on model and query shape, not just raw token count. You can see that pattern clearly in <strong>Figure 1</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PYW4nd5mkc99kovLpNQzfQ.png" /><figcaption>Figure 1. OpenAI GPT-5.4 pricing by token type and execution mode.</figcaption></figure><p>That alone says more than most vendor decks do. If tokens were the full economic story, providers would not keep adding other pricing shapes around them.</p><p>The ratios make the point even more clearly. On current OpenAI GPT-5.4 short-context standard pricing, output tokens are 6 times as expensive as input tokens, and cached input is 90% cheaper than uncached input. Databricks’ public Foundation Model Serving pricing shows a similar shape for open models too. For Llama 4 Maverick, pay-per-token pricing is 7.143 DBU per million input tokens and 21.429 DBU per million output tokens. For GPT OSS 120B, it is 2.143 DBU per million input tokens and 8.571 DBU per million output tokens. Different provider, same <strong>message</strong> which is <strong>output is expensive, and workload shape matters</strong>.</p><p>The exact model prices will change, but the important point here is the shape of the market. Input, cached input, and output are not priced the same way. Batch exists because some work can wait. Priority and provisioned options exist because some work cannot. Cached input exists because repeated context has different economics from fresh context. Prompt caching makes this even clearer as OpenAI says prompt caching can reduce latency by up to 80% and input token costs by up to 90%, and its caching guidance is based on repeated prompt prefixes; Azure also describes prompt caching as a way to reduce latency and cost for longer prompts with identical beginning content.</p><p><strong>Figure 2</strong> shows the same idea in a more practical way, keep the work the same, change the packaging, and the cost drops materially.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1mjiSKnIRYYfHAn22srQyQ.png" /><figcaption>Figure 2. The same workload becomes much cheaper when packaging changes.</figcaption></figure><h3>The core argument</h3><p>The argument is not that token pricing is dumb (you can call simple and practical for quick rollout). It is that token pricing is just incomplete. For experiments, tokens are perfectly reasonable. They are the taxi meter of AI, simple, flexible, and useful when you are still figuring out whether people even want rides. You do not lease a fleet when you are still testing whether the route exists.</p><p>But enterprises do not stay in experiment-land forever. POCs have short expiry tags, mostly because executive patience is not a renewable resource (you know that already). The moment there is a latency commitment, a budget owner, an internal chargeback discussion, or the typical board slide with the word ROI floating around like incense, the token meter starts looking suspiciously small for the job it is being asked to do.</p><blockquote>The invoice measures text volume with precision (tokens), while the corresponding value signal often remains weak, delayed, and/or undefined.</blockquote><h3>How the pricing works</h3><p>The current request-level pricing model is simple enough:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/374/1*6soFYvFevEOlQvEa7imjGw.png" /></figure><p>Here, Ti​ is uncached input tokens, Tc is cached input tokens, and To is output tokens. The p’s are the prices per million tokens.</p><p>That equation is fine as a billing equation, but maybe not fine as a complete economic model.</p><p>The marginal cost shows a different side to the story:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/362/1*0nt9W2c7lOSqMSLOGodLYQ.png" /></figure><p>Using the current OpenAI GPT-5.4 short-context standard prices, one extra output token costs roughly as much as six extra input tokens. So when a team proudly says it trimmed 400 prompt tokens but still lets the model produce long, fluffy answers, it may be optimizing the cheaper side of the bill which to me is more like cosmetic efficiency.</p><p>The monthly view is even more informative in our case here. If per-request cost is a random variable c and monthly request count is N, then</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/305/1*2EXf_BUi_XO7F5nErH4DxA.png" /></figure><p>and</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*v3x86Y59ONYHv8pi2zFokQ.png" /></figure><p>That second line is where the main cost pressure emerges. Spend varies with both traffic volume and request shape, as long contexts, retries, tool calls, verbose outputs, agent loops, human review, and escalations increase variance, which is why provisioned throughput should be understood not only as a speed product but as a way to reduce operational uncertainty.</p><p>Most AI cost conversations are framed as if the scarce resource is compute volume. In production, the <strong>scarcer resource</strong> is often <strong>variance tolerance</strong>. <strong>Enterprises </strong>can <strong>survive expensive </strong>systems, but what they<strong> struggle with is expensive systems that are also unpredictable</strong>. This sort of instability turns promising AI deployments into <strong>operational debt</strong> with a nicer demo.</p><p>That is why <strong>reserved capacity and provisioned</strong> throughput matter. They are not only about faster serving, they are about buying a <strong>calmer variance profile</strong>. A lot of enterprise AI pricing is really risk pricing dressed as compute pricing.</p><h3>What Economics Says</h3><p>There is an old management problem underneath token pricing: once a metric becomes the target, people start serving the metric. When tokens become the dominant unit of measurement, teams may optimize token counts instead of useful work. Prompt trimming can look like discipline even when the workflow still produces little economic value.</p><p>There is also a transaction-cost problem. The real cost of AI is not just the model call; it includes routing, retries, evaluation, monitoring, governance, fallbacks, approvals, and the occasional incident caused by an agent that confuses autonomy with looping forever. Token pricing treats AI like a raw ingredient, while enterprises experience it as a system. Tokens are the flour; the business is trying to run a bakery.</p><p>Providers already price around this reality. Batch pricing rewards work that can wait, cached input rewards repeated structure, priority processing charges for better service class, and provisioned throughput sells certainty. That is not commercial noise; it is the market admitting that a flat token meter is too crude for production AI.</p><h3>What This Looks Like in Practice</h3><p>A workflow that sends 8,000 input tokens and receives 1,000 output tokens may look expensive on paper, but if 6,000 input tokens are stable scaffolding that can be cached, the repeated task can become materially cheaper. If the workload can also move into Batch, the economics improve again.</p><p>This is why “cost per token” is too thin for production AI. Two teams can run nearly the same business process and see very different unit economics because one uses reusable prompts, shorter outputs, caching, batching, and traffic shaping, while the other sends everything to the default endpoint and calls it innovation. That is partly a pricing issue, but mostly an operating-model issue.</p><h3>The Missing Unit of Value</h3><p>The missing unit is not another token category; it is quality-adjusted useful work. One request is not one outcome, and one response is not one accepted result. A better unit is the acceptable piece of work: the support case resolved without escalation, the document reviewed to standard, the extraction accepted without correction, or the code change merged without heavy rework.</p><p>A simple way to express this is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/285/1*ItyKKJ1ftPoylydFjCdGGA.png" /></figure><p>where A is total attempts, c is completion rate, a is acceptance rate, and r is rework rate. This is not a universal law of AI value. It is my practical operating measure. It tells you how much acceptable work came out of the system after accounting for unfinished runs, rejected outputs, and whatever rework took place.</p><p>Suppose an AI-assisted claims workflow handles 10,000 attempts per month. If completion is 95%, acceptance is 88%, and rework is 10%, then:</p><p>Q=10,000×0.95×0.88×0.90=7,524</p><p>The system did not really produce 10,000 useful outcomes. It just produced 7,524 quality-adjusted useful outcomes. If total AI and orchestration spend is $18,000, then:</p><p>18,000/7,524 = $2.39</p><p>Now, if residual human review costs another $6,000, then the full delivered cost per quality-adjusted unit becomes:</p><p>(18,000+6,000)/7,524=$3.19</p><p>Now the business has a usable number, which can compare $3.19 per quality-adjusted outcome against the manual baseline, not against a token bill. If the manual baseline is $5.80 per acceptable case, then the operating gain is:</p><p>(5.80−3.19)×7,524=$19,635</p><p>This is not theoretical, it is just unit economics. Thus, <strong>when cost is measured in tokens</strong> and <strong>value is measured in useful work</strong>, enterprises <strong>need a translation layer</strong> between the invoice and the business case.</p><h3>A better model</h3><p>The answer is not to abandon tokens altogether, that would be another oversimplification.</p><p>The better model is hybrid:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/555/1*70eiKdY2cl7Y-nttXuvhvw.png" /></figure><p>The fixed term F(K,λ,L) is the price of reserved context capacity, throughput, and latency class. The voO term is the variable price of generation. The vtM term covers tools, retrieval, or runtime actions. The α S term ties some part of pricing to successful completed work. The βFa term is a rebate, protection, or risk-sharing mechanism for failed runs.</p><p>For example, imagine a monthly enterprise workflow with a <strong>$10,000</strong> reserved-capacity fee for predictable context, throughput, and latency. During the month, it generates <strong>1 million output tokens</strong> at an illustrative <strong>$15 per million</strong>, so voO=$15. It also uses retrieval and tools <strong>20,000 times</strong> at <strong>$0.02 per action</strong>, so vtM=$400. The system completes <strong>7,500 validated useful tasks</strong>, with a small success-linked fee of <strong>$0.20 per task</strong>, so αS=$1,500. Finally, <strong>300 runs fail validation</strong>, and the provider gives a <strong>$0.50 credit per failed run</strong>, so βFa=$150.</p><p>So the monthly price would be:</p><p>P=10,000+15+400+1,500−150=$11,765</p><p>Instead of saying, we spent $11,765 on tokens, the business can say: we paid for reserved capacity, generation, tools, and 7,500 validated tasks, with credits for failed runs. That is a much better answer to the CFO question.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GFM1jyUymvO0y4CQ1pFMmQ.png" /><figcaption>Figure 3. From token billing to hybrid pricing</figcaption></figure><p>Figure 3 makes the shift clear, as the price is not the only thing changing, the unit being priced moves from text volume to a combination of capacity, execution, and useful work.</p><p>That is a better model because it reflects the actual economics of production AI. Providers are not only processing tokens, they are reserving capacity, meeting latency targets, absorbing traffic spikes, and supporting workflow complexity. Enterprises are not buying text after all, they are buying useful work within cost, quality, and risk constraints. A hybrid model recognizes both sides instead of forcing the whole market through a single token meter.</p><h3>What enterprises should do now</h3><p>Even if providers keep the same commercial structure, enterprises should change their internal measurement layer. Token counts should be treated as telemetry, not value metrics. The better measure is cost per useful unit of work, per reviewed document, resolved case, approved extraction, accepted code patch, analyst hour saved, or quality-adjusted outcome.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A_WLaGBScWMNTwh4dcS31A.png" /><figcaption>Figure 4. How enterprises can move toward hybrid economics.</figcaption></figure><p>Figure 4 shows the transition path. In the short term, enterprises should classify AI traffic by workload shape, not by team, interactive and latency-sensitive, steady and repetitive, asynchronous, or lightweight. That classification makes routing possible, with premium or reserved capacity for sensitive traffic, batch for work that can wait, cache-friendly prompts for repeated structure, and smaller models for simpler tasks.</p><p>In the medium term, enterprises need a control layer between applications and model endpoints. Whether called a gateway or orchestration layer, its job is to make policy enforceable to limit outputs, route by workload class, improve cacheability, move eligible jobs into batch, meter spend by business unit, and prevent one team’s prototype from becoming another team’s budget problem. Azure’s guidance for generative AI gateways points in the same direction, with capabilities such as token metrics, token limits, load balancing, semantic caching, logging, and monitoring.</p><h3>The Orchestration Layer</h3><p>The orchestration layer matters because it does more than route traffic, it translates provider billing into business measurement. With an orchestration layer, the CFO’s question becomes easier to answer. Sitting between applications and model providers, it controls routing, prompt policy, output limits, caching, batching, model choice, fallbacks, evaluation, and guardrails, while also capturing usage, quality, retries, human review, and workflow outcomes. That is where raw consumption becomes measurable business value.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*Vq9sLzGtP-SQIHdmT5Yc9A.png" /><figcaption>Figure 5. How the orchestration layer turns usage into business value.</figcaption></figure><p>Figure 5 captures the operating logic: the orchestration layer governs execution before the model call and converts the results into business economics afterward. Providers may still bill in tokens, but enterprises can manage by workflow, quality, and business unit. That is where AI cost starts to become economically intelligible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HMvneOX_wWbQpXWYG9XcyQ.png" /><figcaption><strong>Figure 6. Old cost structure versus new cost structure.</strong></figcaption></figure><p>Figure 6 should show the shift from we bought tokens to we bought quality-adjusted outcomes at a known unit cost.” The hybrid model is not always cheaper, but it is more governable. For enterprises, that matters: cheap chaos is still chaos.</p><h3>What the Platform Team Should Show</h3><p>A better pricing model is not enough if reporting still looks like a token odometer. At scale, platform teams need a monthly operating view that connects technical usage to business economics: spend, routing, caching, variance, quality, controls, and cost per useful unit of work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pzYCGBSc9ZUQo3hlY8sN3w.png" /><figcaption><strong>Figure 7. AI cost dashboard for platform teams.</strong></figcaption></figure><p>Figure 7 should keep token data, but prevent it from becoming the whole story. The useful dashboard shows monthly AI spend, quality-adjusted work, cost per accepted outcome, cache hit rate, p95 request cost, routing mix, quality funnel, and policy controls. That is the difference between usage reporting and economic management.</p><h3>Where the Market Goes Next</h3><p>Token pricing will not disappear. It is simple, legible, useful for experimentation, and accelerates adoption. What will change is its status. Tokens will remain part of the meter, but they will stop being the whole economic model.</p><p>The market is likely to add more structure around tokens as outcomes become easier to measure, but providers will only move if enterprise buyers push for it. Providers should still be paid for compute, readiness, performance, and risk; the point is that customers should use their buying power to demand clearer pricing shapes, better predictability, and measurement structures that connect usage to value instead of treating prompt engineering as a religion.</p><p>The better competitive question is <strong>not who is cheapest per million tokens?</strong> anymore, It is <strong>who delivers the lowest cost per acceptable outcome under real latency, quality, and variance constraints?</strong></p><h3>Conclusion</h3><p>The problem with AI pricing is not simply that invoices are high. Valuable systems are often expensive. The problem is that enterprises are still buying AI through a meter that is easy to read and hard to defend.</p><p>Tokens tell you that something happened. They do not tell you whether the right thing happened, whether it happened efficiently, whether it required too much review, whether it met latency expectations, or whether the business should be glad it happened at all.</p><p>Use the token meter, but stop treating it as truth. Treat tokens only as a form of telemetry. Build the orchestration layer to separate capacity from variable usage. Measure quality-adjusted useful work. Report unit economics.</p><p><strong>The price of intelligence is not the price of tokens; it is the price of useful work delivered with acceptable quality, risk, and predictability. Until pricing models catch up, enterprises will have to build that logic themselves.</strong></p><p>#AI #GenerativeAI #LLM #EnterpriseAI #AIEconomics #AIInfrastructure #FinOps #CloudCost #MLOps #AIGovernance #PlatformEngineering #DigitalTransformation</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=07e75b715744" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Benchmarks to Blast Radius: Governing Agentic Systems at Runtime]]></title>
            <link>https://medium.com/@yassien/from-benchmarks-to-blast-radius-governing-agentic-systems-at-runtime-cd49cba71c11?source=rss-a7dab149f80f------2</link>
            <guid isPermaLink="false">https://medium.com/p/cd49cba71c11</guid>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[data-governance]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Yassien Shaalan]]></dc:creator>
            <pubDate>Fri, 03 Apr 2026 02:10:21 GMT</pubDate>
            <atom:updated>2026-04-06T01:17:13.503Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VJ2uvAEo0foePkSywNtiQg.png" /></figure><p>AI agents are arriving in organizations with the familiar modern <strong>sequence </strong>of events: first the <strong>excitement</strong>, then the <strong>demos</strong>, then the confident <strong>overpromising</strong>, and only later the <strong>slower realization </strong>that giving a system <strong>access</strong> to tools, data, and workflows is <strong>not </strong>the <strong>same </strong>thing as <strong>governing </strong>its <strong>behaviour</strong>. The language around them still leans heavily on capability, as though benchmark scores, polished scenarios, and a few convincing dashboards were enough to settle the harder institutional questions, which is obviously by all means not enough.</p><p>This article is for technical leaders willing to listen, for security and platform teams who will inherit the mess, for product and operations people caught between ambition and reality, for informed bystanders watching the hype outrun the controls, and for those tempted to vibe their way into production before they can explain what the system is actually allowed to do. Its purpose is to shift the conversation from what agents can do in ideal conditions to what it takes to constrain, monitor, interrupt, and correct them in the real world, where confidence is cheap, authority is easy to grant, and blast radius is what remains after the demo ends.</p><h3>The Wrong Metric</h3><p>The present conversation about AI agents is still trapped inside the grammar of evaluation. That made sense when models were mostly asked to generate content, answer questions, or summarize documents. It makes much <strong>less sense once</strong> they are <strong>allowed </strong>to call tools, read external content, mutate state, chain actions, or move through production workflows. <a href="https://www.mckinsey.com/~/media/mckinsey/business%20functions/quantumblack/our%20insights/the%20state%20of%20ai/2025/the-state-of-ai-how-organizations-are-rewiring-to-capture-value_final.pdf">McKinsey’s <strong>2025 </strong>survey</a> found that <strong>78% of organizations now use AI</strong> in at least one business function, <strong>62% are at least experimenting</strong> with AI agents, and <strong>23% say they are scaling</strong> an agentic system in at least one part of the enterprise. At the same time, <strong>NIST’s March 2026</strong> report on deployed AI monitoring argues that the field <strong>still lacks mature post-deployment</strong> methods and organizes the problem into <strong>six monitoring categories</strong>: <strong>functionality, operational, human factors, security, compliance, and large-scale impact</strong>s. In other words, adoption is widening faster than the discipline needed to monitor these systems after release.</p><blockquote><strong><em>Organizations are measuring the spread of agents faster than the governability of agents.</em></strong></blockquote><p>That <strong>asymmetry </strong>is the <strong>real story</strong>. Benchmarks tell you whether a system can perform under scrutiny. They do not tell you whether the system remains corrigible after deployment, when it is exposed to stale context, ambiguous requests, manipulated content, brittle dependencies, permission sprawl, and human operators who are themselves under pressure. A chatbot can be wrong in a way that produces a bad answer. An agent can be wrong in a way that sends, approves, books, escalates, leaks, deletes, or compounds. The transition from <strong>model to agent </strong>is the <strong>transition </strong>from <strong>output risk</strong> to <strong>state-transition risk</strong>.</p><h3>The Two Gates</h3><p>Agentic systems need to be judged through two gates. The first is the <strong>production gate</strong>: testing, permission scoping, rollback design, failure-mode mapping, release criteria, and security review before any live authority is granted. The second is the <strong>runtime gate</strong>: policy enforcement, provenance, anomaly detection, approval thresholds, intervention paths, containment, and incident correction after the system begins operating in the wild. <a href="https://nvlpubs.nist.gov/nistpubs/ai/NIST.AI.800-4.pdf">NIST’s monitoring framework</a> is useful here precisely because it shifts attention from static model quality to ongoing system observability and control.</p><blockquote><strong><em>The first gate decides whether the system enters production. The second decides whether production remains survivable once it does.</em></strong></blockquote><p>The <strong>mistake </strong>in current practice is to <strong>overvalue </strong>the <strong>first gate </strong>and <strong>underbuild </strong>the <strong>second</strong>. A polished demo, a clean eval, and even a strong red-team cycle do not eliminate the need for runtime governance. They merely establish that the system can behave within a curated frame. <strong>Runtime governance begins where that frame collapses</strong>. It is less like passing a test and more like operating an aircraft, the <strong>certification matters</strong>, but instrumentation, procedures, control logic, and intervention paths <strong>matter more </strong>once the plane is <strong>actually in the air</strong>. That is why this piece is really about governability, not just capability. No serious operational system is trusted because it once looked good in a lab (your dev).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ksRv9E08dzmiKRFbF_l5yw.png" /><figcaption><em>Figure 1. The two gates of agentic governance. Pre-deployment testing determines whether an agent should enter production. Runtime governance determines whether it remains corrigible after deployment.</em></figcaption></figure><h3>The Agentic Security Envelope</h3><p>The right name for the security problem here is <strong>the agentic security envelope </strong>which in simple terms<strong>, </strong>the total <strong>set </strong>of <strong>ways untrusted influence </strong>can enter a privileged decision loop and be converted into action. <a href="https://genai.owasp.org/llmrisk/llm01-prompt-injection/">OWASP’s 2025 Top 10</a> for LLM applications puts prompt injection first, and also flags sensitive information disclosure, supply-chain vulnerabilities, insecure output handling, and excessive agency as core risks. Microsoft describes indirect prompt injection as one of the most widely used techniques in AI security reports and frames the core danger clearly: attackers place malicious instructions inside documents, webpages, emails, or other external content, and the model misreads those instructions as legitimate commands. Anthropic makes the same point for browser agents, warning that every webpage is a potential attack vector and that prompt injection is still “far from a solved problem,” even when model robustness improves. Google’s public guidance for Gemini adds that indirect prompt injection can lead to unauthorized data access, hidden manipulation, and unintended actions, which is why its mitigations now include classifiers, suspicious-URL redaction, user confirmation, and layered system safeguards. The point is not that agents are uniquely magical; it is that they collapse data, instructions, and action into the same operational loop. A link is no longer just a link once an agent can click it with permissions. A document is no longer just a document once its contents can steer downstream action. <strong>A tool is no longer just a capability once its metadata or outputs can be poisoned</strong>. <strong>A human approval step is no longer reassuring if it arrives after the system has already traversed the dangerous part of the workflow</strong>. Most agent failures will not look like rebellion. They will look like clerical overreach at machine speed.</p><blockquote><strong><em>Prompt injection, link traversal, tool misuse, delegation, drift, and social engineering are not separate curiosities; they are one security condition.</em></strong></blockquote><p>That is also why interoperability does not equal safety. The <a href="https://modelcontextprotocol.io/specification/2025-11-25">Model Context Protocol standardizes</a> how LLM applications connect to external tools and data, which is useful and likely necessary for ecosystem growth. But a cleaner interface does not solve trust boundaries, least privilege, provenance, or runtime policy. <strong>Standardization only lowers integration friction</strong>. It does not remove attack surface. In practice, a more standardized tool layer can expand the speed at which organizations wire models into business systems unless governance rises with it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/449/1*0tufmpBlJf_InbuGQ7Gvdg.png" /><figcaption><em>Figure 2. The agentic security envelope. Security risk emerges whenever untrusted content, operator input, memory, or retrieval can steer privileged action without being separated, constrained, traced, and interruptible.</em></figcaption></figure><h3>The Readiness Gap</h3><p>A more <strong>honest maturity </strong>model for agentic AI would <strong>not count pilots</strong>, chat interfaces, or prompt libraries. It should measure the gap between <strong>blast radius</strong> and <strong>governance capacity</strong>. <a href="https://www.verizon.com/business/resources/reports/2025-dbir-executive-summary.pdf">Verizon’s 2025 DBIR</a> is a useful reminder of why this matters operationally, the report analyzed <strong>22,052 incidents</strong> and <strong>12,195</strong> confirmed <strong>breaches</strong>, found that the <strong>human element</strong> was involved in about <strong>60% of breaches</strong>, found <strong>third</strong>-party involvement had <strong>doubled </strong>from <strong>15% to 30%</strong>, and reported a median of 94 days to remediate leaked secrets found in GitHub repositories. <strong>Its GenAI findings are just as telling</strong>: among users who accessed GenAI services from corporate devices, 72% used non-corporate email identifiers and 17% used corporate emails without integrated authentication, suggesting a large amount of AI activity is still happening outside clean enterprise identity controls. That is <strong>exactly </strong>the <strong>environment </strong>in which <strong>agents inherit hidden exposure </strong>from the <strong>organization </strong>around them.</p><blockquote><strong><em>The real maturity question is not Do we have agents? but Can we survive them?</em></strong></blockquote><p>This is why readiness should be plotted on two axes: <strong>production gate maturity</strong> and <strong>runtime governance maturity</strong>, with the size of each use case reflecting its <strong>blast radius</strong>. The framework in Figure 1 is a proposed way to make that visible. It does <strong>not claim to be a universal standard</strong>. Its point is simpler, <strong>large authority surfaces should not sit below the governance</strong> threshold.</p><blockquote>If the system can move money, alter records, send communications, touch regulated data, or take actions that are hard to reverse, then its runtime governance has to rise correspondingly.</blockquote><p><strong>No </strong>agent should be <strong>granted a blast radius larger than the organization’s demonstrated capacity to observe</strong>, interrupt, and correct in real time. That is the maturity rule that matters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W2AnYv7bzmL5-ohW5EFcEw.png" /><figcaption><em>Figure 3. Agentic system readiness vs. blast radius. As authority surface grows, runtime governance has to rise with it, otherwise organizations end up with systems that are demo-ready but not production-governable.</em></figcaption></figure><h3>What the Latest Security Evidence Actually Says</h3><p>The strongest recent evidence comes from the <a href="https://arxiv.org/pdf/2603.15714">emerging benchmark literature </a>on indirect prompt injection. In a large public competition released in 2026, researchers curated 41 agentic scenarios across tool use, coding, and computer-use settings, worked with 464 participants, collected more than 240,000 attack attempts, and recorded more than 8,000 successful attacks. All 13 evaluated models were susceptible to concealed indirect prompt injection attacks in at least some scenarios. The authors’ conclusion is the important part, the findings argue for system-level and architectural defenses beyond model-level robustness training alone. <strong>That is exactly the argument runtime governance needs (the core of this article)</strong>. Not because models do not matter, but because models alone cannot carry the whole security burden once they are embedded in workflows, tools, and environments that adversaries can influence indirectly.</p><blockquote><strong><em>The problem is not hypothetical anymore, and model robustness alone is not enough.</em></strong></blockquote><p><a href="https://www.anthropic.com/news/prompt-injection-defenses">Anthropic’s browser-agent guidance</a> makes the same point from the deployment side. It reports improved robustness but still says a 1% attack success rate remains meaningful risk in browser use, because every webpage, embedded document, ad, and dynamic script can be a vector. Microsoft’s guidance on indirect injection in MCP similarly recommends a layered defense spotlighting or isolating untrusted inputs, detection and filtering, delimiters and data marking, continuous monitoring, and supply-chain controls around tools and dependencies. Google’s public documentation adds suspicious-URL redaction and explicit confirmation for risky actions. Across vendors, the pattern is converging prompt-level cleverness is not enough, you need system-level segregation, runtime checks, and human confirmation at the right boundary.</p><h3>What Deep Runtime Governance Actually Means</h3><p>At a deep level, <strong>runtime governance </strong>is a <strong>control plane for agency.</strong> It is the layer that decides what the system is allowed to do, what it actually did, how quickly that fact becomes visible, and how quickly the organization can stop or reverse it. Tool choice is secondary. The principles are portable.</p><p><strong>First</strong>, <strong>instruction channels must be separated from data channels</strong>. Untrusted content should not silently acquire the authority of a command. Microsoft’s spotlighting and Google’s classifier-plus-confirmation model are two concrete implementations of this broader principle.</p><blockquote><strong><em>It is a control plane, not a prompt, not a dashboard, and not a vibe.</em></strong></blockquote><p><strong>Second</strong>, <strong>least privilege has to be live, not merely configured</strong>. Permissions need to be scoped, time-bounded, and purpose-bound. A system that can draft should not automatically send a system that can inspect should not automatically mutate a system that can retrieve across systems should not automatically merge across them. Microsoft’s guidance for MCP explicitly frames supply-chain and prompt-shield protections as extensions of standard security hygiene, not replacements for it.</p><p><strong>Third</strong>, <strong>behaviour has to be monitored, not just outputs</strong>. NIST’s six-category framing is useful precisely because it widens monitoring beyond correctness into operations, security, human factors, compliance, and larger impacts. The right anomalies are not only bad final answers. They are <strong>abnormal tool sequences, repeated retries, suspicious context shifts</strong>, <strong>unexpected data movement, and long-horizon drift</strong>.</p><p><strong>Fourth</strong>, <strong>interruption must be designed in from the start</strong>. A <strong>safe </strong>agent is not one that never fails. It is one whose failures are <strong>visible, attributable, interruptible, and correctable</strong>. That is Popper in operational form. It is also the dividing line between an impressive assistant and an under-governed process with business permissions.</p><h3>Conclusion</h3><p>The organizations that struggle most with agentic AI will not necessarily be those with the weakest models. They will be the ones that mistake successful scenarios for production readiness, standardization for safety, and speed for maturity. As shown, McKinsey’s numbers already exhibit the <strong>curve of interest is steep.</strong> Verizon’s numbers show the <strong>enterprise perimeter remains human, porous, and third-party dependent</strong>. OWASP, Microsoft, Google, Anthropic, and the latest public red-team evidence all point in the same direction: <strong>once agents operate on live context </strong>with live permissions, the <strong>decisive question is no longer </strong>whether they <strong>can act</strong>. It is <strong>whether </strong>institutions<strong> can keep them corrigible</strong> after deployment.</p><blockquote><strong><em>Benchmarks measure competence. Runtime governance measures survivability.</em></strong></blockquote><p>That is why the real metric is blast radius, not benchmark score. A benchmark can tell you whether the engine starts. Runtime governance tells you whether the aircraft remains controllable in turbulence. And in agentic systems, turbulence is not the exception. It is the environment.</p><p>#AIAgents #AgenticAI #RuntimeGovernance #AISecurity #PromptInjection #AIObservability #AIInfrastructure #AIGovernance #EnterpriseAI #AIEngineering #RiskManagement #AIControlPlane #CyberSecurity #LLMOps #ResponsibleAI</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cd49cba71c11" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI Contracts: Engineering Boundaries in Systems That Generate]]></title>
            <link>https://medium.com/@yassien/ai-contracts-engineering-boundaries-in-systems-that-generate-21a8e294c813?source=rss-a7dab149f80f------2</link>
            <guid isPermaLink="false">https://medium.com/p/21a8e294c813</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[responsible-ai]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Yassien Shaalan]]></dc:creator>
            <pubDate>Thu, 26 Feb 2026 14:06:09 GMT</pubDate>
            <atom:updated>2026-02-26T14:06:09.779Z</atom:updated>
            <content:encoded><![CDATA[<p>Engineering advances not when systems become more powerful, but when their limits become explicit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1n1hQeVo7Npp637EA_njnw.png" /></figure><p>Over time, we learned to draw lines: between components, between responsibilities, between what a system is <strong>allowed to do and what it must never do</strong>. APIs became typed. Interfaces became versioned. Schemas became enforceable. Changes that once slipped silently into production began to fail loudly and early. The result was not less capable software, but software that could evolve without losing control.</p><p>Generative AI systems represent a sharp departure from that trajectory. They are powerful precisely because they are flexible. They generate language, decisions, tool calls, and actions across domains with minimal friction. But that same flexibility dissolves many of the boundaries that traditional architectures rely on. Prompts replace interfaces. Context replaces contracts. Behaviour emerges where structure once existed.</p><p>The consequence is not obvious failure. It is <em>silent drift</em>. Systems continue to run. Latency is fine. Metrics often hold steady. And yet behaviour changes in ways that are difficult to localise, explain, or govern. When something finally goes wrong, it is rarely clear which assumption broke first.</p><blockquote>Software engineering did not become reliable by making systems smarter. It became reliable by making them <strong>bounded</strong>.</blockquote><p>A useful way to think about this comes from extreme-load infrastructure engineering. In systems designed to withstand rare but catastrophic conditions, peak demand events, environmental stress, cascading failures the challenge was never achieving high average performance. It was making load paths explicit. Engineers needed to know where stress could flow, how it would redistribute under pressure, and which boundaries must never be crossed. Structures that failed catastrophically were rarely weak in isolation; they failed because their limits were implicit or misunderstood.</p><p><strong>Generative AI</strong> systems today operate under a <strong>similar risk profile</strong>. Change is constant: prompts evolve, retrieval corpora refresh, tools expand, embedding models are upgraded. Each change is reasonable in isolation. But without explicit boundaries, their interactions become opaque. Load semantic, operational, or decision-making moves through the system in ways no one has fully specified.</p><p>This is where the idea of <strong>AI contracts</strong> enters, but not in the sense the term is usually used. Here, contracts are not legal agreements, policy documents, or loose prompt conventions. They are <strong>engineering artifacts</strong>: explicit, testable constraints that define what a generative system is allowed to produce, consume, and assume at each interface. Prompt contracts define permissible structure and behaviour. Tool contracts define schema and semantics. Retrieval contracts define stability and source expectations. Embedding contracts define representation compatibility.</p><blockquote><strong>The novelty here is not the claim that AI systems need better testing or more monitoring</strong>. That is already well understood. <strong>The novelty is architectural: treating the generative interfaces themselves as forefront boundaries and enforcing them with the same discipline</strong> that mature software systems apply to APIs and services.</blockquote><p>What follows makes this concrete. We introduce a contract-first architecture for generative systems and walk through a set of small, empirical experiments showing how regressions emerge when boundaries are implicit and how making them explicit changes what can be detected, tested, and trusted. The aim is not to constrain generation, but to make it <strong>legible under change</strong>.</p><blockquote>In systems that generate, power without boundaries does not produce robustness. Engineering does.</blockquote><h3>The Silent Failure Modes of Modern AI Architectures</h3><p>Most production AI systems do not fail in dramatic ways. They fail quietly. Requests continue to flow. Latency remains acceptable. Monitoring dashboards stay green. And yet, behaviour changes. Answers become subtly less grounded. Tool calls become slightly more erratic. Retrieval surfaces different sources for the same queries. None of these changes are large enough, on their own, to trigger alarms. Together, they accumulate into systems that no longer behave the way their designers believe they do.</p><p>What makes this difficult to reason about is that they are rarely localized. A prompt change affects tool usage. A retrieval index refresh alters downstream reasoning. An embedding upgrade shifts similarity relationships without touching application code. The architecture offers no obvious place to attach responsibility, because the assumptions that broke were never explicitly declared.</p><blockquote>This is not a failure of modelling. It is a failure of boundaries.</blockquote><h3>Implicit Interfaces and the Cost of Undeclared Assumptions</h3><p>Traditional software architecture is built on the idea that <strong>interfaces are contracts</strong>. An API does not merely describe how to call a service; it defines what is allowed, what is guaranteed, and what constitutes a breaking change. This is what enables independent evolution without systemic fragility.</p><p>Generative AI systems inherit many of the same architectural concerns, but express them in unfamiliar forms. <strong>Prompts behave like APIs</strong>, yet have no schemas. Tool calls resemble RPCs yet often lack semantic validation. Retrieval pipelines function like dependency injection, yet their stability is rarely tested. Embedding spaces act as shared memory, yet their compatibility assumptions are implicit.</p><p>These systems have interfaces in every practical sense. What they <strong>lack is enforcement.</strong></p><blockquote>When interfaces are implicit, change becomes ambiguous. When change is ambiguous, regressions slip through. Over time, systems accrue hidden coupling, and understanding erodes.</blockquote><h3>AI Contract Architecture for Generative Systems</h3><p>The architectural move proposed here is simple in principle: <strong>treat generative interfaces as boundaries and enforce them with contracts</strong>.</p><p>A <strong>contract -</strong> in this sense- is <strong>not a policy document or a guideline</strong>. It is an <strong>executable artifact </strong>that defines what a component may emit or consume, which <strong>invariants must hold, and how violations</strong> are detected.</p><p>In a contract-first generative system, four boundaries matter most:</p><ul><li><strong>Prompt contracts</strong> define structure and behavioural expectations. They specify not only output format, but conditions under which the system must refuse, ask for clarification, or cite sources.</li><li><strong>Tool contracts</strong> define both schema and semantics. Valid JSON is necessary but insufficient; meaning must be validated alongside structure.</li><li><strong>Retrieval contracts</strong> define stability expectations. They make explicit which sources are allowed, how much change in retrieval is acceptable, and when drift becomes a breaking event.</li><li><strong>Embedding contracts</strong> define representation compatibility. They acknowledge that embedding upgrades are architectural changes, not implementation details.</li></ul><p>Together, these contracts form a control plane around generation. The model remains flexible, but its interactions become legible.</p><p>Figure 1 illustrates how these four contracts compose into a single control plane that sits around the generative runtime. Rather than constraining the model internally, the architecture constrains <em>interactions</em> at the system boundaries, where failures are most likely to propagate silently.</p><p>This control plane is only as useful as its enforcement. Contracts that exist in documentation but not in the delivery pipeline offer no protection against the changes that matter most. In practice, each contract should ship as an executable artifact alongside code schemas, invariants, stability thresholds evaluated automatically on every change.</p><p>A prompt refactor, a corpus refresh, an embedding upgrade: each is a candidate breaking change until the contract pack says otherwise. This is what <strong>CI/CD </strong>means for generative systems. Not just does it work but is it still compatible with its own declared boundaries.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xxFmRfRjQUrJhvGZKHjqVQ.png" /><figcaption><strong>Figure 1: Contract-First Control Plane for Generative Systems.</strong><br> Prompt, tool, retrieval, and embedding contracts collectively form an explicit control plane that validates inputs, mediates interactions, and enforces compatibility across the generative runtime.</figcaption></figure><p>The key architectural shift is that contracts operate outside the model, not inside it. The LLM remains a flexible, probabilistic component, while the surrounding system enforces structure, semantics, stability, and representation compatibility. Failures are surfaced at the boundary where they occur, rather than emerging downstream as degraded behaviour or silent regressions.</p><p>This separation allows systems to evolve safely. The result is a generative system whose behaviour is not only powerful, but inspectable, governable, and resilient to change.</p><h3>Enforcing Contracts Through the Delivery Pipeline</h3><p>Architecture only matters if it survives contact with change. To make contracts enforceable, they must be executable and integrated into CI/CD pipelines. In practice, this means shipping a <strong>contract pack</strong> alongside code: schemas, invariants, regression queries, and stability thresholds that can be evaluated automatically.</p><p>Each change like a prompt tweak, a tool extension, a corpus refresh, an embedding upgrade is evaluated against this contract pack. Passing indicates that the system remains within its declared boundaries. Failing does not imply the change is wrong, but that it requires review, versioning, or re-baselining.</p><p>This reframes CI/CD, so the pipeline no longer asks only whether the system works. It asks whether the system is still compatible with its own assumptions.</p><h3>Empirical Evidence: Boundary Failures in Practice</h3><p>To ground these ideas, we ran a set of controlled experiments designed to surface boundary failures that traditional monitoring would miss.</p><h3>Prompt Drift Under Minor Refactoring</h3><p>Prompts are frequently treated as informal instructions rather than executable specifications. Minor refactors, tone changes, or structural edits can introduce behavioural regressions without triggering obvious failures. Prompt contracts address this by defining output structure and behavioural invariants that must hold regardless of phrasing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*o50VlF48A7395rlfqCMEWQ.png" /><figcaption><strong>Figure 2: Prompt Contract Boundary.</strong><br> Prompt contracts enforce output schemas and behavioural invariants, enabling fail-fast detection of regressions caused by prompt drift.</figcaption></figure><p>This boundary reframes prompt engineering from handcrafted tuning to disciplined interface design. Changes that preserve intent but violate expectations are caught immediately, ensuring that prompt evolution does not silently degrade system reliability or governance guarantees.</p><h3>Retrieval Instability After Index Changes</h3><p>Next, we refresh a retrieval index using a different chunking strategy. Retrieval systems are typically monitored through coarse metrics such as latency or recall. These measures miss a critical dimension: stability. A system may continue to retrieve good results while silently changing <em>which</em> sources it relies on. Retrieval contracts encode expectations about acceptable change, source constraints, and drift tolerance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*sXtPxoDJhHUDehbaNypusg.png" /><figcaption><strong>Figure 3: Retrieval Contract Boundary.</strong><br> Retrieval behaviour is constrained by explicit stability and source contracts, ensuring that changes in indices or corpora do not silently alter system grounding.</figcaption></figure><p>By making retrieval drift explicit, this boundary distinguishes healthy evolution from compatibility breaks. The system is allowed to change, but only within declared limits. When those limits are exceeded, the failure is surfaced immediately rather than hidden behind fluent generation.</p><h3>Embedding Upgrades as Architectural Changes</h3><p>We then swap embedding models while keeping downstream logic unchanged. Similarity distributions shift, neighbourhood stability drops, and retrieval behaviour diverges. This is mostly because embeddings are often treated as interchangeable implementation details, swapped freely as models improve.</p><p>In practice, embeddings define the geometry of the system’s meaning space. Any change to that geometry alters similarity, neighbourhood structure, and downstream behaviour. Embedding contracts formalize this reality by treating representation changes as architectural events.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*nNsl8_eAru-qouYouWz7pQ.png" /><figcaption><strong>Figure 4: Embedding Contract Boundary.</strong><br> Embedding contracts enforce compatibility through distributional checks, neighbourhood stability, and representation constraints, with explicit re-baselining required when violations occur.</figcaption></figure><p>This boundary makes representation drift measurable rather than anecdotal. Instead of discovering incompatibilities through degraded retrieval or inexplicable behaviour changes, teams are forced to confront embedding upgrades as first-class system changes requiring validation, review, and controlled migration.</p><h3>Semantic Violations in Tool Interactions</h3><p>Finally, we examine tool calls that satisfy schema requirements but violate semantic constraints. This is because it is often treated as a narrow interface problem, reduced to JSON schema validation or basic type checking. This view is incomplete. Tools encode real-world actions and state transitions, and failures frequently occur not because structure is invalid, but because meaning is. A contract-first approach therefore treats tool calls as semantic boundaries, not merely syntactic ones.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/1*cw3IxFEq_h2CVUYd066ayw.png" /><figcaption><strong>Figure 5: Tool Contract Boundary.</strong><br> Tool interactions are governed by an explicit contract that validates both schema and semantic rules before execution. Calls that violate semantic invariants are rejected even if they are structurally valid.</figcaption></figure><p>By enforcing semantic constraints alongside schema validation, the system prevents silent failures where incorrect assumptions propagate downstream. This boundary makes tool misuse observable and auditable, turning latent logical errors into explicit contract violations rather than deferred operational incidents.</p><h3>Architecture, Not Models, Determines System Trustworthiness</h3><p>It is tempting to attribute these failures to limitations of current models. This is a mistake. Larger models amplify the problem by increasing the surface area of implicit assumptions. As systems scale, changes propagate further and faster, and the cost of hidden coupling rises.</p><blockquote>No model, regardless of capability, can compensate for undefined boundaries. Intelligence without structure scales risk as efficiently as it scales power.</blockquote><h3>Practical Implications for Real Systems</h3><p>Adopting contract-first architecture does not require rewriting systems or constraining generation. It just about making assumptions explicit.</p><p>Prompts are versioned and tested like APIs. Retrieval changes are evaluated for stability, not just performance. Embedding upgrades are treated as migrations. Tool schemas include semantic validation alongside structural checks.</p><p>What changes is not what models can do, but what systems are allowed to accept without scrutiny.</p><h3>Engineering Systems That Can Be Trusted to Change</h3><p>In extreme-load infrastructure, safety does not come from eliminating stress. It comes from knowing where stress can flow, and where it must not.</p><p>Generative AI systems are no different. Change is constant. Drift is inevitable. The architectural question is whether those forces are made visible or allowed to accumulate silently.</p><p>AI contracts are not about control for its own sake. They are about making generative systems understandable under change. In systems that generate, trust is not a property of the model. It is a property of the architecture.</p><h3><strong>Contracts in Practice</strong></h3><p>The ideas above are <strong>not hypothetical</strong>. To test whether explicit contracts at generative boundaries actually catch the failures described in this article, I built a small <strong>empirical validation suite</strong> against the OpenAI API. The full code is available at <a href="https://github.com/yassienshaalan/applied-ml-ai-systems-articles/tree/main/articles/2026-02-ai-contract">my github</a>.</p><p><strong>Four contracts</strong> were implemented in plain Python -no frameworks, no infrastructure- each sitting at one of the boundaries described above. Each was then stress-tested against a scenario designed to produce exactly the kind of silent failure that traditional monitoring misses.</p><p><strong>Prompt drift:</strong> Three versions of the same prompt were sent to GPT-4o-mini: the original production prompt, a tone refactors making it friendlier, and a brevity refactor making it more concise. Both refactors looked reasonable. Neither produced an error. But the tone refactors silently renamed answer to response, and the brevity refactor dropped sources entirely the kind of edit a developer makes in thirty seconds without a second thought. The prompt contract caught both immediately, identifying the exact field that broke. Without it, both would have reached production, and every downstream consumer of that output would have received a different structure in silence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PfVb2ZoWpagaVh4uUJfbLw.png" /><figcaption><strong>Figure 6: Prompt Drift Contract Results.</strong> Three prompt variants sent to GPT-4o-mini. The production prompt passes. A tone refactor silently renames answer to response, a brevity refactor drops sources entirely. Both fail the contract. No error, no latency spike, t<strong>he contract is the only signal</strong>.</figcaption></figure><p><strong>Retrieval instability: </strong>A policy document corpus was embedded and queried under two conditions: a baseline index and an updated one with different chunking. Standard metrics -latency, top-k recall- looked fine in both. But the retrieval contract measured Jaccard overlap between the source sets and found zero. Not low. Zero. Every document grounding the answer had changed between the two runs. An external blog post and an unapproved draft policy had surfaced in the top results, neither of which should ever have been cited. Neither would have triggered a monitoring alert. The answers would have continued to look fluent and confident, grounded in entirely the wrong sources.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vM8ndNqMXmfZSisTIqWagw.png" /><figcaption><strong>Figure 7: Retrieval Instability Contract Results.</strong> The same query run against a baseline and an updated corpus. The baseline passes. The updated retrieval surfaces an external blog post not in the allowed set, and Jaccard overlap drops to 0.00, every grounding source has changed. Both violations are caught at the contract boundary.</figcaption></figure><p><strong>Embedding upgrade:</strong> The same ten-document corpus was embedded with text-embedding-3-small and then with text-embedding-ada-002. Both models output 1536 dimensions which are structurally identical, schema-compatible, nothing obviously broken. The embedding contract measured mean cosine similarity between corresponding vectors across the two models: -0.0062. Near zero. The models are operating in completely unrelated vector spaces, and the negative value indicates the representations are not merely different but actively inverted in direction. Any retrieval index built on the first model is meaningless under the second. A system checking only dimensions which is most systems would call this upgrade safe and proceed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*46os9DzoYuTH-W3fkiFbvA.png" /><figcaption><strong>Figure 8: Embedding Upgrade Contract Results.</strong> Both models output 1536 dimensions structurally identical, schema-compatible. But mean cross-similarity is -0.0062: the vector spaces are unrelated. A system checking only dimensions would call this upgrade safe. The distributional contract is the only thing that catches it.</figcaption></figure><p><strong>Tool semantic violations:</strong> Seven flight booking calls all structurally valid JSON were passed through a tool contract enforcing semantic invariants: return date must follow departure date, infants require at least one adult, origin and destination must differ. Five of the seven were semantically impossible. All five were blocked. The LLM, when explicitly asked to generate a booking with a return date before departure, did exactly that producing perfectly valid, well-formed JSON encoding an impossible trip. No schema validator would have caught it. The semantic contract caught it at the boundary before it reached execution, which in a real system would mean before a booking was attempted, a charge was processed, or a downstream service was called with corrupt state.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gpB2vQ_tSSoknA0VY0-y3w.png" /><figcaption><strong>Figure 9: Tool Semantic Violations Contract Results.</strong> Seven flight booking calls, all structurally valid JSON. Five encode impossible operations return before departure, same origin and destination, infants without adults. All five are blocked by semantic rules. JSON schema validation alone would have passed every one of them through to execution.</figcaption></figure><p>The results are in the results/ folder of the repository. They are not large or complex. What they demonstrate is simply that failures which produce no observable signal in production, no latency spike, no error rate increase, no alert- produce loud, specific, immediate signals at the contract boundary. The architecture does not prevent change. It makes change visible.</p><h3>Concluding Remarks</h3><p>There is an old engineering principle that a structure is only as trustworthy as its weakest implicit assumption. In generative AI systems, the implicit assumptions are everywhere.</p><p>As Dijkstra observed: <em>“</em><strong><em>The art of programming is the art of organising complexity</em></strong><em>.”</em> The same is true of AI systems. The complexity does not go away by ignoring the boundaries. It accumulates there, silently, until something finally breaks in a way that is difficult to trace and expensive to fix.</p><p>What <strong>my proposed AI contracts</strong> offer is not rigidity. They offer legibility. A system whose boundaries are explicit can be reasoned about, tested, governed, and trusted to change. A system whose boundaries are implicit can only be hoped about.</p><blockquote><strong>The experiments in this article are small, however, the principle is not.</strong></blockquote><p>#AIEngineering #GenerativeAI #MLOps #SoftwareArchitecture #LLM #AIReliability #MachineLearning #RAG #AIContracts #ResponsibleAI #SystemsThinking #AIArchitecture</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21a8e294c813" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ZeroPhix: Free Offline Redaction That Doesn’t Move Your Data Boundary]]></title>
            <link>https://medium.com/@yassien/zerophix-free-offline-redaction-that-doesnt-move-your-data-boundary-7c1660353af0?source=rss-a7dab149f80f------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c1660353af0</guid>
            <category><![CDATA[data-security]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[data-governance]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Yassien Shaalan]]></dc:creator>
            <pubDate>Thu, 19 Feb 2026 05:30:07 GMT</pubDate>
            <atom:updated>2026-02-19T10:16:07.369Z</atom:updated>
            <content:encoded><![CDATA[<p>Privacy isn’t a setting. It’s a boundary and boundaries only matter when you can enforce them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TEC8kXQZjmRHa_8F9Vme-w.png" /></figure><p>Open source used to be the place we <strong><em>borrowed leverage</em></strong>, a way to build durable infrastructure without asking permission. Lately, a lot of privacy tooling has drifted in the opposite direction: paywalled APIs, opaque models, vendor-specific pipelines, and workflows that quietly move your sensitive text somewhere else for <strong>processing</strong>.</p><p>That’s not always evil. It’s just… a different set of incentives. And if you’ve ever had to explain <em>why customer data was uploaded to a third party</em> to meet a compliance requirement, you already know how that story ends.</p><p>This is why I released <a href="https://pypi.org/project/zerophix/"><strong>ZeroPhix</strong></a>, an open-source, <strong>enterprise-grade PII/PSI/PHI detection + redaction solution </strong>that is <strong>offline-first</strong>, <strong>policy-driven</strong>, and designed to run inside <em>your</em> boundary.</p><h3>What ZeroPhix?</h3><p>ZeroPhix is a configurable redaction pipeline that detects sensitive entities across multiple jurisdictions and languages, resolves detector conflicts intelligently, and applies advanced redaction strategies, without requiring you to ship your data to someone else.</p><h3>Why build another redaction library?</h3><p>Because redaction is no longer a <strong>preprocessing step</strong>. It’s upstream of everything:</p><ul><li>LLM/RAG ingestion</li><li>Analytics and sharing</li><li>Incident response / forensics</li><li>Compliance workflows</li><li>Vendor onboarding and data exchange</li></ul><p>And the default approach is still: <em>upload first, trust later.</em></p><blockquote>ZeroPhix is built around four principles:</blockquote><ol><li><strong>Sovereignty by default</strong><br> If you’re in Australia, you already feel this in your bones: data boundaries aren’t theoretical , they’re contractual, regulatory, and sometimes geopolitical. <strong>Where did this text go? </strong>is not a casual question. ZeroPhix is built to keep redaction <em>inside your environment, </em>AU sovereignty is one lens, but the principle generalizes to any jurisdiction, any enterprise boundary, any “<strong>this cannot leave the network</strong>” reality.</li><li><strong>Policy is the product</strong><br> Redaction isn’t detect and mask. It’s “<strong>detect, decide, justify</strong>.” Different laws, different org policies, different risk tolerances. ZeroPhix treats redaction as policy-driven enforcement, so your rules are explicit, reviewable, and versioned (not hidden inside a vendor’s black box).</li><li><strong>Detectors are inputs, not authority</strong><br> Regex, NER, BERT, zero-shot , none of them are truth. They’re evidence. The real problem is consensus: overlaps, conflicts, false positives, and high-stakes misses. ZeroPhix is designed around ensemble decisions and conflict resolution so you don’t ship a pipeline that “works on demos” and fails on real data.</li><li><strong>Auditability isn’t optional</strong><br> If you can’t explain what was redacted, why it was redacted, and under which policy — then you don’t have a redaction system, you have a hope generator. ZeroPhix is built so outcomes can be inspected, reproduced, and defended when compliance, security, or incident response come knocking.</li></ol><p>The core idea stays simple:</p><blockquote><strong>Don’t outsource your boundary. Enforce it.</strong></blockquote><h3>New Features by Zerophix</h3><p>Most redaction tools stop at regex and/or NER. That’s table stakes. ZeroPhix goes further in a few directions that matter in production.</p><h3>1) Adaptive ensemble voting (a detector is not a verdict)</h3><p>When multiple detectors disagree (and they will), ZeroPhix doesn’t flip a coin. It resolves overlaps using:</p><ul><li>Label normalization (so “PERSON”, “USERNAME”, “PATIENT_NAME” can converge)</li><li>Policy-based preference (regex &gt; bert &gt; spacy &gt; gliner &gt; statistical, configurable)</li><li>Majority voting and highest-confidence selection</li><li>Optional <strong>calibration on your labeled samples</strong> (learn weights from your data)</li></ul><p>This is the difference between a demo and a system you can defend.</p><h3>2) Zero-shot custom entities with GLiNER</h3><p>Sometimes you don’t have training data. You just have a deadline and a list of concepts:</p><ul><li>Internal reference</li><li>Case number</li><li>API key</li><li>Employee identifier</li></ul><p>ZeroPhix supports <strong>zero-shot detection</strong> (GLiNER) so you can introduce new entity types without running a training pipeline.</p><h3>3) Privacy-preserving strategies beyond masking</h3><p>Classic masking is often not enough (and sometimes breaks downstream workflows). ZeroPhix supports strategies like:</p><ul><li><strong>Differential privacy</strong></li><li><strong>K-anonymity</strong></li><li><strong>Format-preserving encryption</strong></li><li><strong>Synthetic data generation</strong> (with options to preserve demographics / relationships)</li></ul><p>These aren’t buzzwords; they’re levers. They let you choose <em>how</em> data remains useful after redaction.</p><h3>4) Scan-only mode + reporting</h3><p>You don’t always want to redact immediately. Sometimes you need <strong>data discovery</strong>:</p><ul><li>What sensitive entities exist in this dataset?</li><li>What’s the risk profile?</li><li>Can we generate an audit report for compliance?</li></ul><p>ZeroPhix supports scanning without mutation and generating reports (HTML/JSON/CSV/Markdown/Text). For example-heavy walkthroughs, see the repo.</p><h3>5) Document redaction with format preservation (PDF/DOCX/XLSX/CSV)</h3><p>Real data isn’t always plain text. ZeroPhix supports structured document redaction:</p><ul><li>PDF read/write, layout preservation, <strong>OCR support</strong></li><li>DOCX, XLSX (including <strong>column mapping</strong> and formula preservation)</li><li>Directory batch redaction with structure preservation</li></ul><p>Again: this is where most PII tools quietly fall over.</p><h3>6) Security posture: Auditability isn’t optional</h3><p>If you’re going to claim <strong>enterprise-grade</strong>, you need:</p><ul><li><strong>Tamper-evident audit logs</strong></li><li>Encryption at rest + key management</li><li>Compliance context in the pipeline (GDPR/HIPAA/PCI/CCPA/UK DPA/PIPEDA)</li><li><strong>Zero trust concepts</strong> (trust scoring, continuous verification) where applicable</li></ul><p>ZeroPhix has a clear stance: redaction should be observable, explainable, and reviewable.</p><h3>How it works (the mental model)</h3><p>ZeroPhix is a pipeline:</p><ol><li><strong>Detection layer</strong></li></ol><ul><li>Regex patterns (including international formats, country-specific, company- specific)</li><li>ML detectors (spaCy/BERT/custom/domain models)</li><li>Zero-shot detectors (GLiNER)</li><li>Statistical checks where useful</li></ul><p><strong>2. Consensus layer</strong></p><ul><li>Normalize labels, merge spans, resolve overlaps</li><li>Apply weighted voting / policy preference</li><li>Optionally calibrate weights on your validation set</li></ul><p><strong>3. Redaction layer</strong></p><ul><li>Choose a strategy per entity type / jurisdiction / policy</li><li>Preserve format where required</li><li>Output redacted content + structured metadata</li></ul><p><strong>4. Audit layer</strong></p><ul><li>Capture what changed, why it changed, under which policy</li><li>Support reporting and review workflows</li></ul><p>If you want the detailed architecture diagrams and walkthroughs, the <a href="https://github.com/yassienshaalan/zerophix/blob/main/README.md">README </a>goes deeper.</p><h3>Quick start (keep it simple, then expand)</h3><pre># With all features (recommended)<br>pip install &quot;zerophix[all]&quot;<br><br># Or select specific features<br>pip install &quot;zerophix[gliner,documents,api]&quot;</pre><p>Comprehensive pipeline usage (illustrative , refer to the repo for other canonical examples):</p><pre>&quot;&quot;&quot;Detection Methods Comparison - With Per-Method Redacted Text&quot;&quot;&quot;<br>print(&quot;ZEROPHIX: DETECTION METHODS COMPARISON&quot;)<br><br>text = &quot;&quot;&quot;Patient John Doe (born 1985-03-15) was treated for diabetes.<br>Contact: john.doe@hospital.com, emergency: (555) 123-4567.<br>Insurance: INS-123456, SSN: 123-45-6789.&quot;&quot;&quot;<br><br>print(f&quot;\n ORIGINAL TEXT:&quot;)<br>print(f&quot;   {text}\n&quot;)<br><br>configs = [<br>    (&quot;Regex Only&quot;, {&quot;country&quot;: &quot;US&quot;, &quot;use_bert&quot;: False, &quot;use_gliner&quot;: False}),<br>    (&quot;Regex + BERT&quot;, {&quot;country&quot;: &quot;US&quot;, &quot;use_bert&quot;: True, &quot;use_gliner&quot;: False}),<br>    (&quot;Regex + GLiNER&quot;, {&quot;country&quot;: &quot;US&quot;, &quot;use_bert&quot;: False, &quot;use_gliner&quot;: True}),<br>    (&quot;Ensemble (BERT+GLiNER)&quot;, {&quot;country&quot;: &quot;US&quot;, &quot;use_bert&quot;: True, &quot;use_gliner&quot;: True, &quot;enable_ensemble_voting&quot;: True}),<br>]<br><br>results_summary = []<br><br>for name, flags in configs:<br>    try:<br>        config = RedactionConfig(**flags)<br>        pipeline = RedactionPipeline(config)<br>        result = pipeline.redact(text)<br>        <br>        spans = result.get(&#39;spans&#39;, [])<br>        redacted_text = result.get(&#39;text&#39;, text)<br>        <br>        print(&quot;─&quot; * 70)<br>        print(f&quot; {name}&quot;)<br>        print(&quot;─&quot; * 70)<br>        print(f&quot;   Entities Found: {len(spans)}&quot;)<br>        print(f&quot;\n    REDACTED TEXT:&quot;)<br>        print(f&quot;   {redacted_text}&quot;)<br>        <br>        if spans:<br>            print(f&quot;\n    DETECTED ENTITIES:&quot;)<br>            for span in spans:<br>                label = span.get(&#39;label&#39;, &#39;UNKNOWN&#39;)<br>                start = span.get(&#39;start&#39;)<br>                end = span.get(&#39;end&#39;)<br>                if start is not None and end is not None:<br>                    value = text[start:end]<br>                else:<br>                    value = span.get(&#39;value&#39;, &#39;???&#39;)<br>                print(f&quot;       {label:&lt;25} → {value}&quot;)<br>        else:<br>            print(f&quot;\n     No entities detected&quot;)<br>        <br>        results_summary.append((name, len(spans)))<br>        print()<br>        <br>    except RuntimeError as e:<br>        print(f&quot;     {str(e)}\n&quot;)<br><br><br>print(&quot; SUMMARY&quot;)<br>print(&quot;=&quot; * 70)<br>print(f&quot;{&#39;Method&#39;:&lt;25} {&#39;PII Found&#39;:&lt;12} {&#39;Advantage&#39;}&quot;)<br>print(&quot;-&quot; * 70)<br>for name, count in results_summary:<br>    if &quot;Regex Only&quot; in name:<br>        advantage = &quot;Fast baseline, catches structured patterns&quot;<br>    elif &quot;BERT&quot; in name and &quot;+&quot; not in name:<br>        advantage = &quot;Adds PERSON_NAME detection (context-aware)&quot;<br>    elif &quot;GLiNER&quot; in name and &quot;+&quot; not in name:<br>        advantage = &quot;Detects medical/contextual entities&quot;<br>    else:<br>        advantage = &quot;Best coverage via ensemble voting&quot;<br>    print(f&quot;{name:&lt;25} {count:&lt;12} {advantage}&quot;)</pre><p>Expected Output:</p><pre>ZEROPHIX: DETECTION METHODS COMPARISON<br><br> ORIGINAL TEXT:<br>   Patient John Doe (born 1985-03-15) was treated for diabetes.<br>Contact: john.doe@hospital.com, emergency: (555) 123-4567.<br>Insurance: INS-123456, SSN: 123-45-6789.<br><br>──────────────────────────────────────────────────────────────────────<br> Regex Only<br>──────────────────────────────────────────────────────────────────────<br>   Entities Found: 4<br><br>    REDACTED TEXT:<br>   Patient John Doe (born 68b5b32e5ebc) was treated for diabetes.<br>Contact: 6b0b4806b1e5, emergency: (bceb5476591e.<br>Insurance: INS-123456, SSN: 01a54629efb9.<br><br>    DETECTED ENTITIES:<br>       DOB_ISO                   → 1985-03-15<br>       EMAIL                     → john.doe@hospital.com<br>       PHONE_US                  → 555) 123-4567<br>       SSN                       → 123-45-6789<br><br>BERT model loaded from cache: dslim/bert-base-NER<br>──────────────────────────────────────────────────────────────────────<br> Regex + BERT<br>──────────────────────────────────────────────────────────────────────<br>   Entities Found: 5<br><br>    REDACTED TEXT:<br>   Patient 6cea57c2fb6c (born 68b5b32e5ebc) was treated for diabetes.<br>Contact: 6b0b4806b1e5, emergency: (bceb5476591e.<br>Insurance: INS-123456, SSN: 01a54629efb9.<br><br>    DETECTED ENTITIES:<br>       PERSON_NAME               → John Doe<br>       DOB_ISO                   → 1985-03-15<br>       EMAIL                     → john.doe@hospital.com<br>       PHONE_US                  → 555) 123-4567<br>       SSN                       → 123-45-6789<br><br>GLiNER model loaded from cache: urchade/gliner_large-v2.1<br>──────────────────────────────────────────────────────────────────────<br> Regex + GLiNER<br>──────────────────────────────────────────────────────────────────────<br>   Entities Found: 8<br><br>    REDACTED TEXT:<br>   Patient 6cea57c2fb6c (born 68b5b32e5ebc) was 6389dc45d052 for 6a5d28d69b8b.<br>Contact: 6b0b4806b1e5, emergency: (bceb5476591e.<br>Insurance: INS-123456, f96e4bd5abd0: 01a54629efb9.<br><br>    DETECTED ENTITIES:<br>       PATIENT_NAME              → John Doe<br>       DOB_ISO                   → 1985-03-15<br>       TREATMENT                 → treated<br>       MEDICAL_CONDITION         → diabetes<br>       EMAIL                     → john.doe@hospital.com<br>       PHONE_US                  → 555) 123-4567<br>       SOCIAL_SECURITY_NUMBER    → SSN<br>       SSN                       → 123-45-6789<br><br>BERT model loaded from cache: dslim/bert-base-NER<br>GLiNER model loaded from cache: urchade/gliner_large-v2.1<br>──────────────────────────────────────────────────────────────────────<br> Ensemble (BERT+GLiNER)<br>──────────────────────────────────────────────────────────────────────<br>   Entities Found: 8<br><br>    REDACTED TEXT:<br>   Patient 6cea57c2fb6c (born 68b5b32e5ebc) was 6389dc45d052 for 6a5d28d69b8b.<br>Contact: 6b0b4806b1e5, emergency: (bceb5476591e.<br>Insurance: INS-123456, f96e4bd5abd0: 01a54629efb9.<br><br>    DETECTED ENTITIES:<br>       PERSON_NAME               → John Doe<br>       DOB_ISO                   → 1985-03-15<br>       TREATMENT                 → treated<br>       MEDICAL_CONDITION         → diabetes<br>       EMAIL                     → john.doe@hospital.com<br>       PHONE_US                  → 555) 123-4567<br>       SOCIAL_SECURITY_NUMBER    → SSN<br>       SSN                       → 123-45-6789<br><br> SUMMARY<br>======================================================================<br>Method                    PII Found    Advantage<br>----------------------------------------------------------------------<br>Regex Only                4            Fast baseline, catches structured patterns<br>Regex + BERT              5            Best coverage via ensemble voting<br>Regex + GLiNER            8            Best coverage via ensemble voting<br>Ensemble (BERT+GLiNER)    8            Best coverage via ensemble voting</pre><p>Here is a Scanning +Reporting Example</p><pre>&quot;&quot;&quot;Advanced PII Scanning with Reporting&quot;&quot;&quot;<br>from zerophix.config import RedactionConfig<br>from zerophix.pipelines.redaction import RedactionPipeline<br>import json<br><br># Example 1: Detailed Report<br>print(&quot;DETAILED DETECTION REPORT&quot;)<br><br>text = &quot;SSN: 123-45-6789, Email: john@example.com, Phone: (555) 123-4567&quot;<br>config = RedactionConfig(country=&quot;US&quot;, include_confidence=True)<br>pipeline = RedactionPipeline(config)<br><br>result = pipeline.redact(text)<br>spans = result.get(&#39;spans&#39;, [])<br><br>print(f&quot;\nText: {text}\n&quot;)<br>print(f&quot;{&#39;Entity Type&#39;:&lt;20} {&#39;Value&#39;:&lt;25} {&#39;Position&#39;:&lt;15}&quot;)<br><br>for entity in spans:<br>    label = entity[&#39;label&#39;]<br>    start, end = entity[&#39;start&#39;], entity[&#39;end&#39;]<br>    value = text[start:end]<br>    pos = f&quot;[{start}:{end}]&quot;<br>    print(f&quot;{label:&lt;20} {value:&lt;25} {pos:&lt;15}&quot;)<br><br># Example 2: Risk Assessment Report<br>print(&quot;RISK ASSESSMENT REPORT&quot;)<br><br>texts = {<br>    &quot;low_risk&quot;: &quot;Product ABC costs $49.99&quot;,<br>    &quot;medium_risk&quot;: &quot;Contact: john@example.com&quot;,<br>    &quot;high_risk&quot;: &quot;SSN: 123-45-6789, Card: 4532-1234-5678-9999, (555) 123-4567&quot;<br>}<br><br>config = RedactionConfig(country=&quot;US&quot;)<br>pipeline = RedactionPipeline(config)<br><br>risk_levels = {&quot;low_risk&quot;: 0, &quot;medium_risk&quot;: 0, &quot;high_risk&quot;: 0}<br><br>for risk, text in texts.items():<br>    result = pipeline.redact(text)<br>    count = len(result.get(&#39;spans&#39;, []))<br>    <br>    if count == 0:<br>        level = &quot;LOW&quot;<br>        risk_levels[&quot;low_risk&quot;] += 1<br>    elif count &lt;= 2:<br>        level = &quot;MEDIUM&quot;<br>        risk_levels[&quot;medium_risk&quot;] += 1<br>    else:<br>        level = &quot;HIGH&quot;<br>        risk_levels[&quot;high_risk&quot;] += 1<br>    <br>    print(f&quot;\n[{level}] {count} entities found&quot;)<br>    print(f&quot;  Original: {text}&quot;)<br>    print(f&quot;  Redacted: {result[&#39;text&#39;]}&quot;)<br><br># Example 3: Statistical Report<br><br>print(&quot;STATISTICAL REPORT&quot;)<br><br>texts = [<br>    &quot;John Doe, SSN: 123-45-6789&quot;,<br>    &quot;Email: jane@example.com&quot;,<br>    &quot;Phone: (555) 123-4567&quot;,<br>    &quot;Product: XYZ, Price: $99&quot;,<br>    &quot;Card: 4532-1234-5678-9999&quot;<br>]<br><br>config = RedactionConfig(country=&quot;US&quot;, use_bert=True, use_gliner=True)<br>pipeline = RedactionPipeline(config)<br><br>stats = {&quot;total_texts&quot;: len(texts), &quot;total_entities&quot;: 0, &quot;by_type&quot;: {}}<br><br>for text in texts:<br>    result = pipeline.redact(text)<br>    for entity in result.get(&#39;spans&#39;, []):<br>        label = entity[&#39;label&#39;]<br>        stats[&quot;total_entities&quot;] += 1<br>        stats[&quot;by_type&quot;][label] = stats[&quot;by_type&quot;].get(label, 0) + 1<br><br>print(f&quot;\nDocuments Scanned: {stats[&#39;total_texts&#39;]}&quot;)<br>print(f&quot;Total PII Found: {stats[&#39;total_entities&#39;]}&quot;)<br>print(f&quot;\nBreakdown by Type:&quot;)<br>for entity_type, count in sorted(stats[&#39;by_type&#39;].items()):<br>    pct = (count / stats[&#39;total_entities&#39;]) * 100<br>    print(f&quot;  {entity_type:&lt;20} {count:&gt;3} ({pct:&gt;5.1f}%)&quot;)<br><br># Example 4: JSON Export<br>print(&quot;JSON EXPORT&quot;)<br><br>text = &quot;Dr. Jane Smith: jane@clinic.com, (555) 987-6543, SSN: 456-78-9012&quot;<br>config = RedactionConfig(country=&quot;US&quot;, use_bert=True)<br>pipeline = RedactionPipeline(config)<br><br>result = pipeline.redact(text)<br>report = {<br>    &quot;original_text&quot;: text,<br>    &quot;redacted_text&quot;: result[&#39;text&#39;],<br>    &quot;entities_found&quot;: len(result.get(&#39;spans&#39;, [])),<br>    &quot;entities&quot;: [<br>        {<br>            &quot;type&quot;: e[&#39;label&#39;],<br>            &quot;value&quot;: text[e[&#39;start&#39;]:e[&#39;end&#39;]],<br>            &quot;position&quot;: (e[&#39;start&#39;], e[&#39;end&#39;])<br>        }<br>        for e in result.get(&#39;spans&#39;, [])<br>    ]<br>}<br><br>print(json.dumps(report, indent=2))</pre><p>Expected output:</p><pre>DETAILED DETECTION REPORT<br><br>Text: SSN: 123-45-6789, Email: john@example.com, Phone: (555) 123-4567<br><br>Entity Type          Value                     Position       <br>SSN                  123-45-6789               [5:16]         <br>EMAIL                john@example.com          [25:41]        <br>PHONE_US             555) 123-4567             [51:64]        <br>RISK ASSESSMENT REPORT<br><br>[LOW] 0 entities found<br>  Original: Product ABC costs $49.99<br>  Redacted: Product ABC costs $49.99<br><br>[MEDIUM] 1 entities found<br>  Original: Contact: john@example.com<br>  Redacted: Contact: 855f96e983f1<br><br>[HIGH] 3 entities found<br>  Original: SSN: 123-45-6789, Card: 4532-1234-5678-9999, (555) 123-4567<br>  Redacted: SSN: 01a54629efb9, Card: 77b9ec3e5b03, (bceb5476591e<br>STATISTICAL REPORT<br>BERT model loaded from cache: dslim/bert-base-NER<br>GLiNER model loaded from cache: urchade/gliner_large-v2.1<br><br>Documents Scanned: 5<br>Total PII Found: 9<br><br>Breakdown by Type:<br>  CREDIT_CARD            1 ( 11.1%)<br>  EMAIL                  2 ( 22.2%)<br>  ORGANIZATION           1 ( 11.1%)<br>  PERSON_NAME            1 ( 11.1%)<br>  PHONE_US               1 ( 11.1%)<br>  SSN                    1 ( 11.1%)<br>  TRANSACTION_AMOUNT     2 ( 22.2%)<br>JSON EXPORT<br>BERT model loaded from cache: dslim/bert-base-NER<br>{<br>  &quot;original_text&quot;: &quot;Dr. Jane Smith: jane@clinic.com, (555) 987-6543, SSN: 456-78-9012&quot;,<br>  &quot;redacted_text&quot;: &quot;Dr. a2dd3acadb1c: d87eba4c9a30, (d8f6c45fb5e3, SSN: 34450d3629c8&quot;,<br>  &quot;entities_found&quot;: 4,<br>  &quot;entities&quot;: [<br>    {<br>      &quot;type&quot;: &quot;PERSON_NAME&quot;,<br>      &quot;value&quot;: &quot;Jane Smith&quot;,<br>      &quot;position&quot;: [<br>        4,<br>        14<br>      ]<br>    },<br>    {<br>      &quot;type&quot;: &quot;EMAIL&quot;,<br>      &quot;value&quot;: &quot;jane@clinic.com&quot;,<br>      &quot;position&quot;: [<br>        16,<br>        31<br>      ]<br>    },<br>    {<br>      &quot;type&quot;: &quot;PHONE_US&quot;,<br>      &quot;value&quot;: &quot;555) 987-6543&quot;,<br>      &quot;position&quot;: [<br>        34,<br>        47<br>      ]<br>    },<br>    {<br>      &quot;type&quot;: &quot;SSN&quot;,<br>      &quot;value&quot;: &quot;456-78-9012&quot;,<br>      &quot;position&quot;: [<br>        54,<br>        65<br>      ]<br>    }<br>  ]<br>}</pre><p>From here, the real power is in:</p><ul><li>Per-jurisdiction policies (YAML configs)</li><li>Custom patterns for internal identifiers</li><li>Scan-only mode and reports</li><li>Document workflows (PDF/DOCX/XLSX)</li><li>Advanced strategies (DP / k-anon / format-preserving encryption)</li></ul><p>All of those have working examples in the GitHub repo.</p><h3>Evaluation (benchmarks + hard-mode synthetic + AU head-to-head)</h3><p>ZeroPhix was evaluated in three layers: <strong>known public benchmarks</strong>, a <strong>high-strength synthetic suite</strong> (messy formats, overlaps, OCR-like noise, partial identifiers), and a <strong>direct head-to-head</strong> against Azure’s redaction / PII detection.</p><p>On <strong>Australian-specific identifiers</strong> (think Medicare/TFN/ABN/ACN/IHI-style formats and real-world edge cases), ZeroPhix achieved <strong>almost double the accuracy</strong> in my tests, mainly because it’s <strong>jurisdiction-aware</strong> (patterns + validation) instead of treating AU data as generic number-ish text.</p><p>If you want the exact datasets, commands, and reproducible runs, they’re linked in the <strong>GitHub repo</strong>.</p><h3>Open source isn’t charity, it’s infrastructure</h3><p>If we keep outsourcing privacy enforcement to proprietary endpoints, we normalize the idea that sensitive data must leave the building to become safe.</p><p>Open source gives us a different default:</p><ul><li>Inspectability over vibes</li><li>Portability over lock-in</li><li>Ownership over trust me</li></ul><blockquote>ZeroPhix is my contribution to that direction: a redaction system that you can run locally, audit end-to-end, and evolve with your domain.</blockquote><h3>Evaluation (public benchmarks + AU compliance stress test vs Azure)</h3><p>ZeroPhix was evaluated on <strong>standard public benchmarks</strong> and on a deliberately hostile <strong>Australian compliance stress test</strong>, because redaction tools don’t fail on clean examples, they fail on messy, high-density, jurisdiction-specific reality. Details are in the <strong>repo</strong>.</p><h3>Public benchmarks (reproducible)</h3><ul><li><a href="https://github.com/NorskRegnesentral/text-anonymisation-benchmark"><strong>TAB </strong></a><strong>(Text Anonymisation Benchmark, EU legal/court text):</strong> <strong>F1 54.2%</strong> (P 48.8%, R 61.1%)</li><li><a href="https://github.com/JohnSnowLabs/pdf-deid-dataset"><strong>PDF </strong></a><strong>Deid (synthetic medical PDFs):</strong> <strong>F1 76.5%</strong> (P 67.9%, R 87.5%)<br> Auto configuration matched manual configuration in these runs.</li></ul><h3>Australian Compliance Stress Test</h3><p>I started by looking at widely used datasets (e.g., US-centric PII corpora) and hit the obvious problem: <strong>they contain essentially almost no Australian regulatory identifiers</strong>. No Medicare, no TFN, no ABN, no IHI, limited AU phone/address structure. That means they can’t validate what actually matters for AU compliance workflows.</p><p>So, I generated a <strong>fully synthetic, AU-specific dataset (2,500 records)</strong> for two reasons:</p><ol><li><strong>Regulatory coverage, guaranteed</strong><br> Synthetic generation lets you <em>force</em> coverage of AU identifiers and edge cases you must handle under real-world policy: Medicare/TFN/ABN/ACN/IHI-style patterns, provider numbers, AU phone formats, AU address components, etc.</li><li><strong>No real data exposure</strong><br> You get a realistic benchmark without ever touching customer data,important when you’re evaluating de-identification tooling in the first place.</li></ol><p>This dataset is intentionally a <em>stress test</em>, not typical docs:</p><ul><li><strong>High entity density:</strong> avg <strong>17.6 entities/doc</strong> (vs typical 3–5)</li><li><strong>Nested/overlapping structures:</strong> medical narratives with <strong>30–40+</strong> PII/PHI elements</li><li><strong>Format variation + noise:</strong> inconsistent spacing, punctuation, casing, OCR-like artifacts</li><li><strong>AU format reality:</strong> e.g., Medicare &quot;2345 67890 1&quot; vs &quot;2345678901&quot;</li><li>Mixed doc types: medical records (40%), business docs (30%), forms (15%), emails (15%)</li></ul><p>That worst-case posture is intentional: in regulated environments, the cost of <strong>one missed identifier</strong> can dwarf the cost of over-redaction.</p><h3>Results: ZeroPhix vs Azure AI PII</h3><p><strong>Overall performance (PII + PHI):</strong></p><ul><li><strong>ZeroPhix:</strong> Accuracy <strong>29.5%</strong>, F1 <strong>45.6%</strong>, Recall <strong>43.5%</strong>, Precision <strong>47.9%</strong></li><li><strong>Azure AI:</strong> Accuracy <strong>15%</strong>, F1 <strong>26.0%</strong>, Recall <strong>25.8%</strong>, Precision <strong>26.2%</strong></li></ul><p>So, on this AU-focused benchmark, ZeroPhix delivered <strong>~2× overall accuracy</strong> versus Azure (29.5% vs 15%), with materially stronger F1/precision/recall.</p><p><strong>AU-localization gap (the real headline):</strong></p><ul><li><strong>Azure AI:</strong> <strong>4.9%</strong> AU-identifier detection (<strong>537 / 10,980</strong>)</li><li><strong>ZeroPhix:</strong> <strong>95.1%</strong> AU-identifier detection</li></ul><p>This is exactly the problem sovereignty exposes: “supports AU categories” is not the same as “performs under AU formats + variation + noise.”</p><p><strong>Reality check:</strong> the benchmark is intentionally extreme, and both systems still miss entities (ZeroPhix recall <strong>43.5%</strong>). For compliance-critical production, the right posture is still <strong>automation + tuning + human review workflows</strong> — the evaluation is about which system gives you the strongest foundation inside your boundary.</p><h3>Collaboration</h3><p>ZeroPhix is early, and I want it to become <em>harder to replace</em>, not because it’s sticky, but because it’s genuinely useful and broadly battle-tested.</p><p>If you’re working in adjacent spaces (LLM/RAG ingestion, healthcare/legal/finance compliance, secure data platforms, incident response, document pipelines) and you want to collaborate, new jurisdictions, better detectors, sharper policies, more benchmarks, production hardening, <strong>reach out</strong> via GitHub issues/discussions.</p><p>Let’s keep pushing toward tooling that makes privacy enforceable <strong>without being locked in</strong> by proprietary APIs, opaque models, or “upload your sensitive text here” workflows.</p><p><strong>#opensource #python #privacy #security #compliance #datasovereignty #redaction #pii #phi #mlops #llm</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c1660353af0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Derivative Laundering: How Predictions Borrow Authority]]></title>
            <link>https://medium.com/@yassien/derivative-laundering-how-predictions-borrow-authority-3df888bbdde6?source=rss-a7dab149f80f------2</link>
            <guid isPermaLink="false">https://medium.com/p/3df888bbdde6</guid>
            <dc:creator><![CDATA[Yassien Shaalan]]></dc:creator>
            <pubDate>Sat, 07 Feb 2026 21:40:36 GMT</pubDate>
            <atom:updated>2026-02-08T23:14:07.432Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BnVBwc35zw7Jze4XO04-rA.png" /></figure><p><strong>“We live forward, but we understand backward.” Kierkegaard</strong></p><p>We don’t really predict the future. We <strong>certify</strong> it. We take a trend, wrap it in a timeline, and call the wrapping <strong>analysis</strong>. Then we argue about the date like the date is the point. A good prediction is a tool for navigating uncertainty. A popular prediction is often something else: a social object that accumulates credibility as it travels, even when its evidence thins out. There is a particularly modern form of prediction failure that keeps repeating across domains like technology, economics, culture, demographics, markets, anywhere a line on a chart can be extended.</p><p>You see it in claims like: <strong>from the old promise of flying cars by the year 2000,</strong> to today’s <strong>AI will replace X in Y years, agents will run companies,</strong> <strong>software engineers will be prompts,</strong> <strong>this industry is finished,</strong> <strong>this country will collapse, this generation will never…</strong></p><p>The nouns always change. The mechanism doesn’t. The mechanism is the same whether you’re talking about models, markets, memes, migration, or money. The problem is not just extrapolation. It’s <strong>extrapolation </strong>that has been <strong>re-extrapolated iteratively </strong>and then treated as input data.</p><blockquote>I call it <strong>derivative laundering (</strong>not the financial kind).</blockquote><h3>The hidden mechanism is certainty compounding</h3><p>Here’s the laundering pipeline as I see it:</p><ol><li>Someone observes a curve for a short window.</li><li>They extrapolate a little.</li><li>Someone else takes that extrapolation as a fact and extrapolates again.</li><li>A third person adds a year.</li><li>A fourth repeats it until it sounds <strong>inevitable</strong>.</li></ol><blockquote><strong>A forecast becomes a meme with math fonts.</strong></blockquote><p>And because <strong>repetition </strong>is a form of <strong>social proof</strong>, the claim gains weight even as the underlying <strong>evidence </strong>gets <strong>thinner</strong>. What started as “it’s accelerating” becomes “it’s inevitable,” and what started as “it might happen” becomes “it will happen” but more <strong>importantly </strong>with a <strong>date attached</strong>, like a shipping label.</p><blockquote>The striking part here is that the <strong>year</strong> does most of the persuasion.</blockquote><p>A year is a confidence hack as it converts an uncertain process into a calendar object, something the brain can hold like a reservation. A prediction with a year feels accountable. Even when it isn’t.</p><h3>Why the timeline is the most dangerous number</h3><p>A timeline is a claim about <strong>rate </strong>and rate is where error compounds quietly. If you’re off about growth by a small amount, the miss grows exponentially with time. This is not philosophy; it’s basic math wearing a polite face.</p><p>A simple model:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/406/1*ZI_cTNCbr8Mzh2STEUg7Kw.png" /></figure><p>Then your forecast ratio is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/163/1*orH7ZWAxB87rrKQ5epHnBg.png" /></figure><p>That’s the entire problem in one line: forecast error grows multiplicatively with horizon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/416/1*XEt3kgY7mOQfBZz_cqUpow.png" /></figure><p>Thus, a small growth-rate mistake becomes a <strong>65% miss</strong> a decade later, without any black swans. Just ordinary estimation error.</p><p>And this is before the real reason forecasts fail → <strong>regimes change.</strong></p><blockquote><strong>Not because the world is chaotic in a mystical sense, but because the world is made of constraints, incentives, feedback, and substitution. The future doesn’t just continue. It collides with what it cannot ignore.</strong></blockquote><h3>The three regimes every trend eventually enters</h3><p>Most prediction errors are <strong>regime errors</strong>. We look at a graph and assume it belongs to the regime we want. We pick the story first (e.g. it will keep accelerating) and then recruit the curve as evidence. But trends don’t owe us continuity.</p><p><strong>Regime 1: Linear</strong><br> Stable processes with stable constraints.</p><p><strong>Regime 2: Exponential</strong><br> The phase that makes everyone feel like a genius.</p><p><strong>Regime 3: Logistic (S-curve)</strong><br> Reality arrives: constraints bind, saturation happens, substitution emerges, incentives resist, side-effects bite.</p><p>The philosophical mistake here is thinking exponential is a <strong>property </strong>of the <strong>world</strong>, where it’s usually a property of a <strong>window</strong>.</p><blockquote><strong>Exponential is a phase, not a personality.</strong></blockquote><p>This is why <strong>inevitable </strong>predictions often collapse. They are often short-run dynamics narrated as long-run destiny. If you want a systems lens for this: growth runs into limits, delays distort perception, and feedback loops turn more into less. That’s the skeleton behind decades of systems thinking on overshoot, carrying capacity, and constraint-driven dynamics. It’s not that the line stops , it’s that the line discovers it was never alone.</p><h3>Derivative laundering “The meta-fallacy“</h3><p>Classic extrapolation says: This is the trend.</p><p>Derivative laundering says: This is the trend, and also the trend’s future, and also the trend’s confidence.</p><p>It’s not just a forecasting error, it becomes more of an <strong>epistemic</strong> error.</p><p>Because the second person in the chain is no longer forecasting reality; they are forecasting the first person’s <strong>story</strong> about reality. The object being modelled quietly shifts from the world to the narrative about the world. And narratives have their own gravity.</p><p>This is how you get predictions that are suspiciously clean with neat curves, single inflection points, one breakthrough that flips the world, one date that ends the debate.</p><blockquote>These are not statistical objects. They’re narrative objects.</blockquote><h3>Extrapolation Debt as measurable diagnostic</h3><p>One way to quantify how laundered a prediction is by tracking its assumption structure. Lets define a rough score.</p><p><strong>Extrapolation Debt Ratio (EDR)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*GqgseoirIw1AMvky6t0Z1g.png" /></figure><p><strong>Borrowed assumptions</strong> assume stuff like growth continues, constraints don’t bind, no substitution, no backlash, no regulation, demand stays constant, incentives align, quality scales with quantity, cost curves don’t kink, the tail behaves like the mean.</p><p><strong>Tested assumptions </strong>look like out-of-sample validation, alternative baselines, error bars / uncertainty intervals, regime checks, sensitivity analysis, historical analogues with quantified similarity, calibration tracking, explicit <strong>what would falsify this?</strong> clauses.</p><p><strong>High-EDR</strong> predictions are the ones that travel fastest, because they’re easiest to repeat.<br><strong> Low-EDR</strong> predictions are the ones that are useful, because they survive contact with measurement.</p><p>This is the deeper point here that <strong>confidence is easier to scale than verification.</strong> So the internet scales confidence.</p><h3>The Unpacking Tool: what order is this prediction?</h3><p>Most laundered predictions <em>sound</em> like they come straight from data, but they’re several layers deep. To decode one, ask: <strong>how far is it from the measured world?</strong></p><ul><li><strong>Order 0: Observation:</strong> In the last 6–12 months, X moved from A to B. (window + units + method)</li><li><strong>Order 1: Extrapolation:</strong> If the rate continues, X reaches C by T. (assumes the regime holds)</li><li><strong>Order 2: Narrative upgrade:</strong> Therefore the category transforms. (metric → meaning; <em>replace/disrupt/obsolete</em>)</li><li><strong>Order 3: Timeline certification:</strong> By 2028… (the year sells certainty; often not computed)</li><li><strong>Order 4: Social propagation:</strong> Everyone’s saying 2028. (circulation replaces evidence)</li></ul><p><strong>Quick check:</strong> ask for the <em>lowest-order input -</em> the measured trend window-and what would falsify the regime staying the same. If that’s fuzzy, you’re not holding a forecast; you’re holding a derivative.</p><h3>Example: unpacking a Gartner-style prediction (and spotting the laundering stages)</h3><p>Now let’s apply the tool to something concrete.</p><p>Take a clean, quotable line like Gartner’s: <a href="https://www.gartner.com/en/newsroom/press-releases/2025-03-05-gartner-predicts-agentic-ai-will-autonomously-resolve-80-percent-of-common-customer-service-issues-without-human-intervention-by-20290"><strong>“By 2029, agentic AI will autonomously resolve 80% of common customer service issues without human intervention.”</strong> </a><br> Or its cousin: <a href="https://www.gartner.com/en/newsroom/press-releases/2025-08-26-gartner-predicts-40-percent-of-enterprise-apps-will-feature-task-specific-ai-agents-by-2026-up-from-less-than-5-percent-in-2025"><strong>“Up to 40% of enterprise applications will include task-specific AI agents by 2026, up from &lt;5% in 2025.”</strong></a> <br> These are perfect case studies because they’re structured to travel: crisp percentage, crisp year, crisp inevitability. Here’s how to unpack them without dismissing them and how to tell what order of prediction you’re holding.</p><p><strong>Order 0 (ground truth): what is actually being measured?</strong><br> Before the quote becomes a prophecy, ask what the observable input is. For the 40% of apps by 2026 claim, the nearest Order-0 objects would be things like: actual counts of shipped enterprise apps with embedded agent features, deployment telemetry, procurement data, or audited survey panels. Gartner’s press-release format is not the dataset; it’s the headline. (That doesn’t make it wrong by the way it just means the data layer is behind the paywall or methodology.) The first move is to demand the measured present before you accept the projected future.</p><p><strong>Order 1 (extrapolation): which variable is being extended?</strong><br> Now identify the extrapolated curve. Is it: (a) capability improvement, (b) vendor roadmap velocity, (c) enterprise adoption intent, or (d) actual deployments? Each yields radically different dynamics.</p><p>Gartner’s Hype Cycle methodology explicitly acknowledges how publicity can outrun reality (Peak of Inflated Expectations → Trough of Disillusionment), which is basically an institutional admission that <strong>attention is not adoption</strong>. <br> If a prediction doesn’t clearly state <em>which curve</em> it is extending, it’s already drifting upward in order.</p><p><strong>Order 2 (narrative upgrade): when could becomes will, and scope silently expands</strong><br> Watch the scope creep. <strong>Common customer service issues</strong> is a carefully bounded phrase, then the internet paraphrases it into <strong>customer service is automated</strong>, then into <strong>support teams disappear</strong>. The laundering happens in the <em>paraphrase layer</em>, not necessarily in the original claim. <strong>A single bounded operational forecast is retold as a general labour forecast</strong>.</p><p>This is where engineers (or anyone who owns the escalation path) should intervene: <strong>common issues </strong>are <strong>not </strong>the same thing as <strong>the tail</strong>, and the tail is where brands, compliance, refunds, fraud, and liability live.</p><p><strong>Order 3 (timeline certification): where the year does the persuasion</strong><br> Even if the direction is right, the year is often the least justified part. The date implies a smooth diffusion curve, stable budgets, stable incentives, stable regulation, stable integration capacity which <strong>means basically: “no surprises.”</strong></p><p>That’s a Blobby assumption pack and the math is cruel here: small errors in adoption rate estimates compound over time (your earlier e(Δg)t point), <strong>so a confident year can be statistically unjustified even when the qualitative trend is correct</strong>.</p><p><strong>Order 4 (social propagation): when the source becomes Gartner says, not here’s the model</strong><br> The final laundering stage is when the claim stops being a forecast and becomes a citation token: (<strong>“Gartner says X,” Microsoft/Google/OpenAI, ….says Y) is then used to close conversations</strong>, win budgets, or justify urgency. Ironically, Gartner’s own Hype Cycle framing warns that early success stories can be <strong>accompanied by scores of failure</strong>s, yet the propagated version tends to keep only the success-shaped narrative.</p><blockquote>At this stage you’re no longer debating a model, you’re negotiating a meme.</blockquote><h3>Forecasting is a craft that data proves it</h3><p>If prediction were just extending lines, <strong>training wouldn’t matter</strong>. But in real forecasting tournaments, training and method do matter super-forecaster style practices, base rates, calibration discipline, decomposition, and constant updating, produce persistent, measurable skill, and structured teams have repeatedly outperformed unstructured ones.</p><p>Also, in large-scale forecasting benchmarks like M4(a competition built around forecasting 100,000 real-world time series), complexity doesn’t automatically win; strong baselines remain stubbornly competitive, which is a polite way of saying: many fancy curves are just <strong>confident overfitting</strong>.</p><blockquote>Again my point should be clear now, the problem isn’t that forecasting is impossible. It’s that most public forecasts are not designed to be right.</blockquote><p>They’re designed to be <strong>repeatable</strong>. Repeatability is the currency of public discourse so accuracy becomes optional and accountability is already rare.</p><h3>The pivot: the adult question to ask any prediction</h3><p>When someone gives you a timeline -any timeline- ask:</p><p><strong>Which assumption are you treating as constant that historically isn’t?</strong></p><p>Or, even go bolder:</p><p><strong>What would have to be true for this extrapolation to stay in the same regime?</strong></p><p><strong>If they can’t answer, the timeline is not a forecast</strong>. It’s a date-shaped feeling. And here’s the Kierkegaard loop closure: we only understand backward, so design predictions that can survive being read backward. Not just did you get the year right? but: <strong>were you honest about what you assumed, what could break, and how uncertainty should have been priced?</strong></p><p>That’s what separates a forecast from a marketing story.</p><h3>Closing the loop</h3><p>In a noisy world, the scarce resource isn’t information , it’s <strong>signal you can defend</strong>. Timelines feel like signal because they’re crisp, but crispness is often just compression: uncertainty squeezed into a date so it can travel. That’s how forecasts turn into doctrine and not by becoming more true, but by becoming easier to repeat.</p><p>So treat every confident prediction like a claim that owes you a ledger. <strong>It may look perfectly clear, especially when it arrives as a headline, then another headline, then a dozen reposts with the same number and a sharper tone.</strong> Repetition can make a claim feel settled even while the underlying evidence stays thin. In a feed-based world, certainty doesn’t need to be proven; it just needs to be <strong>seen often enough</strong> to slip past your skepticism as familiarity.</p><p>Where did the number come from? What’s the baseline it beats? What breaks it? What changes the regime? If the answer is trust me or everyone says, or Big Tech Company [most would fit here] says, etc. you’re not looking at truth, you’re looking at social momentum.</p><p>The goal of this article isn’t to stop forecasting or to diminish its analytical value. It’s to stop letting noise act as inevitability. In practice, that means choosing methods that punish self-deception: probabilities over proclamations, error bars over slogans, calibration over charisma. Because in the end, the difference between insight and propaganda is simple: <strong>one can survive contact with the past.</strong></p><p>#AI #AITrends #AgenticAI #Automation #FutureOfWork #Forecasting #Predictions #Extrapolation #TrendAnalysis #DataScience #Statistics #Uncertainty #Probability #Calibration #BaseRates #SignalVsNoise #Epistemology #Truth #CriticalThinking #SystemsThinking #ComplexSystems #FeedbackLoops #RegimeChange #Overfitting #ModelRisk #DecisionMaking #ScenarioPlanning #TechTrends #HypeCycle #Superforecasting #MediaLiteracy</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3df888bbdde6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Evaluation Under Asymmetry: When Verification Dominates Generation]]></title>
            <link>https://medium.com/@yassien/evaluation-under-asymmetry-when-verification-dominates-generation-56b17b614fc5?source=rss-a7dab149f80f------2</link>
            <guid isPermaLink="false">https://medium.com/p/56b17b614fc5</guid>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[systems-engineering]]></category>
            <category><![CDATA[model-evaluation]]></category>
            <category><![CDATA[llm-evaluation]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Yassien Shaalan]]></dc:creator>
            <pubDate>Fri, 02 Jan 2026 23:30:04 GMT</pubDate>
            <atom:updated>2026-01-13T03:34:28.582Z</atom:updated>
            <content:encoded><![CDATA[<p><em>The first principle is that you must not fool yourself and you are the easiest person to fool.” Richard Feynman</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*42u7JScodo5eXMtD63TeXQ.png" /></figure><p>Generation cost has collapsed. Verification cost has not.</p><p>Modern AI systems can produce complex artifacts like codebases, workflows, analytical pipelines, decision logic in just minutes. In controlled industry studies, developers using AI coding assistants report <strong>productivity gains of ~55%</strong>, with task completion times dropping by more than half (GitHub Copilot user study). Generation, in practical terms, has become cheap.</p><p><strong>Verification has not followed the same curve.</strong></p><p>The time required to evaluate, audit, and justify these artifacts remains bounded by human attention, cognitive load, and system complexity. In many real systems, the effort required to understand <em>why</em> an AI-generated system works now exceeds the effort required to produce it. It is increasingly common for outputs generated in tens of minutes to require hours or days of review before they can be trusted.</p><p>For decades, engineering and applied science relied on a structural asymmetry: <strong>solution cost was high, verification cost was low</strong>. This asymmetry enabled scale. You could delegate work, automate production, and rely on simple checks to establish correctness.</p><p><strong>That type of asymmetry is disappearing.</strong></p><p>In modern AI systems especially those involving multiple agents, tools, and emergent behaviour, verification cost can dominate generation cost. Not as an edge case, but as a default. The risk is not systematic failure. The risk is <strong>systematic overconfidence</strong>: confidence growing faster than evidence.</p><p>This article <strong>analyses </strong>that <strong>asymmetry</strong>, explains why it arises in agentic AI systems, and <strong>proposes </strong>ways to <strong>measure verification difficulty explicitly</strong>, rather than inferring trust from speed, fluency, or apparent success.</p><h3>A Taxonomy of Verification Cost</h3><p>The core distinction is not how hard a problem is to solve, but how hard it is to <strong>verify the result</strong>. To make this distinction concrete, it helps to step back and look at how <strong>verification cost evolves as systems scale</strong>. The figure below illustrates a recurring pattern: while generation cost often grows linearly or near-linearly with system size, verification cost tends to grow faster and sometimes polynomially, sometimes combinatorially, once interactions, dependencies, and emergent behaviour enter the picture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TXbXm63ubIXVaXePB5n73g.png" /><figcaption><strong>Figure 1: The Verification Asymmetry Map.</strong> A taxonomy of cost showing the trajectory of modern AI scaling toward regimes where verification complexity outweighs generation effort.</figcaption></figure><p>This divergence is not primarily about algorithmic efficiency. It reflects a deeper structural shift: verification increasingly depends on <em>global system </em>behaviour rather than local checks. As a result, problems naturally fall into three regimes depending on how verification cost scales relative to generation (or solution). These regimes form the basis of the taxonomy that follows.</p><h3>Type I: Verification Cheaper Than Generation</h3><p>In this regime, verification is strictly cheaper than creation.</p><p>A candidate solution can be checked quickly against a well-defined specification. Pseudocode can be reviewed. Constraints can be validated. Logical consistency can be assessed without reconstructing the full reasoning process.</p><p><strong>Examples:</strong></p><ul><li>Checking whether a Sudoku solution is valid: you don’t need to know how it was solved, only that each rule is satisfied.</li><li>Verifying a password meets complexity rules: length, characters, and format can be checked instantly.</li></ul><p>This regime underpins most classical evaluation methods: exams, benchmarks, unit tests, and pass/fail criteria. Delegation is safe because trust does not depend on understanding the full path to the solution.</p><h3>Type II: Verification Comparable to Generation</h3><p>Here, verification requires replaying most of the work.</p><p>Long calculations must be redone. Simulations must be re-run. Proofs must be walked step by step. There are few shortcuts, but costs scale roughly linearly with problem size.</p><p><strong>Examples:</strong></p><ul><li>Checking a long spreadsheet calculation: to verify the final number, you often have to re-trace the formulas cell by cell.</li><li>Reviewing a tax return: verifying correctness takes almost as long as preparing it.</li></ul><p>This regime is already fragile, but still manageable with discipline and tooling.</p><h3>Type III: Verification More Expensive Than Generation</h3><p>This is where modern AI systems increasingly operate.</p><p>Generation can be cheap because it is automated and parallelized. Verification, however, requires reconstructing structure, intent, assumptions, and interactions that were never made explicit.</p><p><strong>Examples:</strong></p><ul><li>Auditing a multi-agent decision system for correctness or compliance where each agent may behave correctly in isolation, yet global correctness depends on their interaction graph. Verifying system-level behaviour requires exploring a combinatorial space of states, analogous to constraint satisfaction or SAT-style verification.</li><li>Post-incident analysis of an autonomous or adaptive system where reproducing the outcome is trivial while proving <em>why</em> it occurred requires tracing model versions, prompts, agent coordination, external data, and timing. Verification effort grows super-linearly with system size, even when generation was near-instant.</li></ul><p>Multi-agent systems amplify this effect:</p><ul><li>Outputs are distributed across components</li><li>Assumptions are implicit, not contractual</li><li>Failures are non-local</li><li>Correctness is contextual and emergent</li></ul><p>Verification no longer scales linearly. It often scales combinatorially.</p><h3>Why AI and Multi-Agent Systems Break Evaluation Intuition</h3><p>AI systems no longer produce answers. They produce <strong>artifacts</strong>.</p><p>Artifacts have structure: files, states, interfaces, dependencies, and temporal behaviour. Multi-agent systems add interaction, coordination, and shared state.</p><p>Correctness is no longer a property of a single output. It is a property of a system evolving over time.</p><p>This shifts evaluation from checking results to <strong>auditing systems</strong>. Traditional metrics like accuracy, latency, success rate, capture surface behaviour but say little about how hard it is to establish trust when something goes wrong.</p><p>The evaluator’s task becomes one of reconstruction rather than inspection.</p><h3>Measuring Verification Difficulty Quantitatively</h3><p>If verification is becoming the bottleneck, it should be measurable.</p><p>The aim here is not precision, but <strong>comparability</strong>. Replacing vague discomfort with numbers already improves decision-making.</p><h3>Verification Time Ratio (VTR)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/162/1*iJ2F6_3POqrjvRyPvxjPCg.png" /></figure><ul><li>VTR &lt; 1: classical regime</li><li>VTR ≈ 1: fragile regime</li><li>VTR &gt; 1: verification dominates</li></ul><p>This can be measured empirically using human review time, automated audits, or hybrid processes.</p><h3>Artifact Surface Area (ASA)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/210/1*fbxEm6mLXbHRw-2Hv7LT0Q.png" /></figure><p>Where:</p><ul><li>Fi = number of artifacts (files, models, agents)</li><li>Di = dependency edges</li><li>Ii = interaction points</li></ul><p>Verification effort grows super-linearly with ASA. Large surface areas are harder to reason about even when technically correct.</p><h3>Explainability Reconstruction Cost (ERC)</h3><p>Instead of scoring explainability, measure <strong>effort required to reconstruct justification</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/405/1*dsob7ZGbieadeJOiLY6w_A.png" /></figure><p>If understanding why a system works requires reverse-engineering, trust is already expensive.</p><h3>Human Cognitive Load (HCL)</h3><p>Cognitive load can be approximated as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/202/1*ggDobM9fa5Tk5_S7bSDZuA.png" /></figure><p>Where:</p><ul><li>C = number of distinct concepts required</li><li>S = state transitions to track</li><li>R = reasoning depth</li></ul><p>This captures the point at which verification becomes unreliable even if theoretically possible.</p><h3>Putting It Together: A Quantitative Proxy for Verification Difficulty</h3><p>At this point, it is reasonable to ask: <em>Can we reduce all of this to a single measure? </em>Not a perfect one, but something concrete enough to replace vague discomfort with numbers.</p><p>The goal is not precision. The goal is <strong>comparability</strong>.</p><p>Below is a composable proxy that practitioners can adapt to their own systems.</p><h4>A Composite Verification Difficulty Index (VDI)</h4><p>We define a <strong>VDI</strong> as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/505/1*7fcqa5Yylunf-6kFKHIydA.png" /></figure><p>Where: α,β,γ,δ context-dependent weights reflecting what matters most in your domain (safety-critical systems will weight ERC and HCL higher).</p><p>The logarithm on ASA reflects diminishing returns: surface area grows quickly, but verification pain accelerates once a threshold is crossed.</p><h3>Interpreting the Index (Qualitative Bands)</h3><p>You can interpret VDI loosely:</p><ul><li><strong>Low VDI</strong>: Classical verification regime. Safe to delegate. Cheap to audit.</li><li><strong>Medium VDI</strong>: Verification fragile. Requires discipline, documentation, and guardrails.</li><li><strong>High VDI</strong>: Verification dominates lifecycle cost. Trust does not scale linearly.</li></ul><p>Importantly, <strong>accuracy metrics alone do not move a system between these bands</strong>. Two systems can have identical performance metrics and radically different VDI values.</p><p>The one with lower VDI will:</p><ul><li>Be safer to scale</li><li>Be cheaper to maintain</li><li>Fail more transparently</li><li>Accumulate less hidden risk</li></ul><p>This is why verification difficulty should be treated as a <strong>primary system property</strong>, not an afterthought.</p><p>Now, lets show h<strong>ow to Substitute with real numbers in concrete example</strong>.</p><p>Suppose a team deploys a multi-agent workflow:</p><ul><li><strong>Generation </strong>time: 10 minutes</li><li><strong>Human </strong>+ automated <strong>verification </strong>time: 2 hours → VTR=12</li><li><strong>Artifacts</strong>: (18 files, 27 dependency edges 9 agent interaction points) → ASA=54</li><li><strong>Explainability </strong>reconstruction: 1.5 hours to trace logic and assumptions<br> → ERC=1.5</li><li><strong>Cognitive </strong>load estimate (Concepts= 6, State transitions= 5, Reasoning depth=3)→ HCL=90</li></ul><p>Using conservative weights (α = 1, β = 1, γ = 1, δ = 0.05), the system’s <strong>VDI evaluates to approximately 22</strong>. This places the system <strong>firmly in the high verification-cost band</strong>, where verification effort dominates generation and scalable trust becomes fragile.</p><p>In this regime, systems may function correctly, but confidence is expensive to establish and does not scale linearly with added complexity or autonomy.</p><blockquote>This makes the issue explicit: <em>the bottleneck is not capability, but evaluability</em>.</blockquote><h3>Can Agents Verify Agents?</h3><p>A natural response is to ask whether agents themselves can solve the verification problem.</p><p>Agents can help:</p><ul><li>Parallelize checks</li><li>Enforce consistency constraints</li><li>Replay workflows</li><li>Reduce human effort</li></ul><p>But agents do not remove the problem. They <strong>shift it</strong>.</p><p>Shared model assumptions, correlated blind spots, and specification ambiguity can produce <em>illusory verification</em>: systems that appear audited but are not meaningfully understood.</p><p>Agents can narrow the audit surface. They cannot eliminate the need for human judgment at trust boundaries.</p><h3>Locating Yourself on the Verification Trajectory</h3><p>At this point, the problem should be clear: verification difficulty is not binary. Systems do not suddenly become hard to verify. They <strong>move</strong> often gradually into regimes where verification dominates generation.</p><p>What matters, therefore, is not a static assessment (is this system verifiable?) but a <strong>trajectory question</strong>:</p><blockquote>In which direction is this system moving as it scales?</blockquote><p>To make this concrete, it is useful to map systems onto a two-dimensional space defined by generation cost and verification cost. This does not require precise measurement. Relative positioning is sufficient to expose risk.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uAZXZdz1dSYsJTYbl6a7zg.png" /><figcaption><strong>Figure 2:</strong> Evaluation regimes mapped by generation cost and verification cost. Systems tend to reduce generation cost faster than verification cost, moving upward into an asymmetric regime where verification dominates creation and scalable trust becomes the limiting factor.</figcaption></figure><p>The horizontal axis represents <strong>generation cost</strong>: the time, effort, or resources required to produce the system or its outputs. The vertical axis represents <strong>verification cost</strong>: the effort required to establish confidence that the system behaves correctly, safely, and as intended.</p><p>This creates four qualitatively distinct regions.</p><ul><li><strong>Bottom-right (Classical Engineering Regime)</strong><br> Generation is expensive, verification is cheap. Systems are stable, auditable, and scale well under delegation.</li><li><strong>Diagonal band (Balanced Regime)</strong><br> Generation and verification scale together. Verification is work, but remains tractable with discipline and tooling.</li><li><strong>Top-left (Asymmetric AI Regime)</strong><br> Generation is cheap, verification is expensive. This is where many modern agentic and multi-agent systems land. Outputs are easy to produce, but confidence is costly to establish.</li><li><strong>Top-right (Intractable Complexity Regime)</strong><br> Both generation and verification are expensive. Systems in this region tend to stall, accumulate hidden risk, or collapse under their own complexity.</li></ul><blockquote>The critical observation is not where a system sits today, but <strong>how it moves over time</strong>.</blockquote><h3>The Current AI Trajectory</h3><p>Most contemporary AI systems reduce generation cost dramatically while leaving <strong>verification cost largely unchanged</strong> or even increasing it. On the chart, this appears as an <strong>upward movement that outpaces rightward movement</strong>. This is the verification asymmetry in visual form.</p><p>Teams often misinterpret early success in this regime as maturity. In reality, they are accruing verification debt: systems remain functional, but increasingly difficult to reason about, audit, or safely extend.</p><h3>Using the Chart Practically</h3><p>This chart can be used as a decision tool rather than a diagnostic label:</p><ul><li>Plot your current system.</li><li>Plot your next planned iteration.</li><li>Ask whether architectural choices move you upward, rightward, or diagonally.</li></ul><p>Movement toward the diagonal is stabilizing. Persistent upward movement is a warning signal, even when performance metrics look strong.</p><h3>Conclusion “ Verification Is the Constraint”</h3><p>AI has inverted a long-standing assumption: generation has become cheap, while verification has not. Systems now produce complexity faster than organizations can evaluate it. This does not make AI unsafe by default. It makes <strong>unexamined trust unsafe</strong>.</p><p>Closing this gap is not a peripheral concern. It is a central challenge that demands deliberate effort from scientific research in verification and evaluation, from engineering practices that prioritize auditability and transparency, and from businesses willing to i<strong>nvest in trust as a primary asset rather than an afterthought</strong>.</p><p>The next phase of AI progress will not be limited by intelligence, compute, or scale. It will be limited by our willingness to <strong>build systems that can be verified as efficiently as they are generated</strong>. Verification is no longer downstream of progress. It is the constraint that must now be engineered for.</p><p>#AI #Verification #SystemsEngineering #AgenticAI #ModelEvaluation #TrustInAI #ComplexSystems</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56b17b614fc5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Many Plugs Away Are We?]]></title>
            <link>https://medium.com/@yassien/how-many-plugs-away-are-we-f3a32709b270?source=rss-a7dab149f80f------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3a32709b270</guid>
            <dc:creator><![CDATA[Yassien Shaalan]]></dc:creator>
            <pubDate>Wed, 31 Dec 2025 02:06:22 GMT</pubDate>
            <atom:updated>2025-12-31T02:24:53.212Z</atom:updated>
            <content:encoded><![CDATA[<h3>From uptime to tail risk in a digitally dependent world</h3><blockquote>“Civilization exists by geological consent, subject to change without notice.”<em><br></em><strong><em>Will Durant</em></strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*cRRxeGeUXiUfJK9o5RmR7A.png" /></figure><p>I often joke with friends by asking, <em>“How many plugs away are we?”</em>, usually in the context of how dependent we’ve all become on the internet, the cloud, and everything layered on top of them. This time, though, I tried to take that joke more seriously. Not as a punchline, but as a question worth thinking through carefully, to see whether we could get closer to a shared understanding of what is actually missing in how we reason about resilience today.</p><p>This article is not about artificial intelligence at the core like my previous ones. However, AI will be affected by everything discussed here, often disproportionately, but it is downstream of the same substrate that now carries payments, healthcare operations, logistics, identity, and emergency communications. The core risk is not that AI systems fail. It is that <strong>modern societies, companies, and economies have converged on tightly coupled digital infrastructure whose rare failures propagate faster than we are used to reasoning about</strong>.</p><p>The question we need to ask is not rhetorical and not alarmist. It is pragmatic and operational in nature:</p><p><strong>How many plugs away are we?</strong></p><p>Not how often things fail. Not whether a single outage causes collapse. But how many interdependent assumptions must break, briefly, plausibly, and often recoverably, before harm begins to accumulate faster than recovery can reverse it. That framing matters because collapse today is not sudden. It is <strong>cascading</strong>.</p><h3>Why this question exists at all</h3><p>For most of history, critical systems were local, slow-moving, and loosely coupled. Failures were visible, substitution was often physical, and recovery was manual but understandable. Digital infrastructure changed all three properties at once.</p><p>Over the last two decades, we optimised relentlessly for efficiency, scale, and availability:</p><ul><li>Shared cloud regions instead of bespoke data centres</li><li>Global routing instead of local networks</li><li>Centralised identity instead of fragmented credentials</li><li>Real-time payments instead of delayed settlement</li></ul><p>Each of these decisions was rational in isolation. Together, they changed the <em>failure geometry</em> of society.</p><p>We did not just digitise existing processes. We <strong>stacked dependencies</strong>.</p><p>This is why the “plug” as metaphor is useful. A plug is not a disaster. It is a dependency edge. Removing one rarely matters. Removing several- especially the wrong ones, at the wrong time- changes the world the system operates in.</p><h3>This is not theoretical: we have already observed the cascades</h3><p>When a major regional outage occurred at <strong>Amazon Web Services</strong> in December 2021, the most striking feature was not what went down, but <em>how unrelated the affected services appeared</em>. Retail platforms, logistics tooling, consumer devices, internal enterprise systems , all failed simultaneously.</p><p>They did not share customers. They shared <strong>control planes, authentication services, and regions</strong>.</p><p>Similarly, the global outage at <strong>Facebook</strong> in October 2021 was not a content failure but a routing one. A configuration change withdrew network routes from the internet. Internal access systems failed. Recovery slowed because engineers depended on the same broken systems they were trying to fix. Third-party services that relied on Facebook login or messaging were affected even though their own infrastructure was intact.</p><p>At the network layer, subsea cable disruptions in the Red Sea in early 2024 constrained a significant fraction of traffic between Asia, Europe, and the Middle East. Traffic rerouted, but latency increased and capacity tightened. Services degraded rather than disappeared, exactly the failure mode that stresses downstream systems and exposes hidden coupling.</p><p>None of these incidents lasted days. Most lasted hours. That is precisely <strong>why they matter</strong>.</p><h3>Why uptime is not being a sufficient metric</h3><p>The dominant resilience metric of the digital era has been uptime. It made sense when failures were mostly independent and when impact scaled roughly linearly with downtime.</p><p>Neither assumption holds anymore. Uptime is an average-case measure. Catastrophe is a tail event.</p><p>A system can meet every SLA and still be fragile if:</p><ul><li>Failures are correlated across services</li><li>Recovery times overlap with customer or societal tolerance</li><li>Harm grows nonlinearly with duration</li></ul><p>In other words, <strong>optimising the mean does not protect the tail</strong>. This is not a philosophical claim. Actually, it is a <strong>structural </strong>one.</p><h3>Time-to-impact: the variable we kept ignoring</h3><p>The missing concept in most resilience discussions is <strong>time-to-impact</strong>.</p><p>For every service, there is a delay between degradation and meaningful harm. That delay is not arbitrary; it is shaped by social norms, institutional design, and substitution options.</p><p>Payments in a cash-heavy economy have long time-to-impact. Payments in a cash-light economy do not.</p><p>Healthcare systems can function through brief outages, but risk accumulates with duration through backlog, cognitive load, and coordination failure.</p><p>Fuel and food systems buffer disruption through inventory, then cascade sharply once visibility and coordination break down.</p><p>What matters is not whether services fail, but <strong>how long recovery takes relative to these impact latencies</strong>.</p><h3>Australia as a concrete case</h3><p>Australia is a useful case study because it is not unusually fragile. It is technologically advanced, geographically isolated, politically stable, and institutionally mature. That makes its dependency profile instructive rather than extreme.</p><p>From the <strong>Reserve Bank of Australia Consumer Payments Survey (2022)</strong>:</p><ul><li>Cash accounts for roughly <strong>13% of consumer payments by number</strong></li><li>Cards account for <strong>~76%</strong></li><li>More than half of respondents used <strong>no cash at all</strong> during the survey week</li><li>Around <strong>95% of in-person card payments are contactless</strong></li></ul><p>Operational reporting for Australia’s real-time payments infrastructure (the New Payments Platform) shows strong central reliability, but participant-level incidents still occur and are often resolved within <strong>hours</strong>, not minutes.</p><p>This gives us a bounded, empirical statement:</p><blockquote><em>In Australia, </em><strong><em>payment disruption has a short impact latency</em></strong><em>. Harm begins to accumulate within minutes to hours.</em></blockquote><p>Healthcare looks different. Over <strong>24 million Australians</strong> have a My Health Record. Clinical operations are mostly digital, but healthcare systems are designed to degrade before they fail. Harm appears later, but compounds once it does.</p><p>Fuel, logistics, and food systems lag further, buffered by inventory and physical stock, but eventually follow if coordination and payments remain impaired. This staggered timing is the seed of the cascade.</p><p>The figure below does not show probabilities. It shows <strong>latency</strong>: how long a domain can degrade before harm starts to accumulate.</p><p>Each row has a <strong>grace period</strong> (slack), derived from observable system properties, buffer capacity, backlog growth rates, behavioural tolerance, and incident timelines rather than assumptions. During that window, a service may be degraded but is not yet causing material harm. Once the grace period is exceeded, harm begins to build as queues, workarounds, and downstream dependencies compound.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8vZUX1-HrFKB9u2xCofESQ.png" /><figcaption>Figure 1: Latency, not probability. Each domain has a grace period before harm begins; cascades emerge when harm windows overlap across domains.</figcaption></figure><p>The critical observation is not the ordering, it’s the <strong>overlap</strong>.</p><p>A short payment disruption can still become systemic if its recovery overlaps with healthcare crossing its impact threshold, or logistics exhausting its buffers.</p><blockquote>This is why <em>“everything recovered within a few hours”</em> <strong>is not a sufficient safety argument.</strong></blockquote><p>What matters is whether any downstream domains crossed from “degraded but tolerable” into “harm accumulating” while other services were still impaired.</p><h3>From intuition to model</h3><p>Up to now, we’ve been talking about plugs, cascades, and time-to-impact intuitively. The model doesn’t introduce new ideas. It just forces those ideas to be internally consistent.</p><p>A useful analogy is a leak in a ceiling. A single drop doesn’t matter. What matters is how long the leak continues, how many rooms it spreads to, and whether it reaches structural beams. Damage is not instantaneous; it accumulates. That is the shift the model makes.</p><p>We represent a society, a country, or a single platform as a layered dependency graph:</p><ul><li>Infrastructure: power, networks, cloud control planes</li><li>Services: payments, healthcare operations, communications, logistics</li><li>People or customers who depend on those services</li></ul><p>A “plug” is simply a dependency edge between layers. Pulling one rarely causes immediate collapse. It reduces slack. What we want to measure is not <em>failure</em>, but <em>damage</em>.</p><p>Damage does not appear at the moment a service degrades. It builds up.</p><p>Missed payments accumulate. Clinical backlogs grow. Coordination failures compound. Harm behaves less like a switch and more like pressure behind a wall. Time is the key variable.</p><p>So for each service, we track three things:</p><ul><li><strong>How degraded it is at a given moment</strong><br> This is service unavailability over time. It does not need to be binary; partial degradation counts.</li><li><strong>How long it can tolerate degradation</strong><br> This is the service’s <em>time-to-impact</em>: the delay before real harm begins.</li><li><strong>How harm grows once tolerance is exceeded</strong><br> Some harms grow slowly, others accelerate quickly. This captures compounding effects.</li></ul><p>Nothing more is assumed.</p><p>Total harm is simply then, the accumulation of damage over time, summed across services. At any moment, a degraded service may still be within tolerance. Once it exceeds that tolerance, harm starts to add up. The longer the degradation persists - and the more services overlap- the faster harm grows.</p><h4>The harm formulation</h4><p>Define total harm over a horizon T:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/301/1*RJ4O3sUfqpxbx1WJp94cBg.png" /></figure><p>Where:</p><ul><li>Us(t) is service unavailability</li><li>Ls​ is time-to-impact</li><li>gs​(⋅) captures compounding harm</li></ul><p>This formulation does one crucial thing, it separates <strong>being down</strong> from <strong>causing harm</strong>.</p><p>That allows us to stop asking <em>“is the system up?”</em> and instead ask something more useful:</p><blockquote><strong>How close are we to harm, and how fast is that distance shrinking?</strong></blockquote><p>That is what turns <em>“how many plugs away are we?”</em> from a joke into a measurable quantity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/305/0*I12olbnPMBOmJ5lt" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/0*vDPnaVq4-doyOe3I.png" /><figcaption>Figure 2: Harm distribution under correlated failures</figcaption></figure><p>This figure comes from Monte Carlo simulation with correlated hazards (power, network, control plane), realistic recovery times, and convex harm functions. Most outcomes are manageable. A small fraction are not. The distribution is heavy-tailed. The tail dominates long-term risk. Optimising uptime reduces the centre of this distribution. It does not necessarily reduce the tail.</p><h3>Why tail optimisation is the right objective</h3><p>Optimising average unavailability improves typical performance.</p><p>Instead of minimising expected unavailability:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/93/1*d8GO4j4eK6An1o_jQ3ilew.png" /></figure><p>We should minimise tail harm:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/139/1*f4BKnLQ-OgRAHkf9cgnm3A.png" /></figure><p>While optimising <strong>tail harm</strong> reduces the probability of catastrophic outcomes. This targets the worst α% of scenarios , the ones that matter for societal stability, regulatory intervention, and trust erosion. This is not pessimism. It is realism. These are the scenarios that determine whether systems remain governable, trusted, and socially tolerable.</p><h3>A structural proposition</h3><p><strong>Proposition.</strong><br>In systems with monotone dependencies and convex harm accumulation, minimising expected service unavailability does not, in general, minimise tail harm under correlated failures.</p><p>Correlation increases the likelihood that multiple services exceed impact latency simultaneously. Convex harm functions amplify overlap. Mean performance improves while worst-case outcomes worsen.</p><p>This is a property of the system, not a flaw in execution.</p><h3>Same analysis down to the company level</h3><p>Everything discussed so far applies at the scale of societies and countries, but the same structure appears -almost unchanged- inside individual companies.</p><p>Most modern organisations are not single systems. They are dependency stacks. A product depends on internal services, which depend on external platforms, which depend on power, networks, and control planes that sit entirely outside the company’s direct control. Customers, in turn, depend on the company’s product for payments, workflows, coordination, or trust.</p><p>From the outside, a company looks like a single service. From the inside, it is a layered graph of assumptions.</p><p>The relevant question at company level is therefore not new. It is simply narrower:</p><blockquote><strong>How many plugs away is our business from customer-visible harm?</strong></blockquote><p>Most companies already track uptime, error rates, latency, and availability by service. These are necessary metrics, but they are incomplete. They describe <em>how often</em> things fail, not <em>how failure turns into harm</em>.</p><p>What is usually missing is any explicit modelling of <strong>time-to-impact</strong>:</p><ul><li>How long can a capability degrade before customers feel real damage?</li><li>Does harm start immediately, or only after backlog, retries, and workarounds are exhausted?</li><li>Does harm accumulate linearly, or does it compound once certain thresholds are crossed?</li></ul><p>Critically, <strong>time-to-impact</strong> is <strong>not</strong> the <strong>inverse of uptime</strong>, and it is not a simple complement of availability. Two services can have identical uptime and radically different impact profiles. A few minutes of degradation in one capability may be tolerable; the same in another may be catastrophic. Time-to-impact is multidimensional, context-dependent, and shaped by customer behaviour, contractual obligations, regulatory exposure, and substitution options.</p><p>This is why cloud provider dashboards, SLAs, and platform metrics are insufficient on their own. They tell you how the infrastructure behaved. They do not tell you <strong>when harm begins</strong>.</p><h3>What companies need that they do not get by default</h3><p>If a company wants to reason about tail risk rather than averages, it has to build a layer of understanding that no external provider supplies.</p><p>That layer looks less like traditional monitoring and more like a <strong>time-to-harm model</strong>, supported by dedicated internal dashboards.</p><p>At a minimum, this means:</p><ul><li>Explicitly mapping which customer-visible capabilities depend on which internal services and external platforms.</li><li>Assigning impact latency ranges to those capabilities based on real business constraints (customer tolerance, legal deadlines, operational backlog).</li><li>Tracking not just whether services are “up,” but how long they have been degraded relative to those latency thresholds.</li><li>Monitoring overlap: when multiple capabilities are simultaneously approaching or exceeding their time-to-impact windows.</li></ul><p>The most useful dashboards in this framing <strong>do not replace uptime charts</strong>. They sit above them.</p><p>They answer questions like:</p><blockquote>If this degradation continues for another 30 minutes, which customer obligations are at risk?</blockquote><blockquote>Which internal services are currently consuming our remaining slack?</blockquote><blockquote>Are we in a state where recovery of one service is no longer sufficient to prevent harm because others have crossed their impact threshold?</blockquote><p>This kind of visibility cannot be bought off the shelf. It has to be constructed from an organisation’s own understanding of its customers, workflows, and dependencies. <strong>Every company’s time-to-impact profile is different</strong>, even when they run on the same cloud platforms.</p><h3>This changes how resilience decisions are made</h3><p>Once time-to-impact is made explicit, certain patterns become obvious.</p><p>Some investments primarily improve average uptime. Others primarily increase <strong>slack</strong>, they buy time before harm begins. These are not the same thing.</p><p>At company level, optimising for tail outcomes tends to favour:</p><ul><li>Reducing shared dependencies between customer-critical capabilities.</li><li>Designing graceful degradation modes that slow harm accumulation rather than prevent all failure.</li><li>Ensuring that recovery paths do not depend on the same systems that are already impaired.</li><li>Prioritising independence and diversity over cosmetic redundancy.</li></ul><p>Two architectures can look equally robust when judged by availability metrics and behave very differently when stress arrives. The difference is usually not how rarely they fail, but <strong>how quickly harm starts when they do</strong>.</p><h3>Closing the loop</h3><p>At the start, the question <em>“How many plugs away are we?”</em> sounded like a joke. Taken seriously, it turns out to be a useful lens, one that exposes what our current metrics hide.</p><p>As societies, we need it because infrastructure failures no longer stay local.<br>As countries, we need it because policy often optimises averages while harm lives in the tail.<br>As companies, we need it because rare events dominate trust, reputation, and long-term survival.</p><p>Time-to-impact is not a rebranding of uptime. It captures something different: the structure of dependence, the loss of slack, and the point at which recovery stops being enough.</p><blockquote><strong>If we continue to optimise only for availability, we will continue to be surprised by cascades.</strong></blockquote><p>If we start optimising for time-to-harm , explicitly, quantitatively, and honestly , we at least know how close we are to the cold, and how many plugs still stand between us and it.</p><p>#resilience #systems #infrastructure #risk #tailrisk #cloud #reliability #complexsystems #digitaldependence</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3a32709b270" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>