<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Nerea Jensen on Medium]]></title>
        <description><![CDATA[Stories by Nerea Jensen on Medium]]></description>
        <link>https://medium.com/@nereajensen?source=rss-d855355b90e5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*X5lQh--8zLR9tvFN38OhcA.jpeg</url>
            <title>Stories by Nerea Jensen on Medium</title>
            <link>https://medium.com/@nereajensen?source=rss-d855355b90e5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 21:31:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nereajensen/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Why OpenTelemetry Is Becoming Critical Infrastructure for AI]]></title>
            <link>https://medium.com/@nereajensen/why-opentelemetry-is-becoming-critical-infrastructure-for-ai-a02f5dde7f45?source=rss-d855355b90e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/a02f5dde7f45</guid>
            <category><![CDATA[metrics]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Nerea Jensen]]></dc:creator>
            <pubDate>Fri, 04 Sep 2026 11:41:22 GMT</pubDate>
            <atom:updated>2026-09-04T11:41:22.369Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://opentelemetry.io/"><strong>OpenTelemetry</strong></a> may sound like a rather boring piece of infrastructure.</p><p>And, in a way, it is.</p><p>Its job is to answer questions such as:</p><ul><li>What is my application doing?</li><li>Where is it failing?</li><li>How long does each operation take?</li><li>Which service called which?</li><li>What happened before an error appeared?</li></ul><p>To do this, OpenTelemetry provides an open standard for generating and transporting <strong>traces, metrics, and logs</strong>.</p><p>An application can be instrumented using OpenTelemetry and then send that telemetry to whichever observability system it wants.</p><p>The architecture usually looks something like this:</p><pre>Application<br>↓<br>OpenTelemetry<br>↓<br>Collector<br>↓<br>Observability Backend</pre><p>The application generates telemetry.</p><p>The Collector can process, filter, transform, or route it.</p><p>Finally, observability, storage, or analysis tools can consume it.</p><p>The idea seems simple, but it solves an important problem: preventing every application from having to implement a different way of describing what is happening internally.</p><p>And that problem is becoming especially relevant with AI systems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*etYQZf9rHNSIQoyIEVwMtg.png" /></figure><h3>Observing AI Systems</h3><p>A traditional application might generate a trace like this:</p><pre>HTTP request<br>└── database query</pre><p>An AI-based application may look more like this:</p><pre>User request<br>└── Agent<br>├── LLM call<br>├── Retrieval<br>│ └── Vector database<br>├── Tool call<br>│ └── CRM<br>├── LLM call<br>└── Tool call<br>└── Payment API</pre><p>Suddenly, we no longer want to know only how long a request took.</p><p>We also want to understand things like:</p><ul><li>which model was used,</li><li>how many tokens it consumed,</li><li>which tools an agent called,</li><li>which documents it retrieved,</li><li>which provider ran the model,</li><li>how much an execution cost,</li><li>why a generation ended,</li><li>which steps an agent followed,</li><li>what evaluation a response received.</li></ul><p>This is where a seemingly small problem appears.</p><p>There is no technical reason preventing each team from recording this data however it wants.</p><p>One team might store the model as:</p><pre>llm.model</pre><p>Another as:</p><pre>model_name</pre><p>And another as:</p><pre>provider_model</pre><p>The three fields represent essentially the same thing.</p><p>The problem appears when we want to compare applications, switch observability providers, build tools on top of those traces, or analyze systems built with different frameworks.</p><p>Multiply this inconsistency across tokens, agents, tools, retrieval, models, evaluations, and providers.</p><p>What looked like a naming problem ends up becoming an infrastructure problem.</p><h3>OpenTelemetry Is Trying to Create a Common Language for AI</h3><p>This is where OpenTelemetry’s <strong>GenAI Semantic Conventions</strong> come in.</p><p>Semantic conventions define a common way of representing certain operations within a trace.</p><p>Instead of every SDK, framework, or observability platform inventing its own representation of a model call, the goal is for the entire ecosystem to share the same vocabulary.</p><p>For example, an execution could conceptually produce a trace like this:</p><pre>agent.run<br>├── gen_ai.chat<br>├── retrieval<br>├── execute_tool<br>└── gen_ai.chat</pre><p>And each operation can carry structured attributes about the model, provider, tokens used, or tool executed.</p><p>What matters is not exactly what each attribute is called today.</p><p>What matters is that there is a <strong>common contract</strong>.</p><p>If different applications produce telemetry following the same schema, different tools can understand it.</p><p>This makes it possible to start separating two things that have historically been too tightly coupled:</p><pre>Instrumentation ≠ Observability Backend</pre><h3>Instrument Once</h3><p>Without a common standard, integrating an observability platform can end up introducing vendor-specific code throughout the application.</p><p>For example:</p><pre>vendor.start_llm_span(...)<br>vendor.log_tokens(...)<br>vendor.log_tool_call(...)<br>vendor.finish_span(...)</pre><p>If we later want to switch platforms, part of that instrumentation also has to change.</p><p>With OpenTelemetry, the model can be different:</p><pre>with tracer.start_as_current_span(&quot;generate_response&quot;) as span:<br>response = model.generate(prompt)<br>span.set_attribute(&quot;gen_ai.request.model&quot;, model_name)</pre><p>The application generates a trace using a common standard.</p><p>We can then decide where to send it.</p><pre>┌── Backend A<br>Application → OTel → Collector ── Backend B<br>└── Data warehouse</pre><p>We can even send it to multiple systems simultaneously.</p><p>This makes telemetry a layer independent of the tool that ultimately visualizes it.</p><p>And that is particularly interesting in AI, where the ecosystem changes extremely quickly.</p><p>Today an application may use one model provider; tomorrow, another.</p><p>Today it may use one agent framework and replace it six months from now.</p><p>Observability should survive those changes.</p><h3>An Example: Understanding What an Agent Is Doing</h3><p>Imagine an agent tasked with resolving a support request.</p><p>The user writes:</p><pre>I want to know why I still haven&#39;t received<br>the refund for order 839281.</pre><p>The agent performs these operations:</p><pre>agent.run<br>│<br>├── llm<br>│<br>├── tool: get_order<br>│<br>├── tool: get_refund_status<br>│<br>└── llm</pre><p>A trace lets us reconstruct the complete execution.</p><p>We can discover, for example, that the first model took 800 ms, the get_order call took 120 ms, get_refund_status failed once and had to be retried, and the final generation consumed 1,200 tokens.</p><p>When an AI system fails, looking only at the HTTP 500 from the outer request tells us very little.</p><p>We want to understand <strong>what happened inside the system</strong>.</p><p>That makes traces particularly valuable for agents.</p><h3>Another Example: Finding Cost Problems</h3><p>Observability can also answer questions that are not strictly about errors.</p><p>Suppose a new version of an agent starts consuming twice as many tokens.</p><p>Without structured traces, we may know that the bill has increased.</p><p>With them, we can detect where:</p><pre>Version 41<br>average input tokens: 2,140<br>average output tokens: 430</pre><p>versus:</p><pre>Version 42<br>average input tokens: 5,870<br>average output tokens: 460</pre><p>Perhaps the system is sending too much context to the model, retrieving too many documents, or a tool is returning enormous responses.</p><blockquote>Telemetry turns a cost increase into something we can investigate.</blockquote><h3>But Observing AI Introduces a New Problem</h3><p>In a traditional application, a trace usually contains information about the software: execution times, errors, endpoints, or database queries.</p><p>In an AI application, it can contain something quite different: <strong>the data the user is processing</strong>.</p><p>A prompt may include a name, an email address, medical information, or financial data. A tool call may include a customer’s complete record. An RAG system may retrieve parts of internal documents.</p><p>And an agent can cause that data to pass through many systems during a single execution:</p><pre>User<br>↓<br>Application<br>├── Model<br>├── Vector database<br>├── CRM<br>├── External APIs<br>└── Observability system</pre><p>The problem is not simply that sensitive data exists.</p><p>It is that <strong>copies of that data start existing in many different places</strong>.</p><p>Each copy may have its own permissions, retention policies, backups, storage regions, and external providers.</p><p>A trace created to debug an agent can accidentally become another database containing personal information.</p><h3>Minimize Before Storing</h3><p>The first solution is quite simple: do not store what we do not need.</p><p>To understand an agent’s behavior, we may want to retain:</p><pre>model = ...<br>input_tokens = 1842<br>output_tokens = 312<br>tool = get_customer<br>latency = 842ms<br>status = success</pre><p>without necessarily retaining:</p><pre>My name is María García,<br>my phone number is +34 612 345 678 and...</pre><p>But in AI this is not always enough.</p><p>Sometimes we need part of the content to understand why an agent made a decision, evaluate a response, or reproduce a failure.</p><p>This is where a second strategy comes in: <strong>transforming the data before storing it or sending it to external systems</strong>.</p><p>For example:</p><pre>María García requested a refund for order 839281.</pre><p>can be:</p><pre>&lt;PERSON_71C2&gt; requested a refund for order &lt;ORDER_89AD&gt;.</pre><p>The trace remains useful.</p><p>We can even keep the same pseudonymous identifier across multiple spans to reconstruct what the agent did without directly exposing the person’s identity.</p><p>There is an important distinction here.</p><p>If we destroy any reasonable possibility of identifying María later, we are talking about <strong>anonymization</strong>.</p><p>If there is a private mapping that makes it possible to recover her identity, we are talking about <strong>pseudonymization</strong>.</p><p>For observability, the latter is particularly interesting because it allows correlations to be maintained without distributing the original identifier across all systems.</p><h3>A Privacy Layer Before Data Leaves</h3><p>One possible architecture would be to introduce a dedicated layer to inspect and transform data before exporting it:</p><pre>AI Application<br>↓<br>Instrumentation<br>↓<br>Privacy layer<br>│<br>├── Detect PII<br>├── Remove secrets<br>├── Apply policies<br>├── Pseudonymize identifiers<br>└── Redact content<br>↓<br>Telemetry pipeline<br>↓<br>Observability backend</pre><p>The important question is <strong>where</strong> that transformation happens.</p><p>If the backend first receives:</p><pre>María García</pre><p>and then transforms it into:</p><pre>&lt;PERSON&gt;</pre><p>the backend has already received the original data.</p><p>This is a different security property from performing the transformation within our own infrastructure and exporting only:</p><pre>&lt;PERSON_71C2&gt;</pre><p>The same logic should apply not only to prompts, but also to:</p><ul><li>model responses,</li><li>tool arguments,</li><li>tool results,</li><li>documents retrieved through RAG,</li><li>metadata,</li><li>exceptions,</li><li>logs.</li></ul><p>In agents, tool calls and retrieved documents are probably precisely where some of the most sensitive data appears.</p><h3>How to Build This Layer</h3><p>There is no need to solve the problem exclusively with another LLM.</p><p>A reasonable implementation can combine several techniques.</p><p>First, deterministic detectors for information that is easy to recognize:</p><pre>emails<br>phone numbers<br>IPs<br>credit cards<br>API keys<br>internal identifiers</pre><p>Then, entity recognition models for less structured information:</p><pre>people<br>organizations<br>addresses<br>locations<br>medical information</pre><p>And finally, application-specific rules.</p><p>A patient identifier or an internal contract number probably cannot be discovered by a generic library. The organization itself knows the format and can define how to handle it.</p><p>A policy can then be applied to those detections:</p><pre>EMAIL → remove<br>PHONE_NUMBER → remove<br>PERSON → pseudonymize<br>CUSTOMER_ID → stable HMAC/hash<br>API_KEY → block completely<br>ORDER_ID → retain</pre><p>This is more useful than simply applying [REDACTED] to everything.</p><p>The goal should not be to remove as much information as possible.</p><p>It should be to retain <strong>the minimum amount necessary for the trace to remain useful</strong>.</p><p>There are already open-source components for doing this; among the more mature ones are Presidio, <strong>LLM Guard, and Guardrails AI. I have personally developed two open-source projects toward this solution (pii-firewall and gateforge).</strong></p><h3>AI Observability Is Becoming Infrastructure</h3><p>AI systems are moving beyond being a single call to a model.</p><p>They increasingly resemble distributed systems made up of models, agents, tools, databases, retrieval, and external APIs.</p><p>We need to understand what happens inside them when they fail, when they start spending too much, or when an agent makes an unexpected decision.</p><p>To do that, we need observability.</p><p>But we also need to avoid having that visibility mean copying prompts, internal documents, and personal data into every system a trace touches.</p><p>That is why I think the two pieces will eventually evolve together:</p><pre>Standard observability<br>+<br>Privacy by design</pre><p>OpenTelemetry can provide the common language and infrastructure for observing these systems.</p><p>The next piece is deciding <strong>what information we allow to cross that boundary</strong>.</p><p>Because in AI systems, good observability infrastructure should not merely explain what happened.</p><blockquote>It should also allow us to do so without collecting data we never needed to store.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a02f5dde7f45" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Design Systems Were Built for Humans. AI Agents Need One Too.]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@nereajensen/design-systems-were-built-for-humans-ai-agents-need-one-too-ed30e3c16515?source=rss-d855355b90e5------2"><img src="https://cdn-images-1.medium.com/max/2600/1*V3tR3OHlq3tgKzz0pgI56g.jpeg" width="2816"></a></p><p class="medium-feed-snippet">Modern code-generation models rarely make novice UI mistakes anymore. Ask an LLM to scaffold an account settings page, and it will not&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@nereajensen/design-systems-were-built-for-humans-ai-agents-need-one-too-ed30e3c16515?source=rss-d855355b90e5------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@nereajensen/design-systems-were-built-for-humans-ai-agents-need-one-too-ed30e3c16515?source=rss-d855355b90e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/ed30e3c16515</guid>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[ai-engineering]]></category>
            <category><![CDATA[ux-design]]></category>
            <category><![CDATA[generative-ai]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Nerea Jensen]]></dc:creator>
            <pubDate>Thu, 03 Sep 2026 14:46:22 GMT</pubDate>
            <atom:updated>2026-09-03T14:46:22.258Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Writing Code Is Becoming Cheap. Proving It Works Isn’t.]]></title>
            <link>https://medium.com/@nereajensen/writing-code-is-becoming-cheap-proving-it-works-isnt-b967ee56985c?source=rss-d855355b90e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/b967ee56985c</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Nerea Jensen]]></dc:creator>
            <pubDate>Sun, 30 Aug 2026 00:45:43 GMT</pubDate>
            <atom:updated>2026-08-30T22:20:59.040Z</atom:updated>
            <content:encoded><![CDATA[<h3>Generating Code Is Becoming Cheap. Proving It Works Isn’t.</h3><p>The most dangerous AI-generated patch isn’t the one that breaks CI. It’s the one that passes.</p><p>The tests are green. The diff looks reasonable. The implementation matches the ticket. Someone reviews it and nothing looks obviously wrong.</p><p>And the patch is still incorrect.</p><p>As coding agents get better, I think this becomes a more important problem than code generation itself. Producing a plausible implementation is getting cheap. Figuring out whether it actually belongs in the codebase isn’t.</p><h3>A green test suite can still be wrong</h3><p>Imagine asking an agent:</p><p><strong>Prevent suspended users from creating new projects.</strong></p><p>The repository has tests for normal project creation, but nothing specifically covering suspended accounts.</p><p>The agent adds:</p><pre>if target_user.suspended:<br>    deny()</pre><p>It writes a test. Everything passes.</p><p>There is one problem: administrators are allowed to create projects on behalf of suspended users.</p><p>The agent didn’t know that, so the new condition breaks the admin flow.</p><p>Nothing about the patch looks suspicious. It compiles, the test is green, and the implementation does exactly what the ticket asked.</p><p>The ticket just didn’t describe the whole system.</p><p>That is normal in mature codebases. Requirements are usually fragments of intent sitting on top of years of existing behavior, permissions, conventions and edge cases. Some of that context is documented. Much of it only exists in the code.</p><p>Tests verify the properties somebody thought to encode. They cannot tell us whether those were the right properties.</p><p>This gap is already visible in coding-agent benchmarks.</p><p>In a <strong>2026 METR study</strong>, maintainers reviewed 296 AI-generated pull requests from SWE-bench Verified. Roughly <strong>half of the patches</strong> that passed the benchmark’s automated grader still would <strong>not have been merged</strong>. Some failed core functionality, some broke other code, and others had quality problems serious enough to reject the change.</p><p>Passing an automated grader and producing a mergeable patch are different standards.</p><h3>Correct according to what?</h3><p>A patch can be correct inside the context an agent was given and still be wrong for the repository.</p><p>It might satisfy the ticket but break another caller. It might duplicate an abstraction that already exists elsewhere. A permission check can work on the obvious path while changing a trust boundary somewhere else. A concurrency change can pass deterministic tests and still introduce a race.</p><p>These failures are difficult because they often live outside the patch.</p><p>Coding agents are getting better at reacting to local feedback. Compiler errors, failing tests and type errors give them concrete signals they can often repair.</p><p>The harder case is when all of those signals agree with the implementation.</p><p>At that point, another implementation does not add much. What the system needs is context or evidence that was missing from the first pass.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*onHMd4O2j1T_jjhSA1gu0w.png" /></figure><h3>Two agents can share one mistake</h3><p>One obvious approach is to have one agent write the code and another review it.</p><p>That helps only if the second agent has a reasonable chance of discovering something new.</p><p>If both agents receive the same ticket, retrieve the same files and rely on the same tests, they can confidently converge on the same wrong conclusion.</p><p>Their failure modes are correlated.</p><p>A more useful reviewer would get the requirement and final diff, then investigate independently.</p><p>It might follow a caller the coding agent never opened, find an existing permission abstraction, or discover that the operation is also used by an admin endpoint or background job.</p><p>The reviewer can still be wrong, but at least the second pass is not just repeating the first one with a different model call.</p><p>That distinction matters more than the number of agents involved.</p><h3>Try to prove the patch wrong</h3><p>There is a difference between reviewing a patch and trying to invalidate it.</p><p>Ask:</p><p><strong>Does this implementation look correct?</strong></p><p>and the reviewer starts with a plausible implementation and looks for reasons to accept it.</p><p>A more useful question is:</p><p><strong>What would have to be true for this patch to be wrong?</strong></p><p>That changes the search.</p><p>Inspect callers the implementation did not touch. Try inputs outside the happy path. Check whether another part of the system uses a different permission model. Look for abstractions the patch bypassed. Run it under a different configuration.</p><p>The goal is to deliberately search for contradictory evidence, especially outside the context used to generate the patch.</p><p>That evidence does not need to come from another LLM.</p><p>Tests can check known behavior. Static analysis can catch classes of mistakes without running the program. Repository exploration can expose hidden callers and constraints. A sandbox can reveal behavior that static inspection misses. Security checks can challenge trust boundaries.</p><p>These tools are useful precisely because they fail in different ways.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*krUJ2oWQdOA63jfR0YjqIQ.png" /></figure><h3>From code review to evidence</h3><p>This suggests a different architecture for autonomous coding systems.</p><p>The coding agent produces a candidate patch, and the system then decides what kinds of verification that change needs.</p><p>A small UI change may only need tests and a quick repository check. An authentication change should probably trigger security analysis, affected-caller discovery and runtime validation.</p><p>The patch can be treated as a candidate that still needs to survive several independent checks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/1*93x_zz4ozWaYS2anUD7vCA.png" /></figure><p>A stronger model may generate better patches, but better generation does not remove the need to look for missing context.</p><p>The more autonomous the coding system becomes, the more important it is to separate generation from validation.</p><h3>The bottleneck is moving</h3><p>If generating ten plausible implementations becomes almost free, generating number eleven is not especially valuable.</p><p>Choosing which one deserves to ship is.</p><p>Reliable coding systems will need to do more than produce code and run the tests that came with the task. They will need mechanisms that actively look for hidden assumptions, affected behavior and constraints the original implementation may have missed.</p><p>That is where I think the harder engineering problem is moving: away from producing plausible code, and toward deciding when there is enough evidence to trust it.</p><h3>References</h3><ul><li>METR. <a href="https://metr.org/notes/2026-03-10-many-swe-bench-passing-prs-would-not-be-merged-into-main/">Many SWE-bench-passing PRs would not be merged into main</a> (2026)</li><li>METR. <a href="https://metr.org/blog/2025-03-19-measuring-ai-ability-to-complete-long-tasks/">Measuring AI Ability to Complete Long Software Tasks</a> (2025)</li><li>Liu et al. <a href="https://arxiv.org/abs/2502.13069">Ambig-SWE: Interactive Agents to Overcome Underspecificity in Software Engineering</a> (2025)</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b967ee56985c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Your Coding Agent Doesn’t Need a Longer Memory. It Needs State.]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/magic-ai/your-coding-agent-doesnt-need-a-longer-memory-it-needs-state-90ccbcfef09f?source=rss-d855355b90e5------2"><img src="https://cdn-images-1.medium.com/max/1672/1*4STXACWeyOjIOn_bXU92GQ.png" width="1672"></a></p><p class="medium-feed-snippet">Long coding sessions create a strange problem. The longer an agent works, the more it remembers. But remembering what happened is not the&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/magic-ai/your-coding-agent-doesnt-need-a-longer-memory-it-needs-state-90ccbcfef09f?source=rss-d855355b90e5------2">Continue reading on Magic AI »</a></p></div>]]></description>
            <link>https://medium.com/magic-ai/your-coding-agent-doesnt-need-a-longer-memory-it-needs-state-90ccbcfef09f?source=rss-d855355b90e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/90ccbcfef09f</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[reactjs-developer-tools]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[large-language-models]]></category>
            <dc:creator><![CDATA[Nerea Jensen]]></dc:creator>
            <pubDate>Fri, 28 Aug 2026 11:25:51 GMT</pubDate>
            <atom:updated>2026-09-05T20:22:39.636Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Graphs, Embeddings, or Grep? How Should an AI Agent Understand a Codebase?]]></title>
            <link>https://medium.com/@nereajensen/graphs-embeddings-or-grep-how-should-an-ai-agent-understand-a-codebase-a125ab3c0aeb?source=rss-d855355b90e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/a125ab3c0aeb</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[developer-tools]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[large-language-models]]></category>
            <dc:creator><![CDATA[Nerea Jensen]]></dc:creator>
            <pubDate>Thu, 27 Aug 2026 18:17:43 GMT</pubDate>
            <atom:updated>2026-08-27T18:17:43.046Z</atom:updated>
            <content:encoded><![CDATA[<p>Coding agents have frontier models, semantic embeddings and increasingly sophisticated tooling. Yet one of the most important operations in agentic coding is still regex search.</p><p>Modern coding agents search for symbols, filenames, error messages and string patterns, read a few files, then search again. Some systems add semantic indexes, symbol databases or repository maps, but iterative search over the raw repository remains a core part of how agents navigate code.</p><p>There is a good reason for that.</p><p>A codebase does not have one structure. It has many.</p><p>The same repository can be viewed as text, a directory tree, a symbol table, a dependency graph, an embedding space, a history of changes or a model of domain concepts.</p><p>Knowledge graphs therefore sound like an appealing next step: turn functions, classes, imports, calls, dependencies and capabilities into nodes and edges, and give the agent a structured map instead of forcing it to rediscover the repository on every task.</p><p>But that raises a more interesting question.</p><p>If simple search remains so useful, <strong>what exactly should a richer representation improve?</strong></p><p>The real problem may not be finding one representation of the codebase.</p><p>It may be knowing <strong>which representation to use for which question</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rjkPw6loLjShtT_78cItKw.png" /></figure><h3>A codebase has several structures at once</h3><p>Consider a relatively simple question:</p><blockquote>Where is authentication implemented?</blockquote><p>A lexical search might find files containing auth, login or token.</p><p>An embedding search might find semantically related code even where those exact words do not appear.</p><p>A symbol index can identify implementations of a particular interface.</p><p>A call graph can reveal which components ultimately reach an authentication service.</p><p>Git history might show that a seemingly unrelated middleware file changes whenever authentication logic changes.</p><p>And an architectural document could tell us that authentication is intentionally split between an edge service and an identity service.</p><p>All of these answers describe the same repository.</p><p>None is the repository.</p><p>This distinction is becoming increasingly visible in repository-retrieval research.</p><p>Agent Retrieval Bench, for example, evaluates file retrieval from real coding-workflow signals rather than ordinary semantic code search. Its results show that no retrieval family dominates across repository questions: embeddings, lexical retrieval and structure-aware repository maps win under different task conditions and evaluation metrics (Qin &amp; Xie, 2026).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O-JO0HHw4GM9AE__I6eIbw.png" /></figure><p><em>Figure 1. Different repository questions favor different retrieval biases. Agent Retrieval Bench V1 reports different Recall@20 winners for code-to-test retrieval, review-context retrieval and failure-trace-to-code retrieval.</em></p><p>That result should make us suspicious of any architecture claiming that one representation solves repository understanding.</p><h3>Where graphs genuinely help</h3><p>There are nevertheless problems for which graphs are unusually natural.</p><p>Suppose an interface changes.</p><p>The interesting question is no longer:</p><blockquote>Which files mention this interface?</blockquote><p>It becomes:</p><blockquote>What depends on it?</blockquote><p>That is relational.</p><p>A function calls another function. A module imports another module. A class implements an interface. A test exercises a component. A package participates in a build target.</p><p>These relationships form paths, and paths are precisely what graphs represent well.</p><p>Recent systems exploit this directly. CodexGraph, for example, represents repository structure in a graph database and lets agents query structural relationships when navigating code, with competitive results across repository-level coding benchmarks (Liu et al., 2025).</p><p>A particularly defensible approach is therefore to build deterministic graphs from evidence such as imports, symbol references, tests, build targets and static structure.</p><p>These edges represent facts that can often be reproduced mechanically.</p><p>But the situation changes once we move from <strong>code graphs</strong> to <strong>knowledge graphs</strong>.</p><h3>Semantic graphs</h3><p>A structural graph can tell an agent that:</p><p>validateContact → CALLS → normalizeAddress</p><p>But perhaps the real question is:</p><blockquote>Do we already have email validation somewhere in this repository?</blockquote><p>The relevant function could be called checkContactFormat.</p><p>There may be no lexical match.</p><p>There may not even be an obvious call path from the code currently being edited.</p><p>This motivates adding a semantic layer: concepts, domain entities and system capabilities.</p><p>Such a representation can let an agent ask what the software already knows how to do rather than only which symbols exist.</p><p>But there is a cost hidden inside that abstraction.</p><p>Someone — or some model — has to decide that:</p><p>checkContactFormat → MAY_IMPLEMENT → email validation</p><p>The first kind of relationship can be verified mechanically.</p><p>The second is an interpretation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_1VpredAm7bkwwJggx2RVw.png" /></figure><p><em>Figure 2. Structural edges and semantic edges have different epistemic status. A </em><em>CALLS relationship may be deterministically extracted from code, while a capability relationship such as </em><em>MAY_IMPLEMENT email_validation is an inferred hypothesis.</em></p><p>Once inferred semantic edges enter the graph, the representation becomes a mixture of <strong>facts and hypotheses</strong>.</p><p>That may still be extremely useful.</p><p>But the distinction should not disappear.</p><p>A useful knowledge graph should probably preserve not only an edge, but also where that edge came from: static analysis, runtime evidence, documentation, human input or model inference.</p><h3>Why embeddings are hard to replace</h3><p>Embeddings solve a different problem surprisingly well.</p><p>Embedding similarity is not a reliable source of truth for deterministic relationships such as whether function A calls function B.</p><p>But embeddings become useful when we do not know the vocabulary used by the repository.</p><p>A developer asks about:</p><blockquote>billing retry logic</blockquote><p>The implementation is called:</p><p>recoverFailedCharge</p><p>Semantic retrieval can bridge that vocabulary gap without requiring someone to have previously encoded an explicit: IMPLEMENTS → billing_retryrelationship.</p><p>This makes embeddings attractive for <strong>discovery</strong>.</p><p>Graphs become attractive once explicit relationships matter.</p><p>Lexical search remains attractive when identifiers provide strong clues.</p><p>And filesystem exploration remains useful when the agent needs to inspect local implementation details.</p><p>These mechanisms are not interchangeable.</p><p>They preserve different kinds of evidence.</p><h3>There is another problem: graphs go stale</h3><p>Every derived representation introduces synchronization.</p><p>Rename a symbol.</p><p>Move a class.</p><p>Change a dependency.</p><p>Split a service.</p><p>Modify runtime configuration.</p><p>Some representations can be updated deterministically and cheaply. Others require semantic reinterpretation.</p><p>The richer the derived model becomes, the more work may be required to keep it synchronized with the underlying repository.</p><p>This creates a cost-placement tradeoff.</p><p>You can spend computation <strong>before the task</strong>, continuously maintaining indexes, dependency graphs and semantic representations.</p><p>Or you can spend computation <strong>during the task</strong>, allowing the agent to search and inspect the raw repository.</p><p>Neither is free.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aBbwrkgGJ_UPAToM5oxoCw.png" /></figure><p><em>Figure 3. Repository representations move computation between preprocessing and runtime exploration. Rich precomputed indexes can reduce search during a task, while lightweight approaches reduce synchronization cost but require more exploration.</em></p><p>The right balance is unlikely to be constant.</p><ul><li>Very large repositories may justify substantial precomputation.</li><li>Small repositories may not.</li><li>Fast-changing code may favor cheap deterministic indexes.</li><li>Stable systems may justify richer derived representations.</li></ul><p>This is less a question of finding the perfect repository model than deciding <strong>where retrieval computation should happen</strong>.</p><h3>The likely answer is adaptive retrieval</h3><p>The interesting direction is therefore not to force every repository question through the same retrieval mechanism.</p><p>Instead, treat repository representations as tools.</p><p>When the agent asks:</p><blockquote>Where is this identifier used?</blockquote><p>Use lexical or symbol retrieval.</p><p>When it asks:</p><blockquote>What calls this?</blockquote><p>Use structural edges.</p><p>When it asks:</p><blockquote>Where have we solved something similar?</blockquote><p>Use semantic retrieval.</p><p>When it asks:</p><blockquote>What breaks if I change this?</blockquote><p>Combine dependency structure, tests and possibly history.</p><p>When it asks:</p><blockquote>Does this capability already exist?</blockquote><p>Use semantic discovery together with structural evidence.</p><p>The engineering problem becomes deciding:</p><p><strong>which evidence source should answer which question?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sHxYRZvf0x0uPucFCz1L5w.png" /></figure><p><em>Figure 4. Adaptive repository retrieval routes a question toward the evidence source most suited to answering it rather than forcing every query through one representation.</em></p><p>This is subtly different from simply saying that the answer is “hybrid retrieval”.</p><p>A hybrid system might always execute several retrievers and fuse their rankings.</p><p>An adaptive system can instead decide that some retrievers are unnecessary for a particular question.</p><p>That distinction matters for both latency and context efficiency.</p><p>Recent Agent Retrieval Bench results provide some evidence for the value of combining signals. On its trace2code task, for example, the structure-aware RepoMap reached a Recall@20 of 0.8366 while Qwen3-Embedding-8B reached 0.7970. A post-hoc fusion of the embedding and RepoMap rankings reached 0.8795 (Qin &amp; Xie, 2026).</p><p>The interesting result is not that one representation wins. It is that <strong>the signals are complementary</strong>.</p><h3>The real repository map</h3><p>A call graph, an embedding index, a symbol table, Git history and a domain model are different maps of the same territory.</p><p>So I no longer think the most interesting question is whether coding agents need knowledge graphs. They probably need graphs for some things.</p><p>What they need more is the ability to know <strong>when a graph is the right map to use</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a125ab3c0aeb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Hidden Privacy Problem in Every AI App]]></title>
            <link>https://medium.com/@nereajensen/the-hidden-privacy-problem-in-every-ai-app-fd847b521542?source=rss-d855355b90e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/fd847b521542</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Nerea Jensen]]></dc:creator>
            <pubDate>Thu, 21 May 2026 21:05:04 GMT</pubDate>
            <atom:updated>2026-05-21T21:07:27.424Z</atom:updated>
            <content:encoded><![CDATA[<h4>Introducing PII Firewall: an open-source privacy layer for AI applications</h4><p>Every AI product has the same hidden privacy problem.</p><p>The more useful the assistant becomes, the more sensitive the user data becomes.</p><p>A user writes something like:</p><blockquote>I need to move my appointment from Tuesday to Friday because I had surgery last month and I’m still on medical leave.</blockquote><blockquote>My policy number is INS-48291.</blockquote><p>The task is simple: reschedule an appointment. But the prompt also includes sensitive medical, employment-related, and internal policy information that the model may not need to complete that task.</p><p>In many AI applications, that message is sent directly to a third-party LLM provider.</p><h4>Why this matters now</h4><p>In regulated environments, teams are expected to limit personal data processing, explain why data is needed, and apply privacy by design.</p><p>With LLMs, that becomes harder because users often paste sensitive information directly into prompts, even when that information is not required for the task.</p><p>The risk is not that every AI app will receive a massive fine.</p><p>The real risk is losing control over where sensitive data goes, how long it is stored, whether it appears in logs or traces, and whether the company can prove that the model actually needed that data in the first place.</p><p>Companies want to use LLMs in customer support, healthcare, finance, legal workflows, HR, internal tools, and enterprise automation.</p><p>But these are exactly the environments where sensitive data appears naturally in conversations.</p><p>So the question is not:</p><blockquote>“Can we remove all personal data?”</blockquote><p>The real question is:</p><blockquote>“Can we protect personal data while keeping the AI useful?”</blockquote><p>This is the problem I tried to solve with <a href="https://github.com/neretj/llm-pii-firewall"><strong>PII Firewall</strong></a>, an open-source privacy layer for AI applications. This framework behaves as a stateful proxy that sits between your application and any LLM provider. It detects sensitive information, replaces it with safe tokens before the model call, and restores the original values only inside your trusted environment.</p><p>It is model-agnostic by design, works across 55+ languages, and lets teams combine multiple PII detection techniques through a simple, unified framework.</p><p>The model still gets the context it needs. But it never needs to know who the user really is.</p><h3>Redaction is not enough</h3><p>The most common approach to privacy is redaction.</p><p>Take this input:</p><blockquote>My name is Maria Perez and my email is maria<a href="/service/mailto:john@example.com">@example.com</a>.</blockquote><p>A simple redaction system might turn it into:</p><blockquote>My name is [REDACTED] and my email is [REDACTED].</blockquote><p>That protects the data, but it also destroys useful context.</p><p>If the model later responds with:</p><blockquote>I have updated the record for [REDACTED].</blockquote><p>The final answer is technically private, but not useful.</p><p>The model does not know what was redacted.<br>Was it a person, a company, an email address, or a case reference?</p><p>And in a multi-turn conversation, a stateless redaction layer cannot reliably preserve who or what each placeholder refers to across messages.</p><h3>The core idea: pseudonymize, reason, rehydrate</h3><p><a href="https://github.com/neretj/llm-pii-firewall">PII Firewall</a> uses reversible pseudonymization.</p><p>Instead of deleting sensitive values, it replaces them with safe tokens.</p><pre>John Doe → PERSON_1<br>john@example.com → EMAIL_1</pre><p>So the LLM receives:</p><pre>Hi, I’m PERSON_1. My email is EMAIL_1.<br>Can you help me update my insurance claim?</pre><p>The model can still understand that there is a person, an email address, and a task.</p><p>It can respond naturally:</p><pre>Sure, PERSON_1. I can help you update the account linked to EMAIL_1.</pre><p>Then it rehydrates the response inside your trusted environment:</p><pre>Sure, John Doe. I can help you update the account linked to john@example.com.</pre><p>The user gets a personalized answer but the LLM provider never receives the raw personal data.</p><p>The important part is that the vault stays in the trusted application environment.</p><p>The LLM sees:</p><pre>PERSON_1<br>EMAIL_1<br>PHONE_NUMBER_1</pre><p>Your application keeps the mapping:</p><pre>PERSON_1 → John Doe<br>EMAIL_1 → john@example.com<br>PHONE_NUMBER_1 → +1 555 123 4567</pre><p>This means the model can reason over the conversation without receiving the user’s identity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_yn1f5E1jDZCPaq2qCMKSA.png" /></figure><h3>A flexible privacy framework</h3><p><a href="https://github.com/neretj/llm-pii-firewall">PII Firewall</a> is not the first attempt to protect LLM calls from sensitive data exposure.</p><p>Privacy proxies, PII redaction tools, anonymization layers, and AI security gateways are becoming part of the production LLM stack.</p><p>But in practice, privacy is rarely solved by a single detector, language, or rule.</p><p>Some applications need fast pattern matching for emails, phone numbers, credit cards, IBANs, or internal IDs. Others need language-aware models to detect names, locations, organizations, dates, or contextual references. Some teams need healthcare-specific detection, while others need finance, legal, HR, customer support, or internal enterprise rules.</p><p><a href="https://github.com/neretj/llm-pii-firewall">PII Firewall</a> lets teams choose the LLM provider, combine different PII detection techniques, adapt detection to multiple languages, define different actions per entity, and keep reversible mappings in a scoped vault.</p><p>In other words, the goal is not to provide one fixed privacy policy, but a framework for defining the right privacy behavior for each application.</p><h3>Model-agnostic by design</h3><p><a href="https://github.com/neretj/llm-pii-firewall">PII Firewall</a> can sit in front of OpenAI, Anthropic or any provider that accepts text input and returns text output.</p><p>This matters because AI infrastructure changes quickly. A team may start with one provider, later route workloads to another, or eventually move some models in-house.</p><p>Your privacy layer should not have to be rewritten every time your model strategy changes.</p><p>PII Firewall is designed as middleware: a thin privacy boundary between your application and whichever model you choose.</p><h3>Detector-agnostic too</h3><p>PII detection is not a solved problem with a single perfect technique.</p><p>Some sensitive data is structured and easy to detect:</p><pre>john@example.com<br>+34 600 123 456<br>4242 4242 4242 4242</pre><p>Rule-based patterns work very well for these cases.</p><p>Other data is contextual:</p><pre>John lives near the hospital and spoke with Dr. Martinez last Friday.</pre><p>Here, names, roles, dates, and locations may need language understanding.</p><p><a href="https://github.com/neretj/llm-pii-firewall">PII Firewall</a> supports multiple detection engines.</p><p>You can use simple rule-based patterns when you want speed and precision.</p><ul><li>You can use NER-based detection when you need context.</li><li>You can use transformer models for more specialized domains.</li><li>Or you can combine several approaches in hybrid mode.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-iGcVDcMmsDd1wQ73prRNw.png" /></figure><h3>Built for more than English</h3><p>A lot of privacy tooling works well in English and then quietly breaks down elsewhere.</p><p>Real users write in Spanish, French, Italian, Portuguese, German, Arabic, Japanese, and many other languages. They use different name structures, address formats, national identifiers, phone formats, bank account formats, and local conventions.</p><p>PII Firewall includes language-aware routing, so detection can adapt to the language and region of the text.</p><p>This allows the system to apply the right patterns and models for the context instead of relying on a single English-centric detector.</p><p>For example, a privacy layer used in Europe should understand IBANs, local phone numbers, national identifiers, and multilingual names.</p><p>A global AI product cannot treat privacy as an English-only problem.</p><h3>Different domains need different privacy behavior</h3><p>Different industries have different privacy needs.</p><ul><li>A healthcare assistant should preserve clinical utility while protecting patient identity.</li><li>A finance assistant should protect payment data while keeping enough context for analysis.</li><li>A legal assistant may need to preserve case references while anonymizing party names and addresses.</li></ul><p>PII Firewall includes domain-specific presets for common scenarios such as <em>healthcare</em>, <em>finance</em>, <em>legal </em>or <em>generic</em>.</p><p>These presets are not meant to be rigid. They are starting points.</p><p>Teams can override specific behaviors, add their own entity types, or define new profiles for their own internal data.</p><p>For example, a company may want to detect:</p><pre>employee IDs<br>customer IDs<br>ticket numbers<br>contract references<br>internal project codes</pre><p>Those identifiers may not be “standard PII”, but they can still be sensitive inside a business context.</p><p><strong>The same applies to how different values are handled.</strong></p><p>Not all sensitive data should be handled the same way.</p><ul><li>A person’s name might need to be pseudonymized so the model can continue referencing that person.</li><li>A credit card number should usually be masked.</li><li>A precise date of birth might be generalized.</li><li>A value that should never be exposed may need to be fully redacted.</li></ul><p><a href="https://github.com/neretj/llm-pii-firewall">PII Firewall</a> supports different actions depending on the type of data:</p><pre>John Doe → PERSON_1<br>john@example.com → EMAIL_1<br>4242 4242 4242 4242 → ************4242<br>17 March 1984 → 1980s<br>Highly sensitive value → [REDACTED]</pre><p>Privacy is not one-size-fits-all. The right behavior depends on the data type, the use case, and the risk profile.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RLrbSDaz7CkFXLO7iRDW6w.png" /></figure><h3>Stateful privacy</h3><p>One of the most important parts of PII Firewall is that it is stateful.</p><p>A stateless filter can remove data.</p><p>But it cannot easily remember that across a conversation:</p><pre>PERSON_1 = John Doe<br>EMAIL_1 = john@example.com<br>CASE_1 = Insurance Claim 8821</pre><p>PII Firewall keeps this mapping in a vault scoped to the right context.</p><p>That context can include things like organization, user, case or thread.</p><p>This makes it possible to track mappings safely and restore values only when appropriate.</p><p>It also makes compliance workflows easier.</p><p>For example, if a user invokes a right-to-forget request, the application can purge the mappings for that user, case, or session.</p><h3>Example</h3><p>Here is the basic idea in code:</p><pre>from privacy_firewall import PrivacyFirewallSDK<br><br>firewall = PrivacyFirewallSDK.create(<br>    domain=&quot;healthcare&quot;,<br>    detector_backend=&quot;hybrid&quot;,<br>)<br><br>context = {<br>    &quot;tenant_id&quot;: &quot;acme-corp&quot;,<br>    &quot;case_id&quot;: &quot;case-8821&quot;,<br>    &quot;thread_id&quot;: &quot;thread-001&quot;,<br>    &quot;actor_id&quot;: &quot;user-42&quot;,<br>}<br><br>user_prompt = &quot;&quot;&quot;<br>I need to move my appointment from Tuesday to Friday because I had surgery last month<br>and Im still on medical leave. My policy number is INS-48291.<br>&quot;&quot;&quot;<br><br>sanitized = firewall.anonymize_text(<br>    text=user_prompt,<br>    context=context,<br>)<br><br># Sanitized text:<br># I need to move my appointment from Tuesday to Friday because I had MEDICAL_EVENT_1 last month<br># and Im still on EMPLOYMENT_STATUS_1. My policy number is POLICY_ID_1.<br><br>response = my_llm(<br>    sanitized.sanitized_text,<br>)<br><br>final = firewall.rehydrate_text(<br>    text=response,<br>    context=context,<br>)</pre><p>As AI moves into production, privacy cannot remain an afterthought, especially as regulation becomes stricter.</p><p>The safest personal data to send to an LLM is the data it never receives.</p><blockquote><a href="https://github.com/neretj/llm-pii-firewall"><strong>PII Firewall</strong></a> is an open-source project. If you are building AI products in healthcare, finance, legal tech, customer support, internal automation, or enterprise SaaS, I would love feedback, issues, and contributions from people working on real-world systems.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fd847b521542" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>