<?xml version="1.0" encoding="UTF-8"?>
<rss  xmlns:atom="http://www.w3.org/2005/Atom" 
      xmlns:media="http://search.yahoo.com/mrss/" 
      xmlns:content="http://purl.org/rss/1.0/modules/content/" 
      xmlns:dc="http://purl.org/dc/elements/1.1/" 
      version="2.0">
<channel>
<title>Trajectorium — AI, Agents &amp; Energy-Efficient Sovereign Architectures</title>
<link>https://trajectorium.ai/en/blog/</link>
<atom:link href="https://trajectorium.ai/en/blog/index.xml" rel="self" type="application/rss+xml"/>
<description>Articles on AI, agentic systems, and energy-efficient sovereign architectures.</description>
<generator>quarto-1.10.18</generator>
<lastBuildDate>Sat, 12 Dec 2026 00:00:00 GMT</lastBuildDate>
<item>
  <title>What It Takes to Build a Sovereign AI Agent for Your Organization</title>
  <dc:creator>Jan Scholtes</dc:creator>
  <link>https://trajectorium.ai/en/blog/building-sovereign-ai-agents.html</link>
  <description><![CDATA[ 




<p>Most organizations that say they’ve “built an AI agent” have really just written a system prompt on top of Claude, GPT, or Gemini and called it a day. That’s a starting point, not a sovereign system — as <a href="../blog/the-institutional-moat.html">earlier posts on this site have covered</a>, it leaves your organization renting intelligence rather than owning it, dependent on infrastructure, pricing, and export-control decisions made entirely outside your control. This post pulls together everything this site has covered so far — <a href="../blog/from-text-to-agentic-workflows.html">text-to-agentic-workflows</a>, <a href="../blog/the-institutional-moat.html">the institutional moat</a>, <a href="../blog/why-europe-needs-sovereign-ai.html">sovereignty</a>, <a href="../blog/pruning-quantization-distillation.html">model compression</a>, and <a href="../blog/governing-the-autonomous-organization.html">governance</a> — into one practical answer to a single question: what does it actually take to build your own sovereign agent, end to end?</p>
<section id="first-what-are-we-actually-talking-about" class="level2">
<h2 class="anchored" data-anchor-id="first-what-are-we-actually-talking-about">First: What Are We Actually Talking About?</h2>
<p>Before the steps, it helps to see the range of what a sovereign agent can actually do, because “AI agent” means very different things depending on the setting.</p>
<p><strong>Private sector examples:</strong> - A <strong>customer service agent</strong> for a telecom or insurance company, grounded in the organization’s own contracts, policy documents, and billing systems — able to resolve a disputed charge, explain a coverage clause, or update an account, while escalating anything genuinely ambiguous to a human. - A <strong>contract and compliance review agent</strong> for an in-house legal team, checking incoming vendor contracts against the organization’s own playbook and flagging deviations, exactly as covered in the <a href="../blog/the-institutional-moat.html">earlier post on the institutional moat</a>. - An <strong>HR case-handling agent</strong>, resolving routine leave, payroll, and benefits questions — one of the highest-ROI starting points precisely because it’s rule-heavy, high-volume, and entirely digital, as covered in the <a href="../blog/governing-the-autonomous-organization.html">earlier governance post</a>. - An <strong>agricultural advisory agent</strong> for a farming cooperative, grounded in historical logbooks, current EU organic legislation, and real-time weather data — the orchard example covered in <a href="../blog/from-logbooks-to-agent-training-data.html">an earlier post</a>. - A <strong>clinical documentation assistant</strong> for a hospital, reconstructing the implicit reasoning behind treatment decisions from ICU notes.</p>
<p><strong>Public sector examples — often the most interesting, and the most demanding:</strong> - A <strong>policy implementation assistant</strong> that helps caseworkers apply a new subsidy scheme or environmental regulation consistently across hundreds of cases, reducing the variation that inevitably creeps in when dozens of humans interpret the same rule slightly differently. - A <strong>citizen-facing navigation agent</strong> that helps someone apply for housing benefit, understand a tax notice, or figure out which permit they need — walking them through the actual bureaucratic process, citing the correct forms and deadlines, and clearly flagging the point at which they need a human caseworker or a lawyer rather than continuing to rely on the agent. - A <strong>benefits-eligibility assessment agent</strong> that pre-screens simple, unambiguous applications (freeing caseworkers for the genuinely hard cases) while routing anything borderline to a human — never issuing a final rejection on its own. - A <strong>municipal permitting assistant</strong> helping a small business owner understand which environmental, zoning, or safety regulations apply to their specific situation, before they ever need to speak to an official.</p>
<p>What all of these share is the same underlying requirement: they need to be grounded in <em>your</em> rules, <em>your</em> procedures, and <em>your</em> exceptions — not the generic training data of a foundation model — and, especially in the public-sector cases, they need to be auditable, fair, and clearly bounded in what they’re allowed to decide versus merely suggest.</p>
</section>
<section id="step-1-build-or-rent-a-sovereign-hardware-platform" class="level2">
<h2 class="anchored" data-anchor-id="step-1-build-or-rent-a-sovereign-hardware-platform">Step 1: Build (or Rent) a Sovereign Hardware Platform</h2>
<p>Before any of the interesting work happens, you need somewhere to run it that you actually control. As covered in the <a href="../blog/why-europe-needs-sovereign-ai.html">earlier post on AI sovereignty</a>, this doesn’t mean you need to out-build Google — it means being deliberate about where inference actually happens, not just where training happens.</p>
<p>Realistic options, roughly in order of how much control they give you:</p>
<ul>
<li><strong>Fully on-premise</strong>, on hardware your own IT department manages — the most control, the most upfront investment, and the right choice when data sensitivity (medical, law-enforcement, or classified data) makes anything else a non-starter.</li>
<li><strong>A trusted local or national cloud</strong> — a government-run community cloud (increasingly common across the EU, exactly the kind of infrastructure sovereignty investment covered in the <a href="../blog/why-europe-needs-sovereign-ai.html">earlier sovereignty post</a>), or a regional/EU-based sovereign cloud provider bound by domestic data-protection law rather than foreign jurisdiction.</li>
<li><strong>Your corporate IT department’s private cloud</strong>, if your organization already runs one — often the pragmatic middle ground for companies that don’t want to manage physical hardware but still need contractual and jurisdictional control over where data lives and who can access it.</li>
</ul>
<p>The sizing question matters here too: a fine-tuning workload needs meaningfully more compute than a pure inference deployment. If you’re following the compression path described in a later step, a specialized, distilled, quantized model can often run comfortably on a single consumer-grade or mid-range enterprise GPU for inference — which is precisely what makes on-premise or small-scale sovereign cloud deployment realistic rather than aspirational.</p>
</section>
<section id="step-2-collect-and-structure-your-organizations-own-data" class="level2">
<h2 class="anchored" data-anchor-id="step-2-collect-and-structure-your-organizations-own-data">Step 2: Collect and Structure Your Organization’s Own Data</h2>
<p>This is the step every organization already has the raw material for, usually without realizing it. As covered in the earlier posts on <a href="../blog/from-logbooks-to-agent-training-data.html">agricultural logbooks</a> and <a href="../blog/from-text-to-agentic-workflows.html">text-to-agentic-workflows</a>, the core insight is that documentation written for the next <em>human</em> on the job — SOPs, case files, policy handbooks, historical decisions, exception logs — is exactly the raw material needed to train the next <em>agent</em> on the job.</p>
<p>Concretely, for the examples above, this means gathering: - <strong>Procedures and protocols</strong>: SOPs, policy handbooks, case-handling guidelines — the equivalent of the orchard’s cultivation manuals or a caseworker’s internal procedure guide. - <strong>Exceptions and edge cases</strong>: the messy, real-world deviations from the clean procedure — a citizen’s situation that doesn’t fit the standard eligibility category, a customer complaint that doesn’t match any FAQ entry. - <strong>Regulatory and legal texts</strong>: the actual legislation, regulation, or compliance framework the agent’s advice must never contradict — for a public-sector agent, this is non-negotiable ground truth, not optional context. - <strong>Historical case outcomes</strong>: past decisions and their justifications, ideally captured as <strong>observation-action-result</strong> triples — a citizen’s situation observed, a decision made, an outcome recorded — the same structural pattern covered in both the <a href="../blog/from-logbooks-to-agent-training-data.html">agricultural</a> and text-to-action posts.</p>
<p>Once collected, this text needs to be converted from documents built for human reading into a structured, machine-usable format — typically JSON, mapping procedures into workflow graphs with explicit steps, conditions, and branches, exactly as described in the <a href="../blog/from-text-to-agentic-workflows.html">earlier post on converting text into agentic training data</a>.</p>
</section>
<section id="step-3-extract-the-agentic-training-data" class="level2">
<h2 class="anchored" data-anchor-id="step-3-extract-the-agentic-training-data">Step 3: Extract the Agentic Training Data</h2>
<p>With structured data in hand, the next step is extracting the specific training artifacts each component of the architecture needs — this is where a generic “chatbot” becomes a genuine, specialized agent:</p>
<ul>
<li><strong>RAG chunks and reranker pairs</strong>: semantically coherent sections of legislation, policy, or procedure, embedded for retrieval, paired with real query examples so a neural reranker learns to surface the <em>correct</em> clause, not just a similar-sounding one.</li>
<li><strong>Supervised fine-tuning (SFT) pairs</strong>: instruction-response examples that teach the model your organization’s specific terminology, tone, and reasoning style — a citizen’s question paired with the response a well-trained caseworker would actually give.</li>
<li><strong>Preference data (DPO)</strong>: paired examples where one response is correct but <em>not preferred</em> — for instance, a technically accurate answer that fails to flag a citizen’s right to appeal, versus one that does — teaching the agent to favor the response that meets your organization’s standards, not just any factually correct one.</li>
<li><strong>Planning and task-decomposition data</strong>: multi-step processes (how a benefits application actually moves from intake to decision) encoded so the agent can decompose a broad goal into an ordered sequence of sub-tasks with real dependencies.</li>
<li><strong>Multi-hop reasoning chains</strong>: the “why” behind a decision — an eligibility conclusion linked back through the specific regulation, the specific facts of the case, and the specific prior precedent that justified it.</li>
<li><strong>Guardrail and critic training data</strong>: contrastive pairs of rejected and corrected outputs, each with an explicit rationale (“rejected: violates Article 9 of Regulation X”), which is exactly what trains a critic agent to catch violations rather than merely check spelling.</li>
</ul>
</section>
<section id="step-4-fine-tune-the-components-not-one-giant-model" class="level2">
<h2 class="anchored" data-anchor-id="step-4-fine-tune-the-components-not-one-giant-model">Step 4: Fine-Tune the Components — Not One Giant Model</h2>
<p>The architecture that emerges from this data isn’t a single fine-tuned model — it’s several specialized components working together, each trained on the data extracted above: a memory layer (RAG plus reranker), a reasoning/planning layer, a fine-tuned critic enforcing your specific standards, and a set of guardrails. As demonstrated in the <a href="../blog/small-specialized-model-vs-frontier.html">earlier post comparing a small, specialized model against a frontier foundation model</a>, this approach can get remarkably close to frontier-level performance <em>on your specific task</em>, precisely because the small model isn’t being asked to be good at everything — only at the one thing your organization actually needs it to do.</p>
</section>
<section id="step-5-deploy-on-your-sovereign-infrastructure" class="level2">
<h2 class="anchored" data-anchor-id="step-5-deploy-on-your-sovereign-infrastructure">Step 5: Deploy on Your Sovereign Infrastructure</h2>
<p>With the components trained, deployment means wiring them together — typically using an orchestration framework built for cyclical, multi-step agent behavior (LangGraph and CrewAI are common choices) — and running the whole system on the infrastructure chosen in step one. The foundation model underneath (whether a large commercial model used only for the heaviest reasoning steps, or a fully local open-weight model) becomes a replaceable, commodity component, exactly as argued in the <a href="../blog/the-institutional-moat.html">earlier post on the institutional moat</a> — the actual value, and the actual sovereignty, lives in the architecture and data around it, not in which base model happens to sit at the center.</p>
</section>
<section id="step-6-optional-but-recommended-distill-prune-and-quantize" class="level2">
<h2 class="anchored" data-anchor-id="step-6-optional-but-recommended-distill-prune-and-quantize">Step 6 (Optional but Recommended): Distill, Prune, and Quantize</h2>
<p>If energy efficiency, battery-powered deployment, or running on genuinely modest hardware matters, the <a href="../blog/pruning-quantization-distillation.html">compression techniques covered in an earlier post</a> become directly relevant here: distilling the fine-tuned components into smaller student models, quantizing weights down to 8-bit or even more aggressive precision (BitNet-style quantization at the extreme end), and pruning unnecessary connections. Beyond the obvious cost and energy savings, this step has a genuine security side benefit, <a href="../blog/adversarial-attacks-images-and-text.html">also covered in that post</a>: a compressed model tends to have a smoother, less exploitable decision boundary, making certain classes of adversarial manipulation measurably harder.</p>
</section>
<section id="step-7-validate-against-bias-and-other-failure-modes" class="level2">
<h2 class="anchored" data-anchor-id="step-7-validate-against-bias-and-other-failure-modes">Step 7: Validate Against Bias and Other Failure Modes</h2>
<p>This step is not optional, and it deserves to be treated as seriously as the model architecture itself — especially for anything citizen-facing or decision-adjacent. Concretely, this means:</p>
<ul>
<li><strong>Fairness and bias testing across demographic groups.</strong> For a benefits-eligibility or policy-implementation agent, this is a legal requirement in most jurisdictions, not just good practice — the agent must be tested to confirm it doesn’t systematically disadvantage applicants by name, address, language, or any other proxy for a protected characteristic. This requires deliberately constructed test sets, not just spot-checking outputs that happen to come up.</li>
<li><strong>Factuality and hallucination checks</strong>, comparing every generated claim against the retrieved source of truth and flagging anything unsupported.</li>
<li><strong>Adversarial robustness testing</strong>, following the <a href="../blog/adversarial-attacks-images-and-text.html">attack patterns covered in an earlier post</a> — deliberately probing the system with edge cases, ambiguous phrasing, and adversarially crafted inputs to see where it breaks, before a real citizen or customer finds the same weakness by accident.</li>
<li><strong>Human-in-the-loop audit sampling.</strong> No validation suite catches everything; ongoing, randomized human review of a percentage of the agent’s actual decisions remains necessary, precisely to catch the “the model was right 49 times, will anyone still check the 50th” complacency risk covered in the <a href="../blog/governing-the-autonomous-organization.html">earlier post on governance</a>.</li>
</ul>
</section>
<section id="step-8-test-against-ethical-and-moral-requirements" class="level2">
<h2 class="anchored" data-anchor-id="step-8-test-against-ethical-and-moral-requirements">Step 8: Test Against Ethical and Moral Requirements</h2>
<p>The final step, and arguably the one public-sector deployments can least afford to skip, is holding the system to an explicit ethical and legal standard rather than an implicit one:</p>
<ul>
<li><strong>Write an explicit constitution.</strong> As covered in the <a href="../blog/the-institutional-moat.html">earlier post on the institutional moat</a>, this means a documented set of immutable principles — “never deny a benefit without citing the specific regulation and offering an appeal path,” “never make a final decision on X without human sign-off” — checked by a dedicated node in the pipeline before any output reaches an end user, decoupled from the task-execution logic itself.</li>
<li><strong>Build in the four-phase governance framework</strong> covered in the <a href="../blog/governing-the-autonomous-organization.html">earlier governance post</a>: validated training, tested robustness, a reflection mechanism that catches the system’s own mistakes, and genuine explainability — the ability to show, for any given decision, exactly which regulation, which fact, and which prior case justified it.</li>
<li><strong>Guarantee a human appeal path.</strong> For any public-sector or legally consequential use, the agent should support, never replace, the human decision-maker of record — flagging omissions a caseworker might have missed, proposing a first-pass recommendation for review, but never issuing a final, unappealable decision autonomously.</li>
<li><strong>Be transparent with the end user.</strong> A citizen or customer interacting with the system should know they’re talking to an AI agent, understand what it can and cannot decide, and know exactly how to reach a human when they need one.</li>
</ul>
</section>
<section id="the-takeaway" class="level2">
<h2 class="anchored" data-anchor-id="the-takeaway">The Takeaway</h2>
<p>None of these eight steps is optional if the goal is genuine sovereignty rather than a thin wrapper around someone else’s model. But none of them requires a national government’s budget either — the same techniques covered across this site’s earlier posts on <a href="../blog/from-logbooks-to-agent-training-data.html">agriculture</a>, <a href="../blog/the-institutional-moat.html">institutional strategy</a>, <a href="../blog/why-europe-needs-sovereign-ai.html">sovereignty</a>, and <a href="../blog/pruning-quantization-distillation.html">model compression</a> apply directly, whether the organization building the agent is a cherry orchard cooperative, a hospital, a corporate legal department, or a municipal benefits office. The common thread across every genuinely sovereign deployment is the same: your own data, your own infrastructure, your own explicit standards for what the system is and isn’t allowed to decide — with the foundation model reduced to exactly what it should be, a replaceable component at the center of an architecture your organization actually owns.</p>
<p><strong>Key papers</strong></p>
<ul>
<li>Wang et al.&nbsp;(2023), <em>A Survey on Large Language Model Based Autonomous Agents</em> — <a href="https://arxiv.org/abs/2308.11432">arXiv:2308.11432</a></li>
<li>Lewis et al.&nbsp;(2020), <em>Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks</em> — <a href="https://arxiv.org/abs/2005.11401">arXiv:2005.11401</a></li>
<li>European Commission (2024), <em>EU Artificial Intelligence Act</em> — <a href="https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32024R1689">eur-lex.europa.eu</a></li>
</ul>
<hr>
<p><strong>Further reading on this site</strong></p>
<ul>
<li><a href="../blog/what-is-an-ai-agent.html">What Is an AI Agent?</a> — the seven components this eight-step guide is assembling</li>
<li><a href="../blog/from-text-to-agentic-workflows.html">From Text to Action: Turning NLP Pipelines into Agentic Workflows</a> — the deep dive on steps 2 and 3</li>
<li><a href="../blog/the-institutional-moat.html">The Institutional Moat</a> — why the architecture matters more than the model</li>
<li><a href="../blog/why-europe-needs-sovereign-ai.html">Why Europe Needs Its Own AI Models</a> — the geopolitical case for step 1</li>
<li><a href="../blog/governing-the-autonomous-organization.html">Governing the Autonomous Organization</a> — the governance framework behind steps 7 and 8</li>
<li><a href="../blog/bias-analysis-in-practice.html">Bias Analysis in Practice</a> — the step-by-step technical guide to carrying out the bias analysis required in step 7</li>
<li><a href="../blog/small-specialized-model-vs-frontier.html">David vs.&nbsp;Goliath: Small Model vs.&nbsp;Frontier</a> — the evidence behind step 4</li>
</ul>


</section>

 ]]></description>
  <category>sovereignty-edge</category>
  <category>enterprise-strategy</category>
  <guid>https://trajectorium.ai/en/blog/building-sovereign-ai-agents.html</guid>
  <pubDate>Sat, 12 Dec 2026 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Shrinking the Giant: How Pruning, Quantization, and Distillation Make LLMs Small, Cheap, and Safer</title>
  <dc:creator>Jan Scholtes</dc:creator>
  <link>https://trajectorium.ai/en/blog/pruning-quantization-distillation.html</link>
  <description><![CDATA[ 




<p>Training GPT-2 cost an estimated 100-200 thousand dollars in compute. GPT-3 jumped to somewhere in the 1-10 million range. GPT-4-class training runs are estimated at 10-100 million. A custom GPT-4-class model today is estimated at 2-3 million dollars just for the training compute — and that’s before you’ve deployed it anywhere, let alone somewhere with a battery. If you’re building for an implanted medical device, a smartwatch, or any system where power budget is a hard constraint (as one lecture on this puts it, bluntly: “the US Army runs on batteries”), that scale of model is simply the wrong tool. This post covers the three main techniques — pruning, quantization, and knowledge distillation — that let you take a giant, expensively-trained model and compress it into something that runs on hardware you actually own, with only a small, usually acceptable, loss in capability. And, as a bonus most people don’t expect, these same techniques make a model measurably harder to attack.</p>
<section id="why-this-matters-beyond-cost" class="level2">
<h2 class="anchored" data-anchor-id="why-this-matters-beyond-cost">Why This Matters Beyond Cost</h2>
<p>Three separate motivations converge on the same set of techniques:</p>
<ol type="1">
<li><strong>Energy and battery life.</strong> On-device and edge deployment — implanted medical devices, mobile phones, military hardware — simply cannot run a full-size frontier model. Every watt matters.</li>
<li><strong>Local, sovereign deployment.</strong> As covered in <a href="../blog/why-europe-needs-sovereign-ai.html">an earlier post on this site</a>, a specialized model fine-tuned on your own data and run on your own hardware can get remarkably close to frontier-model performance <em>on a specific task</em> — but only if that specialized model is actually small enough to run locally at reasonable cost. Compression is what makes that “David vs.&nbsp;Goliath” story physically possible.</li>
<li><strong>Security.</strong> Somewhat counter-intuitively, a smaller, distilled or pruned model can be <em>more</em> robust to certain attacks, because compression removes exactly the kind of redundant, unused connections that adversarial attacks tend to exploit.</li>
</ol>
<p>Let’s go through the three main techniques in turn.</p>
</section>
<section id="knowledge-distillation-teaching-a-small-model-to-mimic-a-big-one" class="level2">
<h2 class="anchored" data-anchor-id="knowledge-distillation-teaching-a-small-model-to-mimic-a-big-one">1. Knowledge Distillation: Teaching a Small Model to Mimic a Big One</h2>
<p>Knowledge distillation compresses and transfers what a large, expensive “teacher” model has learned into a smaller “student” model, while trying to preserve as much of the teacher’s competence as possible. The canonical example is <strong>DistilBERT</strong> (Sanh, Debut, Chaumond &amp; Wolf, 2019): by distilling BERT-base during pre-training, the authors reduced model size by <strong>40%</strong>, ran it <strong>60% faster</strong>, while retaining <strong>97%</strong> of BERT’s language understanding performance on the GLUE benchmark.</p>
<p>The training mechanics are worth understanding, because they explain why this works as well as it does. Rather than training the student purely to predict the correct label, distillation trains it on a <strong>combined loss</strong>:</p>
<pre><code>total loss = (alpha * student loss) + ((1 - alpha) * distillation loss)</code></pre>
<p>The distillation loss is computed using <strong>KL-divergence</strong> between the teacher’s and student’s softmax outputs — but crucially, using a softened temperature (t &gt; 1) so the outputs aren’t just hard 0/1 labels but “soft labels” carrying the teacher’s relative confidence across all classes, not just the winning one. That soft signal is where most of the useful information actually lives: it tells the student not just <em>what</em> the right answer is, but <em>how</em> the teacher weighs the alternatives — an implicit signal a hard label alone can never carry. DistilBERT specifically combines this distillation loss with a masked-language-modeling loss and a cosine-embedding loss (to align the direction of the teacher’s and student’s hidden vectors), and initializes the student by taking every other layer directly from the teacher rather than starting from scratch.</p>
<p>Other notable examples in the same family include <strong>TinyBERT</strong>, which pushes distillation further for even smaller footprints. This is very much an active area of research — see the <em>Nature</em> coverage of ongoing model-compression work for a sense of how fast the field is still moving.</p>
</section>
<section id="quantization-fewer-bits-almost-the-same-answer" class="level2">
<h2 class="anchored" data-anchor-id="quantization-fewer-bits-almost-the-same-answer">2. Quantization: Fewer Bits, Almost the Same Answer</h2>
<p>A standard neural network stores its weights as 32-bit floating point numbers. Quantization asks a simple question: do you actually need all 32 bits? Often, no. Representing weights with 8-bit integers instead of 32-bit floats gives you a model that’s <strong>a quarter the memory footprint</strong>, with <strong>four times faster data transfer</strong>, and computation that’s often dramatically faster too, especially for integer arithmetic. Depending on the hardware, this alone can produce speedups in the range of <strong>25% to 250%</strong>.</p>
<p>There are two main flavors:</p>
<ul>
<li><strong>Post-Training Quantization (PTQ)</strong> — take an already-trained model and quantize its weights afterward.</li>
<li><strong>Quantization-Aware Training (QAT)</strong> — train the model <em>while simulating</em> the effects of quantization, so it learns to be robust to the reduced precision from the start.</li>
</ul>
<p>The most striking recent example of QAT taken to its logical extreme is <strong>BitNet b1.58</strong> (a 2024 paper), which restricts every weight to just <strong>three possible values: {-1, 0, 1}</strong> — technically 1.58 bits per weight (since log₂(3) ≈ 1.585). Remarkably, this achieves performance comparable to a standard LLaMA model of equivalent size, while requiring dramatically less energy — the paper reports roughly <strong>1/71.4 of the energy consumption</strong> of the equivalent full-precision model, and it’s efficient enough to run on ordinary CPUs rather than requiring specialized accelerator hardware at all.</p>
<p>The obvious challenges are quantization error and numerical overflow/underflow, which is exactly why QAT exists — training the model to be well-behaved under low precision from the start, rather than hoping a post-hoc rounding step doesn’t break anything important.</p>
</section>
<section id="pruning-deleting-what-the-model-doesnt-need" class="level2">
<h2 class="anchored" data-anchor-id="pruning-deleting-what-the-model-doesnt-need">3. Pruning: Deleting What the Model Doesn’t Need</h2>
<p>Where quantization makes every number smaller, <strong>pruning</strong> removes numbers entirely — introducing zeros (sparsity) into weight matrices so that whole connections, or in some cases entire neurons, simply stop existing. Sparse matrices are cheaper to store and, on the right hardware, cheaper to compute with, since operations on zero-valued weights can often be skipped outright.</p>
<p>Pruning and quantization aren’t mutually exclusive — a real deployment pipeline typically combines several of these techniques at once: distill a smaller student model, quantize its weights, and prune unnecessary connections, often alongside <strong>Low-Rank Adaptation (LoRA)</strong> for efficient fine-tuning (and its quantized cousin, <strong>QLoRA</strong>) so that adapting the compressed model to a specific domain remains cheap too.</p>
</section>
<section id="why-smaller-models-can-be-more-secure-not-less" class="level2">
<h2 class="anchored" data-anchor-id="why-smaller-models-can-be-more-secure-not-less">Why Smaller Models Can Be <em>More</em> Secure, Not Less</h2>
<p>Here’s the connection that doesn’t get made often enough: compression isn’t just a cost-and-energy story — it’s also a security story. Adversarial attacks on neural networks frequently exploit <strong>unused or redundant capacity</strong>: connections and parameters that don’t contribute meaningfully to the model’s actual task, but that an attacker can manipulate to produce a targeted misclassification or an unwanted output while leaving the input looking normal to a human.</p>
<p>Pruning removes exactly this kind of slack. If a connection has been eliminated because it wasn’t contributing to genuine task performance, it’s no longer available as an attack surface either — the model’s decision boundary gets forced to depend only on the features that actually matter, rather than on incidental correlations an attacker can nudge. Knowledge distillation does something related: because the student model is trained to reproduce the teacher’s <em>softened, generalized</em> decision boundary rather than to memorize the training data directly, it tends to inherit a smoother, less exploitable response surface. This specific idea has its own name in the adversarial-robustness literature — <strong>defensive distillation</strong>, and a closely related family of techniques called <strong>feature squeezing</strong>, which reduces the input’s degrees of freedom in a way that echoes exactly what pruning does to a model’s internal degrees of freedom.</p>
<p>None of this means a compressed model is <em>immune</em> to adversarial attacks — it isn’t, and dedicated adversarial training remains necessary on top of compression, not instead of it. But it does mean that shrinking a model for cost and energy reasons is not a security trade-off you’re forced to accept. Done well, it can move in the opposite direction.</p>
<p>For a full treatment of what adversarial attacks on images and text actually look like — and the concrete defenses, beyond compression, that address each type — see the earlier post in this series: <a href="../blog/adversarial-attacks-images-and-text.html">Adversarial Attacks: How a Few Invisible Pixels or One Swapped Word Can Fool an AI</a>.</p>
</section>
<section id="bringing-it-together" class="level2">
<h2 class="anchored" data-anchor-id="bringing-it-together">Bringing It Together</h2>
<p>Distillation, quantization, and pruning are usually presented as separate cost-optimization tricks, but they share a common thread: each one asks the model to do more with less — fewer parameters, fewer bits, fewer connections — while preserving the behavior that actually matters. That’s precisely the mechanism behind the <a href="../blog/small-specialized-model-vs-frontier.html">“small specialized model nearly matching a frontier model” result covered in an earlier post on this site</a>: a model doesn’t need the full capacity of a generalist if it’s only being asked to do one thing well, and compression is the concrete engineering path that turns “doesn’t need the capacity” into “doesn’t have the capacity, and runs on a laptop instead of a data center.” Lower training and inference cost, genuine on-device and edge deployment, and — as a welcome side effect — a smaller, harder-to-exploit attack surface. That combination is why this remains one of the most active areas of research in the field.</p>
<p><strong>Key papers</strong></p>
<ul>
<li>Hinton et al.&nbsp;(2015), <em>Distilling the Knowledge in a Neural Network</em> — <a href="https://arxiv.org/abs/1503.02531">arXiv:1503.02531</a></li>
<li>Sanh et al.&nbsp;(2019), <em>DistilBERT, a Distilled Version of BERT</em> — <a href="https://arxiv.org/abs/1910.01108">arXiv:1910.01108</a></li>
<li>Ma et al.&nbsp;(2024), <em>The Era of 1-bit LLMs: All Large Language Models are in 1.58 Bits</em> (BitNet b1.58) — <a href="https://arxiv.org/abs/2402.17764">arXiv:2402.17764</a></li>
<li>Hu et al.&nbsp;(2022), <em>LoRA: Low-Rank Adaptation of Large Language Models</em> — <a href="https://arxiv.org/abs/2106.09685">arXiv:2106.09685</a></li>
</ul>
<hr>
<p><strong>Further reading on this site</strong></p>
<ul>
<li><a href="../blog/adversarial-attacks-images-and-text.html">Adversarial Attacks: Invisible Pixels and Swapped Words</a> — the full treatment of attack types and defenses that compression partially addresses</li>
<li><a href="../blog/xai-for-fine-tuned-models.html">Why You Can’t Fine-Tune or Distill Without XAI</a> — why distillation specifically makes explainability a requirement, not a nice-to-have</li>
<li><a href="../blog/small-specialized-model-vs-frontier.html">David vs.&nbsp;Goliath: Small Model vs.&nbsp;Frontier</a> — compression and specialization together: what a small, task-focused model can actually do</li>
<li><a href="../blog/why-europe-needs-sovereign-ai.html">Why Europe Needs Its Own AI Models</a> — why edge and on-device deployment matters geopolitically, not just for cost</li>
<li><a href="../blog/why-nlp-finally-works.html">Why NLP Finally Works</a> — the transformer architecture whose weights are being compressed here</li>
</ul>


</section>

 ]]></description>
  <category>fundamentals</category>
  <category>efficiency</category>
  <guid>https://trajectorium.ai/en/blog/pruning-quantization-distillation.html</guid>
  <pubDate>Sat, 28 Nov 2026 00:00:00 GMT</pubDate>
</item>
<item>
  <title>From the Next Farmhand to the Next AI Agent: Turning Generational Knowledge Into Training Data</title>
  <dc:creator>Jan Scholtes</dc:creator>
  <link>https://trajectorium.ai/en/blog/from-logbooks-to-agent-training-data.html</link>
  <description><![CDATA[ 




<p>Somewhere in a Dutch cherry orchard there’s a logbook from 2013. A page reads, roughly: <em>8 April — copper fertilizer oxychloride, half a liter on 200 liters of water, 7:30 in the morning, about 7°C, wind from the northeast, a long cold spring with a month of wind and no rain.</em> Whoever wrote that note wasn’t writing for a machine. They were writing for the next person who’d stand in that orchard — maybe themselves next year, maybe a successor after they retired — so that person would know what was done, when, under what conditions, and, implicitly, why.</p>
<p>That’s the quiet shift worth naming: text written for decades to train the <em>next human</em> on the job can now train the <em>next agent</em> on the job instead. This post walks through what that actually looks like in practice, using a real project built around exactly this kind of data.</p>
<section id="the-knowledge-was-always-meant-to-be-passed-on" class="level2">
<h2 class="anchored" data-anchor-id="the-knowledge-was-always-meant-to-be-passed-on">The Knowledge Was Always Meant to Be Passed On</h2>
<p>Modern agriculture — fruit farming especially — is losing something it can’t easily get back: an aging workforce is retiring, and with it goes decades of empirical knowledge about micro-climates, pest pressure, and crop cycles that was never formalized anywhere except in handwritten logbooks and oral tradition. That knowledge was always meant to transfer to a successor. The logbook was the transfer mechanism.</p>
<p>At the same time, farmers now face a genuinely hard balancing act: mounting pressure toward organic methods and reduced chemical use, set against the economic reality of needing to protect yield and quality. A general-purpose chatbot can’t responsibly help here — a wrong pesticide recommendation can mean crop failure, environmental damage, or the loss of organic certification, and generic models trained on the open internet have no access to what actually happened, and worked, in <em>this</em> orchard, under <em>these</em> conditions.</p>
<p>The knowledge that would actually help already exists. It’s just sitting in a form built for a human reader, not a machine.</p>
</section>
<section id="the-same-data-read-a-different-way" class="level2">
<h2 class="anchored" data-anchor-id="the-same-data-read-a-different-way">The Same Data, Read a Different Way</h2>
<p>Here’s the reframe that makes this possible: every entry in a farming logbook is already, structurally, an <strong>observation → action → consequence</strong> record. Cloudy, no wind, post-bloom (observation) → applied ureum, borium, zinc (action) → maximal leaf absorption without evaporation (intended consequence). That’s not a coincidence — it’s how anyone documents a decision they want a successor to be able to trust and repeat. And an observation-action-consequence triple is, not coincidentally, exactly the data structure reinforcement learning is built around: state, action, reward, next state. The format a farmer used to teach a human apprentice turns out to be the format needed to teach an AI agent.</p>
<p>The practical pipeline looks like this:</p>
<ol type="1">
<li><strong>Digitize.</strong> OCR and multimodal models convert handwritten pages — dates, dosages, weather, outcomes, all in a farmer’s own shorthand — into machine-readable text.</li>
<li><strong>Structure into JSON.</strong> Free-form, tabular handwriting gets serialized into a consistent schema: date, weather conditions, substance applied, quantity, timing, and (where recorded) the outcome. This structured layer is what every downstream training pipeline builds on.</li>
<li><strong>Extract component-specific training data.</strong> This is the part worth walking through in detail, because a single logbook entry can be turned into several different kinds of training signal, each feeding a different part of an agentic architecture:</li>
</ol>
</section>
<section id="one-logbook-entry-five-different-kinds-of-training-data" class="level2">
<h2 class="anchored" data-anchor-id="one-logbook-entry-five-different-kinds-of-training-data">One Logbook Entry, Five Different Kinds of Training Data</h2>
<p>Take that same April entry and see what it becomes for each component of an agent:</p>
<p><strong>For retrieval (RAG):</strong> the entry becomes a semantically chunked fact the agent can look up later — “on this orchard, copper oxychloride at this dose was applied under these specific weather conditions” — embedded and stored so a future query can retrieve it directly, cited to its source.</p>
<p><strong>For reranking:</strong> paired with the question a farmer might actually ask (“how do I treat fruit rot risk during a wet cold spring”), the same entry becomes a query-answer pair used to train a reranker to recognize <em>this</em> historical intervention as the relevant one, rather than a generically similar but wrong result — solving exactly the “lost in the middle” problem where an agent drowns in twenty broadly similar retrieved passages and misses the one that actually matters.</p>
<p><strong>For instruction-following (SFT):</strong> the raw entry gets rewritten as a structured instruction-response pair — <em>“It’s late May, light rain, and the orchard is at risk of fruit rot. What’s the historical intervention?”</em> → <em>“Historically, Signum (0.25 kg) combined with a leaf mix was applied to prevent fruit rot during light rain.”</em> This is what teaches a model to adopt the terminology, tone, and reasoning style of an actual agronomist rather than a generic assistant.</p>
<p><strong>For preference learning (DPO):</strong> the same scenario, paired with a <em>rejected</em> alternative — a heavy chemical spray that would technically work but violates current organic certification — teaches the model that not every factually correct answer is the <em>preferred</em> one. This is where an agent learns to default toward the sustainable, compliant option rather than whatever seems most immediately effective.</p>
<p><strong>For planning and multi-hop reasoning:</strong> a multi-week sequence from the logbook — evaluate blossom readiness, order bees, place hives on a specific date, remove hives before spraying three weeks later — becomes a task-decomposition example: how a single seasonal goal (“manage pollination”) breaks down into an ordered sequence of dependent sub-tasks, each with its own timing constraint.</p>
<p>One page of handwriting, five different downstream capabilities — and none of it required the original farmer to think about AI at all. They were just doing what farmers have always done: writing down what happened so someone else could learn from it.</p>
</section>
<section id="why-the-oldest-text-might-be-the-most-valuable" class="level2">
<h2 class="anchored" data-anchor-id="why-the-oldest-text-might-be-the-most-valuable">Why the Oldest Text Might Be the Most Valuable</h2>
<p>Here’s a genuinely counter-intuitive point buried in this approach: the most useful historical documents for building a <em>modern, organic-focused</em> agricultural agent might be agricultural texts from <strong>1850 to 1930</strong> — before synthetic pesticides existed at all. These archives, digitized in collections like Cornell’s Core Historical Literature of Agriculture and the USDA’s National Agricultural Library, describe ecological pest management and soil techniques that were simply forgotten once cheap synthetic chemicals took over for most of the 20th century. As farming now transitions back toward organic methods, that “obsolete” pre-chemical knowledge is suddenly directly relevant again — and it exists in exactly the same form as the personal logbook: text written by one generation of practitioners for the benefit of the next, that happened to skip a generation or two before finding its intended reader.</p>
</section>
<section id="the-guardrails-have-to-come-from-the-same-place" class="level2">
<h2 class="anchored" data-anchor-id="the-guardrails-have-to-come-from-the-same-place">The Guardrails Have to Come From the Same Place</h2>
<p>None of this works safely without an equally serious investment in what <em>not</em> to do, and — fittingly — that data comes from the same kind of source. A “critic agent” checking a draft recommendation needs concrete negative examples: a 2020 logbook entry mentioning a chemical (say, Calypso) that was legal then but is now restricted, paired with the corrected, currently compliant alternative, and — crucially — a stated rationale (“rejected: violates EU Organic Regulation 2018/848, Article 9”). That rationale is what teaches a critic model not just <em>that</em> something is wrong, but <em>why</em>, in a form it can generalize from. Historical logbooks and current legislation, cross-referenced against each other, become the raw material for the safety layer just as much as they do for the advice-giving layer.</p>
</section>
<section id="the-bigger-pattern" class="level2">
<h2 class="anchored" data-anchor-id="the-bigger-pattern">The Bigger Pattern</h2>
<p>Step back from the orchard specifically and the pattern generalizes cleanly, and it connects directly to <a href="../blog/from-text-to-agentic-workflows.html">something this site has covered before</a>: any organization’s internal manuals, standard operating procedures, incident logs, and handover notes were always written with an implicit reader in mind — the next person doing the job. That framing has quietly been the whole point of workplace documentation for as long as workplaces have existed. What’s changed is who that “next person” can now be. The same discipline that made a good logbook entry useful to a human successor — being concrete about conditions, actions, and outcomes, rather than vague — is precisely what makes it usable as training data for an agent. Good documentation was never really about compliance or record-keeping for its own sake. It was about making tacit expertise transferable. It just turns out the recipient doesn’t have to be human anymore.</p>
</section>
<section id="the-takeaway" class="level2">
<h2 class="anchored" data-anchor-id="the-takeaway">The Takeaway</h2>
<p>A logbook entry from 2013, or a farming manual from 1890, was never written with a language model in mind — and that’s exactly why it works so well as training data. It’s honest, concrete, and grounded in what actually happened, because it was written for someone who’d need to trust and repeat it. Turning that text into structured retrieval data, reranker pairs, instruction examples, preference pairs, and planning templates isn’t a reinterpretation of what the knowledge was for — it’s the same transfer of expertise from one practitioner to the next, just with a new kind of successor on the receiving end.</p>
<p><strong>Key papers</strong></p>
<ul>
<li>Lewis et al.&nbsp;(2020), <em>Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks</em> — <a href="https://arxiv.org/abs/2005.11401">arXiv:2005.11401</a></li>
<li>Rafailov et al.&nbsp;(2023), <em>Direct Preference Optimization</em> — <a href="https://arxiv.org/abs/2305.18290">arXiv:2305.18290</a></li>
<li>Yao et al.&nbsp;(2022), <em>ReAct: Synergizing Reasoning and Acting in Language Models</em> — <a href="https://arxiv.org/abs/2210.03629">arXiv:2210.03629</a></li>
</ul>
<hr>
<p><strong>Further reading on this site</strong></p>
<ul>
<li><a href="../blog/from-text-to-agentic-workflows.html">From Text to Action</a> — the general pipeline this agricultural example instantiates</li>
<li><a href="../blog/what-is-an-ai-agent.html">What Is an AI Agent?</a> — what the trained agent this data is meant to power actually is</li>
<li><a href="../blog/small-specialized-model-vs-frontier.html">David vs.&nbsp;Goliath: Small Model vs.&nbsp;Frontier</a> — what a domain-specialized model built on this kind of data can achieve</li>
<li><a href="../blog/the-institutional-moat.html">The Institutional Moat</a> — why proprietary training data like this is the real competitive advantage</li>
</ul>


</section>

 ]]></description>
  <category>text-to-action</category>
  <guid>https://trajectorium.ai/en/blog/from-logbooks-to-agent-training-data.html</guid>
  <pubDate>Sat, 21 Nov 2026 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Why NLP Finally Works: What Transformers Got Right That Fifty Years of Grammars, Statistics, and RNNs Didn’t</title>
  <dc:creator>Jan Scholtes</dc:creator>
  <link>https://trajectorium.ai/en/blog/why-nlp-finally-works.html</link>
  <description><![CDATA[ 




<p>Natural language processing has been “almost working” for roughly fifty years. Every generation of researchers solved a real problem and ran headlong into a new one. Transformers are the first architecture that doesn’t just solve the next problem in line — they finally take on every layer of language at once, and derive all of it from exposure to data rather than from a human writing it down. Understanding why requires walking through what came before, because the contrast is the whole story.</p>
<section id="the-problem-that-never-went-away-language-doesnt-follow-rules-cleanly" class="level2">
<h2 class="anchored" data-anchor-id="the-problem-that-never-went-away-language-doesnt-follow-rules-cleanly">The Problem That Never Went Away: Language Doesn’t Follow Rules Cleanly</h2>
<p>Natural language is ambiguous at every level. “I saw the man on the hill with a telescope” has at least five valid readings depending on who has the telescope and who’s on the hill. Words like “run” carry a dozen related senses (polysemy); words like “bank” carry two entirely unrelated ones (homonymy). Negation scope, pronoun resolution, irony, sarcasm, discourse structure — each adds another dimension of ambiguity that has to be resolved using context, not just grammar.</p>
<p>Underneath all of this sits an even harder mathematical fact: language follows Zipf’s Law. A small number of words and constructions are extremely common, and then there’s an enormous, unpredictable “long tail” — idioms, rare domain terms, novel phrasings — that occurs too rarely to ever be fully enumerated. Any system built on a fixed set of rules will inevitably run into cases the rules don’t cover, no matter how many rules you write.</p>
<p>That single fact — the long tail is unsolvable by fixed rules — explains almost the entire fifty-year history of the field.</p>
</section>
<section id="generation-1-grammars-and-logic-the-rule-based-era" class="level2">
<h2 class="anchored" data-anchor-id="generation-1-grammars-and-logic-the-rule-based-era">Generation 1: Grammars and Logic (the Rule-Based Era)</h2>
<p>The earliest computational approach to language, tracing back through Chomsky’s generative grammars to Aristotle’s original grammatical categories, tried to formalize language as a system of rules: part-of-speech categories, phrase structure, syntactic derivations. This gives you precision — a grammar either accepts a sentence or it doesn’t — but it’s fundamentally brittle. Hand-written rules can’t account for the long tail, don’t adapt to new vocabulary (a neologism like “Zoom” as a verb didn’t exist yesterday and does today), and require a linguist to manually extend the system every time real-world text breaks it.</p>
</section>
<section id="generation-2-probabilistic-and-corpus-based-models" class="level2">
<h2 class="anchored" data-anchor-id="generation-2-probabilistic-and-corpus-based-models">Generation 2: Probabilistic and Corpus-Based Models</h2>
<p>The next generation added likelihoods on top of structure: instead of a rule either firing or not, assign it a probability learned from a corpus of real text. This was a genuine step forward — it let systems handle ambiguity gracefully instead of failing outright, and it learned patterns directly from annotated data rather than requiring them to be hand-coded. But probabilistic models still largely operated over fixed, engineered features (n-grams, hand-built lexical resources like WordNet encoding synonymy and hyponymy by hand). They were more robust than pure grammars, but they still weren’t learning the deep structure of language — they were learning statistics <em>about</em> a structure someone else had defined.</p>
</section>
<section id="generation-3-neural-networks-learn-sequential-dependencies-rnn-lstm" class="level2">
<h2 class="anchored" data-anchor-id="generation-3-neural-networks-learn-sequential-dependencies-rnn-lstm">Generation 3: Neural Networks Learn Sequential Dependencies (RNN, LSTM)</h2>
<p>Early artificial neural networks, and then recurrent neural networks and LSTMs, represented a real architectural leap: instead of hand-built features, the network learns sequential dependencies directly from data. An RNN passes a hidden state forward through a sentence, meaning it can, in principle, use “what came before” to interpret “what comes now” — exactly the kind of context resolution that ambiguity requires. LSTMs, introduced in 1997, added a gated memory mechanism specifically to help the network retain information across longer gaps (“I grew up in France … I speak fluent French” requires connecting words that are far apart).</p>
<p>Here’s where the wall appeared again, though, and it was a serious one. RNNs and LSTMs process a sentence strictly sequentially — token by token, each step depending on the previous one’s output. That has two consequences that turned out to be fatal at scale: training cannot be parallelized (you can’t compute step 10 before step 9 finishes), and the sequential chain of multiplications causes gradients to either vanish or explode as sentences get longer, making genuinely long-range dependencies hard to learn no matter how clever the gating mechanism. On top of that, the entire meaning of an input sequence had to be compressed into a single final hidden-state vector — often just a handful of dimensions — before being handed to a decoder. Too many relations, too small a bottleneck.</p>
<p>By the mid-2010s, the field had a real diagnosis: RNNs and LSTMs were data-hungry, unstable, computationally expensive to train, and structurally incapable of running in parallel. There was room — need, really — for something fundamentally different.</p>
</section>
<section id="generation-4-transformers-solving-the-bottleneck-and-the-sequential-constraint-at-once" class="level2">
<h2 class="anchored" data-anchor-id="generation-4-transformers-solving-the-bottleneck-and-the-sequential-constraint-at-once">Generation 4: Transformers — Solving the Bottleneck and the Sequential Constraint at Once</h2>
<p>The 2017 paper “Attention Is All You Need” replaced recurrence entirely with <strong>self-attention</strong>: instead of passing information step-by-step through a chain, every token in a sequence is compared directly against every other token, all at once, via matrix multiplication. That single change fixes both of the RNN/LSTM problems simultaneously. Because there’s no sequential dependency between tokens during training, the entire computation parallelizes — and matrix multiplication happens to be exactly what modern GPU and TPU hardware is built to do at enormous speed. And because attention is computed between every pair of tokens directly, there’s no more single bottleneck vector trying to hold an entire sentence’s meaning; the model can look directly at any earlier or later token when it needs to.</p>
<p>But the more interesting part, for anyone who cares about <em>why</em> this actually works for language specifically, is what happens when you stack multiple layers of self-attention on top of each other. Each layer takes the output of the layer before it and refines it further — and empirically, the layers specialize into something that looks remarkably like the classical linguistic pipeline computational linguists had been hand-building for decades: the lower layers pick up on relatively obvious relations like punctuation and morphology, the middle layers start capturing syntax and basic semantic relationships, and the upper layers handle the genuinely hard stuff — resolving pronouns and co-references, tracking long-distance logical relationships, the kind of discourse-level structure that used to require dedicated hand-built modules.</p>
<p>This is the point worth sitting with: the classical NLP pipeline — tokenization, morphology, syntax, semantics, discourse — doesn’t disappear in a Transformer. It <strong>re-emerges automatically</strong>, layer by layer, purely as a consequence of training on enough text, without anyone hand-coding a single grammatical rule. Fifty years of linguistics tried to specify that pipeline explicitly, one layer at a time. Transformers derive the same structure implicitly, from data, and — critically — they don’t get stuck the way every previous generation did on the long tail, because the model isn’t relying on any single fixed rule; it’s building a probabilistic representation flexible enough to generalize to inputs it’s never seen.</p>
</section>
<section id="was-it-luck-or-did-they-know-exactly-what-they-were-doing" class="level2">
<h2 class="anchored" data-anchor-id="was-it-luck-or-did-they-know-exactly-what-they-were-doing">Was It Luck, or Did They Know Exactly What They Were Doing?</h2>
<p>Here’s a genuinely interesting historical question that gets asked about the eight authors of “Attention Is All You Need”: was this breakthrough a lucky architectural accident, or did the people who built it actually understand the linguistics they were encoding?</p>
<p>The honest answer leans toward the latter. Several of the paper’s authors had real, substantial backgrounds in computational linguistics rather than pure machine learning — most notably Jakob Uszkoreit, whose father, Hans Uszkoreit, is a well-known computational linguist. Growing up around that field isn’t a minor biographical detail; it’s a plausible reason the architecture was built with an intuition for how meaning actually layers in language — morphology, then syntax, then semantics, then discourse — rather than being purely an engineering exercise in scaling matrix multiplications. It’s a rare case where the “chance versus deliberate plan” question doesn’t have an obvious answer, and where the deliberate-plan interpretation is genuinely well supported by who was in the room.</p>
</section>
<section id="why-finally-works-is-the-right-phrase" class="level2">
<h2 class="anchored" data-anchor-id="why-finally-works-is-the-right-phrase">Why “Finally Works” Is the Right Phrase</h2>
<p>Put the whole history side by side and the pattern is unmistakable. Grammars gave precision but no robustness to the long tail. Statistical models gave robustness but were still built on fixed, hand-engineered features. RNNs and LSTMs finally learned sequential structure directly from data, but couldn’t scale — sequential processing capped both their training speed and how far back they could actually “remember.” Transformers are the first architecture to combine genuine data-driven learning of linguistic structure <em>at every level</em> — from morphology up through discourse — with a computation that parallelizes cleanly enough to be trained at a scale no earlier architecture could reach. That combination — not any single trick — is why, after fifty years of partial solutions, natural language processing finally works.</p>
<p><em>Course material referenced: Advanced NLP lecture series, Department of Advanced Computing Sciences.</em></p>
<p><strong>Key papers</strong></p>
<ul>
<li>Vaswani et al.&nbsp;(2017), <em>Attention Is All You Need</em> — <a href="https://arxiv.org/abs/1706.03762">arXiv:1706.03762</a></li>
<li>Hochreiter &amp; Schmidhuber (1997), <em>Long Short-Term Memory</em> — <a href="https://doi.org/10.1162/neco.1997.9.8.1735">Neural Computation</a></li>
<li>Devlin et al.&nbsp;(2018), <em>BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding</em> — <a href="https://arxiv.org/abs/1810.04805">arXiv:1810.04805</a></li>
</ul>
<hr>
<p><strong>Further reading on this site</strong></p>
<ul>
<li><a href="../blog/what-is-an-ai-agent.html">What Is an AI Agent?</a> — the transformer-based language model as the missing engine that makes agentic systems work</li>
<li><a href="../blog/small-specialized-model-vs-frontier.html">David vs.&nbsp;Goliath: Small Model vs.&nbsp;Frontier</a> — what happens when you specialize one of these architectures on a single task</li>
<li><a href="../blog/pruning-quantization-distillation.html">Shrinking the Giant: Pruning, Quantization, and Distillation</a> — how to compress what transformers learned into something that runs on modest hardware</li>
<li><a href="../blog/adversarial-attacks-images-and-text.html">Adversarial Attacks: Invisible Pixels and Swapped Words</a> — the security vulnerabilities that emerge from how these models draw their decision boundaries</li>
</ul>


</section>

 ]]></description>
  <category>fundamentals</category>
  <guid>https://trajectorium.ai/en/blog/why-nlp-finally-works.html</guid>
  <pubDate>Sat, 07 Nov 2026 00:00:00 GMT</pubDate>
</item>
<item>
  <title>David vs. Goliath: A Fine-Tuned 8B Model Nearly Matches a Trillion-Parameter Giant — On One Task</title>
  <dc:creator>Jan Scholtes</dc:creator>
  <link>https://trajectorium.ai/en/blog/small-specialized-model-vs-frontier.html</link>
  <description><![CDATA[ 




<p>Here’s a number worth sitting with: a fine-tuned 8-billion-parameter model, small enough to run on a single consumer GPU, recently landed within <strong>1.2 percentage points</strong> of a frontier foundation model on step-validity, and within <strong>6.1 points</strong> on task completion — on a genuinely hard task: following complex, branching procedures (think SOPs, repair manuals, multi-step business workflows) reliably from start to finish. The foundation model it was compared against is estimated at <strong>625 times its size</strong>. This post walks through what was actually built, what the numbers show, and — most importantly — why this result isn’t a fluke. It’s a direct consequence of what specialization buys you.</p>
<section id="the-problem-ai-agents-are-bad-at-following-instructions" class="level2">
<h2 class="anchored" data-anchor-id="the-problem-ai-agents-are-bad-at-following-instructions">The Problem: AI Agents Are Bad at Following Instructions</h2>
<p>It’s tempting to assume that if a language model can write an essay or debug code, it can obviously follow a company’s standard operating procedure. Recent benchmarking says otherwise. One 2025 study deploying AI agents to execute real company SOPs found the <em>best</em> frontier model achieved only a <strong>30.3% success rate</strong>, with open-source models falling under 8%. Separate work testing frontier models on multi-hop reasoning tasks in a clinical records setting found accuracies <strong>below 11%</strong>. The common thread: unstructured procedural text — full of conditional branches, loops, and ambiguous phrasing (“if the name is already in the database… otherwise, start a registration process and execute steps 1 to 10”) — is exactly where general-purpose models stumble, because they’re reasoning over free-form text rather than a structured notion of where they are in a process and what’s actually still valid to do next.</p>
</section>
<section id="the-approach-turn-manuals-into-training-signal-not-just-context" class="level2">
<h2 class="anchored" data-anchor-id="the-approach-turn-manuals-into-training-signal-not-just-context">The Approach: Turn Manuals Into Training Signal, Not Just Context</h2>
<p>The core idea is to stop treating a procedure as text to reason over at inference time, and instead treat it as a source of <em>structured, step-level training data</em> the model can actually learn from. The pipeline runs in five stages:</p>
<ol type="1">
<li><strong>Extract the workflow as a graph.</strong> An LLM-based extraction loop reads a procedural document and recovers it as a directed graph — actions, decision gateways, branch conditions — with a self-checking refinement loop (a structural checker verifying every node is reachable and a path exists from start to end, plus a semantic checker comparing the extracted graph back against the original text for missed steps).</li>
<li><strong>Turn the graph into a notion of progress.</strong> Every valid path through the graph, enumerated deterministically (via breadth- and depth-first search), becomes a sequence of states: what’s been done so far, which conditions held, and what’s validly available next.</li>
<li><strong>Generate both positive and near-miss training signals.</strong> Alongside the correct next action at each state, the pipeline deliberately generates <em>wrong</em> next actions — a skipped step, two steps done in the wrong order, a repeated action, a wrong starting point — each labeled with exactly why it’s wrong.</li>
<li><strong>Train a small, specialized model on this data</strong> — a Process Reward Model that scores candidate next actions given the current state, layered as a LoRA adapter on top of a small open-weight base model (Llama 3.1 8B).</li>
<li><strong>Deploy an agent that combines the small trained model with the extracted graph itself</strong> as a real-time filter: when the model is uncertain, it narrows its candidate actions to only what the graph says is actually valid at that point — at no extra training cost.</li>
</ol>
</section>
<section id="the-results-each-layer-earns-its-keep" class="level2">
<h2 class="anchored" data-anchor-id="the-results-each-layer-earns-its-keep">The Results: Each Layer Earns Its Keep</h2>
<p>The step-by-step improvement is the clearest evidence that this isn’t one clever trick but a genuinely compounding architecture:</p>
<ul>
<li><strong>A bare, ungrounded small model</strong> invents actions that don’t exist in the procedure roughly <strong>35% of the time</strong>, completes only <strong>10.2%</strong> of procedures end-to-end, and produces valid next-steps just <strong>56%</strong> of the time.</li>
<li><strong>Simply grounding it in the extracted action list</strong> (no training required) already lifts completion to <strong>36.7%</strong> and valid steps to <strong>81%</strong>, and — critically — eliminates hallucinated actions entirely, since the model can now only pick from what’s actually real.</li>
<li><strong>Adding the trained Process Reward Model</strong>, blended with the base model’s own judgment, pushes completion to <strong>51%</strong> and valid steps to <strong>87%</strong>.</li>
<li><strong>Adding the graph as a live safety net for uncertain moments</strong> brings completion to <strong>55.1%</strong> and valid steps to <strong>88.7%</strong> — with almost no additional cost, since the graph was already extracted in step one.</li>
</ul>
<p>And the punchline: benchmarked against a frontier foundation model (also given the extracted action list, so it’s not competing at a disadvantage) — the frontier model scored <strong>89.9%</strong> on valid steps and <strong>61.2%</strong> on completion, versus the small system’s <strong>88.7%</strong> and <strong>55.1%</strong>. A gap of roughly one and six points, against a model estimated to be <strong>625 times larger</strong>.</p>
<p>One more finding worth flagging: when the <em>training data itself</em> was deduplicated and rebalanced — cutting the dataset by 43% but removing redundant, near-identical examples and correcting a skew toward “correct” labels — the resulting model performed <em>better</em> on some configurations than the model trained on the larger, messier dataset. Quality beat volume, not just for the base architecture, but for the training data feeding it.</p>
</section>
<section id="why-this-result-makes-complete-sense" class="level2">
<h2 class="anchored" data-anchor-id="why-this-result-makes-complete-sense">Why This Result Makes Complete Sense</h2>
<p>It’s tempting to read a result like this as “small models are secretly as good as huge ones” — that’s not the right lesson, and it’s worth being precise about why.</p>
<p>A frontier foundation model is a generalist. It has to be simultaneously good at writing poetry, debugging Rust, explaining quantum mechanics, translating Portuguese, and — only as one of thousands of competencies — following a company’s specific loan-approval procedure. Its capacity is spread across an enormous space of possible tasks it might be asked to do. That’s precisely why it’s a 5-trillion-parameter-class system in the first place: breadth is expensive.</p>
<p>A specialized model trained specifically on step-level, state-aware procedural data doesn’t need any of that breadth. It needs to answer exactly one narrower question extremely well: <em>given where we are in this specific process, what’s the valid next step?</em> All of its (comparatively tiny) capacity gets spent on that one competency, reinforced by thousands of concrete examples of what’s correct and — just as importantly — labeled examples of what’s <em>almost</em> correct but wrong in a specific, named way. A generalist model has never seen that kind of dense, structured, negative-example-rich training signal for your specific procedures, because it doesn’t exist publicly — it has to be built from an organization’s own manuals.</p>
<p>This is the same logic that shows up whenever a narrow specialist competes with a generalist: a chess engine that only plays chess beats a human generalist at chess, not because it’s more intelligent overall, but because it isn’t spending any capacity on anything else. The 625x parameter gap doesn’t disappear — it’s just mostly irrelevant to this specific, narrow task, because the small model was never asked to be good at everything else the large model also has to be good at.</p>
</section>
<section id="why-this-matters-practically" class="level2">
<h2 class="anchored" data-anchor-id="why-this-matters-practically">Why This Matters Practically</h2>
<p>The practical implications extend past the raw numbers:</p>
<ul>
<li><strong>It runs locally, on a single consumer-grade GPU</strong> — no data leaves the building, which matters directly for the kind of <a href="../blog/why-europe-needs-sovereign-ai.html">institutional and data sovereignty concerns covered earlier on this site</a>.</li>
<li><strong>No proprietary procedural data has to be sent to an external API provider</strong> to get this level of performance — the specialization happens entirely on infrastructure the organization controls.</li>
<li><strong>The cost and energy footprint drop by orders of magnitude</strong> relative to querying a frontier model repeatedly, without giving up much of the task-specific performance that matters.</li>
<li><strong>The bottleneck that remains is extraction quality, not model size</strong> — when the underlying workflow graph is perfect (gold-standard), the same small model completes 98% of procedures with 99.6% valid steps. The gap to frontier-model performance in real deployment comes almost entirely from imperfect automatic extraction of the workflow graph from messy source text, not from the small model’s reasoning capacity itself.</li>
</ul>
</section>
<section id="the-takeaway" class="level2">
<h2 class="anchored" data-anchor-id="the-takeaway">The Takeaway</h2>
<p>A handful of percentage points separating an 8-billion-parameter specialist from a multi-trillion-parameter generalist, on a task that actually matters to an organization’s operations, is not a coincidence and not a trick — it’s the direct, predictable result of trading breadth for depth. Foundation models are built to be good at almost everything; a fine-tuned small model built on an organization’s own procedural data only has to be good at one thing. When that one thing is narrow enough and the training data is good enough, the size gap stops being the deciding factor. That’s the entire argument for building your own specialized agentic components on top of a commodity foundation model, rather than renting the whole capability from someone else’s much bigger, much more expensive, much less controllable system.</p>
<p><strong>Key papers</strong></p>
<ul>
<li>Hu et al.&nbsp;(2022), <em>LoRA: Low-Rank Adaptation of Large Language Models</em> — <a href="https://arxiv.org/abs/2106.09685">arXiv:2106.09685</a></li>
<li>Sanh et al.&nbsp;(2019), <em>DistilBERT, a Distilled Version of BERT</em> — <a href="https://arxiv.org/abs/1910.01108">arXiv:1910.01108</a></li>
<li>Ouyang et al.&nbsp;(2022), <em>Training Language Models to Follow Instructions with Human Feedback</em> — <a href="https://arxiv.org/abs/2203.02155">arXiv:2203.02155</a></li>
</ul>
<hr>
<p><strong>Further reading on this site</strong></p>
<ul>
<li><a href="../blog/from-text-to-agentic-workflows.html">From Text to Action</a> — how to build the training data pipeline that produces a model like this</li>
<li><a href="../blog/from-logbooks-to-agent-training-data.html">From Logbooks to Agent Training Data</a> — a concrete domain example of building exactly this kind of specialized training signal</li>
<li><a href="../blog/pruning-quantization-distillation.html">Shrinking the Giant: Pruning, Quantization, and Distillation</a> — the complementary compression techniques that make small models even smaller and cheaper</li>
<li><a href="../blog/why-europe-needs-sovereign-ai.html">Why Europe Needs Its Own AI Models</a> — why running this model locally on sovereign infrastructure matters</li>
<li><a href="../blog/the-institutional-moat.html">The Institutional Moat</a> — the strategic case for building specialized rather than renting general</li>
</ul>


</section>

 ]]></description>
  <category>text-to-action</category>
  <guid>https://trajectorium.ai/en/blog/small-specialized-model-vs-frontier.html</guid>
  <pubDate>Sat, 31 Oct 2026 00:00:00 GMT</pubDate>
</item>
<item>
  <title>How AI Will Revolutionize Education — And Where It Genuinely Shouldn’t</title>
  <dc:creator>Jan Scholtes</dc:creator>
  <link>https://trajectorium.ai/en/blog/how-ai-will-revolutionize-education.html</link>
  <description><![CDATA[ 




<p>“Since 1985 I have been wondering how we can teach computers to use human language. And now, after all these years, it finally works.” That’s a fair summary of where higher education finds itself with generative AI — the technology finally works, and the harder question has shifted to how we responsibly fold it into teaching and learning. This post walks through both sides honestly: what’s genuinely transformative, and where the same technology creates problems education hasn’t fully solved yet.</p>
<section id="the-kissinger-warning-applied-to-the-classroom" class="level2">
<h2 class="anchored" data-anchor-id="the-kissinger-warning-applied-to-the-classroom">The Kissinger Warning, Applied to the Classroom</h2>
<p>Before getting to the exciting use cases, it’s worth sitting with an uncomfortable observation from Henry Kissinger, writing about AI and chess: <em>“AI is likely to win any game assigned to it. But for our purposes as humans, the games are not only about winning; they are about thinking… By treating a mathematical process as if it were a thought process, and either trying to mimic that process ourselves or merely accepting the results, we are in danger of losing the capacity that has been the essence of human cognition.”</em></p>
<p>Swap “games” for “assignments” and the warning applies directly to education. The purpose of education was never just passing exams — it’s learning to think. Yet assessment, historically, has often rewarded memorization over reasoning. With models like GPT now able to produce a polished essay in seconds, that mismatch has become impossible to ignore. AI can revolutionize education by acting as a scalable, personalized teaching assistant — but only if institutions redesign how they teach and assess around it, rather than bolting AI onto an assessment model built for a pre-AI world.</p>
</section>
<section id="what-generative-ai-actually-does-well-in-the-classroom" class="level2">
<h2 class="anchored" data-anchor-id="what-generative-ai-actually-does-well-in-the-classroom">What Generative AI Actually Does Well in the Classroom</h2>
<p>Set aside the risks for a moment — the concrete use cases are genuinely compelling, and most have already been tested in real courses.</p>
<p><strong>Socratic dialogues, generated on demand.</strong> The Socratic method — probing questions that challenge assumptions and stimulate reasoning rather than handing over answers — is exactly the kind of interaction AI can produce at scale. Ask a model to generate five Socratic dialogues on a topic (what makes an approach powerful, where it breaks down, what the societal risks are) and you get ready-to-use classroom material that shifts the room from lecture to dialogue, in minutes rather than hours of prep.</p>
<p><strong>A teaching assistant that works 24/7.</strong> Students hit conceptual walls at 2 a.m. the night before an exam, not during office hours. An AI tutor with infinite patience — willing to re-explain a difficult concept as many times and in as many different ways as a student needs — fills a gap no human teaching staff can realistically cover.</p>
<p><strong>Exercises, readers, and lecture material, generated at scale.</strong> One concrete example from this material: a full 240-page reader — chapters, exercises, answers, and coding assignments — generated from 1,300 lecture slides in a few evenings, chapter by chapter. That’s not a marginal efficiency gain; it’s work that would otherwise take weeks, freeing an educator’s time for the parts of teaching that actually require a human — deeper interaction, mentoring, judgment calls about where a specific student is stuck.</p>
<p><strong>Personalized explanation and adaptive content.</strong> The same underlying material can be re-explained at different levels of complexity depending on what a specific student needs — something a single lecture, delivered once to a room of 200, structurally cannot do.</p>
<p><strong>Immediate feedback on your own teaching.</strong> Educators can use the same tools to review their own lecture material and get concrete feedback on clarity and structure — a second pair of eyes available on demand.</p>
<p><strong>Automated conversational assessment.</strong> Early research (including ongoing work at Maastricht University’s DACS group) is exploring conversational agents that combine a teacher’s rubric, the content document, and a dialogue with the student to produce assessment recommendations — not to replace the teacher’s judgment, but to structure and speed up a process that’s currently manual and slow.</p>
</section>
<section id="the-arms-race-nobody-wanted" class="level2">
<h2 class="anchored" data-anchor-id="the-arms-race-nobody-wanted">The Arms Race Nobody Wanted</h2>
<p>Here’s where the honest picture gets more complicated. The moment AI got good enough to write a passable essay, an entire counter-industry appeared. Tools now exist specifically to “humanize” AI-generated text so it evades AI-detection software — and in a strange twist, students who write their <em>own</em> original work are now running it through the same detectors first, worried their authentic writing might get flagged as AI-generated. Teachers use AI-detection tools to catch AI-written submissions; students use humanizing tools to defeat those detectors; some students run their own real writing through detectors defensively. Everyone is now writing partly for the detector, not for the reader.</p>
<p>This isn’t entirely new — “homework machines” predate ChatGPT by decades, and every generation of technology has triggered similar panic (the same fear was raised about Google two decades ago: “Is Google Making Us Stupid?”). But generative AI’s fluency makes the cat-and-mouse dynamic sharper and faster-moving than anything before it, and it’s producing genuinely unhappy students and frustrated educators on both sides of the detection arms race.</p>
</section>
<section id="why-the-underlying-technology-still-needs-guardrails" class="level2">
<h2 class="anchored" data-anchor-id="why-the-underlying-technology-still-needs-guardrails">Why the Underlying Technology Still Needs Guardrails</h2>
<p>It’s worth being precise about what these models are — and aren’t — actually doing, because it explains both their usefulness and their failure modes in an educational setting. A model like GPT is fundamentally a next-token predictor: given a sequence of words, it estimates the probability of what comes next, generating text autoregressively, one token at a time. It has no built-in factuality check, no persistent memory across sessions unless explicitly engineered, and no real-world grounding for the words it produces — critiques often summarized as “stochastic parrot”: fluent language production without genuine understanding.</p>
<p>That has direct educational consequences: the longer the generated text, the higher the odds of factual drift or outright hallucination — a serious problem when the content is a formula, a citation, a historical date, or a piece of code a student will trust. The mitigation techniques that matter here for an education setting are the same ones used in any serious deployment: retrieval-augmented generation to ground answers in actual course material rather than the model’s general training data, knowledge-graph-based context injection for structured facts, and simply instructing the system to say “I don’t know” rather than confidently inventing an answer when confidence is low. None of this is optional polish — it’s the difference between a tutor that’s occasionally wrong in a way students can catch, and one that’s confidently wrong in a way they can’t.</p>
</section>
<section id="the-real-redesign-question" class="level2">
<h2 class="anchored" data-anchor-id="the-real-redesign-question">The Real Redesign Question</h2>
<p>The most productive framing isn’t “should we ban this” or “should we embrace this uncritically” — it’s “what does assessment need to become now that this exists.” A few concrete directions worth taking seriously:</p>
<ul>
<li><strong>Redesign assignments around understanding, not output.</strong> Have students use GenAI to critique and improve their own work, understanding <em>why</em> something can be improved — turning the AI into a teammate rather than a shortcut.</li>
<li><strong>Consider flipping the classroom.</strong> If lecturing information is a solved problem AI can do reasonably well, live class time can shift toward Socratic dialogue and applied reasoning — though this requires a real shift in what’s expected of students, not just of instructors.</li>
<li><strong>Keep genuinely AI-free assessment where it matters.</strong> Some final assessments should remain “do it on your own,” without any AI tooling, specifically to verify the reasoning skill the AI-assisted work was meant to build toward.</li>
<li><strong>Avoid “AI-friendly assignments”</strong> — tasks that don’t require critical analysis in the first place are exactly the ones AI will complete indistinguishably from a human, telling you nothing about what the student actually learned.</li>
</ul>
<p>There’s also a quieter risk worth naming: if an AI grading or tutoring assistant is right 49 times in a row, will an educator still carefully check the 50th? Automation complacency is a real failure mode, not a hypothetical one, and it argues for keeping a human genuinely in the loop rather than rubber-stamping AI output because it’s usually been reliable.</p>
</section>
<section id="weighing-it-honestly" class="level2">
<h2 class="anchored" data-anchor-id="weighing-it-honestly">Weighing It Honestly</h2>
<p><strong>The case for:</strong> 24/7 access to explanation, genuinely personalized pacing, scaffolding for difficult topics, efficient tutoring support at a scale no institution could staff with humans alone, reduced barriers for students in under-resourced situations, and language support for non-native speakers.</p>
<p><strong>The case for caution:</strong> over-reliance that erodes the exact skill education is meant to build, the risk of confidently wrong information reaching students who can’t yet tell the difference, unequal access if tools are costly, and the very real possibility that assignments get outsourced rather than understood.</p>
</section>
<section id="the-takeaway" class="level2">
<h2 class="anchored" data-anchor-id="the-takeaway">The Takeaway</h2>
<p>The technology genuinely works now, after decades of research — that part isn’t in question. What’s still being worked out, in real time, in real classrooms, is how educators shift from being information providers to facilitators of critical thinking, and how assessment shifts from rewarding memorization to rewarding reasoning and application. Used well, AI in education looks like a tireless, patient, always-available teaching assistant that frees human educators for the parts of teaching machines still can’t do. Used carelessly, it looks like an arms race between detection tools and humanizing tools that leaves everyone writing for the algorithm instead of for understanding. The technology doesn’t decide which of those futures we get — the redesign of assessment and pedagogy around it does.</p>
<p><em>Based on “Exploring the Potential of AI Tutors in Higher Education” (Prof.&nbsp;dr. ir. Jan Scholtes, UM Education Day, June 2025).</em></p>
<p><strong>Key papers</strong></p>
<ul>
<li>Kasneci et al.&nbsp;(2023), <em>ChatGPT for Good? On Opportunities and Challenges of LLMs for Education</em> — <a href="https://doi.org/10.1016/j.lindif.2023.102274">Learning and Individual Differences</a></li>
<li>Bender et al.&nbsp;(2021), <em>On the Dangers of Stochastic Parrots</em> — <a href="https://doi.org/10.1145/3442188.3445922">ACM FAccT 2021</a></li>
<li>Mollick &amp; Mollick (2023), <em>Assigning AI: Seven Approaches for Students, With Prompts</em> — <a href="https://ssrn.com/abstract=4391243">SSRN</a></li>
</ul>
<hr>
<p><strong>Further reading on this site</strong></p>
<ul>
<li><a href="../blog/what-is-an-ai-agent.html">What Is an AI Agent?</a> — the architecture behind the AI tutors and assessment agents discussed here</li>
<li><a href="../blog/why-nlp-finally-works.html">Why NLP Finally Works</a> — the transformer architecture that made generative AI in education possible</li>
<li><a href="../blog/adversarial-attacks-images-and-text.html">Adversarial Attacks: Invisible Pixels and Swapped Words</a> — why AI systems need guardrails, including in educational settings</li>
<li><a href="../blog/from-text-to-agentic-workflows.html">From Text to Action</a> — how course materials and corrections can become training data for a specialized educational agent</li>
</ul>


</section>

 ]]></description>
  <category>education</category>
  <guid>https://trajectorium.ai/en/blog/how-ai-will-revolutionize-education.html</guid>
  <pubDate>Sat, 24 Oct 2026 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Governing the Autonomous Organization: Who’s Accountable When AI Decides?</title>
  <dc:creator>Jan Scholtes</dc:creator>
  <link>https://trajectorium.ai/en/blog/governing-the-autonomous-organization.html</link>
  <description><![CDATA[ 




<p>After roughly forty years of “AI is almost there,” it’s finally there. Chess in 1997, Jeopardy in 2011, Go in 2016, poker and DOTA 2 shortly after, transformers in 2017, and now agentic systems that don’t just answer questions but act on them. The technical question — can we make it work? — is largely settled. The question that’s left, and it’s the harder one, is organizational: <strong>how do you govern an institution where AI analyzes, advises, and acts, while final accountability still sits with a human being?</strong></p>
<p>This isn’t a hypothetical for a future board meeting. It’s already the operating reality in places that have gone furthest with agentic AI — including, perhaps surprisingly, the US Navy.</p>
<section id="the-governance-framework-nobody-wrote-down-until-now" class="level2">
<h2 class="anchored" data-anchor-id="the-governance-framework-nobody-wrote-down-until-now">The Governance Framework Nobody Wrote Down (Until Now)</h2>
<p>A useful way to think about governing an AI agent is to map its lifecycle onto four phases, each with its own governance question — and each with a corresponding evaluation standard, such as Stanford’s HELM benchmark suite, that gives you something concrete to measure rather than a vague sense of trust.</p>
<p><strong>1. Training — is the foundation sound?</strong> This is the pre-training and instruction-tuning phase where the model learns patterns, language, and baseline tasks. The governance question here is simple but foundational: does this system have adequate baseline accuracy and knowledge quality across the scenarios it will actually face? If the foundation is weak, nothing built on top of it will be trustworthy, no matter how sophisticated the oversight layers are.</p>
<p><strong>2. Validation — does it behave consistently under pressure?</strong> Testing an agent in simulated environments — can it reliably call APIs and execute code without breaking? — surfaces two governance-critical properties: robustness (does small variation in input cause large variation in behavior?) and calibration (does the system actually know how confident it should be?). A model that’s simultaneously wrong and confident is far more dangerous to govern than one that’s wrong and says so.</p>
<p><strong>3. Reflection — does it catch its own mistakes?</strong> Agentic frameworks like ReAct and Reflexion give a system the ability to look at the outcome of its own action — an error message from a tool, an unexpected result — think about it, and correct its own plan. From a governance standpoint, this is where you assess adaptivity: does the agent keep following a logical, defensible chain of steps, or does it derail under uncertainty? This is the layer that catches problems before a human ever has to.</p>
<p><strong>4. Explanation — can it show its work?</strong> This is Explainable AI (XAI): why did the agent choose action A instead of action B? A governed agent needs to expose its internal decision tree, the weight it gave to competing considerations, or at minimum a clear log — to the human supervisor who remains accountable for the outcome. This is also where fairness and bias reduction get enforced in practice, because you cannot audit what you cannot see. Without this layer, “the AI decided” is not an answer — it’s an evasion.</p>
<p>Together, these four phases aren’t just an engineering pipeline. They’re a governance framework: each phase answers a specific question a board, a regulator, or an auditor will eventually ask, and each has a measurable standard behind it rather than a hand-wave.</p>
</section>
<section id="what-this-looks-like-in-practice-the-us-navy" class="level2">
<h2 class="anchored" data-anchor-id="what-this-looks-like-in-practice-the-us-navy">What This Looks Like in Practice: The US Navy</h2>
<p>Abstract frameworks are easier to trust when you can point to them working under real operational pressure. The US Navy’s recent agentic AI deployments are instructive precisely because the stakes — safety, cost, mission readiness — leave no room for governance to be an afterthought.</p>
<p><strong>MyNavy HR: eliminating bureaucracy, not just automating it.</strong> Internal administration was one of the biggest sources of wasted time and frustration for sailors, contributing directly to lower retention. The Navy’s answer was to place AI agents as an invisible translator between the sailor and the Navy’s clunky ERP systems — a sailor submits an HR, pay, or leave change through a radically simple interface, and the agent autonomously updates the backend systems. The result: hundreds of thousands of saved labor-hours annually, a reduced HR headcount, and operational crews freed from paperwork. The governance lesson here is that the sailor never has to understand or trust the AI directly — they trust that the outcome is correct, because the governance sits one layer back, in how the agent’s actions are validated against HR policy.</p>
<p><strong>Condition-Based Maintenance Plus (CBM+): sovereignty as a governance requirement, not a preference.</strong> The Navy is moving away from reactive or purely calendar-based maintenance on ships and submarines, using what they call Sovereign Edge AI — models that run physically and locally on the ship, independent of a satellite connection. Sensors feed a local model; when it detects an abnormal pattern, the agent doesn’t just generate a report — it autonomously orders the needed spare part and schedules the repair for the next port call. The result: massive savings from minimizing “Awaiting Parts” downtime — a billion-dollar ship no longer sits idle because a hundred-dollar valve is missing. Note what’s doing the governance work here: the AI is authorized to <em>act</em> (order parts, schedule repairs) precisely because it runs on infrastructure the Navy fully controls, with a bounded, well-tested action space. Autonomy and sovereignty aren’t separate concerns — the first depends on the second.</p>
<p><strong>NAVSUP: predictive logistics that anticipate need.</strong> The Naval Supply Systems Command manages global depots and must resupply fleets at sea, where bureaucratic delay can be genuinely dangerous. The AI links a mission profile to logistics: if a fleet operates in heavy weather, the system proactively calculates increased wear and positions the needed parts forward in the nearest depot — before the crew even asks. The result is a near-elimination of expensive emergency logistics flights and a sharp reduction in excess “dead” inventory sitting in ports.</p>
<p>Across all three, the pattern is the same: AI is given real decision-making and action authority, but only within a tightly governed envelope — bounded actions, local/sovereign infrastructure where the stakes require it, and a clear chain back to a human accountable for the outcome.</p>
</section>
<section id="digital-sovereignty-is-part-of-governance-not-a-separate-topic" class="level2">
<h2 class="anchored" data-anchor-id="digital-sovereignty-is-part-of-governance-not-a-separate-topic">Digital Sovereignty Is Part of Governance, Not a Separate Topic</h2>
<p>It’s tempting to treat “who governs the AI’s decisions” and “who controls the infrastructure the AI runs on” as two different conversations. The Navy’s CBM+ case shows why they’re the same conversation. <a href="../blog/why-europe-needs-sovereign-ai.html">Governing an autonomous system and owning its infrastructure are the same question — as the five-dimension sovereignty framework covered separately on this site makes clear.</a> Governing an autonomous decision-making system requires control over:</p>
<ul>
<li><strong>Training infrastructure</strong> — who shapes what the model learns</li>
<li><strong>Inference infrastructure</strong>, including edge deployment — where and how the model actually runs when it makes a decision</li>
<li><strong>Reliable, often smaller models</strong> you can fully validate, rather than an opaque general-purpose model you can only prompt</li>
<li><strong>Fine-tuning, RAG, RLHF, and reflection</strong> — the mechanisms that let you actually shape behavior rather than just hope for it</li>
<li><strong>Compression, pruning, and distillation</strong> — the techniques that make it feasible to run a governed model locally, at the edge, instead of depending on a remote API you don’t control</li>
</ul>
<p>An organization that governs only the prompt layer, while every actual inference call goes out to infrastructure it doesn’t control, hasn’t really solved the governance problem — it’s outsourced part of it to a party outside the accountability chain.</p>
</section>
<section id="the-open-question-centralized-or-decentralized-governance" class="level2">
<h2 class="anchored" data-anchor-id="the-open-question-centralized-or-decentralized-governance">The Open Question: Centralized or Decentralized Governance?</h2>
<p>This is where the framework runs out of easy answers, and honestly should. Should AI governance in a large organization be centralized — one body setting standards, validation thresholds, and explainability requirements for every AI system in the organization — or decentralized, with each department or ship, in the Navy’s case, governing its own agents against a shared baseline?</p>
<p>There’s a reasonable case for both. Centralized governance gives you consistency, a single point of audit, and economies of scale in validation and XAI tooling. Decentralized governance gives you speed and domain-specific judgment — the team running shipboard maintenance AI understands failure modes that a central AI ethics board never will in the same depth. Most organizations that have gone furthest with agentic AI seem to converge on a hybrid: centrally defined <em>standards</em> (the four-phase framework above, minimum XAI requirements, escalation thresholds for human sign-off) paired with decentralized <em>implementation and monitoring</em> close to where the decisions actually happen. Sovereignty and accountability get set centrally; day-to-day judgment stays local.</p>
</section>
<section id="where-to-start-hr-legal-and-finance" class="level2">
<h2 class="anchored" data-anchor-id="where-to-start-hr-legal-and-finance">Where to Start: HR, Legal, and Finance</h2>
<p>If governing agentic AI across an entire organization feels daunting, there’s a well-established place to build the muscle before extending it to higher-stakes domains: HR, in-house legal, and finance. These functions operate almost entirely in a digital and paper reality — no unpredictable physical world of weather, broken pumps, or physical distance to contend with. They deal in text and numbers in office documents, follow strict rules and protocols, and typically represent a slow, expensive bottleneck for the rest of the organization. That combination — high rule-density, high volume, low physical unpredictability — makes them the ideal low-risk proving ground for the governance framework above: you can validate the four phases, test your explainability tooling, and establish your escalation thresholds somewhere the cost of an early mistake is a delayed invoice, not a stranded ship.</p>
</section>
<section id="the-takeaway" class="level2">
<h2 class="anchored" data-anchor-id="the-takeaway">The Takeaway</h2>
<p>The technology question — does agentic AI actually work? — is behind us. What’s left is the governance question, and it doesn’t have a single settled answer yet, but it does have a workable shape: train and validate against measurable standards, build in reflection so the system catches its own errors, require genuine explainability so a human can actually audit the decision, control the infrastructure the decisions run on, and decide deliberately — not by default — how much of that sits centrally versus close to where the work happens. Organizations that treat this as an engineering afterthought will find out the hard way that “the AI decided” is not an acceptable answer to a board, a regulator, or a sailor whose ship is stuck in port.</p>
<p><em>Based on “AI en Bestuurlijke Besluitvorming” (Prof.&nbsp;dr. ir. J.C. Scholtes, roundtable session, August 2026).</em></p>
<p><strong>Key papers</strong></p>
<ul>
<li>Jobin et al.&nbsp;(2019), <em>The Global Landscape of AI Ethics Guidelines</em> — <a href="https://doi.org/10.1038/s42256-019-0088-2">Nature Machine Intelligence</a></li>
<li>Doshi-Velez &amp; Kim (2017), <em>Towards a Rigorous Science of Interpretable Machine Learning</em> — <a href="https://arxiv.org/abs/1702.08608">arXiv:1702.08608</a></li>
<li>Cath (2018), <em>Governing Artificial Intelligence: Ethical, Legal and Technical Opportunities and Challenges</em> — <a href="https://doi.org/10.1098/rsta.2018.0080">Phil. Trans. R. Soc. A</a></li>
</ul>
<hr>
<p><strong>Further reading on this site</strong></p>
<ul>
<li><a href="../blog/the-institutional-moat.html">The Institutional Moat</a> — the architecture layer that governance sits on top of</li>
<li><a href="../blog/why-europe-needs-sovereign-ai.html">Why Europe Needs Its Own AI Models</a> — sovereignty as the infrastructure prerequisite for real governance</li>
<li><a href="../blog/what-is-an-ai-agent.html">What Is an AI Agent?</a> — what the system being governed actually is</li>
<li><a href="../blog/building-sovereign-ai-agents.html">What It Takes to Build a Sovereign AI Agent</a> — the end-to-end practical guide that applies this governance framework</li>
<li><a href="../blog/bias-analysis-in-practice.html">Bias Analysis in Practice</a> — how to carry out the required bias analysis, justification test, and ethical desirability test</li>
</ul>


</section>

 ]]></description>
  <category>governance</category>
  <guid>https://trajectorium.ai/en/blog/governing-the-autonomous-organization.html</guid>
  <pubDate>Sat, 17 Oct 2026 00:00:00 GMT</pubDate>
</item>
<item>
  <title>The Institutional Moat: Why CTOs Can’t Stop at Prompts and Skill Files</title>
  <dc:creator>Jan Scholtes</dc:creator>
  <link>https://trajectorium.ai/en/blog/the-institutional-moat.html</link>
  <description><![CDATA[ 




<p>Most enterprise “AI strategies” today look the same: pick a foundation model — Claude, GPT, Gemini — write a system prompt, wrap it in a few skill files, wire up some function calling, and call it an agent. It works, it demos well, and it ships fast. It is also, on its own, not a moat. If your CTO briefing stops there, this post is for you.</p>
<section id="the-sandbox-youre-actually-building-in" class="level2">
<h2 class="anchored" data-anchor-id="the-sandbox-youre-actually-building-in">The Sandbox You’re Actually Building In</h2>
<p>Foundation model providers aren’t just shipping smarter chatbots anymore — they’re building fully integrated, closed-loop agentic ecosystems: multi-step reasoning chains, native tool integration, proprietary knowledge graphs, neural rerankers trained on billions of queries, and increasingly recursive self-improvement. What they hand external developers, by contrast, is a controlled sandbox: system prompts (shallow control), function calling to trigger tools, standard RAG (basic vector search), and pre-built templates. You do not get access to their RLHF layers, their model weights, or their internal reranking. You get to build <em>on</em> the platform — not <em>into</em> it.</p>
<p>That gap matters more than it looks like at first glance. A system prompt, however carefully engineered, is treating the model as a black box. When your entire “agent” is a Markdown file layered over a general-purpose LLM, you haven’t built a proprietary system — you’ve built a configuration of someone else’s product. That’s the trap: <strong>you end up building a dependency, not a company.</strong></p>
</section>
<section id="why-the-next-model-version-will-fix-it-is-a-fatal-strategy" class="level2">
<h2 class="anchored" data-anchor-id="why-the-next-model-version-will-fix-it-is-a-fatal-strategy">Why “The Next Model Version Will Fix It” Is a Fatal Strategy</h2>
<p>It’s tempting to defer. Base models improve every few months, so why invest in custom architecture now? Because relying solely on the ever-improving base model turns your business into a temporary feature on someone else’s roadmap. Customer loyalty built on “good enough” is a mirage, particularly in conservative markets — the moment a foundation model provider ships a superior integrated capability in your exact niche, that loyalty disappears overnight. Without your own memory layer, your own reasoning logic, and your own verification loops, you are not a company with an AI product. You are a wrapper waiting to be absorbed.</p>
<p>The uncomfortable question every CTO should be asking isn’t <em>whether</em> the platforms will expand into your niche — it’s whether your organization can out-specialize them before they do.</p>
</section>
<section id="where-the-real-moat-actually-lives" class="level2">
<h2 class="anchored" data-anchor-id="where-the-real-moat-actually-lives">Where the Real Moat Actually Lives</h2>
<p>Value-add has shifted. It’s no longer in which foundation model you call — that’s increasingly a replaceable, commodity choice between Claude, GPT, Gemini, or an open-weight model like Llama. The moat is in the <strong>proprietary architecture and data sovereignty you build around it.</strong> Four components do the heavy lifting.</p>
<section id="rag-neural-reranking-your-corporate-memory" class="level3">
<h3 class="anchored" data-anchor-id="rag-neural-reranking-your-corporate-memory">1. RAG + Neural Reranking — Your Corporate Memory</h3>
<p>Basic vector search is now table stakes, not a differentiator. Chunking your manuals, projects, and institutional expertise into semantic sections and indexing them (Pinecone, pgvector) gets you standard retrieval-augmented generation — useful, but generic. The real moat is a <strong>neural reranker</strong>: a cross-encoder trained specifically on your own query-and-best-answer pairs, which re-examines the top 50–100 candidates a plain vector search returns and understands the nuance a generalist model can’t — the difference between “Market Risk” and “Operational Risk” in your specific domain, for instance. Vector search finds things that are similar. A reranker finds the thing that’s correct. That distinction is where hallucinations get drastically reduced.</p>
</section>
<section id="a-fine-tuned-critic-your-digital-peer-reviewer" class="level3">
<h3 class="anchored" data-anchor-id="a-fine-tuned-critic-your-digital-peer-reviewer">2. A Fine-Tuned Critic — Your Digital Peer Reviewer</h3>
<p>A large foundation model is fast and broadly knowledgeable, but it’s a generalist. Pair it with a small, specialized, fine-tuned “Critic” model trained on your organization’s own corrections — not a static rulebook, but adaptive intelligence that reviews, rejects, or sends drafts back with specific feedback. The training data for this is concrete and collectible starting today: rejected or edited AI outputs from your own staff, the expert-corrected version, the rationale (“violates Section 4.2”), and any hard compliance red lines. As a rough guide, 50–100 curated examples gets you a working prototype; 500–1,000 reaches production standard; 2,000+ approaches genuine domain expertise. No foundation model provider has access to this data — it’s yours by construction.</p>
</section>
<section id="planning-and-multi-hop-reasoning-navigating-real-information-chains" class="level3">
<h3 class="anchored" data-anchor-id="planning-and-multi-hop-reasoning-navigating-real-information-chains">3. Planning and Multi-Hop Reasoning — Navigating Real Information Chains</h3>
<p>Complex professional tasks are never solved in one step. A useful architecture runs an OODA-style loop — observe, orient, decide, act — parsing intent, decomposing it into sub-goals with dependencies, selecting the next tool or reasoning step, executing, verifying, and looping until the task actually resolves. Frameworks like LangGraph (control loops), DSPy (prompt auto-optimization), and CrewAI (role-based multi-agent orchestration) exist precisely to support this; Chain-of-Thought, Tree-of-Thought, and Skeleton-of-Thought give the reasoning itself room to unfold across steps instead of being crammed into one pass.</p>
</section>
<section id="guardrails-solving-the-single-biggest-barrier-to-adoption" class="level3">
<h3 class="anchored" data-anchor-id="guardrails-solving-the-single-biggest-barrier-to-adoption">4. Guardrails — Solving the Single Biggest Barrier to Adoption</h3>
<p>Hallucination risk is the number one reason institutional AI adoption stalls. The fix isn’t a bigger model — it’s independent verification agents surrounding the core LLM: fact-checking every draft against your RAG source of truth, safety filters enforcing legal and compliance red lines, and self-consistency checks that run the same query through multiple reasoning paths and discard answers that don’t agree with each other. None of this should be left to the same model policing itself. For a full treatment of the specific attack types these guardrails defend against, see the <a href="../blog/adversarial-attacks-images-and-text.html">post on adversarial attacks</a> in this series.</p>
</section>
</section>
<section id="the-compounding-advantage-reasoning-triples" class="level2">
<h2 class="anchored" data-anchor-id="the-compounding-advantage-reasoning-triples">The Compounding Advantage: Reasoning Triples</h2>
<p>Put these four together and something compounding starts to happen. Every real interaction generates a <strong>reasoning triple</strong>: the observation the system saw, the action or tool call it chose, and the consequence — success or failure. That data refines your reranker, your critic, and your planner, which produces better outcomes, which drives more usage, which produces more data. This is the flywheel that turns a one-off integration project into a genuinely defensible asset — and, notably, it’s exactly the kind of proprietary dataset that later lets you fine-tune around each new generation of foundation model rather than being replaced by it.</p>
</section>
<section id="what-to-do-monday-morning" class="level2">
<h2 class="anchored" data-anchor-id="what-to-do-monday-morning">What to Do Monday Morning</h2>
<p>If you’re a CTO or CIO reading this and recognizing your own stack, the fix doesn’t require a moonshot:</p>
<ol type="1">
<li><strong>Audit your AI stack.</strong> If it’s prompts plus API calls and nothing else, you currently have no moat.</li>
<li><strong>Start collecting reasoning triples today</strong>, from every expert interaction — this data only exists going forward, not retroactively.</li>
<li><strong>Implement a neural reranker on your domain data.</strong> This is usually the highest-ROI first step.</li>
<li><strong>Build your first Critic agent.</strong> Fifty curated examples is enough for a working prototype.</li>
<li><strong>Decouple your architecture into modular, independently upgradable components</strong> — reranker, critic, planner, and guardrails should each be replaceable without rebuilding the whole system.</li>
</ol>
</section>
<section id="the-eu-angle-why-this-isnt-optional-here" class="level2">
<h2 class="anchored" data-anchor-id="the-eu-angle-why-this-isnt-optional-here">The EU Angle: Why This Isn’t Optional Here</h2>
<p>Everything above applies globally. But European CTOs and CIOs have an additional, very concrete reason not to treat this as a nice-to-have: <strong>almost all of this architecture currently sits on top of American infrastructure and American foundation models — and that dependency has already proven fragile once.</strong> This is the dimension <a href="../blog/why-europe-needs-sovereign-ai.html">covered in depth in the companion post on AI sovereignty</a> on this site.</p>
<p>In mid-2026, Anthropic suspended access to its newly released Fable and Mythos model tiers for several weeks to comply with U.S. Department of Commerce export controls, before the Department lifted those restrictions and access was restored. Whatever the specifics of that episode, it’s a concrete, recent, real-world demonstration of the exact risk this post is about: if your entire operation runs on a thin layer of prompts over a foreign-hosted model, an export control decision, a pricing change, or a policy shift made in Washington — not in Brussels, and not by you — can suspend or reprice your core capability with no notice and no recourse.</p>
<p>This is precisely why Stanford’s 2026 AI Index frames AI sovereignty across five dimensions — infrastructure, data, model, application, and talent — and why the report shows Europe investing heavily but still trailing in raw compute and model production. An organization that has built nothing but a prompt layer on a U.S. model has zero independent leverage in that scenario. An organization that has built its own RAG-and-reranking memory, its own fine-tuned critics, its own planning logic, and its own guardrails — all trained on proprietary European data — can survive a model swap. The foundation model becomes what it should always have been: a replaceable component, not the whole business.</p>
<p>For European institutions specifically — hospitals, legal firms, financial services, public sector bodies bound by GDPR and sector-specific regulation — this isn’t abstract risk management. It’s the difference between an AI capability you control and one you merely rent, at a price and on terms someone else can change at any time.</p>
</section>
<section id="the-takeaway" class="level2">
<h2 class="anchored" data-anchor-id="the-takeaway">The Takeaway</h2>
<p>The question every CTO and CIO needs an honest answer to isn’t whether to use Claude, GPT, or Gemini — it’s what you’ve built <em>around</em> it. If the answer is “a system prompt and some function calling,” you have a sandbox, not a moat, and a single point of foreign dependency sitting underneath your entire operation. Build the architecture — memory, tools, planning, critics, guardrails — and the foundation model underneath becomes exactly what it should be: swappable, commoditized, and no longer the thing your business depends on for survival.</p>
<p><em>This post draws on “The Institutional Moat: Beyond the Big Tech AI Trap” (Prof.&nbsp;dr. ir. J.C. Scholtes, Endeit Capital, March 2026).</em></p>
<p><strong>Key papers</strong></p>
<ul>
<li>Bommasani et al.&nbsp;(2021), <em>On the Opportunities and Risks of Foundation Models</em> — <a href="https://arxiv.org/abs/2108.07258">arXiv:2108.07258</a></li>
<li>Brown et al.&nbsp;(2020), <em>Language Models are Few-Shot Learners</em> (GPT-3) — <a href="https://arxiv.org/abs/2005.14165">arXiv:2005.14165</a></li>
<li>Ouyang et al.&nbsp;(2022), <em>Training Language Models to Follow Instructions with Human Feedback</em> — <a href="https://arxiv.org/abs/2203.02155">arXiv:2203.02155</a></li>
</ul>
<hr>
<p><strong>Further reading on this site</strong></p>
<ul>
<li><a href="../blog/what-is-an-ai-agent.html">What Is an AI Agent?</a> — what the seven agentic components you are building actually are</li>
<li><a href="../blog/from-text-to-agentic-workflows.html">From Text to Action</a> — the concrete pipeline for building the proprietary architecture described here</li>
<li><a href="../blog/why-europe-needs-sovereign-ai.html">Why Europe Needs Its Own AI Models</a> — the geopolitical dimension of why this architecture cannot rest on foreign infrastructure</li>
<li><a href="../blog/governing-the-autonomous-organization.html">Governing the Autonomous Organization</a> — the governance layer that sits on top</li>
<li><a href="../blog/building-sovereign-ai-agents.html">What It Takes to Build a Sovereign AI Agent</a> — the step-by-step guide putting everything in this post into practice</li>
</ul>


</section>

 ]]></description>
  <category>enterprise-strategy</category>
  <guid>https://trajectorium.ai/en/blog/the-institutional-moat.html</guid>
  <pubDate>Sat, 10 Oct 2026 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Why Europe Needs Its Own AI Models on Its Own AI Infrastructure</title>
  <dc:creator>Jan Scholtes</dc:creator>
  <link>https://trajectorium.ai/en/blog/why-europe-needs-sovereign-ai.html</link>
  <description><![CDATA[ 




<p>For years, “just call the API” was a perfectly reasonable AI strategy. Stanford’s <em>2026 AI Index Report</em> suggests that era is ending — not because the APIs got worse, but because governments and organizations increasingly realize that dependence on someone else’s model, running on someone else’s infrastructure, is a strategic liability. The report devotes an entire section to what it calls <strong>AI sovereignty</strong>, and the data behind it makes an unusually concrete case for why Europe, in particular, needs to run its own models on its own infrastructure — down to the edge.</p>
<section id="what-ai-sovereignty-actually-means" class="level2">
<h2 class="anchored" data-anchor-id="what-ai-sovereignty-actually-means">What “AI Sovereignty” Actually Means</h2>
<p>The Index defines AI sovereignty as a state’s — or, by extension, an organization’s — “capacity to act deliberately and make independent decisions over the development, deployment, and governance of AI systems” rather than depending on external actors for critical capability. Crucially, the report breaks this down into five distinct layers, and each one maps directly onto a decision your own organization has to make, not just a government:</p>
<ul>
<li><strong>Infrastructure sovereignty</strong> — who controls the compute your models run on</li>
<li><strong>Data sovereignty</strong> — where your data lives and who can access it</li>
<li><strong>Model sovereignty</strong> — whether you can build, adapt, and control the models themselves</li>
<li><strong>Application sovereignty</strong> — how much control you have over the systems built on top</li>
<li><strong>Talent sovereignty</strong> — whether you have the people to do all of the above</li>
</ul>
<p>Let’s walk through what the data says about each — and where edge computing fits in.</p>
</section>
<section id="infrastructure-sovereignty-europe-is-investing-but-the-gap-is-real" class="level2">
<h2 class="anchored" data-anchor-id="infrastructure-sovereignty-europe-is-investing-but-the-gap-is-real">Infrastructure Sovereignty: Europe Is Investing, But the Gap Is Real</h2>
<p>Domestic compute capacity is “increasingly used as an indicator of compute sovereignty” — a way to reduce reliance on foreign providers and maintain continuity of access during export controls or geopolitical disruptions. The numbers show Europe moving fast, but from behind: state-backed AI supercomputing clusters in Europe and Central Asia grew from <strong>3 to 44 between 2018 and 2025</strong> — the sharpest acceleration of any region, driven largely by coordinated efforts like the European High Performance Computing Joint Undertaking (EuroHPC JU). That’s real momentum. But China still leads with 85 clusters, and North America grew nearly sevenfold to 41 over the same period.</p>
<p>Here’s the direct link to edge computing: infrastructure sovereignty isn’t only about who owns the largest training supercomputer. It’s equally about <em>where inference happens</em> — the day-to-day running of models once they’re built. An organization that trains a model on sovereign European infrastructure but then has to run every single query through a foreign cloud API has only solved half the problem. Edge and on-premise deployment — running models locally, close to where the data is generated and used — is how infrastructure sovereignty actually reaches daily operations rather than remaining a policy talking point.</p>
</section>
<section id="data-sovereignty-europe-already-set-the-global-standard" class="level2">
<h2 class="anchored" data-anchor-id="data-sovereignty-europe-already-set-the-global-standard">Data Sovereignty: Europe Already Set the Global Standard</h2>
<p>This is where Europe’s position is genuinely strong, and the Index confirms it with hard numbers. Data localization measures — legal requirements that data be stored or processed within a country’s borders — have risen sharply worldwide since 2016, “coinciding with the implementation of GDPR in Europe and the subsequent Brussels Effect, whereby other nations adopted similar frameworks.” Europe and Central Asia now have <strong>66 such measures</strong>, part of what the report calls a high-localization cluster alongside East Asia (77) and sub-Saharan Africa (71). North America, by contrast, sits at just 3 measures, reflecting what the report describes as a long-standing “flow-first” policy orientation.</p>
<p>That regulatory framework is only meaningful in practice if the infrastructure exists to back it. GDPR-grade data governance and edge computing are natural partners: keeping sensitive data — medical records, legal documents, agricultural sensor data — physically within a domestic or even on-premise environment is far easier when the model doing the processing runs locally rather than shipping every query to infrastructure outside the jurisdiction.</p>
</section>
<section id="model-sovereignty-the-concentration-problem" class="level2">
<h2 class="anchored" data-anchor-id="model-sovereignty-the-concentration-problem">Model Sovereignty: The Concentration Problem</h2>
<p>Model production remains heavily concentrated. The report’s data on publicly released models shows the United States reaching <strong>1,618 cumulative model releases by 2025</strong>, China <strong>849</strong>, and Europe and Central Asia <strong>666</strong> — with the UK (229) and France (141) as the leading European contributors. Europe is a distant third globally, though its trajectory is steady rather than stagnant.</p>
<p>This matters because model sovereignty is what determines whether an organization can actually <em>adapt</em> a model to its own domain — fine-tuning on proprietary legal, medical, or agricultural data, for instance — rather than being limited to whatever a foreign general-purpose model happens to support. Open-source frameworks have lowered the barrier to entry, which is precisely why smaller, specialized models — the kind that can realistically run at the edge, on modest hardware, close to the data — are becoming a viable European strategy rather than an afterthought.</p>
</section>
<section id="application-sovereignty-where-europe-has-real-room-to-compete" class="level2">
<h2 class="anchored" data-anchor-id="application-sovereignty-where-europe-has-real-room-to-compete">Application Sovereignty: Where Europe Has Real Room to Compete</h2>
<p>Interestingly, the report notes that the application layer — how AI is actually deployed within specific sectors like healthcare, finance, or agriculture — is “less concentrated than the model or compute layer,” giving countries “more space… to develop niche specializations.” Germany’s strength is in industrial and manufacturing applications; Estonia’s is in education technology. This is exactly the layer where a smaller, sovereignty-conscious European organization can compete on domain depth rather than on raw model scale — which again favors an edge-capable, domain-specific deployment model over a one-size-fits-all cloud API.</p>
</section>
<section id="talent-sovereignty-a-quiet-warning-sign" class="level2">
<h2 class="anchored" data-anchor-id="talent-sovereignty-a-quiet-warning-sign">Talent Sovereignty: A Quiet Warning Sign</h2>
<p>The fifth dimension — the ability to develop and retain AI talent — shows a less visible but structurally important trend: cross-border AI talent circulation has slowed globally, with both inflows and outflows declining, meaning talent increasingly stays within national or regional systems. For Europe, this cuts both ways — talent retained is talent not lost to the US, but it also means the region cannot simply assume it can import its way out of a capability gap. Building the domestic expertise to design, deploy, and maintain sovereign AI infrastructure is itself part of the sovereignty equation.</p>
</section>
<section id="why-this-adds-up-to-run-it-yourself-close-to-home" class="level2">
<h2 class="anchored" data-anchor-id="why-this-adds-up-to-run-it-yourself-close-to-home">Why This Adds Up to “Run It Yourself, Close to Home”</h2>
<p>Put these five dimensions together and a clear strategic picture emerges for European organizations, not just European governments:</p>
<ol type="1">
<li><strong>You already operate under some of the strongest data protection requirements in the world</strong> (data sovereignty) — but that framework only bites if your infrastructure choices actually keep processing local.</li>
<li><strong>The compute is being built</strong> (infrastructure sovereignty) — European supercomputing capacity grew faster than any other region between 2018 and 2025 — but training capacity alone doesn’t help if every inference call still leaves the region.</li>
<li><strong>Open-source models have lowered the barrier to model sovereignty</strong> — meaning smaller, specialized, fine-tunable models are realistic even for organizations well below nation-state scale.</li>
<li><strong>The application layer is where Europe can actually win</strong> — domain-specific deployment, not general-purpose scale, is the competitive opening the data points to.</li>
</ol>
<p>Edge computing is the practical mechanism that ties all four together. It’s what lets a compliance-sensitive sector — healthcare, legal, agriculture — actually benefit from Europe’s regulatory strength instead of being undermined by it, because the data and the model doing the reasoning never have to leave the building, let alone the jurisdiction.</p>
</section>
<section id="the-takeaway" class="level2">
<h2 class="anchored" data-anchor-id="the-takeaway">The Takeaway</h2>
<p>Stanford’s AI Index doesn’t use the phrase “edge computing,” but its own sovereignty framework makes the case for it implicitly and repeatedly: sovereignty is only real when it reaches all the way down to where inference actually happens. For Europe specifically — with genuinely strong data protection law, fast-growing but still second-tier compute capacity, a widening base of open, adaptable models, and a real opening at the application layer — running your own models on your own infrastructure, as close to the edge as the use case demands, isn’t a defensive or nostalgic choice. It’s the version of the strategy the data actually supports.</p>
<p><em>Source: Stanford HAI, <a href="https://hai.stanford.edu/ai-index">2026 AI Index Report</a>, Chapter 8.3, “AI Sovereignty.”</em></p>
<p><strong>Key papers</strong></p>
<ul>
<li>Stanford HAI (2026), <em>AI Index Report</em> — <a href="https://hai.stanford.edu/ai-index">hai.stanford.edu/ai-index</a></li>
<li>Bommasani et al.&nbsp;(2021), <em>On the Opportunities and Risks of Foundation Models</em> — <a href="https://arxiv.org/abs/2108.07258">arXiv:2108.07258</a></li>
<li>European Commission (2024), <em>EU Artificial Intelligence Act</em> — <a href="https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32024R1689">eur-lex.europa.eu</a></li>
</ul>
<hr>
<p><strong>Further reading on this site</strong></p>
<ul>
<li><a href="../blog/the-institutional-moat.html">The Institutional Moat</a> — how to build architecture that survives a model swap or export-control decision</li>
<li><a href="../blog/governing-the-autonomous-organization.html">Governing the Autonomous Organization</a> — sovereignty and governance as one question, not two</li>
<li><a href="../blog/small-specialized-model-vs-frontier.html">David vs.&nbsp;Goliath: Small Model vs.&nbsp;Frontier</a> — the evidence that small, local models can nearly match frontier performance on specific tasks</li>
<li><a href="../blog/building-sovereign-ai-agents.html">What It Takes to Build a Sovereign AI Agent</a> — the practical eight-step guide to building a system your organization actually owns</li>
</ul>


</section>

 ]]></description>
  <category>sovereignty-edge</category>
  <guid>https://trajectorium.ai/en/blog/why-europe-needs-sovereign-ai.html</guid>
  <pubDate>Sat, 03 Oct 2026 00:00:00 GMT</pubDate>
</item>
<item>
  <title>From Text to Action: Turning NLP Pipelines into Agentic Workflows</title>
  <dc:creator>Jan Scholtes</dc:creator>
  <link>https://trajectorium.ai/en/blog/from-text-to-agentic-workflows.html</link>
  <description><![CDATA[ 




<p>Most organizations already sit on a mountain of unstructured text: manuals, case files, log books, contracts, years of internal correspondence. The question this post answers is a very practical one: how do you turn that raw text into the actual training data that powers an agent’s memory, tools, reasoning, and safety checks? And why does that conversion pipeline matter more than which foundation model you plug in behind it?</p>
<section id="why-the-model-isnt-your-moat" class="level2">
<h2 class="anchored" data-anchor-id="why-the-model-isnt-your-moat">Why the Model Isn’t Your Moat</h2>
<p>It’s tempting to think that wiring a system prompt onto a strong LLM <em>is</em> building an agent. It isn’t. Relying purely on system prompts and Markdown “skill files” gives you only shallow control — you’re treating the model as a black box and, more importantly, building a dependency on someone else’s roadmap rather than a company. Many teams that claim to have “built an agent” have really just layered instructional text over a general-purpose model. That’s the <strong>God-Prompt trap</strong>, and it’s brittle: rigid if-then rules can’t account for the infinite long tail of exceptions that real-world text mining and operations actually contain.</p>
<p>The real competitive advantage — the “moat” — isn’t the underlying LLM at all. Big Tech models are generalists: they own multi-step reasoning chains, native tool integration, and recursive self-improvement, but what you get through their APIs is largely a sandbox — system prompts, function calling, and standard vector search. If your business’s value is purely tied to whichever model you’re calling, you’re standing in the path of a tidal wave: the next model update might simply absorb what you built. The moat is in the <strong>architecture around the model</strong> — and that architecture has to be trained on <em>your</em> text.</p>
</section>
<section id="step-one-from-raw-text-to-structured-json" class="level2">
<h2 class="anchored" data-anchor-id="step-one-from-raw-text-to-structured-json">Step One: From Raw Text to Structured JSON</h2>
<p>Raw text — especially from PDFs — is built for human eyes, not machine reasoning. An LLM reading a flat text dump can’t reliably tell a chapter heading from a technical definition, a warning label from a procedural step. That ambiguity is exactly what breaks downstream agentic components, so the first real engineering step is converting unstructured text into a hierarchical, machine-readable <strong>JSON schema</strong> — a “foundational ontology” that explicitly maps chapters to sub-topics to definitions to procedures.</p>
<p>This step matters more than it looks like it should, because errors cascade. If the JSON conversion flattens the hierarchy or merges unrelated paragraphs:</p>
<ul>
<li><strong>RAG chunks lose their parent context</strong> — a retrieved procedure like “terminate the malicious process” might silently lose the fact that it only applies to one specific scenario, and the reranker downstream won’t be able to surface the right answer.</li>
<li><strong>Sequential workflows get taught out of order</strong> — if Phase 1/2/3 structure isn’t preserved, an agent’s fine-tuned planning layer can learn to execute step 3 before step 1.</li>
<li><strong>Knowledge graphs lose their edges</strong> — entity relationships that aren’t captured hierarchically can’t later support multi-hop reasoning.</li>
<li><strong>RLHF preference pairs lose their justification</strong> — without the surrounding context, a Critic agent can’t judge whether an action actually violated a rule.</li>
</ul>
<p>Get the structure right once, early, and every downstream training pipeline benefits. Get it wrong, and every downstream component inherits the flaw.</p>
</section>
<section id="step-two-memory-rag-and-neural-reranking-as-your-corporate-memory" class="level2">
<h2 class="anchored" data-anchor-id="step-two-memory-rag-and-neural-reranking-as-your-corporate-memory">Step Two: Memory — RAG and Neural Reranking as Your Corporate Memory</h2>
<p>Once your text is structured, it becomes the backbone of the agent’s memory. The mechanics are familiar but worth being precise about:</p>
<ol type="1">
<li><strong>Chunking</strong> — break long documents into semantically coherent sections (roughly 500 words is a common target), not arbitrary fixed-length slices.</li>
<li><strong>Indexing</strong> — convert chunks into vectors and store them in a vector database (Pinecone, pgvector, Azure AI Search).</li>
<li><strong>Retrieval</strong> — given a query, pull the most relevant chunks.</li>
<li><strong>Augmentation</strong> — instruct the model to answer <em>using only</em> those retrieved sources.</li>
<li><strong>Generation</strong> — produce a cited, factual answer.</li>
</ol>
<p>A plain vector search finds things that are <em>similar</em>; it doesn’t reliably find the thing that’s <em>correct</em>. That’s the job of a <strong>neural reranker</strong> — a fine-tuned cross-encoder trained on your own query/best-answer pairs, which re-examines the top 50–100 candidates and pushes the actual “smoking gun” answer into position one, dramatically cutting hallucinations and solving the “lost in the middle” problem where a model buried in twenty similar-looking chunks misses the one that matters. Building this well requires real infrastructure choices: a strong embedding model (don’t skimp here — a bad translator produces bad search), an orchestration framework such as LlamaIndex or LangChain to wire files to database to model, and a reliable document parser for the messy PDFs you’re starting from.</p>
</section>
<section id="step-three-tools-turning-text-into-operational-limbs" class="level2">
<h2 class="anchored" data-anchor-id="step-three-tools-turning-text-into-operational-limbs">Step Three: Tools — Turning Text into Operational Limbs</h2>
<p>Skills and tools are the “limbs” of an agentic architecture — structured definitions (API schemas, JSON functions, SQL interfaces) that let a model act instead of only talk. Proprietary internal APIs are where this becomes a genuine business moat: a general-purpose model from a big provider is legally and technically blocked from touching your internal systems, however smart it is. An agent wired into your own electronic patient database, CRM, or monitoring tools can pull real historical values, cross-reference them, and act on live context instead of guessing from pre-trained weights.</p>
<p>This is also where multi-hop orchestration becomes necessary rather than optional. Complex professional tasks rarely resolve in one lookup — an agent chaining an HR database (who’s on call), a monitoring tool (current load), and an execution tool (restart the service) is running an <strong>OODA loop</strong>: observe, orient, decide, act, and repeat until the objective is met, adjusting its plan as each tool call returns new information.</p>
</section>
<section id="step-four-reasoning-and-a-digital-peer-reviewer" class="level2">
<h2 class="anchored" data-anchor-id="step-four-reasoning-and-a-digital-peer-reviewer">Step Four: Reasoning and a Digital Peer Reviewer</h2>
<p>Planning frameworks like Chain-of-Thought, Tree-of-Thought, and Skeleton-of-Thought give a large model room to decompose a task into sub-goals with dependencies rather than answering in one pass. But a large, general model generating a first draft still benefits from a second, much smaller and more specialized model reviewing it — a <strong>Critic</strong> — fine-tuned specifically on your organization’s own corrections.</p>
<p>The training data for that critic is concrete and collectible: the rejected or edited raw outputs, the expert-corrected version, the rationale for the correction (“violates Section 4.2”), and any hard negative constraints or compliance red lines. As a rough scale guide: 50–100 examples gets you a prototype, 500–1,000 a production-grade critic, and 2,000+ starts to approach genuine domain expertise. This is precisely the kind of proprietary, real-world correction data that a general-purpose LLM provider will never have access to — which is exactly why it’s a durable advantage rather than a temporary one.</p>
</section>
<section id="step-five-guardrails-where-institutional-trust-actually-comes-from" class="level2">
<h2 class="anchored" data-anchor-id="step-five-guardrails-where-institutional-trust-actually-comes-from">Step Five: Guardrails — Where Institutional Trust Actually Comes From</h2>
<p>Hallucination and compliance risk is the single biggest barrier to real institutional AI adoption, so the architecture needs independent verification layers surrounding the core model, not baked into it:</p>
<ul>
<li><strong>Fact-checking</strong> — compare every draft against the RAG source of truth; every claim needs to be citable.</li>
<li><strong>Safety filters</strong> — enforce legal, ethical, and compliance constraints, blocking outputs that cross defined red lines.</li>
<li><strong>Self-consistency checks</strong> — run the same query through multiple reasoning paths and discard answers that don’t agree with each other.</li>
</ul>
<p>None of these should be delegated entirely to another instance of the same probabilistic model policing itself. Deterministic, hard-coded checks — input guarding before a prompt even reaches the main agent, strict schema enforcement on outputs — provide the backstop that a purely LLM-based critic cannot guarantee.</p>
</section>
<section id="the-flywheel" class="level2">
<h2 class="anchored" data-anchor-id="the-flywheel">The Flywheel</h2>
<p>Put these pieces together and something compounding happens. Every real interaction generates a <strong>reasoning triple</strong>: the observation the system saw, the action or tool call it chose, and the consequence — success or failure. That data doesn’t just sit there; it refines your rerankers, your critics, and your planners, which produces better outcomes, which drives more usage, which produces more data. This is the flywheel that converts a one-time text-mining project into a compounding, defensible asset — and it’s precisely the dataset that later lets you fine-tune around each new generation of foundation model, rather than being replaced by it.</p>
</section>
<section id="the-takeaway" class="level2">
<h2 class="anchored" data-anchor-id="the-takeaway">The Takeaway</h2>
<p>Converting text into agentic training data isn’t a single technical trick — it’s a pipeline: structure the text into a faithful JSON hierarchy, use that hierarchy to build a real memory layer (RAG plus reranking), extract the API definitions that give the agent hands, collect the correction data that trains a critic, and wrap all of it in deterministic guardrails. Do this well with your own proprietary text, and you’re not renting intelligence from a foundation-model provider — you’re building an architecture, and a dataset, that gets more valuable every time it’s used.</p>
<p><em>For a concrete domain example of this exact pipeline applied to agricultural logbooks and institutional knowledge, see <a href="../blog/from-logbooks-to-agent-training-data.html">From the Next Farmhand to the Next AI Agent</a>.</em></p>
<p><strong>Key papers</strong></p>
<ul>
<li>Lewis et al.&nbsp;(2020), <em>Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks</em> — <a href="https://arxiv.org/abs/2005.11401">arXiv:2005.11401</a></li>
<li>Ouyang et al.&nbsp;(2022), <em>Training Language Models to Follow Instructions with Human Feedback</em> (InstructGPT) — <a href="https://arxiv.org/abs/2203.02155">arXiv:2203.02155</a></li>
<li>Rafailov et al.&nbsp;(2023), <em>Direct Preference Optimization</em> — <a href="https://arxiv.org/abs/2305.18290">arXiv:2305.18290</a></li>
</ul>
<hr>
<p><strong>Further reading on this site</strong></p>
<ul>
<li><a href="../blog/what-is-an-ai-agent.html">What Is an AI Agent?</a> — what the seven components being trained here actually are</li>
<li><a href="../blog/from-logbooks-to-agent-training-data.html">From Logbooks to Agent Training Data</a> — the same pipeline applied to a real agricultural knowledge base</li>
<li><a href="../blog/small-specialized-model-vs-frontier.html">David vs.&nbsp;Goliath: Small Model vs.&nbsp;Frontier</a> — what a well-trained specialized model built this way can achieve</li>
<li><a href="../blog/the-institutional-moat.html">The Institutional Moat</a> — why building this proprietary architecture matters strategically</li>
</ul>


</section>

 ]]></description>
  <category>text-to-action</category>
  <guid>https://trajectorium.ai/en/blog/from-text-to-agentic-workflows.html</guid>
  <pubDate>Sat, 26 Sep 2026 00:00:00 GMT</pubDate>
</item>
<item>
  <title>What Is an AI Agent? From Chatbot to Autonomous System</title>
  <dc:creator>Jan Scholtes</dc:creator>
  <link>https://trajectorium.ai/en/blog/what-is-an-ai-agent.html</link>
  <description><![CDATA[ 




<p>Ask ten people what an “AI agent” is and you’ll get ten different answers — some confidently wrong. Part of the confusion is that the word isn’t new. Part of it is that “agent” has quietly become a marketing label slapped on anything with a chat interface. This post cuts through that: what an agent actually is, why the idea failed in the 1990s, why it’s working now, and what’s actually inside one.</p>
<section id="agents-are-older-than-you-think" class="level2">
<h2 class="anchored" data-anchor-id="agents-are-older-than-you-think">Agents Are Older Than You Think</h2>
<p>Long before ChatGPT, <em>Artificial Intelligence: A Modern Approach</em> (Russell &amp; Norvig, 1995) defined an agent as anything that:</p>
<ol type="1">
<li>senses its environment,</li>
<li>perceives inputs from that environment,</li>
<li>reasons about those inputs, and</li>
<li>acts upon the environment through its actions.</li>
</ol>
<p>That definition doesn’t mention language models at all — it includes thermostats, robots, web crawlers, and self-driving cars. What separates a mere “computer program” from an agent is that an agent operates <em>autonomously</em>, persists over time, adapts to change, and pursues goals rather than simply executing one instruction and stopping.</p>
<p>In the late 1990s, “agent” was everywhere — intelligent agents, software agents, personal digital assistants. They were built on symbolic AI, expert systems, and rule-based reasoning. And they mostly failed to live up to the hype. APIs were primitive, the web was barely accessible programmatically, memory was static, and language understanding amounted to keyword spotting. The concepts — memory, goals, planning, an interface to the world — were sound. The technology to make them work simply wasn’t there yet.</p>
</section>
<section id="what-changed-the-llm-is-the-missing-engine" class="level2">
<h2 class="anchored" data-anchor-id="what-changed-the-llm-is-the-missing-engine">What Changed: The LLM Is the Missing Engine</h2>
<p>A useful mental model: <strong>think of a stand-alone LLM as a brain in a jar.</strong> It can reason in language, but it has no body, no senses beyond the text you feed it, and no memory once the conversation ends. An agent gives that brain:</p>
<ul>
<li>a <strong>body</strong> — tools it can call to act on the world,</li>
<li><strong>senses</strong> — retrieval systems and APIs that bring in fresh information,</li>
<li><strong>memory</strong> — context windows and external databases, and</li>
<li><strong>goals</strong> — a planner that decides what to do next.</li>
</ul>
<p>That’s the moment a language model stops being a very articulate autocomplete and starts being something that can act.</p>
<p>This matters because stand-alone LLMs have real, well-documented limitations: they hallucinate confidently, their knowledge has a cutoff date, their context window is finite, they cannot browse the web or call an API on their own, they reason poorly in a single pass on multi-step problems, and they have no built-in way to notice or correct their own mistakes. Agentic architecture doesn’t eliminate these limitations — but it gives you the scaffolding to manage them.</p>
</section>
<section id="the-seven-things-an-agent-architecture-needs" class="level2">
<h2 class="anchored" data-anchor-id="the-seven-things-an-agent-architecture-needs">The Seven Things an Agent Architecture Needs</h2>
<p>Whether you’re looking at a 1990s symbolic system or a 2026 LLM-based one, a working agent architecture requires the same seven ingredients:</p>
<ul>
<li><strong>Memory</strong> (short-term and long-term)</li>
<li><strong>Knowledge access</strong></li>
<li><strong>Tool use / action execution</strong></li>
<li><strong>Planning &amp; control loop</strong></li>
<li><strong>Goal management</strong></li>
<li><strong>Verification &amp; guardrails</strong></li>
<li><strong>A user/system interface</strong></li>
</ul>
<p>What’s changed isn’t the list — it’s the horsepower behind each item. Let’s walk through the ones that matter most in practice.</p>
<section id="memory-more-than-a-chat-history" class="level3">
<h3 class="anchored" data-anchor-id="memory-more-than-a-chat-history">Memory: More Than a Chat History</h3>
<p>A stand-alone LLM is stateless — once the prompt ends, it forgets everything. A working agent needs several <em>kinds</em> of memory: short-term (the conversation history in the context window), long-term (external vector databases and knowledge bases), episodic (logs of past interactions), and semantic (knowledge retrieved via RAG). Retrieval-Augmented Generation, in particular, acts as the agent’s factual anchor — it’s the verified database the reasoning engine is forced to consult rather than guess.</p>
<p>That distinction matters more than it sounds: an LLM’s neural network is excellent at <em>generalizing</em> patterns to handle situations it’s never explicitly seen. But you do not want it generalizing — that is, guessing — about a specific fact. A hallucinated IP address, legal clause, or medical dosage isn’t a quirky error; in a professional setting it’s a serious failure. RAG, and the neural reranking that sits alongside it, exist precisely to keep generalization and factual precision in balance: reranking acts like a senior partner reviewing 50–100 retrieved candidates and forcing the one true answer to the top, rather than letting the model drown in “lost in the middle” noise.</p>
</section>
<section id="action-interface-doing-not-just-talking" class="level3">
<h3 class="anchored" data-anchor-id="action-interface-doing-not-just-talking">Action Interface: Doing, Not Just Talking</h3>
<p>The defining difference between an LLM and an agent is that an agent <em>does things</em>. Without tool access, an LLM can only reply to “cancel my order #99887” with “I can’t do that, please contact support.” With a tool interface — API calls, function calling, database queries, code execution — the same model can actually cancel the order.</p>
<p>This typically follows the <strong>ReAct</strong> pattern: the model reasons about what it needs to do, then issues a tool call, then waits for the real-world result before taking its next step. That waiting is unavoidable — an LLM cannot execute an API call and use the result within a single unbroken stream of text. Complex tasks are therefore inherently <strong>multi-hop</strong>: plan, act, observe, reflect, act again, closer each time to a resolution.</p>
</section>
<section id="goal-management-harder-than-it-looks" class="level3">
<h3 class="anchored" data-anchor-id="goal-management-harder-than-it-looks">Goal Management: Harder Than It Looks</h3>
<p>LLM-based agents let users express goals in plain language (“plan my trip for under €500”) and decompose that into subgoals — budget, flights, hotels, activities. Some frameworks dynamically re-evaluate priorities at every loop iteration, combining hard rule-based constraints with scoring functions and, when goals are ambiguous, a human in the loop.</p>
<p>Even with all that, goal management remains genuinely hard. Models aren’t inherently good at resolving trade-offs without explicit scoring systems. Agents can drift off a goal mid-process if it isn’t reinforced. And a vague goal (“make me successful”) tends to make an agent spin in circles rather than act.</p>
</section>
<section id="critics-reflection-and-guardrails-building-in-self-doubt" class="level3">
<h3 class="anchored" data-anchor-id="critics-reflection-and-guardrails-building-in-self-doubt">Critics, Reflection, and Guardrails: Building in Self-Doubt</h3>
<p>Here’s an underappreciated problem: LLMs are sycophantic. Because they’re fine-tuned via RLHF to be agreeable and helpful, they tend to tell you what you want to hear — including about their own plans. Left unchecked, this makes an agent overconfident in its own bad ideas.</p>
<p>The fix is architectural, not motivational: give a <strong>Critic agent</strong> a separate, adversarial mandate — find the holes, play devil’s advocate, refuse to be agreeable. Pair it with a <strong>Reflection agent</strong> that periodically stops and asks, “does this step still solve the original problem, or did we lose the plot?” Together, these turn a linear, error-prone pipeline into a self-correcting loop: an Actor proposes, a Critic tears it apart, a Reflector synthesizes concrete adjustments, and the Actor tries again — until the Critic is satisfied.</p>
<p>On top of that sits a layer of <strong>guardrails</strong> that should never be left entirely to another LLM, because probabilistic systems eventually fail in probabilistic ways. Deterministic, hard-coded checks — semantic routing to catch jailbreaks and injections before they reach the main agent, strict output parsers that reject malformed responses — provide a non-negotiable backstop. Some teams add a “constitution”: a set of immutable principles a separate model checks the final output against, decoupled entirely from the task-execution logic.</p>
</section>
</section>
<section id="why-this-matters-now" class="level2">
<h2 class="anchored" data-anchor-id="why-this-matters-now">Why This Matters Now</h2>
<p>None of this is achievable with simple retrieval alone. Consider four examples of what agentic architectures make possible that plain RAG cannot:</p>
<ul>
<li><strong>Autonomous research and synthesis</strong> — planning multi-hop queries across medical, legal, and financial domains, identifying conflicting studies, and producing a structured report without a human directing each step.</li>
<li><strong>End-to-end troubleshooting</strong> — diagnosing an issue through conversation, calling diagnostic APIs to check system logs, and autonomously executing a fix.</li>
<li><strong>Strategic decision support</strong> — decomposing a broad question like “analyze our market expansion risk” into sub-queries, pulling live competitive data, running calculations, and adapting strategy as findings come in.</li>
<li><strong>Forensics and compliance monitoring</strong> — continuously watching logs or communications for patterns of concerning behavior and triggering escalation when thresholds are crossed.</li>
</ul>
<p>None of these are single-shot text generation tasks. They require memory across steps, tools that reach into the real world, a plan that can be revised, and a mechanism to catch the system’s own mistakes before they become someone else’s problem.</p>
</section>
<section id="the-takeaway" class="level2">
<h2 class="anchored" data-anchor-id="the-takeaway">The Takeaway</h2>
<p>An AI agent isn’t a chatbot with a longer memory, and it isn’t a rebrand of a 1990s rule-based system either. It’s what happens when a language model — genuinely capable of open-ended reasoning for the first time — gets wrapped in the same seven components AI researchers identified thirty years ago: memory, knowledge access, tool use, planning, goal management, verification, and an interface to act through. The concepts haven’t changed. What changed is that we finally have an engine powerful enough to make them work.</p>
<p><em>This post is a high-level overview. Later posts in this series go deeper into specific components — <a href="../blog/from-text-to-agentic-workflows.html">RAG architectures and neural reranking</a>, <a href="../blog/governing-the-autonomous-organization.html">multi-agent orchestration and governance</a>, and <a href="../blog/from-logbooks-to-agent-training-data.html">the training data needed to specialize these components for a given domain</a>.</em></p>
<p><strong>Key papers</strong></p>
<ul>
<li>Russell &amp; Norvig (2020), <em>Artificial Intelligence: A Modern Approach</em> (4th ed.) — <a href="http://norvig.com/aima.html">norvig.com/aima.html</a></li>
<li>Yao et al.&nbsp;(2022), <em>ReAct: Synergizing Reasoning and Acting in Language Models</em> — <a href="https://arxiv.org/abs/2210.03629">arXiv:2210.03629</a></li>
<li>Wang et al.&nbsp;(2023), <em>A Survey on Large Language Model Based Autonomous Agents</em> — <a href="https://arxiv.org/abs/2308.11432">arXiv:2308.11432</a></li>
</ul>
<hr>
<p><strong>Further reading on this site</strong></p>
<ul>
<li><a href="../blog/from-text-to-agentic-workflows.html">From Text to Action: Turning NLP Pipelines into Agentic Workflows</a> — how to build the training data behind each of these components</li>
<li><a href="../blog/governing-the-autonomous-organization.html">Governing the Autonomous Organization</a> — who is accountable when the agent acts</li>
<li><a href="../blog/why-nlp-finally-works.html">Why NLP Finally Works</a> — the transformer architecture that made agents possible</li>
<li><a href="../blog/the-institutional-moat.html">The Institutional Moat</a> — why the architecture around the model matters more than the model itself</li>
</ul>


</section>

 ]]></description>
  <category>fundamentals</category>
  <guid>https://trajectorium.ai/en/blog/what-is-an-ai-agent.html</guid>
  <pubDate>Sat, 12 Sep 2026 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Adversarial Attacks: How a Few Invisible Pixels or One Swapped Word Can Fool an AI</title>
  <dc:creator>Jan Scholtes</dc:creator>
  <link>https://trajectorium.ai/en/blog/adversarial-attacks-images-and-text.html</link>
  <description><![CDATA[ 




<p>A picture of a panda, correctly classified by a neural network with 57% confidence, gets a tiny amount of carefully calculated noise added to it — invisible to a human eye, the image still looks exactly like a panda — and the same network now classifies it as a gibbon with over 99% confidence. This isn’t a hypothetical; it’s one of the founding demonstrations of what’s called an <strong>adversarial attack</strong>, and the underlying vulnerability turns out to affect text models just as much as image models, if you know where to push. This post covers what these attacks actually look like in both domains, and what genuinely works as a defense — following on from the <a href="../blog/pruning-quantization-distillation.html">previous post on model compression</a>, which turns out to be part of the answer, but far from all of it.</p>
<section id="why-this-is-possible-at-all" class="level2">
<h2 class="anchored" data-anchor-id="why-this-is-possible-at-all">Why This Is Possible at All</h2>
<p>Every trained model draws a decision boundary through an extremely high-dimensional space, separating “panda” from “gibbon,” or “positive review” from “negative review.” That boundary is learned from data, and it’s shaped by whatever correlations happen to exist in the training set — not necessarily by the same features a human would use to make the same distinction. An adversarial attack works by finding the shortest possible path across that boundary: a tiny, deliberately calculated perturbation to the input that pushes it just barely to the other side, without changing anything a human would notice. The vulnerability isn’t a bug in one particular model — it’s a structural consequence of how these decision boundaries get learned in the first place, which is why the problem shows up across model types and domains.</p>
</section>
<section id="adversarial-attacks-on-images" class="level2">
<h2 class="anchored" data-anchor-id="adversarial-attacks-on-images">Adversarial Attacks on Images</h2>
<p><strong>Gradient-based perturbation attacks.</strong> The classic approach — the Fast Gradient Sign Method and its more iterative successor, Projected Gradient Descent — computes the gradient of the model’s loss with respect to the <em>input pixels</em> rather than the model’s weights, and then nudges every pixel by a tiny amount in whichever direction increases the loss (i.e., makes the model more wrong) the fastest. Because the perturbation is spread across the entire image and kept within a small bound, it’s imperceptible to a human viewer while being precisely calibrated to cross the model’s decision boundary.</p>
<p><strong>Patch attacks.</strong> Rather than perturbing an entire image subtly, a patch attack places one small, highly visible, often strange-looking sticker or region somewhere in the frame — on a stop sign, on a piece of clothing, in the corner of a photo — that reliably causes a targeted misclassification regardless of everything else in the image. Unlike gradient-based perturbations, these are often robust to being photographed at different angles and distances, which is exactly what makes them a practical physical-world concern (a modified stop sign that a self-driving system misreads as a speed limit sign, for instance) rather than just a digital curiosity.</p>
<p><strong>Black-box and transfer attacks.</strong> Both attack families above assume the attacker has access to the model’s internals to compute gradients. In practice, many real attacks don’t need that: adversarial examples crafted against one model frequently <strong>transfer</strong> and fool a different model trained on similar data, even without access to that second model’s weights at all. This is what makes the threat practical rather than purely academic — an attacker doesn’t need to steal your exact model to attack it.</p>
</section>
<section id="adversarial-attacks-on-text" class="level2">
<h2 class="anchored" data-anchor-id="adversarial-attacks-on-text">Adversarial Attacks on Text</h2>
<p>Text is discrete — you can’t nudge a word by 0.1% the way you can nudge a pixel’s brightness — so text-based adversarial attacks look structurally different, but the underlying goal is identical: change the input as little and as unnoticeably as possible while flipping the model’s output.</p>
<p><strong>Character-level perturbations.</strong> Swapping visually similar characters, inserting or deleting a character, or introducing common typos can flip a classifier’s output while remaining perfectly readable to a human — “excellent” becomes “excel1ent” or “exceellent,” and a sentiment classifier’s confidence collapses even though no reasonable reader would misread the word.</p>
<p><strong>Word-level substitution attacks.</strong> A more sophisticated family of attacks replaces individual words with close synonyms — chosen specifically to preserve the sentence’s actual meaning to a human reader while shifting it just enough in the model’s embedding space to cross a decision boundary. Because the substitution is semantically faithful, these are harder to catch with a simple typo filter and harder to dismiss as “obviously broken input.”</p>
<p><strong>Universal adversarial triggers.</strong> Rather than crafting a bespoke perturbation for each individual input, some attacks discover a short sequence of words or tokens that, when prepended or appended to <em>almost any</em> input, reliably pushes the model toward a specific wrong output — a kind of reusable “skeleton key” for a given model, rather than a one-off attack tailored to a single sentence.</p>
<p><strong>Prompt injection (the LLM-specific version).</strong> In agentic systems specifically, an increasingly relevant variant is prompt injection: text embedded in a document, webpage, or tool output that a language model reads as part of its context — not something the actual user typed — but that’s crafted to look like an instruction the model should follow. This is structurally the same underlying vulnerability as classic adversarial text attacks (a carefully chosen input pushes the model somewhere it shouldn’t go), applied to the specific weakness of a system that can’t always distinguish “data I’m reading” from “instructions I should obey.”</p>
</section>
<section id="what-actually-works-as-a-defense" class="level2">
<h2 class="anchored" data-anchor-id="what-actually-works-as-a-defense">What Actually Works as a Defense</h2>
<p>No single technique fully solves this, which is why real deployments layer several together:</p>
<p><strong>Adversarial training.</strong> The most direct defense: deliberately generate adversarial examples during training and include them in the training set, so the model learns a decision boundary that isn’t so easily crossed by small perturbations. This can be extended with broader data augmentation — random noise, hand-crafted negations, synonym substitution, and general training-set diversity — so the model doesn’t overfit to a narrow, brittle notion of what “normal” input looks like.</p>
<p><strong>Defensive distillation and feature squeezing.</strong> Training a smaller student model on a teacher’s <em>softened</em> output distribution tends to produce a smoother, less sharply-creased decision boundary that’s harder to exploit with a tiny, precisely-calculated nudge. Feature squeezing works in a related but more direct way: it reduces the input’s degrees of freedom before the model ever sees it — for images, this might mean reducing color depth or applying mild smoothing; for text, normalizing spelling variants and character substitutions before classification — specifically to collapse the fine-grained space an attacker needs to operate in.</p>
<p><strong>Input transformations and randomization.</strong> Techniques like slight image compression, cropping, or resizing before classification can disrupt the very precise pixel-level calculations an adversarial perturbation depends on, without meaningfully affecting a genuine image. On the text side, spelling normalization and canonicalization serve a similar purpose against character-level attacks.</p>
<p><strong>Ensembles.</strong> Running the same input through multiple independently trained models and requiring agreement (or flagging disagreement) raises the bar significantly for an attacker, since a perturbation crafted to fool one specific model’s particular decision boundary often doesn’t transfer cleanly to a differently-trained model with a different boundary.</p>
<p><strong>Detection rather than pure prevention.</strong> Rather than trying to make a model unconditionally robust to every possible perturbation, a separate detection layer can flag inputs that look statistically unusual — oddly high-frequency noise patterns in an image, unusual character sequences in text — and route them for additional scrutiny before they ever reach a decision.</p>
<p><strong>For agentic systems specifically: input guarding and deterministic guardrails.</strong> Because prompt injection exploits the boundary between “data” and “instructions,” the most effective defense isn’t asking the language model to police itself — it’s routing untrusted input (documents, web content, tool outputs) through a separate, deterministic check <em>before</em> it reaches the main reasoning model, and treating anything that looks like an embedded instruction as suspicious by default rather than as a legitimate command.</p>
</section>
<section id="the-common-thread" class="level2">
<h2 class="anchored" data-anchor-id="the-common-thread">The Common Thread</h2>
<p>Every one of these defenses is really doing the same underlying thing: making the model’s decision boundary smoother, less sensitive to tiny or narrowly-targeted changes, and less trusting of any single unverified signal. None of them make a model perfectly unbreakable — this remains a genuinely active arms race between attack and defense research, on both images and text — but layering several of these together (adversarial training plus distillation plus input normalization plus detection) meaningfully raises the cost and difficulty of a successful attack, which in most real deployments is exactly the practical goal.</p>
<p><strong>Key papers</strong></p>
<ul>
<li>Goodfellow et al.&nbsp;(2014), <em>Explaining and Harnessing Adversarial Examples</em> (FGSM) — <a href="https://arxiv.org/abs/1412.6572">arXiv:1412.6572</a></li>
<li>Madry et al.&nbsp;(2017), <em>Towards Deep Learning Models Resistant to Adversarial Attacks</em> (PGD) — <a href="https://arxiv.org/abs/1706.06083">arXiv:1706.06083</a></li>
<li>Wallace et al.&nbsp;(2019), <em>Universal Adversarial Triggers for Attacking and Analyzing NLP</em> — <a href="https://arxiv.org/abs/1908.07125">arXiv:1908.07125</a></li>
</ul>
<hr>
<p><strong>Further reading on this site</strong></p>
<ul>
<li><a href="../blog/pruning-quantization-distillation.html">Shrinking the Giant: Pruning, Quantization, and Distillation</a> — how model compression closes off a whole class of adversarial attacks as a side effect</li>
<li><a href="../blog/xai-for-fine-tuned-models.html">Why You Can’t Fine-Tune or Distill Without XAI</a> — how LIME-based before/after testing detects adversarial brittleness introduced by fine-tuning</li>
<li><a href="../blog/governing-the-autonomous-organization.html">Governing the Autonomous Organization</a> — the governance layer that handles security threats in institutional AI deployments</li>
<li><a href="../blog/the-institutional-moat.html">The Institutional Moat</a> — why deterministic guardrails around a model matter more than trusting a model to police itself</li>
<li><a href="../blog/what-is-an-ai-agent.html">What Is an AI Agent?</a> — the agentic architecture where prompt injection specifically becomes a threat</li>
</ul>


</section>

 ]]></description>
  <category>fundamentals</category>
  <category>efficiency</category>
  <guid>https://trajectorium.ai/en/blog/adversarial-attacks-images-and-text.html</guid>
  <pubDate>Sat, 29 Aug 2026 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Why You Can’t Fine-Tune, Train, or Distill a Model Without XAI</title>
  <dc:creator>Jan Scholtes</dc:creator>
  <link>https://trajectorium.ai/en/blog/xai-for-fine-tuned-models.html</link>
  <description><![CDATA[ 




<p>When you call a foundation model’s API, you’re borrowing someone else’s reasoning and someone else’s accountability. The moment you fine-tune it on your own data, distill it into a smaller student model, or train a specialized component from scratch — as covered across the earlier posts on this site about <a href="../blog/building-sovereign-ai-agents.html">building sovereign agents</a> and <a href="../blog/pruning-quantization-distillation.html">compressing models for local deployment</a> — that borrowed accountability disappears. The model’s behavior is now <em>your</em> behavior. And a model that performs well on your validation set can still be reasoning in ways you’d never approve of if you could actually see them. This post covers what XAI (eXplainable AI) actually is, the concrete toolbox for looking inside a model, and why this stops being optional the moment you’re the one training it.</p>
<section id="three-words-that-arent-synonyms" class="level2">
<h2 class="anchored" data-anchor-id="three-words-that-arent-synonyms">Three Words That Aren’t Synonyms</h2>
<p>Practitioners often use “transparency,” “interpretability,” and “explainability” interchangeably, but they mean genuinely different things:</p>
<ul>
<li><strong>Transparency</strong> exists when the process that extracts model parameters from training data, and generates labels from test data, can be described and justified by the person who designed the approach.</li>
<li><strong>Interpretability</strong> is the ability to comprehend the model and present the basis for its decision-making in a way a human can actually understand.</li>
<li><strong>Explainability</strong> — a term without full field-wide consensus yet — is best understood as the set of features from an interpretable domain that contributed to a specific decision for a specific example.</li>
</ul>
<p>The distinction matters practically: you can have a transparent process (you know exactly what algorithm you used and why) without having an interpretable model (you still can’t explain any individual decision it makes).</p>
</section>
<section id="what-actually-counts-as-a-valid-explanation" class="level2">
<h2 class="anchored" data-anchor-id="what-actually-counts-as-a-valid-explanation">What Actually Counts as a Valid Explanation?</h2>
<p>This is worth taking seriously as a genuinely human, social question, not just a technical one. A valid explanation is part of a social interaction — it has to be sound, cogent, convincing, and it has to build trust in the receiving party, delivered as a step-by-step transfer of knowledge they can actually follow. Beyond that, a good explanation needs to show the difference between possible outcomes (why <em>this</em> answer rather than that one), needs to be relevant to what the person actually wants to know, and — importantly — is allowed to be incomplete. Highlighting a few salient examples is often sufficient; an explanation doesn’t need to be exhaustively complete to be useful, and in fact often shouldn’t be.</p>
</section>
<section id="the-fundamental-trade-off-accuracy-vs.-explainability" class="level2">
<h2 class="anchored" data-anchor-id="the-fundamental-trade-off-accuracy-vs.-explainability">The Fundamental Trade-off: Accuracy vs.&nbsp;Explainability</h2>
<p>There’s a well-known, rough hierarchy of model families running from highly interpretable but often less powerful (decision trees, linear/logistic models, simple statistical models) to highly accurate but much harder to interpret (deep learning, ensemble methods, large neural networks). Three broad strategies exist to deal with this trade-off:</p>
<ol type="1">
<li><strong>Interpretable models</strong> — techniques that learn inherently structured, causal, interpretable models in the first place.</li>
<li><strong>Deep explanation</strong> — modified deep learning techniques specifically designed to learn explainable features as part of training.</li>
<li><strong>Model induction</strong> — techniques that infer an explainable model from any other model, treated purely as a black box.</li>
</ol>
<p>Most of the practical tools covered below fall into the third category — they don’t require you to change your architecture, only to interrogate it after the fact.</p>
</section>
<section id="the-practical-xai-toolbox" class="level2">
<h2 class="anchored" data-anchor-id="the-practical-xai-toolbox">The Practical XAI Toolbox</h2>
<section id="attention-visualization-bertviz-and-exbert" class="level3">
<h3 class="anchored" data-anchor-id="attention-visualization-bertviz-and-exbert">Attention visualization: BERTViz and exBERT</h3>
<p><strong>BERTViz</strong> provides an interactive way to visualize attention weights inside Transformer models (BERT, GPT-2, T5, and most Huggingface models). The <strong>head view</strong> shows attention from one token to another within a single layer, with line weight showing attention strength and color identifying which head. The <strong>model view</strong> gives a bird’s-eye view across the entire model — every layer and every head at once, letting you click into any cell for detail. <strong>exBERT</strong> goes further, combining attention visualization with contextual embedding search — letting you find other contexts in a corpus that produced similar embeddings for a given token, which is genuinely useful for exploratory analysis beyond just “which token attended to which.”</p>
</section>
<section id="feature-attribution-gradient-based-saliency-and-integrated-gradients" class="level3">
<h3 class="anchored" data-anchor-id="feature-attribution-gradient-based-saliency-and-integrated-gradients">Feature attribution: gradient-based saliency and Integrated Gradients</h3>
<p>Saliency methods score how important each input token was to a specific output. The mechanism: the model’s final hidden state gets projected onto its vocabulary, producing a score per possible next token; after selecting the generated token, you calculate the gradient of that selected logit with respect to every input token, back-propagating all the way to the input. The intuition is that the input token whose smallest change would produce the largest change in output is the token that mattered most.</p>
<p>In practice, using a library like <strong>Inseq</strong> with Integrated Gradients, you can literally watch this work: asking GPT-2 to complete “Heathrow airport is located in the city of” and seeing which input tokens the model actually leaned on to produce “London” — or, more usefully, feeding a movie review into a sentiment classifier and seeing precisely which words drove the “positive” classification. One striking demonstration: swapping a single word can flip the model’s sentiment prediction entirely, which is exactly the kind of brittleness saliency analysis exposes that a simple accuracy number never would.</p>
</section>
<section id="perturbation-based-methods-lime-and-shap" class="level3">
<h3 class="anchored" data-anchor-id="perturbation-based-methods-lime-and-shap">Perturbation-based methods: LIME and SHAP</h3>
<p><strong>LIME</strong> (Local Interpretable Model-agnostic Explanations, Ribeiro, Singh &amp; Guestrin, 2016) treats the model as a black box and asks: what happens to the prediction as I perturb the input? It generates a new dataset of perturbed samples plus the black-box model’s predictions on them, then trains a simple, interpretable local model (often linear) weighted by proximity to the original instance. This works across tabular data, text, and images alike, and its strength is producing short, human-friendly, contrastive explanations. Its real weaknesses are worth naming honestly: defining the right “neighborhood” for perturbation is an unsolved problem, explanations can be unstable (rerun the sampling and you can get a different-looking explanation for the same instance), and — most concerning for anything compliance-adjacent — LIME explanations can be deliberately manipulated to hide bias. This is why LIME suits lay-audience or debugging use well, but is not sufficient on its own anywhere you’re legally required to fully justify a specific decision.</p>
<p><strong>SHAP</strong> (SHapley Additive exPlanations) takes a more mathematically principled route, borrowing Shapley values from cooperative game theory: each feature is treated as a “player,” and its contribution is its average marginal effect across every possible combination (coalition) of features. A SHAP plot typically shows the model’s average prediction across a dataset as a baseline, then shows exactly how much each individual feature pushed the prediction up or down from that baseline for one specific instance. The honest trade-off against LIME: SHAP is computationally far more expensive (it has to consider a combinatorial number of feature coalitions), but it comes with a much stronger theoretical guarantee of consistency.</p>
</section>
<section id="looking-past-attention-neuron-activations-and-the-streetlight-fallacy" class="level3">
<h3 class="anchored" data-anchor-id="looking-past-attention-neuron-activations-and-the-streetlight-fallacy">Looking past attention: neuron activations and the streetlight fallacy</h3>
<p>Here’s a genuinely important and under-appreciated point. The feed-forward network (FFN) sitting on top of the self-attention block in a Transformer holds roughly <strong>two-thirds of all the model’s parameters</strong> — it’s the primary store of the model’s learned capacity. Yet the overwhelming majority of popular NLP explainability tools (BERTViz, self-attention heatmaps) focus almost exclusively on the attention mechanism, largely because attention weights are easy to visualize as lines connecting words. That’s worth naming as what it actually is: a version of the streetlight fallacy — searching where the light is easy to shine, rather than where the computation actually lives. Techniques like Non-negative Matrix Factorization applied to neuron activations, and tracking how the hidden state evolves layer by layer, are the tools that actually look at where most of the model’s capacity sits — and they matter precisely because attention-only analysis can give you a comfortable but incomplete picture of what’s really driving a decision.</p>
</section>
</section>
<section id="why-this-stops-being-optional-when-you-train-the-model-yourself" class="level2">
<h2 class="anchored" data-anchor-id="why-this-stops-being-optional-when-you-train-the-model-yourself">Why This Stops Being Optional When You Train the Model Yourself</h2>
<p>Everything above is useful for understanding any model, including one you’re only calling through an API. It becomes a genuine requirement — not a nice-to-have — the moment you’re fine-tuning, distilling, or training a component yourself, for several concrete reasons.</p>
<p><strong>Fine-tuning and distillation can change <em>how</em> a model decides without changing <em>whether</em> it gets the right answer.</strong> As covered in the <a href="../blog/pruning-quantization-distillation.html">earlier post on pruning, quantization, and distillation</a>, a distilled student model is trained to match a teacher’s softened output distribution — but matching the output distribution doesn’t guarantee the student arrived there via the same reasoning path. A validation accuracy score that looks identical before and after distillation can hide a genuinely different — and possibly less trustworthy — decision process underneath. XAI tools are how you actually check this: run SHAP or saliency analysis on the same set of examples before and after distillation, and compare not just the predictions but <em>which tokens or features drove them</em>.</p>
<p><strong>This connects directly to the “faithfulness versus plausibility” trap.</strong> A valid human explanation, as covered above, needs to be convincing and build trust — but a method like LIME is specifically built to produce a simplified, human-palatable local approximation. That raises an uncomfortable question worth sitting with honestly: when you check your fine-tuned model’s explanations and they look reasonable, are you verifying that the model actually reasoned that way, or are you just generating a comforting post-hoc rationalization that satisfies human psychology without reflecting the actual high-dimensional computation? This is exactly why a serious verification process for a self-trained model needs more than one XAI method — a saliency map, a SHAP explanation, and an attention visualization that all tell a consistent story is meaningfully stronger evidence than any single one alone.</p>
<p><strong>Fine-tuning can introduce new adversarial brittleness that a clean validation set won’t reveal.</strong> As covered in the <a href="../blog/adversarial-attacks-images-and-text.html">earlier post on adversarial attacks</a>, a model fine-tuned on a narrower dataset can become more sensitive to small, meaning-preserving perturbations — a synonym swap or a minor typo. There’s a concrete detection method worth adopting as a standard step: run LIME on an example before an adversarial perturbation, apply the perturbation, then run LIME again. If the explanation shifts dramatically, that’s a direct signal of adversarial sensitivity your fine-tuning process introduced or failed to remove.</p>
<p><strong>Regulatory and governance frameworks explicitly require this.</strong> As covered in the earlier posts on <a href="../blog/governing-the-autonomous-organization.html">AI governance</a> and <a href="../blog/bias-analysis-in-practice.html">bias analysis under the Dutch Algorithm Framework</a>, being able to show <em>why</em> a specific decision was made — not just that the system performs well in aggregate — is often a legal requirement, not a courtesy. A fine-tuned or distilled model deployed in a public-sector, medical, or financial context needs to support exactly this kind of per-decision explanation, and that capability has to be built in and verified during training, not retrofitted after a complaint arrives.</p>
</section>
<section id="a-practical-checklist-for-anyone-fine-tuning-or-distilling-their-own-model" class="level2">
<h2 class="anchored" data-anchor-id="a-practical-checklist-for-anyone-fine-tuning-or-distilling-their-own-model">A Practical Checklist for Anyone Fine-Tuning or Distilling Their Own Model</h2>
<ol type="1">
<li><strong>Run attention visualization (BERTViz) before and after fine-tuning</strong> on a fixed set of representative examples, and look for attention patterns shifting toward unexpected tokens.</li>
<li><strong>Run SHAP or LIME on the same validation examples before and after distillation</strong>, and compare not just the predicted label but which features drove it — a matching label with a different explanation is a warning sign, not a pass.</li>
<li><strong>Use saliency or Integrated Gradients to spot brittleness</strong>, especially single-word substitutions that flip a prediction — these are exactly the failure modes a plain accuracy metric will never surface.</li>
<li><strong>Test explicitly for adversarial sensitivity introduced by training</strong>, using the before/after LIME comparison method — a stable model should show stable local explanations under small, meaning-preserving perturbations.</li>
<li><strong>Look past attention at neuron activations and hidden-state evolution</strong>, since two-thirds of a Transformer’s capacity sits in the feed-forward layers that most standard tooling ignores.</li>
<li><strong>Document all of this</strong>, the same way the earlier posts on <a href="../blog/governing-the-autonomous-organization.html">governance</a> and <a href="../blog/bias-analysis-in-practice.html">bias analysis</a> argue for documenting fairness testing.</li>
</ol>
</section>
<section id="the-takeaway" class="level2">
<h2 class="anchored" data-anchor-id="the-takeaway">The Takeaway</h2>
<p>Borrowing a foundation model through an API means borrowing someone else’s explainability obligations along with its capability. The moment you fine-tune it, distill it, or train a specialized component yourself — exactly the path this site has argued for repeatedly as the route to genuine sovereignty and specialization — that obligation transfers to you in full. A model that scores well on a held-out test set has told you <em>what</em> it does. Only XAI tells you <em>how</em> — and without that, you’re deploying a system you’ve built but genuinely can’t account for.</p>
<p><em>Based on “XAI for NLP” (Advanced Natural Language Processing course, Department of Advanced Computing Sciences).</em></p>
<p><strong>Key papers</strong></p>
<ul>
<li>Ribeiro et al.&nbsp;(2016), <em>“Why Should I Trust You?”: Explaining the Predictions of Any Classifier</em> (LIME) — <a href="https://arxiv.org/abs/1602.04938">arXiv:1602.04938</a></li>
<li>Lundberg &amp; Lee (2017), <em>A Unified Approach to Interpreting Model Predictions</em> (SHAP) — <a href="https://arxiv.org/abs/1705.07874">arXiv:1705.07874</a></li>
<li>Sundararajan et al.&nbsp;(2017), <em>Axiomatic Attribution for Deep Networks</em> (Integrated Gradients) — <a href="https://arxiv.org/abs/1703.01365">arXiv:1703.01365</a></li>
<li>Vig (2019), <em>A Multiscale Visualization of Attention in the Transformer Model</em> (BERTViz) — <a href="https://arxiv.org/abs/1906.05714">arXiv:1906.05714</a></li>
</ul>
<hr>
<p><strong>Further reading on this site</strong></p>
<ul>
<li><a href="../blog/why-nlp-finally-works.html">Why NLP Finally Works</a> — the transformer architecture whose internals XAI tools are designed to open up</li>
<li><a href="../blog/pruning-quantization-distillation.html">Shrinking the Giant: Pruning, Quantization, and Distillation</a> — where the need for XAI during distillation originates</li>
<li><a href="../blog/adversarial-attacks-images-and-text.html">Adversarial Attacks: Invisible Pixels and Swapped Words</a> — the brittleness that LIME-based adversarial testing detects</li>
<li><a href="../blog/governing-the-autonomous-organization.html">Governing the Autonomous Organization</a> — the governance framework that makes explainability a legal requirement</li>
<li><a href="../blog/bias-analysis-in-practice.html">Bias Analysis in Practice</a> — the complementary fairness testing that XAI enables</li>
<li><a href="../blog/building-sovereign-ai-agents.html">What It Takes to Build a Sovereign AI Agent</a> — step 7 (validation) is where the XAI checklist in this post belongs</li>
</ul>


</section>

 ]]></description>
  <category>fundamentals</category>
  <category>governance</category>
  <guid>https://trajectorium.ai/en/blog/xai-for-fine-tuned-models.html</guid>
  <pubDate>Sat, 22 Aug 2026 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Bias Analysis in Practice: How Do You Actually Test an Algorithm for Discrimination?</title>
  <dc:creator>Jan Scholtes</dc:creator>
  <link>https://trajectorium.ai/en/blog/bias-analysis-in-practice.html</link>
  <description><![CDATA[ 




<p>Any algorithm that treats people or businesses differently carries a risk of discrimination — sometimes blatantly, more often hidden inside an apparently neutral variable like a postal code. The Dutch government’s Algorithm Framework (Algoritmekader, measure VER-03) requires a structured bias analysis for every algorithm that affects natural persons. This isn’t a paperwork exercise — it’s a concrete, technical, and legal test you can actually walk through step by step. This post covers the three required steps — bias analysis, justification test, ethical desirability test — with practical tools, real Dutch case studies, and the fairness science underneath it.</p>
<section id="why-this-is-more-than-a-compliance-checkbox" class="level2">
<h2 class="anchored" data-anchor-id="why-this-is-more-than-a-compliance-checkbox">Why This Is More Than a Compliance Checkbox</h2>
<p>The Algorithm Framework frames this as fulfilling a requirement from the Dutch Data Protection Authority (Autoriteit Persoonsgegevens) around automated decision-making: the risk of discriminatory processing has to be investigated <em>and</em> mitigated. Two recent Dutch cases show what goes wrong when this doesn’t happen:</p>
<ul>
<li><strong>DUO / student housing grant control</strong>: between 2010 and 2023, the Dutch education executive agency (DUO) used a risk profile to detect misuse of the “living-away-from-home” student grant. An investigation by Algorithm Audit found insufficient statistical association between several of the selection criteria used — the profile was discontinued.</li>
<li><strong>Ministry of Foreign Affairs / visa applications</strong>: the government’s Rijks ICT Gilde ran a quantitative bias test on the assessment of short-stay visa applications and found a significant difference based on nationality — recommending that the use of profile scores and risk groups be discontinued entirely.</li>
</ul>
<p>Both cases illustrate the same lesson: bias is rarely sitting in an explicit “race” or “nationality” variable. It’s in the patterns a model distills from data.</p>
</section>
<section id="step-1-analyze-whether-bias-is-present" class="level2">
<h2 class="anchored" data-anchor-id="step-1-analyze-whether-bias-is-present">Step 1: Analyze Whether Bias Is Present</h2>
<section id="direct-discrimination-the-relatively-simple-check" class="level3">
<h3 class="anchored" data-anchor-id="direct-discrimination-the-relatively-simple-check">Direct discrimination: the relatively simple check</h3>
<p>Simply check whether your input variables directly reference a protected characteristic: religion, belief, political conviction, race, sex, nationality, sexual orientation, or civil status. Note that many proxy terms also count as “race” under case law — skin color, other racialized physical characteristics, migration background, a “non-Western-sounding name,” or references to specific ancestry. If your model uses such variables directly (or a variable that functionally maps one-to-one onto them), that’s prohibited direct discrimination — full stop.</p>
</section>
<section id="indirect-discrimination-where-the-real-work-is" class="level3">
<h3 class="anchored" data-anchor-id="indirect-discrimination-where-the-real-work-is">Indirect discrimination: where the real work is</h3>
<p>This is where most bias actually hides: apparently neutral variables like postal code, income level, license plate, or low literacy that correlate strongly with a protected characteristic. The Algorithm Framework describes five concrete steps here — here’s how to actually implement them:</p>
<p><strong>1. Identify the vulnerable groups.</strong> Base this on the discrimination grounds defined in law, optionally supplemented with groups for whom differential treatment is ethically sensitive in your specific context.</p>
<p><strong>2. Define what “difference in treatment” means for your algorithm.</strong> This requires choosing between (at least) two families of fairness definitions — and this is exactly where many projects get stuck, because they never make this choice explicit:</p>
<ul>
<li><strong>Equal outcomes (representation)</strong>: do different groups have an equal chance of being selected? This corresponds to what the fairness literature calls <em>demographic parity</em> or <em>statistical parity</em>.</li>
<li><strong>Equal performance (errors)</strong>: does the algorithm perform equally well across different groups? This requires building a confusion matrix per group, and corresponds to concepts like <em>equalized odds</em> and <em>equal opportunity</em> — metrics that look at false positives and false negatives, not just the final score.</li>
</ul>
<p>A well-known and practical starting point for choosing which metric fits your situation is the <strong>Fairness Tree</strong> (a decision tree that asks about the nature of your decision and the consequences of false positives versus false negatives) — the Algorithm Framework itself points to this. Important to know: different fairness metrics can <em>mathematically contradict each other</em> — in most realistic situations, you cannot simultaneously guarantee demographic parity and equal error rates. This isn’t an implementation flaw; it’s a proven mathematical fact in the fairness literature. You therefore need to prioritize, in advance and together with stakeholders, which notion of fairness matters most in your context.</p>
<p><strong>3. Collect the data needed to measure these groups.</strong> This often collides directly with privacy law — you need sensitive data (ethnicity, sex, etc.) to be able to test for discrimination on exactly those same grounds. The EU AI Act explicitly provides an exception for this (Article 10.5) for high-risk AI systems: special category personal data may be processed specifically for the purpose of monitoring, detecting, and correcting bias. Make sure this processing is well documented and strictly scoped to that purpose.</p>
<p>Also pay attention to the quality of this data itself: if your testing data already contains historical or representation bias, you may end up measuring the bias of your measurement instrument rather than the actual bias you’re trying to detect. And for some groups (low literacy, for instance) reliable data simply isn’t available — consider alternative signals in that case, such as monitoring through the complaints and objections process.</p>
<p><strong>4. Calculate the differences.</strong> This is the step where you actually measure, using open-source tools built specifically for this:</p>
<ul>
<li><strong>Fairlearn</strong> (Microsoft) — measures and constrains unfairness, with direct support for demographic parity and equalized odds constraints during training.</li>
<li><strong>Aequitas</strong> — a bias-audit toolkit specifically aimed at policy and government contexts, built to report multiple fairness metrics side by side per group.</li>
<li><strong>AI Fairness 360 (IBM)</strong> — a broad toolkit with dozens of fairness metrics and bias-mitigation techniques (pre-processing, in-processing, post-processing).</li>
<li><strong>FairML</strong> — focused on tracing which input variables contribute most to an observed difference.</li>
</ul>
<p>In practice: build the confusion matrix per group, calculate the relevant metrics (selection-rate ratio, false-positive-rate gap, false-negative-rate gap), and test whether the difference is statistically significant rather than just random sampling noise.</p>
<p><strong>5. Explain how the difference arose.</strong> If you find a significant difference, trace where it came from: - <strong>Historical bias</strong> — does the data still describe the current situation, or does it reflect outdated patterns? - <strong>Representation bias</strong> — is the training data representative of the entire target population? - <strong>Measurement bias</strong> — do your input variables actually measure what they claim to, or are they crude proxies? - <strong>Automation bias or confirmation bias</strong> — does the bias only emerge in the human review step that follows the algorithm?</p>
<p>This step explicitly requires involving a broad group of stakeholders — the causes of bias are rarely purely technical; they live in the social and historical reality the data reflects.</p>
</section>
</section>
<section id="step-2-carry-out-a-justification-test" class="level2">
<h2 class="anchored" data-anchor-id="step-2-carry-out-a-justification-test">Step 2: Carry Out a Justification Test</h2>
<p>An observed difference isn’t automatically prohibited — but it always requires an explicit test against four sub-questions:</p>
<ol type="1">
<li><strong>Does the algorithm pursue a legitimate aim?</strong></li>
<li><strong>Is the algorithm suitable for achieving that aim?</strong></li>
<li><strong>Is it necessary</strong> — are there no reasonable, less intrusive alternatives?</li>
<li><strong>Is it, all things considered, proportionate?</strong></li>
</ol>
<p>For direct discrimination, there’s only room for an exception if the law itself provides one. For indirect discrimination, an objective justification can also suffice — but only if all four questions above are answered affirmatively. Without a valid justification, an observed difference is by definition prohibited discrimination, and the algorithm may not be used. The Netherlands Institute for Human Rights has published a detailed Risk Profiling Assessment Framework specifically addressing discrimination on grounds of race and nationality.</p>
</section>
<section id="step-3-carry-out-an-ethical-desirability-test" class="level2">
<h2 class="anchored" data-anchor-id="step-3-carry-out-an-ethical-desirability-test">Step 3: Carry Out an Ethical Desirability Test</h2>
<p>This is the step that goes beyond the legal question. Even with a valid, objective justification, an observed difference can still be ethically undesirable. Deliberately involve a broad group of stakeholders here — not just lawyers and data scientists, but also the people the algorithm actually affects — and discuss explicitly: what are the possible adverse effects, do we consider this fair, and are there alternatives? As the Algorithm Framework itself notes, this weighing can ultimately become a political-administrative question — make sure that responsibility is then explicitly assigned there.</p>
</section>
<section id="a-concrete-example-bias-is-already-baked-into-the-building-blocks-word2vec" class="level2">
<h2 class="anchored" data-anchor-id="a-concrete-example-bias-is-already-baked-into-the-building-blocks-word2vec">A Concrete Example: Bias Is Already Baked Into the Building Blocks (Word2Vec)</h2>
<p>Everything above is about how you <em>measure</em> bias in an algorithm’s output. But bias often creeps in much earlier — in the language representations a model is built on. A tangible, hands-on illustration of this comes from a tutorial on document representation, and it’s exactly why “measurement bias” and “historical bias” (mentioned in Step 1) aren’t abstract — they’re literally visible in the numbers of a word vector.</p>
<p><strong>Word2Vec and GloVe</strong> learn dense word vectors based on the distributional hypothesis: a word is characterized by the company it keeps (Firth, 1957). Semantically similar words end up close together in vector space — which works remarkably well for analogies like <em>king - man + woman ≈ queen</em>. But the same mechanism also picks up societal stereotypes from the training corpus, with concrete and recognizable consequences:</p>
<pre><code>man : programmer :: woman : ?</code></pre>
<p>Query a GloVe model (trained on Wikipedia plus news articles) with this, and the terms that surface clearly reflect a gender stereotype rather than a neutral translation of the profession. The same happens with <code>man:doctor :: woman:?</code> and <code>father:doctor :: mother:?</code> — the model hasn’t learned what a doctor <em>is</em>; it has learned which words tend to co-occur in text that’s already saturated with societal assumptions.</p>
<p>Why this doesn’t just sneak in but actually stays in: these embeddings are trained on huge amounts of web text, news articles, and books — sources that reflect historical and societal prejudice. When such embeddings then end up in a downstream application — a CV-screening tool, a chatbot, a risk-assessment instrument — they can <strong>pass on and amplify</strong> that discrimination. A résumé screener running on GloVe embeddings that associates “programmer” more strongly with “man” than with “woman” will systematically rank male candidates higher, without “sex” ever being used as an explicit input variable. This is exactly the type of indirect discrimination described in Step 1 above — only arising at the representation level, deeper in the pipeline than most bias audits typically look.</p>
<section id="making-bias-measurable-and-correctable-projection-based-debiasing" class="level3">
<h3 class="anchored" data-anchor-id="making-bias-measurable-and-correctable-projection-based-debiasing">Making bias measurable and correctable: projection-based debiasing</h3>
<p>The most influential technique for this (Bolukbasi et al., 2016) shows that this kind of bias can not only be demonstrated, but also — partially — corrected, in three steps:</p>
<ol type="1">
<li><strong>Determine the bias direction</strong>: compute a “gender direction” as the average difference between gender-defined word pairs (<em>he/she</em>, <em>man/woman</em>, <em>king/queen</em>, <em>father/mother</em>, and so on).</li>
<li><strong>Project that direction out</strong>: for neutral profession words (<em>programmer</em>, <em>nurse</em>, <em>engineer</em>), remove the component of the vector that lies along that gender direction — mathematically, an orthogonal projection.</li>
<li><strong>Verify</strong>: confirm that the debiased vectors no longer show a gender association, while the word’s actual meaning (the profession itself) is preserved.</li>
</ol>
<p>This is concretely measurable: compute a “bias score” for a set of neutral profession words (how strongly the word vector points in the gender direction) before and after this projection — the score drops to near zero for almost every word after debiasing, while the word retains its original meaning.</p>
</section>
<section id="the-limitations-an-honest-analysis-has-to-include-these-too" class="level3">
<h3 class="anchored" data-anchor-id="the-limitations-an-honest-analysis-has-to-include-these-too">The limitations — an honest analysis has to include these too</h3>
<p>Important not to gloss over: this technique doesn’t fully solve the problem.</p>
<ul>
<li><strong>It only addresses one axis at a time.</strong> Debiasing for gender doesn’t fix ethnicity, age, or other bias.</li>
<li><strong>Intersectional bias</strong> (for example, the combination of gender and ethnicity) requires considerably more sophisticated approaches than a single projection.</li>
<li><strong>Bias can persist in higher-order statistics</strong> that a simple linear projection doesn’t remove (Gonen &amp; Goldberg, 2019) — the direct association is gone, but cluster structures in the vector space can still remain gendered.</li>
<li><strong>Contextual models (BERT, GPT) require different techniques.</strong> Word2Vec and GloVe give each word exactly one fixed vector; a contextual model gives “bank” a different vector depending on the sentence. That doesn’t change <em>whether</em> bias can occur, but it does change <em>how</em> you have to detect and correct it — this connects to XAI methods for transformers.</li>
</ul>
<p>The lesson here for a bias analysis like the one in Step 1: if you only test an algorithm’s final decision, you may miss the point where the bias actually originated. A thorough “explain how the difference arose” step, for language models, therefore also means: look at the underlying word representations, not just the final output.</p>
</section>
</section>
<section id="how-to-operationalize-this-in-an-aiagent-project" class="level2">
<h2 class="anchored" data-anchor-id="how-to-operationalize-this-in-an-aiagent-project">How to Operationalize This in an AI/Agent Project</h2>
<p>For anyone looking to operationalize this within a larger agentic AI project — as covered in the <a href="../blog/building-sovereign-ai-agents.html">earlier post on building sovereign agents</a> and the <a href="../blog/governing-the-autonomous-organization.html">governance framework post</a> on this site:</p>
<ol type="1">
<li><strong>Document the three steps as a standing part of your validation phase</strong> — not as a one-time check at delivery, but as a recurring process, since both data and populations change over time.</li>
<li><strong>Choose your fairness metrics before you see the results</strong>, together with stakeholders — otherwise the temptation to pick, after the fact, whichever metric happens to look favorable becomes hard to resist.</li>
<li><strong>Build the bias test in as a separate, repeatable step in your pipeline</strong> — using one of the open-source tools mentioned above — the same way you’d build a fact-checking or guardrail module.</li>
<li><strong>Document every judgment call explicitly</strong>, including why a given difference was or wasn’t found to be justified. This is precisely what a regulator — or a court, if it ever comes to that — will want to see later.</li>
<li><strong>Keep monitoring after go-live</strong> — through the complaints and objections process, and through periodic repetition of the analysis, especially whenever the underlying population or the model changes.</li>
</ol>
</section>
<section id="the-takeaway" class="level2">
<h2 class="anchored" data-anchor-id="the-takeaway">The Takeaway</h2>
<p>Bias analysis isn’t a one-time checklist — it’s a repeated process of measuring, explaining, justifying, and, where necessary, correcting course. The Dutch cases covered here show this isn’t a theoretical exercise: profiles that ran in production for years turned out, on closer inspection, to be insufficiently substantiated and were discontinued. Build these three steps in from the design phase of your algorithm — not as a reaction to an incident after the fact.</p>
<p><em>Source: Algorithm Framework (Algoritmekader), Dutch Ministry of the Interior and Kingdom Relations, measure 5-VER-03.</em></p>
<p><strong>Key papers</strong></p>
<ul>
<li>Bolukbasi et al.&nbsp;(2016), <em>Man is to Computer Programmer as Woman is to Homemaker? Debiasing Word Embeddings</em> — <a href="https://arxiv.org/abs/1607.06520">arXiv:1607.06520</a></li>
<li>Gonen &amp; Goldberg (2019), <em>Lipstick on a Pig: Debiasing Methods Cover up Systematic Gender Biases</em> — <a href="https://arxiv.org/abs/1903.03862">arXiv:1903.03862</a></li>
<li>Hardt et al.&nbsp;(2016), <em>Equality of Opportunity in Supervised Learning</em> — <a href="https://arxiv.org/abs/1610.02413">arXiv:1610.02413</a></li>
<li>Barocas, Hardt &amp; Narayanan, <em>Fairness and Machine Learning</em> — <a href="https://fairmlbook.org">fairmlbook.org</a></li>
</ul>
<hr>
<p><strong>Further reading on this site</strong></p>
<ul>
<li><a href="../blog/governing-the-autonomous-organization.html">Governing the Autonomous Organization</a> — the four-phase governance framework that bias testing is part of</li>
<li><a href="../blog/building-sovereign-ai-agents.html">What It Takes to Build a Sovereign AI Agent</a> — step 7 of the guide deals with bias validation in practice</li>
<li><a href="../blog/adversarial-attacks-images-and-text.html">Adversarial Attacks: Invisible Pixels and Swapped Words</a> — the related category of security vulnerabilities in model inputs</li>
<li><a href="../blog/the-institutional-moat.html">The Institutional Moat</a> — why guardrails and compliance architecture matter for institutions</li>
<li><a href="../blog/why-nlp-finally-works.html">Why NLP Finally Works</a> — the transformer architecture whose embeddings carry the representational bias discussed here</li>
</ul>


</section>

 ]]></description>
  <category>governance</category>
  <guid>https://trajectorium.ai/en/blog/bias-analysis-in-practice.html</guid>
  <pubDate>Sat, 15 Aug 2026 00:00:00 GMT</pubDate>
</item>
</channel>
</rss>
