<?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 Yingzuoliu on Medium]]></title>
        <description><![CDATA[Stories by Yingzuoliu on Medium]]></description>
        <link>https://medium.com/@yingzuoliu?source=rss-6e54ad669bcf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*RN5eUXiJg5oaO3vQ</url>
            <title>Stories by Yingzuoliu on Medium</title>
            <link>https://medium.com/@yingzuoliu?source=rss-6e54ad669bcf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 21:45:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yingzuoliu/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[From Recommenders to Agents: A New Interface for Product Discovery]]></title>
            <link>https://medium.com/@yingzuoliu/from-recommenders-to-agents-a-new-interface-for-product-discovery-5e2157430a3b?source=rss-6e54ad669bcf------2</link>
            <guid isPermaLink="false">https://medium.com/p/5e2157430a3b</guid>
            <dc:creator><![CDATA[Yingzuoliu]]></dc:creator>
            <pubDate>Thu, 05 Nov 2026 11:16:47 GMT</pubDate>
            <atom:updated>2026-11-05T11:16:47.013Z</atom:updated>
            <content:encoded><![CDATA[<p>What conversational AI changes – and what it doesn’t – in recommendation systems</p><p>Recommendation systems are good at ranking. They use behavior and context to decide which items are most likely to interest someone. But when a shopper has a specific, complicated need – “a lightweight camera for hiking, under $800, with good low-light performance” – a ranked list may not be enough. The shopper still has to translate that need into filters, browse results, and compare products.</p><p>AI agents are beginning to change that interaction. The key question is whether they will replace recommendation systems, or help people use them more effectively.</p><p>Three ways agents are entering recommendation</p><p>One approach is to use an agent as a conversational layer over existing recommendation models.</p><p>Microsoft’s InteRecAgent explores this pattern: an LLM interprets a user’s request and uses recommendation models as tools. The LLM handles interaction and planning; specialized models provide recommendation capabilities.</p><p>The CORE research project takes a related approach. It connects a conversational agent to an existing recommender, allowing the system to ask questions and refine recommendations during a session.</p><p>A second approach is visible in consumer products. Amazon’s Rufus is a shopping assistant that answers questions, compares products, and makes recommendations using product information and conversational context. This brings product discovery into a dialogue, rather than relying only on search boxes and filters.</p><p>A third approach applies agents to the business side of recommendations and discovery. Sony’s OKG research uses an LLM agent to generate and adapt sponsored-search keywords as advertising KPIs change. It is not a traditional recommender system, but it tackles a neighboring problem: matching products with customer intent, then adjusting that match based on results.</p><p>These examples are at different stages. Rufus is a consumer product; InteRecAgent, CORE, and OKG are research projects. They should not be treated as evidence that every agent-based approach has already proven its value at production scale.</p><p>The likely shift: from ranking to interaction</p><p>Recommendation systems and agents are suited to different parts of the job.</p><p>A recommender can retrieve and rank items efficiently across a large catalog. An agent can interpret an open-ended request, ask for missing details, explain trade-offs, and help a person revise their preferences.</p><p>That suggests a practical division of labor:</p><ul><li>The agent interprets the request and manages the conversation.</li><li>* The recommender retrieves and ranks relevant items.</li><li>* Business systems verify facts such as price, availability, and eligibility.</li></ul><p>The agent may change how users express what they want and how they refine results. That does not make the underlying recommendation models unnecessary.</p><p>What companies should measure</p><p>A fluent conversation is not proof of a better recommendation experience. A product team should test whether the agent helps users find more relevant items, reach a decision faster, or complete more purchases. It should also track the costs: latency, model usage, incorrect product claims, and whether users trust the recommendations.</p><p>A useful evaluation compares the agent experience with the existing one. Does it improve task completion or conversion for requests that are difficult to express through ordinary search? Does it help with new or changing preferences? Do those gains hold after accounting for operating cost?</p><p>A new layer, not a replacement</p><p>The strongest near-term case for agents in recommendation is not “let the LLM choose everything.” It is to give users a more flexible way to express intent, while keeping retrieval, ranking, and business rules grounded in systems designed for those jobs.</p><p>For recommendation teams, the opportunity is to make discovery more interactive without giving up the efficiency and measurable performance of established models. The test is simple: does the agent help people find and choose better – or does it only make the search experience more conversational?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5e2157430a3b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[When Code Becomes Cheap, Truth Becomes Expensive]]></title>
            <link>https://medium.com/@yingzuoliu/when-code-becomes-cheap-truth-becomes-expensive-34169d5213dd?source=rss-6e54ad669bcf------2</link>
            <guid isPermaLink="false">https://medium.com/p/34169d5213dd</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Yingzuoliu]]></dc:creator>
            <pubDate>Sun, 04 Oct 2026 10:57:40 GMT</pubDate>
            <atom:updated>2026-10-04T10:57:40.456Z</atom:updated>
            <content:encoded><![CDATA[<p>AI can generate software faster than teams can establish which state is authoritative.</p><p>AI can now write a patch faster than many teams can decide whether that patch is real.</p><p>Recently, I kept encountering the same class of problem in different forms: a generated file that could be mistaken for an accepted change, a repository state that could be mistaken for a deployed state, a failed repository integration that looked like a lack of access even though normal Git operations still worked, and a version-management design that risked becoming a second source of truth.</p><p>They all pointed to the same rule:</p><p>Never infer a higher state from evidence of a lower one.</p><p>This may become one of the more important rules of AI-era software engineering.</p><p>The cost of producing code is falling quickly. The cost of maintaining an authoritative chain of state is not.</p><p>⸻</p><p>Code Is No Longer Strong Evidence</p><p>Traditional software development already had multiple states between “someone wrote code” and “users are running it.”</p><p>AI makes those intermediate states much easier to create.</p><p>A coding agent can generate files, modify a worktree, create a branch, write tests, produce a commit, open a pull request, or prepare a release candidate within minutes. Multiple agents and humans can do this simultaneously.</p><p>At any given moment, a project may contain:</p><ul><li>agent scratch work;</li><li>* uncommitted local changes;</li><li>* temporary worktrees;</li><li>* candidate branches;</li><li>* reviewed pull requests;</li><li>* merged commits;</li><li>* release artifacts;</li><li>* deployed revisions;</li><li>* and production behavior that may or may not correspond exactly to any of them.</li></ul><p>The existence of code therefore tells us surprisingly little.</p><p>A file can exist without being accepted. A commit can exist without being released. A release can exist without being deployed. A deployment can succeed while the intended external effect never happens.</p><p>AI makes this especially dangerous because agents are good at filling gaps with plausible inference.</p><p>A model sees a file and concludes the feature exists. It sees the feature on main and concludes production supports it. It sees a successful API call and concludes the business operation succeeded.</p><p>Each inference sounds reasonable.</p><p>Each can be false.</p><p>⸻</p><p>The Software Truth Ladder</p><p>I find it useful to think about a change as moving through a sequence of increasingly strong claims:</p><p>Generated</p><p>. ↓</p><p>Persisted</p><p>. ↓</p><p>Committed</p><p>. ↓</p><p>Reviewed</p><p>. ↓</p><p>Accepted</p><p>. ↓</p><p>Canonical</p><p>. ↓</p><p>Released</p><p>. ↓</p><p>Deployed</p><p>. ↓</p><p>Observed</p><p>. ↓</p><p>Verified</p><p>This is not merely a delivery pipeline. It is a promotion path for truth claims.</p><p>Each level requires stronger evidence than the previous one.</p><p>Generated means an agent produced something.</p><p>Persisted means the change actually exists outside the transient reasoning context.</p><p>Committed gives it a durable Git identity.</p><p>Reviewed and accepted mean someone or something with authority approved it.</p><p>Canonical means the organization now treats it as the authoritative source.</p><p>Released means an immutable version was created.</p><p>Deployed means that version reached an environment.</p><p>Observed means we have runtime evidence.</p><p>Verified means the intended outcome was checked against reality.</p><p>The important principle is:</p><p>Evidence from one level should not automatically promote a claim to the next.</p><p>A commit does not prove deployment.</p><p>A deployment record does not prove the intended effect succeeded.</p><p>An agent saying “done” may not even prove that the intended file was written.</p><p>The faster code generation becomes, the more important these boundaries become.</p><p>⸻</p><p>CI Solves One Part of the Problem</p><p>One useful approach is to make CI the deterministic boundary.</p><p>Different contributors – human or AI – may produce different local states, but every submitted change has to pass the same checks.</p><p>Instead of trusting:</p><p>“This looks correct on my machine.”</p><p>the team can trust:</p><p>“This exact commit passed this exact set of checks.”</p><p>CI creates a deterministic acceptance boundary.</p><p>But it only answers one question:</p><p>Is this candidate change valid according to the rules we defined?</p><p>It does not tell us whether that candidate became canonical, whether it entered a release, whether the release reached production, or whether production behaved correctly.</p><p>CI is therefore a gate on the truth ladder, not the truth ladder itself.</p><p>The same applies to batching changes before production.</p><p>Batching multiple approved changes can look conservative in an age of fast AI-generated code. But the point is not to make deployment slow. The point is to preserve an explicit promotion boundary.</p><p>When generation happens at machine speed, teams may need clearer moments where they can say:</p><p>This is the exact set of changes we decided to ship.</p><p>⸻</p><p>We Can Accidentally Build a Second Source of Truth</p><p>A different version of the same problem appears in capability or skill management.</p><p>Imagine an internal system that distributes reusable capabilities to employees or agents.</p><p>The requirement sounds straightforward:</p><p>How do we ensure that every consumer uses the latest approved version?</p><p>An initial design might add more machinery: freshness tracking, a registry, synchronization logic, and a “latest” pointer.</p><p>None of that is inherently wrong.</p><p>But there is a more basic question to ask first:</p><p>Are we solving an AI problem, or are we reimplementing software release management?</p><p>If the capability is ultimately a versioned set of files, Git already gives us history, authorship, diffs, branches, tags, and rollback.</p><p>CI can validate it.</p><p>Review can establish organizational acceptance.</p><p>A release can identify the approved immutable version.</p><p>If a separate registry independently decides which version is “current,” we have created a new problem:</p><p>Git says version A is current.</p><p>The registry says version B is current.</p><p>Which one is authoritative?</p><p>A safer design is thinner:</p><p>Git repository</p><p>. ↓</p><p>review + CI</p><p>. ↓</p><p>approved release</p><p>. ↓</p><p>index / resolver</p><p>. ↓</p><p>consumer</p><p>Git owns history.</p><p>CI owns deterministic qualification.</p><p>The release mechanism defines the approved version.</p><p>The registry provides discovery and distribution.</p><p>The consumer uses the resolved result.</p><p>That distinction matters because AI systems often tempt us to add another memory layer, registry, agent, or reasoning loop whenever something needs to be “known.”</p><p>Sometimes the right architecture is simply a thin interface over an existing deterministic system.</p><p>⸻</p><p>Repository Access Is Not One Capability</p><p>Another common mistake is treating repository access as binary.</p><p>In one environment, a repository integration failed to return metadata, while normal Git transport operations still worked.</p><p>The environment could still perform operations such as:</p><p>git fetch</p><p>git pull</p><p>git push</p><p>The lesson was simple:</p><p>There is no single capability called “repository access.”</p><p>There are separate surfaces:</p><p>Repository metadata</p><ul><li>inspect repositories</li><li>- read pull requests</li><li>- query issues</li><li>- inspect permissions</li><li>Git transport</li><li>- clone</li><li>- fetch</li><li>- pull</li><li>- push</li><li>Local workspace</li><li>- read files</li><li>- modify files</li><li>- create commits</li><li>Delivery</li><li>- run CI</li><li>- create releases</li><li>- trigger deployment</li><li>Production</li><li>- observe runtime</li><li>- mutate runtime</li></ul><p>An agent can fail in one plane while retaining significant capability in another.</p><p>So this inference is unsafe:</p><p>“The metadata integration failed, therefore the agent cannot modify the repository.”</p><p>But the opposite inference is unsafe too:</p><p>“The metadata layer shows a merged change, therefore this workspace must already contain that state.”</p><p>Observability and capability are different.</p><p>In an agentic environment, something like this is much more meaningful than a single has_access flag:</p><p>can_read_repo_metadata</p><p>can_fetch_git_objects</p><p>can_modify_worktree</p><p>can_commit</p><p>can_push</p><p>can_merge</p><p>can_trigger_ci</p><p>can_release</p><p>can_deploy</p><p>can_observe_production</p><p>can_mutate_production</p><p>AI forces us to make these distinctions explicit because an agent may otherwise reason from what it can see to what it can do – or from what it can do to what must be true.</p><p>Neither implication is reliable.</p><p>⸻</p><p>The Same Problem Exists Inside the Application</p><p>This is not only a repository-governance problem.</p><p>The same ambiguity appears inside software when independently reasonable functions do not have explicit ownership constraints.</p><p>Imagine a support workflow with functions such as:</p><p>classify_request()</p><p>update_ticket()</p><p>send_notification()</p><p>Each function can be correct in isolation.</p><p>The harder questions are between them:</p><p>Who owns the ticket state?</p><p>Can an old event reopen a closed ticket?</p><p>Does sending a notification automatically change workflow status?</p><p>What happens if the external notification succeeds but the local state update fails?</p><p>What happens if two workers process contradictory events?</p><p>These are state-ownership questions.</p><p>Without explicit invariants, AI can generate locally correct code that produces globally contradictory software.</p><p>That is an important failure mode of AI-assisted development:</p><p>Locally correct code can still create globally incorrect state.</p><p>When implementation becomes cheaper, specifying constraints between implementations becomes more important.</p><p>⸻</p><p>The Ladder Is the Path. The Axes Are What We Check.</p><p>The truth ladder describes how a change moves from generated work toward verified production reality.</p><p>But at every step, I find it useful to check three independent dimensions.</p><p>Authority</p><p>Who or what has the right to declare this state?</p><p>scratch</p><p>→ candidate</p><p>→ accepted</p><p>→ canonical</p><p>→ released</p><p>→ deployed</p><p>Evidence</p><p>What proof supports the claim?</p><p>agent claim</p><p>→ file</p><p>→ commit</p><p>→ CI result</p><p>→ artifact</p><p>→ telemetry</p><p>→ readback</p><p>Capability</p><p>What can this actor actually do?</p><p>read</p><p>→ write</p><p>→ commit</p><p>→ push</p><p>→ merge</p><p>→ release</p><p>→ deploy</p><p>→ mutate production</p><p>The ladder is the promotion path.</p><p>The three axes tell us whether a promotion is justified.</p><p>This distinction explains many failures that otherwise look unrelated.</p><p>An agent may have evidence but no authority.</p><p>It may have authority to propose a change but no capability to deploy it.</p><p>It may be able to push code while being unable to inspect repository metadata.</p><p>It may observe production but have no permission to mutate it.</p><p>Treating authority, evidence, and capability as separate concerns makes the system easier to reason about.</p><p>⸻</p><p>Source of Truth Is Becoming an Execution Primitive</p><p>“Source of truth” can sound like documentation language.</p><p>In AI systems, it increasingly becomes part of execution semantics.</p><p>For every important state, a system should be able to answer:</p><p>Which component has the authority to declare this fact?</p><p>For example:</p><p>Code history. → Git</p><p>Accepted change. → canonical branch</p><p>Release identity. → immutable release artifact</p><p>Deployment state. → deployment system</p><p>Runtime health. → production telemetry</p><p>External side effect → readback from external system</p><p>Workflow status. → authoritative workflow store</p><p>Capability version. → approved release index</p><p>The dangerous case is when several systems independently claim ownership over the same state.</p><p>For example:</p><p>Agent memory says: ticket resolved</p><p>Database says: pending</p><p>Notification provider says: delivered</p><p>Workflow projection says: completed</p><p>Which one wins?</p><p>If the answer is “the agent decides,” the architecture already has a problem.</p><p>Canonical state should not depend on probabilistic interpretation when deterministic authority can be defined.</p><p>⸻</p><p>AI-Native Engineering May Need More Traditional Engineering, Not Less</p><p>There is a tendency to assume that AI-native software engineering requires replacing old engineering mechanisms with new agentic ones.</p><p>I increasingly think the opposite is true.</p><p>Many of the mechanisms we need already exist:</p><ul><li>Git;</li><li>* protected branches;</li><li>* CI;</li><li>* reproducible builds;</li><li>* immutable releases;</li><li>* artifact registries;</li><li>* deployment records;</li><li>* RBAC;</li><li>* state machines;</li><li>* idempotency;</li><li>* audit logs.</li></ul><p>The challenge is not replacing them with agent reasoning.</p><p>The challenge is connecting agents to them without weakening their deterministic guarantees.</p><p>A healthy architecture often looks more like this:</p><p>. Agent reasoning</p><p>. │</p><p>. proposes / interprets</p><p>. │</p><p>. ▼</p><p>. deterministic boundary</p><p>. ──────────────────────</p><p>. Git</p><p>. CI</p><p>. policy</p><p>. state machine</p><p>. release system</p><p>. permission system</p><p>. readback validator</p><p>. │</p><p>. ▼</p><p>. external world</p><p>Agents are useful precisely where ambiguity exists.</p><p>They should not become the place where canonical truth lives.</p><p>⸻</p><p>Governance Becomes the Scarce Resource</p><p>The first generation of AI coding tools focused on generating more software.</p><p>That problem is being solved surprisingly fast.</p><p>The next bottleneck may be deciding what all that generated software actually means.</p><p>The critical chain is becoming:</p><p>intention</p><p>→ candidate change</p><p>→ accepted change</p><p>→ canonical source</p><p>→ release</p><p>→ deployment</p><p>→ observed effect</p><p>→ verified outcome</p><p>AI can accelerate almost every step.</p><p>But accelerating the steps does not remove the boundaries between them.</p><p>If anything, it makes those boundaries more important.</p><p>The scarce resource in AI-era software engineering may no longer be the ability to produce code.</p><p>It may be the ability to maintain an authoritative chain of state from intention to production reality.</p><p>Because once code becomes cheap, knowing what is real becomes expensive.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=34169d5213dd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Used to Treat Long Context as an Application Problem. HySparse2 Changed My Mind.]]></title>
            <link>https://medium.com/@yingzuoliu/i-used-to-treat-long-context-as-an-application-problem-hysparse2-changed-my-mind-92a857b83d4e?source=rss-6e54ad669bcf------2</link>
            <guid isPermaLink="false">https://medium.com/p/92a857b83d4e</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[ai-infrastructure]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[transformers]]></category>
            <dc:creator><![CDATA[Yingzuoliu]]></dc:creator>
            <pubDate>Sun, 27 Sep 2026 04:00:19 GMT</pubDate>
            <atom:updated>2026-09-27T04:00:19.116Z</atom:updated>
            <content:encoded><![CDATA[<h3>Context optimization has two control surfaces: what enters the model, and what the model does with what remains.</h3><p>For most of my work on agent systems, I treated long context as an <strong>application-layer problem</strong>.</p><p>When an agent accumulated too much history, the obvious response was to compact the conversation, retrieve only relevant evidence, externalize authoritative workflow state, summarize tool outputs, checkpoint execution state, and avoid replaying raw history whenever possible.</p><p>The intuition was straightforward: if an agent has already processed 100,000 tokens, why should every future turn pay to read all 100,000 again?</p><p>I still think that is correct.</p><p>But reading Xiaomi’s recent <strong>HySparse2</strong> paper changed how I think about the problem. It made me realize that application-layer context management covers only half of the design space.</p><p>There is another question:</p><blockquote><em>After deciding what information should remain available to the model, why should the model process all of it with the same fidelity, at every layer, on every turn?</em></blockquote><p>That is a model-architecture problem.</p><p>Looking across HySparse2, YOCO, Native Sparse Attention, Kimi Linear, and DeepSeek-V4, I started to see a broader pattern: application systems are becoming selective about <strong>what enters context</strong>, while model architectures are becoming selective about <strong>how retained context is represented, retrieved, compressed, and reused</strong>.</p><p>The interesting problem is therefore no longer simply “RAG versus long context.”</p><p>It is deciding <strong>where each kind of context optimization belongs</strong>.</p><h3>Agent context has a different shape</h3><p>A normal chat interaction is relatively simple: a user sends a message and the model produces a response.</p><p>Agent workloads are structurally different.</p><p>A short instruction may produce a short reasoning step or tool call, followed by a very large observation. The model then makes another short decision, receives another large tool result, and repeats the cycle.</p><p>The actions are often small. The observations are often huge.</p><p>A database query may return thousands of tokens. A coding agent may inspect many files. A browser agent may accumulate entire pages. A research agent may collect evidence whose importance becomes clear only many steps later.</p><p>As that trajectory grows, three costs start to matter more and more:</p><ul><li>repeated long prefills;</li><li>growing KV-cache memory;</li><li>accurately recovering sparse evidence from distant turns.</li></ul><p>HySparse2 explicitly starts from this kind of workload. Its framing is important because it suggests a reversal in how we normally think about model infrastructure.</p><p>Traditionally, the direction was simple: <strong>Transformer architecture first, Agent workload second</strong>. The model existed, and application engineers learned how to build agents around it.</p><p>Now the pressure is beginning to flow the other way.</p><p>Long-running agents are creating workload patterns distinctive enough that model architectures are being redesigned around them.</p><p>But that does <strong>not</strong> mean every context problem belongs inside the model.</p><p>That distinction is the part I find most interesting.</p><h3>The first control surface: what should the model see?</h3><p>Consider a recruiting agent that has processed forty emails, several resumes, interview feedback, and a long sequence of workflow events.</p><p>Suppose the system already knows that the authoritative state is:</p><p><strong>Application A123 is currently in the hiring-manager interview stage, no offer exists, and interview feedback is still outstanding.</strong></p><p>There is little reason to ask a language model to reconstruct those facts from forty emails every time it acts.</p><p>This is where application-layer context management is clearly superior.</p><p>The system can keep authoritative workflow state in structured storage, retain the full history separately for audit and provenance, retrieve only relevant evidence, and send the model a compact working context.</p><p>This is the layer where RAG, structured memory, checkpointing, selective replay, conversation compaction, tool-result shaping, and external state stores make sense.</p><p>The main advantage is not only lower token cost. It is <strong>control</strong>.</p><p>Permissions, workflow stages, account balances, candidate identities, inventory counts, approval states, and transaction truth should not become fuzzy semantic memories merely because the model has a large context window.</p><p>When information has explicit business semantics, the application usually knows more about its meaning than the attention mechanism does.</p><p>My earlier instinct was therefore not wrong.</p><p>The mistake was assuming that once the application had reduced the context, the remaining model-side problem had disappeared.</p><h3>The second control surface: how should the model process what remains?</h3><p>Now consider a coding agent that has explored a repository for 150,000 tokens.</p><p>Near the beginning, it saw a configuration flag that looked irrelevant.</p><p>Much later, it encounters a failing test. Only then does the old configuration suddenly matter.</p><p>An application summarizer may already have removed it. A retrieval system may also miss it because the connection between the configuration and the failure was not obvious when either was indexed.</p><p>This is a fundamentally different kind of information:</p><blockquote><strong><em>Information whose future relevance cannot be safely predicted when it first appears.</em></strong></blockquote><p>In these cases, “compress harder” is not free.</p><p>Once information disappears from the working representation, the loss may be irreversible.</p><p>Model-level context optimization offers another strategy: <strong>keep more history available, but make retaining and revisiting it cheaper</strong>.</p><p>That is where sparse attention, KV sharing, recurrent state, and multi-resolution attention architectures become interesting.</p><h3>Sparse attention: keep the history, read less of it</h3><p>DeepSeek’s <strong>Native Sparse Attention (NSA)</strong> is a useful example.</p><p>NSA combines coarse compression, selective access to important distant details, and high-fidelity local attention. Rather than treating every historical token equally, the architecture distinguishes between broad global context, selectively retrieved long-range evidence, and recent local information.</p><p>The principle is simple:</p><blockquote><em>Not every historical token deserves the same attention cost.</em></blockquote><p>This is attractive because the original information can remain available. The model does not need the application to permanently discard it in advance.</p><p>But sparse attention creates its own failure mode.</p><p>If the selector fails to identify the important piece of evidence, the model still loses access to it.</p><p>Application-level retrieval has <strong>retrieval misses</strong>. Sparse attention has <strong>selection misses</strong>.</p><p>Moving relevance estimation into the model does not eliminate the problem. It changes where the problem lives.</p><h3>YOCO: maybe the problem is not what we read, but how often we store it</h3><p>YOCO attacks another source of redundancy.</p><p>A conventional Transformer maintains layer-specific KV state throughout the network. In effect, the same historical sequence is represented repeatedly at different depths.</p><p>YOCO asks a different question:</p><blockquote><em>Why should every layer independently materialize its own complete historical cache?</em></blockquote><p>Its self-decoder constructs the representation that later cross-decoder layers reuse. This reduces KV storage and allows parts of prefill computation to terminate earlier.</p><p>Conceptually, this is very different from sparse attention.</p><p>Sparse attention says: <strong>do not read every token</strong>.</p><p>YOCO says: <strong>do not repeatedly store equivalent historical state</strong>.</p><p>This distinction is useful because long-context cost is not a single thing. Some of it comes from attention computation, some from KV memory, and some from repeatedly propagating the same long sequence through deep layers.</p><p>HySparse2 combines several of these concerns.</p><h3>HySparse2: two levels of reuse</h3><p>HySparse2 builds directly around long-horizon agent workloads and combines sparse retrieval with cross-layer reuse.</p><p>Its first level of sharing happens between a <strong>self-decoder</strong> and a <strong>cross-decoder</strong>. Hidden states produced earlier in the network can be re-projected into the KV representations used later, allowing prefill to terminate before the full decoder stack has executed.</p><p>Its second level of sharing happens inside hybrid attention blocks. Sparse layers reuse both the KV state and the token-selection results associated with a preceding full-attention layer.</p><p>In other words, HySparse2 tries to remove two kinds of repeated work:</p><p><strong>reconstructing historical KV across large parts of the network, and repeatedly deciding which historical tokens matter.</strong></p><p>It also moves from block-level selection toward finer token-level selection.</p><p>That detail matters particularly for agent trajectories.</p><p>Agent histories contain tool boundaries, IDs, error messages, observations, role delimiters, and small pieces of evidence scattered across turns. Under a limited attention budget, selecting an entire chunk because one token matters wastes capacity on neighboring text that may be irrelevant.</p><p>A token-level selector can spend that budget more precisely.</p><p>What I found especially useful was not just the final architecture, but the way the authors evaluated these choices.</p><p>They did not simply compare “full HySparse2” against a baseline.</p><p>They separately asked whether finer selection helps under the same budget, whether recent local context still needs its own pathway, and whether KV bridging preserves enough quality to justify the efficiency gain.</p><p>That experimental decomposition is worth copying outside model architecture research.</p><h3>Local context and distant context are not the same thing</h3><p>One of HySparse2’s ablations makes a broader point.</p><p>Earlier designs used a dedicated sliding-window branch for recent tokens. HySparse2 explores whether that separate branch can be removed by simply forcing the most recent tokens into the sparse selection set.</p><p>Removing local information hurts.</p><p>But preserving recent information inside the shared sparse path can recover much of the benefit while avoiding the cost of a separate local cache.</p><p>The result is not universally better. Some benchmarks improve while others degrade.</p><p>That is exactly why the experiment is useful.</p><p>It suggests that <strong>recency is a structural prior</strong>, but it also shows that implementation choices introduce real quality-efficiency trade-offs.</p><p>Recent context and distant context should probably not be treated identically.</p><p>This pattern appears in several other architectures.</p><h3>DeepSeek-V4: different distances, different fidelity</h3><p>DeepSeek-V4 makes the multi-resolution idea particularly explicit.</p><p>Recent context receives high-fidelity local attention.</p><p>More distant context is moderately compressed and selectively retrieved.</p><p>Very distant context is compressed far more aggressively but remains available as a global representation.</p><p>The mechanisms differ from HySparse2, but the underlying principle is strikingly similar:</p><blockquote><strong><em>Different temporal regions of context deserve different representational fidelity.</em></strong></blockquote><p>What I found interesting is how closely this resembles good application-layer memory design.</p><p>At the application layer, we might separate recent conversation, retrieved evidence, structured persistent state, and archive.</p><p>At the model layer, architectures are increasingly separating local exact attention, selective long-range access, and compressed global memory.</p><p>These layers are not solving the same problem.</p><p>But both are moving away from the assumption that all historical information should be treated uniformly.</p><h3>Kimi Linear: what if we stop keeping token-level history altogether?</h3><p>Kimi Linear takes a more radical approach.</p><p>Instead of maintaining a growing KV representation for every historical token, much of the architecture continuously updates a finite recurrent state.</p><p>That changes the question from:</p><p><strong>Which old tokens should I retrieve?</strong></p><p>to:</p><p><strong>What information about the past should survive in the state at all?</strong></p><p>This can dramatically reduce memory growth, but it introduces a different kind of risk.</p><p>Sparse attention may fail because it did not select the right old token.</p><p>Recurrent or compressed memory may fail because the needed detail no longer exists explicitly anywhere.</p><p>This distinction matters.</p><p>Different architectures are not simply “better” or “worse” at long context. They are making different choices about <strong>where information loss is allowed to happen</strong>.</p><h3>Application memory and model memory are not the same thing</h3><p>This is where terminology can become misleading.</p><p>We often use the word “memory” for at least three different systems.</p><p>There is <strong>persistent application memory</strong>: user facts, workflow state, business records, permissions, and information that survives across sessions.</p><p>There is <strong>working context</strong>: the evidence assembled for the current decision.</p><p>And there is <strong>model inference memory</strong>: KV cache, recurrent state, compressed representations, or sparse-attention state.</p><p>HySparse2 primarily optimizes the third.</p><p>It cannot determine whether a candidate has already been rejected. It cannot identify which database is authoritative. It cannot decide whether a permission expired yesterday. It cannot provide provenance for a business-critical state transition.</p><p>Those remain application and runtime responsibilities.</p><p>That leads me to a useful boundary:</p><blockquote><strong><em>Model-level memory should reduce the cost of reasoning over uncertain information. It should not replace authoritative application state.</em></strong></blockquote><h3>So where should the context problem be solved?</h3><p>I now think the right first question is not “RAG or long context?”</p><p>It is:</p><blockquote><strong><em>What do we already know about the semantics of this information?</em></strong></blockquote><p>If something is known to be irrelevant, remove it before inference.</p><p>If it is authoritative state, keep it in a deterministic structured store.</p><p>If relevance can be safely determined using identity, workflow state, or business semantics, application-level retrieval is preferable.</p><p>If information may become important later and we cannot safely predict that relevance today, aggressive application compression becomes much riskier.</p><p>That is where model-level selective or compressed processing becomes more attractive.</p><p>A practical division might look like this:</p><p>InformationPreferred treatmentKnown irrelevant informationDrop before inferenceAuthoritative business stateStructured deterministic storeClearly scoped evidenceApplication retrievalRecent interactionPreserve at high fidelityHistory with uncertain future relevancePreserve, but process selectively or compactly inside the modelFull raw trajectory needed mainly for provenanceArchive outside the normal working context</p><p>The objective is therefore not to minimize context size at all costs.</p><p>It is to avoid paying high-fidelity inference cost for information that does not require high-fidelity treatment.</p><h3>How should we evaluate application-layer and model-layer optimization?</h3><p>This is the part I think matters most in practice.</p><p>A comparison such as “Model A with RAG versus Model B with full context” mixes too many variables.</p><p>If one side wins, we may not know whether the gain came from better architecture, stronger base-model capability, retrieval quality, or simply different information availability.</p><p>The two control surfaces should be evaluated separately.</p><p>First, keep the model fixed and vary only the application context strategy:</p><ul><li>full raw context;</li><li>summary;</li><li>retrieval;</li><li>structured state plus retrieval.</li></ul><p>Measure task success, evidence recall, irreversible information loss, latency, and cost.</p><p>That tells us how much value application-layer context management provides.</p><p>Then freeze the application context policy and compare model architectures: full attention, sparse attention, hybrid linear attention, or other long-context mechanisms.</p><p>Now the question becomes cleaner:</p><blockquote><em>Given access to the same information, how much efficiency can the architecture recover without losing capability?</em></blockquote><p>Only after those two experiments should the layers be combined.</p><p>This is especially important because the most useful metric is not <strong>cost per million tokens</strong>.</p><p>It is closer to:</p><blockquote><strong><em>cost per successful agent outcome.</em></strong></blockquote><p>An architecture that halves inference cost but reduces task success from 90% to 70% may be a terrible optimization.</p><h3>Agent workloads also need better long-context evaluation</h3><p>Ordinary long-document benchmarks do not fully represent agent context.</p><p>Agent context has repeated structure: a short decision, a large tool observation, another short decision, another large observation.</p><p>The relevant evidence may also appear in very different patterns.</p><p>Sometimes the answer depends almost entirely on the most recent turn.</p><p>Sometimes one precise fact from 100,000 tokens ago matters.</p><p>Sometimes the model must combine several small observations spread across many turns.</p><p>A meaningful long-context evaluation should therefore measure more than “can the model retrieve a needle?”</p><p>I would want to know:</p><ul><li>How does accuracy change as evidence moves farther away?</li><li>Can the model combine evidence distributed across multiple turns?</li><li>What happens after several large tool observations?</li><li>How often does compression or sparse selection permanently lose relevant evidence?</li><li>What happens to TTFT, decode latency, KV memory, throughput, and concurrency?</li><li>Most importantly, what happens to end-to-end task success?</li></ul><p>This is also why HySparse2’s ablations are useful.</p><p>Some efficiency changes improve long-context retrieval but hurt other reasoning metrics. Others preserve broad quality while reducing compute.</p><p>There is no universally superior architecture.</p><p>There is only an acceptable <strong>quality–latency–memory–retrieval trade-off for a specific workload</strong>.</p><h3>A broader shift: workloads are beginning to shape model architecture</h3><p>The larger change may be the direction of causality.</p><p>For years, application engineers received a largely fixed model abstraction: tokens go in, a Transformer runs, tokens come out.</p><p>We optimized around it.</p><p>We built RAG, memory systems, summarization, tool-result filtering, checkpoints, and structured state because the model architecture was effectively fixed.</p><p>Now model designers are increasingly responding to the workloads created by those applications.</p><p>Long-horizon agents create repeated prefill.</p><p>Tool use creates long observations.</p><p>Persistent sessions create large inference state.</p><p>Multi-turn trajectories scatter useful evidence across distant positions.</p><p>Different architectures respond to different parts of that workload.</p><p>YOCO asks whether the same historical representation should be materialized at every layer.</p><p>NSA asks whether every historical token deserves equal attention.</p><p>Kimi Linear asks whether token-level history must remain explicitly cached at all.</p><p>DeepSeek-V4 assigns different fidelity to different temporal regions.</p><p>HySparse2 combines fine-grained selection, state reuse, and early-exit prefill around long-horizon agent workloads.</p><p>The mechanisms are different.</p><p>But they share one increasingly important assumption:</p><blockquote><strong><em>Context is not homogeneous.</em></strong></blockquote><h3>What changed my mind</h3><p>I still think application-layer context management should come first for most Agent builders.</p><p>If I can deterministically discard irrelevant information, I should.</p><p>If something is authoritative state, I should externalize it.</p><p>If retrieval can be scoped safely using identity or workflow semantics, I should not ask a million-token model to rediscover that structure from raw history.</p><p>And if I am consuming an API model, model architecture is largely outside my control anyway.</p><p>But I no longer think application-layer compression is the whole solution.</p><p>There is a class of information whose future value is genuinely hard to predict.</p><p>Deleting it early saves compute by accepting irreversible uncertainty.</p><p>Model-level architectures offer a different bargain:</p><blockquote><strong><em>Keep more information available, but make retaining and revisiting it cheaper.</em></strong></blockquote><p>That gives context optimization two distinct control surfaces.</p><p>The <strong>application layer</strong> decides what information should be available to the model.</p><p>The <strong>model layer</strong> decides how efficiently that remaining information should be represented and processed.</p><p>Neither replaces the other.</p><p>The more interesting design problem is how they interact.</p><p>And that changes the goal.</p><p>The best context may not be the smallest context.</p><blockquote><strong><em>It is the cheapest representation that preserves the information whose future relevance we cannot safely predict.</em></strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=92a857b83d4e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Agent Harnesses Are Becoming Commodities. The Business Logic Is Not.]]></title>
            <link>https://medium.com/@yingzuoliu/agent-harnesses-are-becoming-commodities-the-business-logic-is-not-16d564dad056?source=rss-6e54ad669bcf------2</link>
            <guid isPermaLink="false">https://medium.com/p/16d564dad056</guid>
            <category><![CDATA[ai-infrastructure]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[enterprise-ai]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai-agent]]></category>
            <dc:creator><![CDATA[Yingzuoliu]]></dc:creator>
            <pubDate>Sat, 26 Sep 2026 01:14:20 GMT</pubDate>
            <atom:updated>2026-09-26T01:18:04.938Z</atom:updated>
            <content:encoded><![CDATA[<p><em>What changes when an agent moves from research, to back-office automation, to customer service, HR, and real-world actions.</em></p><p>A lot of the current discussion around agent infrastructure starts with the same question:</p><p><strong>Which harness should I use?</strong></p><p>LangGraph, Temporal, OpenAI’s agent stack, an open-source runtime, or something built in-house?</p><p>That is a reasonable engineering question, but I increasingly think it is the wrong first question.</p><p>If I were working as a forward-deployed engineer, I would start somewhere else:</p><blockquote><strong><em>What kind of business process is this agent entering, and what happens when it is wrong?</em></strong></blockquote><p>Because a research agent, a recruitment workflow, a customer-service agent, and an agent that changes inventory are not just different applications built on top of the same runtime.</p><p>They have fundamentally different failure semantics.</p><p>And that changes what I am willing to outsource to a generic harness.</p><h3>The harness layer is becoming less interesting</h3><p>Most agent systems eventually need some version of the same infrastructure:</p><ul><li>sessions</li><li>state persistence</li><li>tool execution</li><li>retries</li><li>timeouts</li><li>checkpoints</li><li>pause and resume</li><li>sub-agent coordination</li><li>tracing</li><li>human interrupts</li><li>sandboxing</li></ul><p>A few years ago, building a serious agent often meant implementing a large portion of this yourself.</p><p>That is changing quickly.</p><p>More frameworks and platforms are turning these capabilities into reusable infrastructure. Open-source projects increasingly provide durable execution, state machines, tracing and recovery. Managed platforms are starting to package long-running sessions, tool orchestration and multi-agent execution as services.</p><p>This is good.</p><p>I do not think most companies should differentiate themselves by implementing their own checkpoint storage or retry scheduler.</p><p>If somebody else can solve those problems reliably, use it.</p><p>The interesting question becomes:</p><blockquote><strong><em>Where should the generic harness stop?</em></strong></blockquote><p>That boundary depends heavily on the business.</p><h3>Case 1: Research agents</h3><p>Imagine an internal agent producing a weekly competitor report.</p><p>It searches the web, reads internal material, synthesizes findings and writes a document.</p><p>The failure modes are relatively forgiving.</p><p>If one source fails, it can retry.<br>If a session dies, it can resume.<br>If the output is imperfect, a human can review it before it affects anything.</p><p>For this kind of workload, I would happily delegate a lot to a generic harness.</p><p>Let it handle:</p><ul><li>context management</li><li>sub-agents</li><li>search tools</li><li>retries</li><li>long-running jobs</li><li>tracing</li><li>state persistence</li></ul><p>The company-specific layer may be relatively thin.</p><p>The harder problems are things such as:</p><ul><li>Which sources are trustworthy?</li><li>What counts as sufficient evidence?</li><li>What output format does the business expect?</li><li>How do we evaluate factual quality?</li></ul><p>That is already a useful distinction.</p><p>The harness handles <strong>execution</strong>.</p><p>The company defines <strong>quality</strong>.</p><h3>Case 2: Back-office automation</h3><p>Now move from research into operations.</p><p>Suppose an agent:</p><ul><li>updates CRM records,</li><li>schedules interviews,</li><li>sends candidate emails,</li><li>processes invoices,</li><li>or updates internal inventory records.</li></ul><p>The architecture may look similar.</p><p>The failure semantics are not.</p><p>Consider a simple email workflow.</p><p>The agent sends an email. The network times out before the application receives confirmation.</p><p>A generic runtime may see:</p><blockquote><em>request failed → retry</em></blockquote><p>But what if the email was actually sent?</p><p>The retry sends the same message again.</p><p>Now the problem is no longer simply “reliable execution.”</p><p>It is <strong>business-state correctness</strong>.</p><p>The system needs to know:</p><blockquote><em>Did the side effect happen?</em></blockquote><p>That introduces concepts such as:</p><ul><li>idempotency</li><li>authoritative state</li><li>readback</li><li>reconciliation</li><li>recovery rules</li></ul><p>These are not just infrastructure concerns.</p><p>They depend on what the action actually means.</p><p>A generic harness can retry a function.</p><p>It cannot automatically know whether repeating that function is safe.</p><p>That distinction becomes increasingly important as agents move closer to real operations.</p><h3>Durable execution is not the same as safe execution</h3><p>Imagine a customer refund flow:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/1*NCtpf3_Z_T56DuU3sSsE1A.png" /></figure><p>From the runtime’s perspective, the retry mechanism behaved correctly.</p><p>From the business’s perspective, the system failed.</p><p>This is why I think agent infrastructure discussions sometimes over-focus on durability.</p><p>Durability matters.</p><p>But:</p><blockquote><strong><em>Durable execution is not the same as safe execution.</em></strong></blockquote><p>Once an agent can create external side effects, the runtime needs to understand — or at least expose hooks for — the semantics of those actions.</p><p>Was the operation committed?</p><p>Can it safely be repeated?</p><p>How do we verify its final state?</p><p>What should happen after partial success?</p><p>Who has authority to approve the action?</p><p>Those questions cannot be completely solved by a generic framework.</p><h3>Case 3: Customer service</h3><p>Customer service makes this boundary even clearer.</p><p>Suppose a customer sends a complaint.</p><p>The agent may need to decide whether the message is:</p><ul><li>a normal FAQ,</li><li>a refund request,</li><li>a machine issue,</li><li>a franchise inquiry,</li><li>an angry customer requiring escalation,</li><li>or a food-safety incident.</li></ul><p>The harness can record that:</p><blockquote><em>classification tool called<br>knowledge retrieval completed<br>response generated</em></blockquote><p>But that is not the real business problem.</p><p>The real questions are:</p><ul><li>Should the agent answer this case at all?</li><li>When must it hand off to a human?</li><li>What policy applies?</li><li>Is a compensation voucher allowed?</li><li>Does Finance need to approve a refund?</li><li>If Operations is asked to fix something, who checks that it was actually fixed?</li></ul><p>These are business rules.</p><p>And they determine whether the workflow is safe.</p><p>A generic harness can tell me that the agent called the refund tool.</p><p>It cannot tell me whether this customer should have been refunded in the first place.</p><p>That requires:</p><blockquote><em>policy + classification + escalation + verification + closure</em></blockquote><p>For customer-facing agents, this may matter more than the underlying orchestration framework.</p><h3>Case 4: HR and recruitment</h3><p>Recruitment introduces another dimension: sensitive data and consequential decisions.</p><p>Consider a recruitment workflow:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oyGf11MKRVlqkS9NqBoZNA.png" /></figure><p>At first glance, this looks like another long-running workflow.</p><p>But now the system handles:</p><ul><li>resumes</li><li>candidate identity</li><li>interview notes</li><li>assessments</li><li>compensation information</li><li>hiring decisions</li></ul><p>The questions change again.</p><p>Where is session state stored?</p><p>What appears in traces?</p><p>Does a trace accidentally contain a candidate’s CV?</p><p>How long is it retained?</p><p>Which employees can see it?</p><p>Can the runtime be deployed inside the customer’s environment?</p><p>And, more importantly:</p><blockquote><em>Which decisions should the agent be allowed to make?</em></blockquote><p>An agent might summarize an interview.</p><p>It might score against a rubric.</p><p>It might recommend the next step.</p><p>But rejection, offer creation or management approval may still require an explicit human gate.</p><p>For this type of workload, open-source or self-hosted infrastructure may become more attractive — not because open source is inherently superior, but because deployment boundaries become part of the product requirement.</p><h3>Case 5: Agents that change the real world</h3><p>The closer an agent gets to changing real systems, the less sufficient a generic harness becomes.</p><p>Consider agents that:</p><ul><li>change product prices,</li><li>update stock levels,</li><li>submit payments,</li><li>issue refunds,</li><li>alter advertising budgets,</li><li>modify production infrastructure.</li></ul><p>Now even a technically correct action can be dangerous.</p><p>The system needs to answer:</p><blockquote><em>Was this action allowed?<br>Was it performed on the correct object?<br>Did it happen once or twice?<br>Did the external system actually accept the change?<br>Did the resulting state match policy?</em></blockquote><p>This is where I think many production agent architectures eventually need a layer beyond ordinary tracing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/1*9XFcEv2QPj_HvlUuKj-NxA.png" /></figure><p>A tool returning HTTP 200 is not evidence that the business task succeeded.</p><p>If an agent updates Shopify inventory, the real completion criterion may be:</p><blockquote><em>Read the product back from Shopify and confirm that the expected SKU now has the expected quantity.</em></blockquote><p>That is a business-aware verification rule.</p><p>It belongs closer to the application than to the generic harness.</p><h3>So what should an FDE actually evaluate?</h3><p>If I were choosing an agent harness for a customer, I would not begin with a framework feature matrix.</p><p>I would start with five questions.</p><h3>1. Is the agent reading or writing?</h3><p>A research assistant and an autonomous refund agent should not share the same risk model.</p><h3>2. What is the cost of failure?</h3><p>A mediocre competitor summary may waste ten minutes.</p><p>A duplicated payment may create a financial incident.</p><h3>3. Where is the data allowed to live?</h3><p>Some workloads can use managed state and tracing.</p><p>Others may require private infrastructure, aggressive redaction or self-hosting.</p><h3>4. How long does the workflow live?</h3><p>A ten-second search request and a recruitment workflow lasting three weeks have very different persistence and recovery requirements.</p><h3>5. How do we know the task actually succeeded?</h3><p>This may be the most important question.</p><p>If the team cannot define a concrete success condition, a sophisticated harness will not save the application.</p><p>It may simply execute an ambiguous workflow more reliably.</p><h3>The architecture I increasingly prefer</h3><p>I would separate the stack roughly like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xxlgqLWt1KABi2_eo3NBHQ.png" /></figure><p>The exact boundaries will vary.</p><p>But I like this separation because it prevents two opposite mistakes.</p><p>The first mistake is rebuilding infrastructure that has already become commodity software.</p><p>The second is assuming that a generic agent platform understands the customer’s operating model.</p><p>It does not.</p><h3>What actually becomes proprietary?</h3><p>This leads to the part I find most interesting.</p><p>If session management, tracing, retries and tool loops continue becoming standardized, then much of the defensible value in enterprise agents may move upward.</p><p>Toward things such as:</p><ul><li>decision policies</li><li>business-specific skills</li><li>workflow rules</li><li>evaluation datasets</li><li>escalation policies</li><li>recovery semantics</li><li>verification logic</li><li>organizational memory</li><li>business outcome definitions</li></ul><p>In other words:</p><blockquote><strong><em>The harness may become commodity infrastructure. The operating knowledge does not.</em></strong></blockquote><p>Two companies can run the same model on the same harness and still have dramatically different agent quality.</p><p>One may know:</p><blockquote><em>exactly when a customer complaint requires escalation.</em></blockquote><p>Another may not.</p><p>One may know:</p><blockquote><em>what evidence is sufficient before changing inventory.</em></blockquote><p>Another may simply trust the model.</p><p>One may have hundreds of real failure cases encoded as regression tests.</p><p>Another may have a polished prompt.</p><p>That difference is much harder to commoditize.</p><h3>Memory follows the same pattern</h3><p>I think agent memory has a similar issue.</p><p>The generic infrastructure problem is:</p><blockquote><em>How do we store and retrieve information?</em></blockquote><p>The harder business problem is:</p><blockquote><em>What deserves to become memory?</em></blockquote><p>A production system probably should not convert every conversation into permanent knowledge.</p><p>Some things are temporary state.</p><p>Some things are decisions.</p><p>Some things are verified lessons.</p><p>Some are sensitive data that should never enter shared memory.</p><p>A useful memory system therefore needs more than vector search.</p><p>It needs judgment about what should survive.</p><p>For example:</p><blockquote><em>A temporary tool error probably belongs in logs.</em></blockquote><p>But:</p><blockquote><em>“When this particular external system times out after committing an action, always perform a readback before retrying”</em></blockquote><p>may be a reusable operational lesson.</p><p>The first is history.</p><p>The second is organizational knowledge.</p><p>Again, the generic harness can provide storage primitives.</p><p>The business determines meaning.</p><h3>The role of the Forward-Deployed Engineer</h3><p>This is why I think the FDE role becomes particularly important in agent systems.</p><p>The job is not simply to connect a model to customer APIs.</p><p>And it is not to design the most elegant universal agent platform.</p><p>It is to find the boundary between:</p><blockquote><strong><em>what should be standardized</em></strong></blockquote><p>and:</p><blockquote><strong><em>what must remain specific to how this customer actually operates.</em></strong></blockquote><p>That requires understanding both the software and the business workflow.</p><p>You need to know when to say:</p><blockquote><em>“We should use existing infrastructure for this.”</em></blockquote><p>And when to say:</p><blockquote><em>“No, this rule is core to the customer’s operating model and needs to remain explicit.”</em></blockquote><p>That boundary will be different for research, recruitment, customer service, finance and operational automation.</p><p>Which is why I increasingly think:</p><blockquote><strong><em>There is no universally best agent harness. There is only a harness that leaves the right things customizable for the business you are trying to automate.</em></strong></blockquote><h3>Build less infrastructure. Encode more reality.</h3><p>The agent ecosystem will continue producing better runtimes.</p><p>That is a good thing.</p><p>Session persistence will improve.</p><p>Tracing will improve.</p><p>Tool execution will improve.</p><p>Recovery will improve.</p><p>Multi-agent orchestration will improve.</p><p>I would happily reuse all of it.</p><p>But I would not confuse better execution infrastructure with a solved agent application.</p><p>The difficult part begins when an agent enters a real organization.</p><p>When it touches customer policy.</p><p>When it handles sensitive information.</p><p>When a retry can duplicate an action.</p><p>When a technically successful tool call creates the wrong business result.</p><p>When nobody knows whether the workflow is actually complete.</p><p>That is where generic infrastructure stops being enough.</p><p>So if I were building an enterprise agent today, my instinct would be:</p><blockquote><strong><em>Use commodity infrastructure for commodity problems.</em></strong></blockquote><p>Then spend engineering effort on:</p><blockquote><strong><em>decision policy, evaluation, recovery, verification, and business closure.</em></strong></blockquote><p>Because the harness will keep getting cheaper.</p><p>The business logic will not.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=16d564dad056" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why I Stopped Trying to MCP-Everything]]></title>
            <link>https://medium.com/@yingzuoliu/why-i-stopped-trying-to-mcp-everything-893f26ff1b71?source=rss-6e54ad669bcf------2</link>
            <guid isPermaLink="false">https://medium.com/p/893f26ff1b71</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[ai-infrastructure]]></category>
            <category><![CDATA[model-context-protocol]]></category>
            <dc:creator><![CDATA[Yingzuoliu]]></dc:creator>
            <pubDate>Sat, 26 Sep 2026 01:03:03 GMT</pubDate>
            <atom:updated>2026-09-26T01:03:03.276Z</atom:updated>
            <content:encoded><![CDATA[<p>I used to think standardizing agent infrastructure meant standardizing how agents access tools.</p><p>After using MCP in real enterprise workflows, I’m no longer convinced.</p><p>MCP is useful. But I think we sometimes ask it to solve a bigger problem than the protocol was designed to solve.</p><p>In one recent workflow, we needed an agent to retrieve operational data from an existing enterprise system.</p><p>There wasn’t a useful API available to us, so the practical integration choice came down to two paths: <strong>MCP or the system’s existing CLI.</strong></p><p>MCP looked attractive because it gave the agent a standardized tool interface and seemed like the cleaner long-term architecture.</p><p>But once we tried to use it for the actual workflow, some of the data and operations we needed simply weren’t exposed through the MCP surface.</p><p>The CLI could retrieve them.</p><p>So we used the CLI.</p><p>That sounds like a small implementation detail, but it changed the way I think about agent infrastructure.</p><h3>MCP is a protocol, not an execution guarantee</h3><p>MCP gives agents a common way to discover and invoke capabilities.</p><p>That becomes valuable when many agents need to interact with many systems.</p><p>But putting something behind MCP does not automatically make it:</p><ul><li>more reliable</li><li>easier to debug</li><li>better authorized</li><li>more observable</li><li>capable of everything the underlying system can do</li></ul><p>In practice, the MCP surface can be narrower than the system underneath it.</p><p>The CLI may support filtering, pagination, raw queries or metadata that the MCP server never exposed.</p><p>Authorization can also behave differently: credentials that work in a local execution path do not automatically imply that the MCP server has the same identity, scopes or tenant context.</p><p>And errors acquire another translation boundary. A useful underlying error can become a generic tool failure unless the server preserves its semantics properly.</p><p>Those are not necessarily flaws in MCP.</p><p>They are costs introduced by another abstraction boundary.</p><p>For a narrow workflow, a deterministic wrapper around an already proven CLI or API can therefore be the better engineering choice.</p><h3>The question is not “CLI or MCP?”</h3><p>I increasingly think that framing is wrong.</p><p>The better question is:</p><p><strong>Has this capability earned the right to become a shared protocol surface?</strong></p><p>My current preference is:</p><p>business need<br>→ working capability<br>→ stable inputs and outputs<br>→ known failure modes<br>→ validation<br>→ repeated reuse<br>→ standardize when useful</p><p>Not:</p><p>MCP<br>→ now figure out how to force every workflow through it</p><p>A capability proven through a CLI or API can often be exposed through MCP later.</p><p>That migration is not free. Authentication models, streaming behavior, error semantics and permissions may need to be redesigned.</p><p>But that is very different from requiring MCP before we even know whether the underlying capability works reliably.</p><h3>This also changed how I think about governance</h3><p>At first, it was tempting to associate a common tool protocol with centralized agent governance.</p><p>I now think those are separate concerns.</p><p><strong>Governance should be centralized. Execution does not have to be.</strong></p><p>A common governance layer might require every consequential agent action to carry:</p><ul><li>identity and authorization</li><li>a run or correlation ID</li><li>action intent</li><li>approval evidence where required</li><li>execution result</li><li>latency and failure information</li><li>readback</li><li>outcome validation</li><li>audit history</li></ul><p>But the last mile can remain heterogeneous.</p><p>One customer may execute through MCP.</p><p>Another may already have a well-governed API gateway.</p><p>Another may have an internal CLI that exposes capabilities the MCP integration does not.</p><p>Another may need direct access to a legacy system behind a deterministic adapter.</p><p>The governance contract can remain consistent without pretending that every customer has the same infrastructure.</p><p>This matters especially in enterprise deployments.</p><p>Different environments have different identity systems, security boundaries, legacy applications, data-access constraints and operational practices.</p><p>Forcing all of them through the same transport can turn standardization into an integration bottleneck.</p><p>The thing worth centralizing is not necessarily <strong>how every tool is called</strong>.</p><p>It is <strong>what must be true before, during and after an agent takes action.</strong></p><h3>Where MCP becomes much more compelling</h3><p>Suppose multiple agents repeatedly need the same capabilities:</p><p>get_customer()<br>get_application()<br>search_documents()<br>create_ticket()</p><p>Now the economics change.</p><p>Maintaining separate integrations for every agent makes less sense. A shared protocol surface starts creating real value: reuse, discoverability, portability and a common contract.</p><p>That leads me toward a hybrid model:</p><p><strong>centralized governance + federated execution + selective standardization.</strong></p><p>Some capabilities may stay CLI-backed.</p><p>Some may use direct APIs.</p><p>Some may be exposed through MCP.</p><p>Ideally, the agent depends on a stable capability contract rather than caring about the transport underneath it.</p><p>My main takeaway after actually using MCP is therefore not that MCP is good or bad.</p><p>It is this:</p><p><strong>Standardize proven capabilities, not assumptions.</strong></p><p>And perhaps more importantly:</p><p><strong>A protocol can standardize access. Governance has to standardize trust.</strong></p><p>I’m curious how others are drawing this boundary in production: what have you found worth exposing through MCP, and what have you deliberately kept behind APIs, CLIs or other execution paths?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=893f26ff1b71" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[30,000 Agents Changed How I Think About Agent Infrastructure]]></title>
            <link>https://medium.com/@yingzuoliu/30-000-agents-changed-how-i-think-about-agent-infrastructure-af92ddc8820f?source=rss-6e54ad669bcf------2</link>
            <guid isPermaLink="false">https://medium.com/p/af92ddc8820f</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[anthropics]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Yingzuoliu]]></dc:creator>
            <pubDate>Sat, 19 Sep 2026 13:45:18 GMT</pubDate>
            <atom:updated>2026-09-19T13:45:18.476Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>The hard part is no longer spawning agents. It is deciding what must remain stable when agents, models, tools, and customers keep changing.</strong></p><p>When I first saw the number <strong>30,000 agents</strong>, I assumed the interesting question would be scale.</p><p>How much compute does that require? How many containers are running? How are model calls batched? How do you create that many agents without overwhelming the system?</p><p>But after reading several recent Anthropic engineering and research posts together, I came away with a different question:</p><blockquote><em>What has to remain stable when almost everything inside an agent system is allowed to change?</em></blockquote><p>As of August 2026, Anthropic reported approximately 30,000 research and engineering agents working at any one time on its most-used internal platform.</p><p>That does not mean 30,000 separate models or 30,000 dedicated GPUs.</p><p>An agent is better understood as a logical execution: a task, identity, history, model interaction loop, permissions, tools, and state — running on shared infrastructure.</p><p>Once I looked at the system this way, the number itself became less surprising.</p><p>The harder problem was no longer creating another agent process. It was operating thousands of stateful, non-deterministic executions without losing control of identity, history, authority, versions, or outcomes.</p><p>That changed how I think about agent infrastructure.</p><h3>Spawning Is the Easy Part</h3><p>To spawn an agent is simply to create another execution with its own task and context.</p><p>A lead agent can decompose a problem, start several subagents, and ask each one to investigate a different direction. Those subagents may work in parallel and return their findings to the lead agent.</p><p>No model weights are copied. They can share the same underlying model-serving infrastructure while maintaining separate contexts, tasks, and tool states.</p><p>Anthropic’s research system uses this orchestrator–worker pattern. A lead researcher creates specialized subagents that explore different aspects of a question simultaneously.</p><p>For broad research tasks, this can be powerful. Anthropic reported a 90.2% improvement over a single-agent configuration on one internal research evaluation, while parallel tool use reduced research time by as much as 90% for complex queries.</p><p>But the same report contains an important warning.</p><p>Multi-agent systems used roughly 15 times as many tokens as ordinary chat interactions in Anthropic’s data, and they were not equally useful for every kind of work.</p><p>Tasks with tightly coupled dependencies or a need for shared context may gain little from parallel agents. Anthropic also described its lead agents as synchronously waiting for each batch of subagents, because fully asynchronous coordination introduces harder problems in state consistency, result coordination, and error propagation.</p><p>This leads to a distinction that is easy to miss:</p><blockquote><em>Spawning creates concurrency. It does not create coordination.</em></blockquote><p>The ability to start five agents is a runtime feature.</p><p>Deciding what each agent owns, which result is authoritative, how failures propagate, and whether the extra token spend is justified is a systems-design problem.</p><h3>The More Important Abstraction: Session, Harness, and Sandbox</h3><p>Anthropic’s Managed Agents architecture made the deeper problem much clearer to me.</p><p>The system separates three components:</p><p><strong>Session</strong></p><p>The append-only record of what happened.</p><p><strong>Harness</strong></p><p>The loop that calls the model and routes its tool calls.</p><p><strong>Sandbox</strong></p><p>The execution environment in which code runs and files change.</p><p>Anthropic initially placed these components together in one container.</p><p>That made local interaction simple, but it also turned the container into a fragile, stateful “pet.” If it failed, the session could be lost. If it became unresponsive, engineers had to recover that particular container.</p><p>Connecting the agent to resources in a customer environment also became difficult because the harness assumed the execution environment lived beside it.</p><p>The redesign separated the “brain” from the “hands” and from the durable history.</p><p>The harness could fail and restart from the session log. A sandbox could die and be reprovisioned. Tools and credentials could sit behind constrained interfaces rather than being exposed inside an environment executing model-generated code.</p><p>A session could continue even when the model or harness implementation changed.</p><p>This is a familiar move in systems engineering: replace a tightly coupled implementation with stable interfaces.</p><p>Anthropic explicitly compares the idea to operating systems. Applications survived generations of hardware because interfaces such as processes and files remained stable while the implementation underneath them changed.</p><p>Managed Agents applies the same principle to agent components.</p><p>The practical result is not only resilience. Decoupling also lets the system provision sandboxes only when they are needed. Anthropic reported that this reduced median time to first token by roughly 60% and p95 by more than 90% in its architecture.</p><p>The lesson I took from this was simple:</p><blockquote><em>A production agent should not be identical to the container, model, or harness currently running it.</em></blockquote><p>If agent identity disappears when the model changes, if history disappears when a worker crashes, or if authority lives inside an ephemeral prompt, then the system has not yet found its stable abstractions.</p><h3>Thirty Thousand Agents Require More Than an Agent Loop</h3><p>At small scale, we tend to describe an agent as a loop:</p><ol><li>Observe.</li><li>Reason.</li><li>Call a tool.</li><li>Read the result.</li><li>Repeat.</li></ol><p>That description is useful, but incomplete.</p><p>At large scale, the platform also has to answer:</p><ul><li>Which agent took this action?</li><li>Which tenant, user, and policy authorized it?</li><li>Which model, harness, prompt, and skill versions were active?</li><li>Which session and run produced the decision?</li><li>What source or artifact did the agent rely on?</li><li>Can another agent treat the result as evidence rather than as its own memory?</li><li>Can the execution resume after a crash without repeating a consequential action?</li><li>Which monitor reviewed the action, and when?</li><li>What happened in the real world after the action was taken?</li></ul><p>Anthropic’s internal platform gives agents persistent individual identities and ties the data they create to those identities.</p><p>It also uses a shared, open messaging system in which messages are attributable, may link to original material, and are cross-referenced with agent transcripts.</p><p>This allows other agents to inspect and challenge claims, and it allows monitoring to follow activity across a communication graph.</p><p>One point is worth stating carefully:</p><blockquote><em>Anthropic’s public description does not establish that this internal messaging system uses Google’s Agent2Agent protocol, or A2A.</em></blockquote><p>“Open communication” describes the visibility and provenance of communication inside the system. It does not identify the underlying wire protocol.</p><p>That distinction matters.</p><p>A team may need an internal message or task contract long before it needs an interoperability standard. The requirement should come first:</p><ul><li>Do agents need to delegate work?</li><li>Do they exchange structured results or artifact references?</li><li>Must they coordinate asynchronously?</li><li>Do they communicate across organizational boundaries?</li></ul><p>Only after those questions have real answers does it make sense to decide whether a simple internal event contract is sufficient or an external standard such as A2A is justified.</p><h3>The Missing Layer I Now Think of as an Agent Control Plane</h3><p>“Agent control plane” is my own framing, not Anthropic’s product terminology.</p><p>Reading these systems together led me to think about agent infrastructure in three layers.</p><h3>The Agent Control Plane</h3><p><strong>Core question: Who is this agent, and what is it allowed to do?</strong></p><p>Its responsibilities include:</p><ul><li>identity;</li><li>tenant boundaries;</li><li>policies;</li><li>permissions;</li><li>version management;</li><li>release decisions;</li><li>monitoring;</li><li>audit;</li><li>rollback.</li></ul><h3>The Agent Execution Plane</h3><p><strong>Core question: What is this agent doing now, and can it recover?</strong></p><p>Its responsibilities include:</p><ul><li>sessions;</li><li>harnesses;</li><li>sandboxes;</li><li>tools;</li><li>checkpoints;</li><li>artifacts;</li><li>retries;</li><li>recovery.</li></ul><h3>The Inference Plane</h3><p><strong>Core question: When and how does the model compute?</strong></p><p>Its responsibilities include:</p><ul><li>model serving;</li><li>request routing;</li><li>queues;</li><li>batching;</li><li>caching;</li><li>scheduling;</li><li>streaming.</li></ul><p>These are not perfectly isolated infrastructure boxes. They are a way to separate different kinds of responsibility.</p><p>The inference plane optimizes model computation.</p><p>The execution plane turns model calls into a durable workflow.</p><p>The control plane governs who and what may run, which version is active, and whether the result can be trusted and audited.</p><p>This model also helped me place my earlier work more precisely.</p><p>I had been studying the boundary between model inference and agent execution: how requests enter a serving system, how streamed output returns, how tool proposals become actions, and where deterministic controls should sit.</p><p>My core question was not merely how to produce tokens faster. It was:</p><blockquote><em>How does a probabilistic model cross a controlled boundary into a system that changes real state?</em></blockquote><p>The pattern I kept returning to was:</p><blockquote><em>The model proposes. A deterministic system validates. An exact action is bound. An executor acts. The resulting state is reconciled and recorded.</em></blockquote><p>Anthropic’s recent work made me see the layer above that boundary.</p><p>Once the boundary is used by thousands of long-running agent executions, controlled inference is necessary but no longer sufficient.</p><p>The platform also needs durable sessions, replaceable harnesses, scoped tools, persistent identities, monitored communication, versioned releases, and recoverable execution.</p><p>The problem expands from <strong>controlled inference</strong> to <strong>controlled agent infrastructure</strong>.</p><h3>What Should Stay Deterministic?</h3><p>The presence of an intelligent agent does not mean every part of the system should become agentic.</p><p>Models are useful where the path cannot be fully specified in advance: decomposing ambiguous goals, selecting among tools, interpreting incomplete evidence, adapting a plan, and deciding which line of inquiry to pursue next.</p><p>But several boundaries should remain deterministic:</p><ul><li>authentication and authorization;</li><li>tenant and resource isolation;</li><li>schema and argument validation;</li><li>idempotency for consequential actions;</li><li>approval requirements and spending limits;</li><li>invariant and policy checks;</li><li>version promotion and rollback rules;</li><li>audit-log creation;</li><li>retry limits and checkpoint semantics;</li><li>verification that the intended state change actually occurred.</li></ul><p>This is not a limitation on the agent’s intelligence.</p><p>It is what makes that intelligence deployable.</p><p>The more capable a model becomes, the less we should encode temporary assumptions about its weaknesses into a permanent harness.</p><p>But stronger models do not eliminate the need for authority boundaries, durable state, or evidence.</p><p>Intelligence may change how a task is solved. It should not silently change who is allowed to act or what counts as a committed transaction.</p><h3>Stable Contracts Matter More Than Stable Implementations</h3><p>Models will change.</p><p>Harness strategies will change.</p><p>Context-management techniques will change.</p><p>Tool sets and customer systems will change.</p><p>Trying to freeze those implementations would be a mistake. The more useful goal is to define a small set of contracts that can survive their replacement.</p><p>For me, those contracts increasingly look like this.</p><h3>Identity Contract</h3><p>Which tenant, user, agent, and run does an action belong to?</p><h3>Session Contract</h3><p>What is the durable, replayable history, independent of the current context window?</p><h3>Tool Contract</h3><p>What capability is exposed, with which input schema, permissions, side effects, and failure semantics?</p><h3>Artifact and Communication Contract</h3><p>How does one agent refer to another agent’s result without copying, distorting, or silently trusting it?</p><h3>Version Contract</h3><p>Which model, harness, policy, prompt, skill, and connector versions produced this behavior?</p><h3>Release Contract</h3><p>How does a tested change become active, and how can it be rejected or rolled back?</p><h3>Outcome Contract</h3><p>How do we know the agent’s action created the intended business or operational result?</p><p>The last one is especially important.</p><p>A perfectly traced agent can still be useless.</p><p>Infrastructure should not stop at recording what the model said and which tools it called. It must eventually connect execution to outcomes:</p><p>Was the issue resolved?</p><p>Did the state actually change?</p><p>Was human intervention required?</p><p>What did the action cost?</p><p>Did a later failure reveal a regression?</p><p>Without that readback, an agent platform can measure activity while remaining blind to value.</p><h3>What This Means for Enterprise Agent Platforms</h3><p>The implications become sharper when agents are deployed across customers.</p><p>Imagine one platform serving multiple organizations.</p><p>Each customer has different data sources, tools, policies, access rules, and risk tolerances.</p><p>Some workflows are read-only. Others can send messages, modify records, approve refunds, or place orders.</p><p>A model upgrade may improve one workflow and regress another. A shared skill may be useful across customers, while authorization and business semantics remain tenant-specific.</p><p>At that point, manually crafting and maintaining each agent as a self-contained application will not scale.</p><p>But the answer is not to start by building a “30,000-agent platform.”</p><p>That would be copying the scale before earning the problem.</p><p>A better path is to begin with one end-to-end workflow:</p><ol><li>Start from a real user or business signal.</li><li>Separate approved knowledge from live operational data.</li><li>Give the agent only the tools and permissions required for that workflow.</li><li>Keep consequential actions behind deterministic validation or human approval.</li><li>Evaluate the result against a concrete outcome.</li><li>Version the change, release it deliberately, and retain a rollback path.</li><li>Read production evidence back into the next evaluation.</li></ol><p>This vertical slice reveals which platform contracts are actually needed.</p><p>Identity may become necessary because two agents act on the same case.</p><p>Durable sessions may become necessary because work lasts longer than one context window.</p><p>Artifact references may become necessary because one agent produces evidence another must verify.</p><p>A communication protocol may become necessary because coordination crosses product or organizational boundaries.</p><p>The architecture should grow from repeated operational pressure — not from the availability of another protocol.</p><h3>Five Principles I Am Taking Forward</h3><p>After reading Anthropic’s work, I would summarize my current view in five principles.</p><h3>1. Count Governed Executions, Not Agent Personas</h3><p>The meaningful unit is not a named chatbot.</p><p>It is an attributable execution with identity, state, authority, version, and outcome.</p><h3>2. Keep the Session Durable and the Harness Replaceable</h3><p>History should survive crashes and implementation changes.</p><p>A context window is a working set, not the system of record.</p><h3>3. Treat Communication as Auditable Evidence</h3><p>Agent messages should carry provenance and references.</p><p>Other agents should be able to inspect a claim without confusing it with their own reasoning.</p><h3>4. Use Multiple Agents Only When the Task Structure Justifies Them</h3><p>Parallelism is valuable for independent, breadth-first work.</p><p>It is expensive and sometimes counterproductive for tightly coupled tasks.</p><p>More agents are not automatically a better system.</p><h3>5. Separate Reasoning from Commitment</h3><p>Let the model explore, interpret, and propose.</p><p>Keep authorization, validation, side-effect commitment, and outcome verification explicit and deterministic.</p><h3>The Question Has Changed</h3><p>I used to think about agent infrastructure primarily from the bottom of the stack: model serving, inference protocols, queues, streaming, tool calls, and the boundary between probabilistic output and deterministic execution.</p><p>I still think that boundary is fundamental.</p><p>But 30,000 concurrent agents make the next problem impossible to ignore.</p><p>Once agent executions become numerous, long-running, and interconnected, the system needs more than a fast inference endpoint and a clever loop.</p><p>It needs stable abstractions for identity, history, authority, communication, versioning, recovery, monitoring, and outcomes.</p><p>The most interesting part of Anthropic’s architecture is therefore not that it can spawn many agents.</p><p>It is that models, harnesses, sandboxes, and tools can change while the system preserves the things that must not disappear.</p><p>That is the design question I now carry into agent work:</p><blockquote><em>When everything intelligent is changing, what must the infrastructure keep stable?</em></blockquote><h3>References</h3><p>Anthropic, <a href="https://www.anthropic.com/institute/measuring-pace-of-ai-development">“Measurements for understanding the pace of AI development inside frontier labs”</a>, September 2026.</p><p>Anthropic, <a href="https://www.anthropic.com/engineering/managed-agents">“Scaling Managed Agents: Decoupling the brain from the hands”</a>, April 2026.</p><p>Anthropic, <a href="https://www.anthropic.com/engineering/multi-agent-research-system">“How we built our multi-agent research system”</a>, June 2025.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af92ddc8820f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Multi-Agent Risk Systems：真正难的不是“多 Agent”，而是如何形成可信决策]]></title>
            <link>https://medium.com/@yingzuoliu/multi-agent-risk-systems-%E7%9C%9F%E6%AD%A3%E9%9A%BE%E7%9A%84%E4%B8%8D%E6%98%AF-%E5%A4%9A-agent-%E8%80%8C%E6%98%AF%E5%A6%82%E4%BD%95%E5%BD%A2%E6%88%90%E5%8F%AF%E4%BF%A1%E5%86%B3%E7%AD%96-67339e2161e3?source=rss-6e54ad669bcf------2</link>
            <guid isPermaLink="false">https://medium.com/p/67339e2161e3</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[multi-agent-systems]]></category>
            <dc:creator><![CDATA[Yingzuoliu]]></dc:creator>
            <pubDate>Sat, 19 Sep 2026 02:31:27 GMT</pubDate>
            <atom:updated>2026-09-19T02:31:27.671Z</atom:updated>
            <content:encoded><![CDATA[<p>最近在看 multi-agent risk assessment / intervention 这类系统时，我越来越觉得，真正值得研究的问题并不是“怎样让多个 agent 协作”，而是：</p><blockquote><strong><em>当多个 agent 各自拥有不完整、可能冲突、甚至受隐私约束的信息时，系统如何形成一个可校准的判断，并可靠地把判断转化为 action？</em></strong></blockquote><p>一个比较自然的系统骨架可能是：</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xy6VnLc3XcNJsmMNBwDqQg.png" /></figure><p>这里我觉得至少有四个问题比“agent communication protocol”本身更重要。</p><p>第一是 <strong>evidence aggregation</strong>。如果三个 agent 分别给出 0.82、0.31、0.76 的 risk score，简单平均通常没有意义。系统真正需要考虑的是 evidence quality、freshness、source reliability、confidence，以及每个 agent 到底看到了什么。</p><p>第二是 <strong>disagreement handling</strong>。多个 agent 的价值不应该只是多数投票。真正有意思的是：当 agent 冲突时，系统是请求更多证据、cross-check、调用 independent verifier，还是直接升级给人？</p><p>第三是 <strong>decision-to-action boundary</strong>。Detection 不等于 intervention。一个更完整的 decision policy 可能同时考虑：</p><p>risk × confidence × consequence × reversibility × intervention cost → action</p><p>高风险但低置信度，和高风险且高置信度，应该触发不同动作。</p><p>第四是 <strong>information boundary</strong>。如果不同 agent 不能共享原始数据，那么 multi-agent 就不再只是“多个 LLM 一起推理”，而变成：</p><blockquote><strong><em>distributed decision-making under information constraints</em></strong></blockquote><p>agent 之间传递的可能只是 sanitized features、risk signal、summary 或 confidence，而不是 raw data。</p><h3>我更关心的 Eval</h3><p>如果要证明 multi-agent 真的有价值，baseline 至少应该包括：</p><p>Single LLM<br>vs Single LLM + deterministic scorer<br>vs Multi-agent<br>vs Multi-agent + verifier<br>vs Multi-agent + verifier + escalation</p><p>然后比较的不只是 accuracy。</p><p>还应该看：</p><p><strong>Detection quality</strong><br> precision / recall / false positive / false negative</p><p><strong>Calibration</strong><br> confidence 是否真的对应正确率，而不是模型“听起来很确定”</p><p><strong>Disagreement resolution</strong><br> 发生冲突后，补充证据或 verifier 是否真的提高最终判断</p><p><strong>Intervention quality</strong><br> 系统是否选择了正确的 intervention，而不仅仅是“风险识别正确”</p><p><strong>Escalation quality</strong><br> 什么时候交给人，是否过早或过晚</p><p><strong>Latency / Cost</strong><br> multi-agent 带来的额外推理成本是否换来了实际提升</p><p><strong>Robustness</strong><br> 某个 agent 出错、延迟、缺数据甚至提供错误 evidence 时，整体系统是否仍然可靠</p><p><strong>Privacy / information leakage</strong><br> 为了协作，agent 究竟必须共享多少信息</p><p><strong>Outcome</strong><br> intervention 之后，实际风险是否下降 — — 这是最容易被忽略但最重要的一层。</p><p>这里还有一个我觉得很重要的分界：</p><p>LLM / agent 比较适合做：</p><ul><li>理解非结构化 evidence</li><li>提出 hypothesis</li><li>补充 context</li><li>解释 disagreement</li><li>请求更多信息</li></ul><p>而一些关键部分最好尽可能 deterministic：</p><ul><li>权限边界</li><li>risk threshold</li><li>escalation rule</li><li>intervention allowlist</li><li>audit log</li><li>evaluation calculation</li></ul><p>因为如果连“什么时候可以执行”“什么时候必须升级”“成功到底怎么算”都交给同一个 LLM 自己解释，系统最后很难真正被验证。</p><p>所以我现在判断一个 multi-agent 系统是否有研究含量，会先问：</p><blockquote><strong><em>它是不是因为信息、权限和决策本身是分布式的，所以不得不 multi-agent？</em></strong></blockquote><p>还是仅仅：</p><p>Agent A proposes → Agent B critiques → Agent C judges</p><p>如果所有 agent 看的是同一份 context，没有真实的信息边界、冲突处理、权限差异，也没有 outcome evaluation，那么它可能只是 orchestration。</p><p>但如果问题本身是：</p><blockquote><strong><em>distributed evidence → coordination → calibrated decision → controlled intervention → verified outcome</em></strong></blockquote><p>那 multi-agent 才真正成为问题结构的一部分，而不只是一个架构选择。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=67339e2161e3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Can a Home Automation Config Actually Tell You?]]></title>
            <link>https://medium.com/@yingzuoliu/what-can-a-home-automation-config-actually-tell-you-90d987dca1df?source=rss-6e54ad669bcf------2</link>
            <guid isPermaLink="false">https://medium.com/p/90d987dca1df</guid>
            <dc:creator><![CDATA[Yingzuoliu]]></dc:creator>
            <pubDate>Sun, 30 Aug 2026 09:57:18 GMT</pubDate>
            <atom:updated>2026-08-30T10:03:40.718Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qcGWy1UiakmSXWKEhj0uKA.png" /></figure><blockquote>Cover: Home Assistant Core Architecture by Paulus Schoutsen, CC BY-SA 4.0, via Wikimedia Commons. Cropped for format.</blockquote><p>I started looking at a fairly concrete question:</p><p>If a new Home Assistant automation is added to an existing home, how much can we determine about its interactions with the rules that are already there — using configuration alone?</p><p>At first, this sounds like a graph problem.</p><p>Two automations control the same device.<br>One turns something on, another turns it off.<br>One writes a helper that another rule listens to.</p><p>Those relationships are easy to extract, and they look like a natural basis for static preflight.</p><p>The problem is that real automation failures do not always live at that level.</p><h3>Some interactions really are visible in configuration</h3><p>There is a useful subset that configuration describes quite well.</p><p>For example:</p><ul><li>two rules write opposite literal values to the same input_boolean;</li><li>one rule updates an internal helper and another triggers directly from that state;</li><li>a delayed action can later overwrite a value set by another rule;</li><li>two command paths operate on the same target during an overlapping policy window.</li></ul><p>These are not necessarily bugs.</p><p>An automation that switches something on in the morning and another that switches it off at night also contains opposite commands. That is normal shared control, not contention.</p><p>But once timing, guards and paths are explicit enough, some narrower interaction properties really can be established statically.</p><p>That part worked better than I expected.</p><h3>The harder cases are missing a different kind of information</h3><p>The interesting boundary appeared when I looked at actual Home Assistant incidents.</p><p>Consider a feedback loop involving a light and a camera:</p><p>light turns off<br>→ camera image changes<br>→ motion detection fires<br>→ another automation turns the light on</p><p>The automation configuration may contain both light commands.</p><p>What it does not contain is the causal edge:</p><p>light change → camera image change → motion event</p><p>That relationship belongs partly to the device, the integration and the physical environment.</p><p>The same pattern appears elsewhere.</p><p>An MQTT automation may fire twice because of overlapping broker subscriptions.</p><p>A scene may restore an older state after another rule has changed the device.</p><p>A service call may request switch.turn_on, but whether an integration subsequently reports the entity as on is a separate semantic step.</p><p>A pair of rules may appear to create a delayed overwrite, while a third automation elsewhere in the home cancels the timer that would have caused it.</p><p>In each case, the YAML still contains useful information.</p><p>It just does not contain the whole causal mechanism.</p><h3>We tried measuring that boundary instead of assuming it</h3><p>I looked at six public Home Assistant configurations containing 651 automations.</p><p>Breaking those automations into smaller semantic constructs — triggers, conditions, actions, targets, timing modifiers and execution modes — produced 5,239 constructs.</p><p>Most of those individual pieces were straightforward to interpret under a deliberately conservative semantic subset.</p><p>But that did not mean the full automation was equally easy to reason about.</p><p>A single dynamic template, device-specific action, external service or integration-dependent transition could make a whole-rule behavioral conclusion uncertain.</p><p>That initially looked discouraging.</p><p>Then a more useful pattern emerged.</p><p>Even when the complete automation was uncertain, narrower facts often remained available:</p><ul><li>what entity it directly targets;</li><li>what command it requests;</li><li>what literal trigger or condition it uses;</li><li>what ordering or delay is configured.</li></ul><p>So the useful question was no longer:</p><p>“Can I understand this entire automation?”</p><p>It became:</p><p>“Do I have all the semantics required for this particular property?”</p><p>That is a much narrower standard.</p><p>And a much more practical one.</p><h3>Pair analysis helped — but also exposed another limit</h3><p>From those configurations, I generated 628 naturally occurring structural automation pairs and audited a deterministic sample of 60.</p><p>Generic shared-target pairs were not very informative.</p><p>More explicit relationships — literal opposite assignments and direct internal writer-to-trigger chains — were substantially easier to reason about.</p><p>But another distinction became necessary:</p><p>co-reachability is not contention.</p><p>Two rules can both be executable and still belong to clearly separated phases of normal operation.</p><p>And even a pair that looks problematic in isolation may behave differently once the rest of the home’s automations are considered.</p><p>So the levels started to separate:</p><p>structural relationship<br>→ command feasibility<br>→ contention<br>→ full-home interaction<br>→ physical outcome</p><p>Configuration gives us different amounts of information at each level.</p><h3>The result I find most useful is not “static analysis works” or “static analysis fails”</h3><p>It is this:</p><p>A Home Assistant configuration can contain enough information to establish some narrow interaction properties.</p><p>But some real interaction mechanisms depend on causal information that the automation configuration does not contain.</p><p>That sounds obvious when stated abstractly.</p><p>What was less obvious to me was where the boundary actually showed up in real configurations:</p><ul><li>internal helper state: often quite explicit;</li><li>literal commands and delays: often usable;</li><li>dynamic templates: much less so;</li><li>integration-reported state transitions: require more than command syntax;</li><li>MQTT subscription behavior: outside the automation rule itself;</li><li>physical feedback: outside the configuration model;</li><li>complete-home behavior: sometimes not recoverable from pairwise analysis.</li></ul><p>So I would no longer treat “automation interaction analysis” as one problem.</p><p>There are several different problems hiding behind that phrase, and they require different evidence.</p><h3>This also changes how I think about preflight checks</h3><p>A static preflight tool can still be useful.</p><p>But its output should probably look more like evidence:</p><p>“these rules definitely share this target”</p><p>“these commands are opposite”</p><p>“these time windows cannot overlap”</p><p>“this helper write can trigger this rule”</p><p>“this conclusion depends on integration state propagation”</p><p>rather than a single global statement about whether the home has a conflict.</p><p>The distinction is important because the hard cases are not always hard because the analyzer is insufficiently sophisticated.</p><p>Sometimes the relevant fact simply is not present in the artifact being analyzed.</p><p>And adding more inference does not automatically turn missing evidence into known behavior.</p><p>For me, that is the main takeaway from this research:</p><p>Configuration is a useful model of control intent.</p><p>It is not, by itself, a complete model of what the system will do.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90d987dca1df" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[模拟广告市场中的三层优化与用户长期兴趣建模 — — 技术与业务结合的探索]]></title>
            <link>https://medium.com/@yingzuoliu/%E6%A8%A1%E6%8B%9F%E5%B9%BF%E5%91%8A%E5%B8%82%E5%9C%BA%E4%B8%AD%E7%9A%84%E4%B8%89%E5%B1%82%E4%BC%98%E5%8C%96%E4%B8%8E%E7%94%A8%E6%88%B7%E9%95%BF%E6%9C%9F%E5%85%B4%E8%B6%A3%E5%BB%BA%E6%A8%A1-%E6%8A%80%E6%9C%AF%E4%B8%8E%E4%B8%9A%E5%8A%A1%E7%BB%93%E5%90%88%E7%9A%84%E6%8E%A2%E7%B4%A2-7bae616acd52?source=rss-6e54ad669bcf------2</link>
            <guid isPermaLink="false">https://medium.com/p/7bae616acd52</guid>
            <dc:creator><![CDATA[Yingzuoliu]]></dc:creator>
            <pubDate>Wed, 01 Oct 2025 12:21:08 GMT</pubDate>
            <atom:updated>2025-10-01T12:21:08.155Z</atom:updated>
            <content:encoded><![CDATA[<h3>模拟广告市场中的三层优化与用户长期兴趣建模 — — 技术与业务结合的探索</h3><h3>背景</h3><p>在广告推荐系统中，我们既要考虑<strong>短期点击率（CTR）</strong>，也要平衡<strong>中期转化率（CVR）和长期收益（Revenue，eCPM/ROI）</strong>。<br> 这天然是一个 <strong>多时间尺度优化问题</strong>：</p><ul><li><strong>短期层（即时CTR）</strong>：提高广告曝光后的点击概率，确保广告主流量可见。</li><li><strong>中期层（转化CVR）</strong>：将点击行为转化为实际购买行为，提升广告主投放效果。</li><li><strong>长期层（Revenue）</strong>：在预算和竞争下优化广告主投资回报率，保证平台收益。</li></ul><p>传统方法往往只在单一维度（如CTR预估）上优化，忽略了广告主预算约束、用户长期兴趣建模和多轮拍卖动态。<br> 因此，我尝试构建一个 <strong>小型广告市场模拟器</strong>，并结合<strong>三层优化 + 用户长期兴趣建模</strong>来探索这个问题。</p><h3>方法设计</h3><h3>1. 小型广告市场模拟器</h3><p>我构建了一个 multi-round 的广告市场：</p><ul><li><strong>用户画像</strong>：每个用户有一个真实兴趣向量（latent embedding），会随时间漂移（preference drift）。</li><li><strong>广告候选集</strong>：每个广告也有 embedding，用于与用户兴趣匹配。</li><li><strong>点击与转化</strong>：用 sigmoid 打分函数模拟点击概率，用另一个层次的函数模拟转化概率。</li><li><strong>市场博弈</strong>：每一轮用户曝光、点击、转化，都会反馈到系统中，用于下一轮更新。</li></ul><p>这样我们在模拟器里能看到 <strong>点击-转化-收益</strong> 的完整闭环。</p><h3>2. 三层优化（多时间尺度 reward）</h3><p>我将优化目标分成三层：</p><ol><li><strong>CTR优化（短期层）</strong></li></ol><ul><li>直接优化点击概率，提高广告的即时吸引力。</li></ul><p><strong>2. CVR优化（中期层）</strong></p><ul><li>在点击的条件下进一步优化购买行为，模拟真实 GMV 提升。</li></ul><p><strong>3. Revenue优化（长期层）</strong></p><ul><li>在预算和竞争条件下，最大化广告主的长期收益（eCPM）。</li></ul><p>在模拟器里，我们让代理模型同时输出三个 reward，并通过加权求和进行更新：</p><pre>reward = alpha * CTR + beta * CVR + gamma * Revenue</pre><p>这对应着工业界常见的 <strong>multi-objective learning / 多任务学习</strong> 思路。</p><h3>3. 用户长期兴趣建模</h3><p>为了捕捉用户行为的动态性，我设计了一个 <strong>用户兴趣embedding随时间漂移</strong>的机制：</p><ul><li>每次点击都会让用户 embedding 向点击广告靠拢</li><li>未点击则会加速遗忘</li><li>长期兴趣建模通过一个 RNN-like 滑动窗口记录用户历史</li></ul><p>代码片段：</p><pre>user_pref = (1 - drift_lr) * user_pref + drift_lr * ad_vec</pre><p>这样，用户兴趣 embedding 就能体现出 <strong>长期 + 短期的平衡</strong>。</p><h3>4. Online Fine-tuning (Warm Start)</h3><p>考虑到工程限制（RTX 4050 + 300GB 内存，单机），我采用了 <strong>Warm Start 微调</strong> 而不是全量重训：</p><ul><li>先训练一个基础模型（CTR预估 + CVR预估）</li><li>在模拟市场中，每隔 100 轮更新一次模型参数（增量训练）</li><li>避免频繁全量 retrain，降低显存压力</li></ul><h3>实验与效果</h3><p>我在 500 轮模拟中观测到以下结果（部分日志）：</p><pre>Round 100, clicks=1, conversions=0, revenue=0.00<br>Round 200, clicks=3, conversions=0, revenue=0.00<br>Round 300, clicks=8, conversions=0, revenue=0.00<br>Round 400, clicks=13, conversions=1, revenue=47.95<br>Round 500, clicks=20, conversions=2, revenue=95.91</pre><p><strong>发现：</strong></p><ul><li>仅优化 CTR 时，前期点击数上升，但没有转化 → Revenue=0。</li><li>引入 CVR 优化后，转化数逐渐上升（Round 400 以后），Revenue 增长明显。</li><li>加入 Online Fine-tuning 后，点击与转化的累计增长更快，说明 <strong>Warm Start 增量更新</strong>有效避免了冷启动问题。</li></ul><h3>工程取舍与限制</h3><h3>假设</h3><ul><li>用户偏好漂移是线性的（现实中可能更复杂）。</li><li>广告池有限（工业界广告数百万）。</li><li>转化概率直接由 embedding 相似度决定，简化了真实 funnel。</li></ul><h3>工程取舍</h3><ul><li><strong>显存限制</strong>：选择 Warm Start 微调而不是全量 retrain。</li><li><strong>稳定性</strong>：降低学习率，减少 Online Update 引起的模型震荡。</li><li><strong>速度 vs 精度</strong>：简化点击转化函数，保证能在本地 GPU 上快速迭代。</li></ul><h3>改进方向</h3><ul><li>使用 <strong>多任务深度模型</strong>（MMoE、PLE）替代简单加权。</li><li>加入 <strong>预算与竞价机制</strong>（second price auction）模拟真实广告市场。</li><li>将用户兴趣建模改进为 <strong>Transformer-based 序列建模</strong>，更好地捕捉长短期交互。</li></ul><h3>业务价值</h3><p>为什么这套模拟和优化思路对业务重要？</p><ol><li><strong>广告主 ROI 提升</strong></li></ol><ul><li>不仅追求点击，还保证购买和长期收益，帮助广告主更愿意加大投放。</li></ul><p><strong>2. 平台收益稳定</strong></p><ul><li>在预算和竞争强度下动态调节，使广告市场更健康。</li></ul><p><strong>3. 用户体验改善</strong></p><ul><li>长短期兴趣建模避免“广告疲劳”，推送的广告更符合用户真实兴趣。</li></ul><p>用一句话总结：<br> 👉 <strong>这套方法展示了如何通过模拟与三层优化，把用户兴趣建模和广告收益目标结合起来，为广告平台带来可持续的价值。</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7bae616acd52" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[多模态AI的可解释性与安全性：从黑盒到透明的技术之路]]></title>
            <link>https://medium.com/@yingzuoliu/%E5%A4%9A%E6%A8%A1%E6%80%81ai%E7%9A%84%E5%8F%AF%E8%A7%A3%E9%87%8A%E6%80%A7%E4%B8%8E%E5%AE%89%E5%85%A8%E6%80%A7-%E4%BB%8E%E9%BB%91%E7%9B%92%E5%88%B0%E9%80%8F%E6%98%8E%E7%9A%84%E6%8A%80%E6%9C%AF%E4%B9%8B%E8%B7%AF-2eb46a75a16a?source=rss-6e54ad669bcf------2</link>
            <guid isPermaLink="false">https://medium.com/p/2eb46a75a16a</guid>
            <dc:creator><![CDATA[Yingzuoliu]]></dc:creator>
            <pubDate>Thu, 11 Sep 2025 06:05:05 GMT</pubDate>
            <atom:updated>2025-09-11T06:05:05.272Z</atom:updated>
            <content:encoded><![CDATA[<p><em>如何让AI既聪明又值得信任？一文读懂多模态AI的核心挑战与解决方案</em></p><h3>什么是多模态AI？</h3><p>想象一个聪明的机器人，它不仅能看图片、听声音，还能读文字，并且能把这些信息结合起来理解。比如看到一张猫的照片，听到”喵”的声音，读到”这是我的宠物”这段文字，然后综合判断这是在介绍一只宠物猫。</p><p>这就是多模态AI的魅力所在 — — 它能像人类一样，同时处理和理解来自不同感官的信息。</p><h3>局部代理：AI的”翻译官”</h3><h3>简单理解</h3><p>你问AI为什么认为这张图片是猫，AI的内部运作太复杂了，我们看不懂。所以我们训练一个简单的”翻译官”（局部代理），它能用人类能理解的方式解释：</p><ul><li>“因为我看到了尖耳朵”</li><li>“因为我看到了胡须”</li><li>“因为文字描述提到了’喵’”</li></ul><h3>核心技术方法</h3><p><strong>LIME (Local Interpretable Model-agnostic Explanations)</strong></p><ul><li>通过在局部区域构建简单模型来解释复杂AI的决策</li><li>就像给复杂的数学公式找一个简单的近似解</li></ul><p><strong>SHAP (SHapley Additive exPlanations)</strong></p><ul><li>基于博弈论，计算每个特征对最终结果的”贡献度”</li><li>就像分配团队功劳一样，量化每个部分的重要性</li></ul><p><strong>Grad-CAM及其变体</strong></p><ul><li>通过梯度信息生成热力图，显示AI”关注”的区域</li><li>就像给AI的”视线”做标记</li></ul><h3>问题在哪？</h3><p><strong>跨模态对齐难题</strong>：不同模态的特征空间差异导致代理模型难以准确捕捉跨模态交互</p><ul><li>就像翻译一样，可能会”失真” — 翻译官的解释可能不完全准确</li></ul><p><strong>局部性偏差</strong>：局部解释可能无法反映全局模型行为</p><ul><li>只能解释局部，看不到全貌 — 就像盲人摸象</li></ul><p><strong>保真度问题</strong>：简化的代理模型可能与原始复杂模型存在显著行为差异</p><ul><li>不同”感官”（图像、声音、文字）的信息很难统一解释</li></ul><h3>怎么改进？</h3><p><strong>多尺度代理建模</strong>：结合不同粒度的局部解释</p><ul><li>找多个翻译官，互相验证</li></ul><p><strong>跨模态一致性约束</strong>：确保不同模态解释的语义一致性</p><ul><li>从不同角度、不同层面来解释</li></ul><p><strong>对抗性验证</strong>：通过对抗样本测试代理模型的鲁棒性</p><ul><li>用一些”测试题”来检验翻译官是否靠谱</li></ul><h3>蒸馏：师傅教徒弟的智慧传承</h3><h3>简单理解</h3><p>有个超级聪明但很复杂的AI老师，我们想让一个简单的AI学生学会它的本事。就像武功高手把自己的技能传授给弟子，但不是照搬，而是教核心要领。</p><p><strong>用在多模态上：</strong></p><ul><li>老师AI：能同时处理图像、声音、文字的复杂系统</li><li>学生AI：更简单、更快的系统</li><li>目标：让学生AI也能综合理解多种信息，但运行更高效</li></ul><h3>核心技术方法</h3><p><strong>结构化蒸馏 (Structured Distillation)</strong></p><ul><li>不只是模仿最终答案，还要学会老师的”思考过程”</li><li>保持跨模态注意力模式的传承</li></ul><p><strong>特征级蒸馏 (Feature-level Distillation)</strong></p><ul><li>让学生的”大脑结构”尽可能接近老师</li><li>多模态特征表示的深层知识传递</li></ul><p><strong>预测级蒸馏 (Prediction-level Distillation)</strong></p><ul><li>不仅要答案正确，连”信心程度”都要学会</li><li>输出分布匹配的精细化训练</li></ul><h3>问题在哪？</h3><p><strong>知识损失</strong>：蒸馏过程中复杂跨模态关联信息的丢失</p><ul><li>师傅的绝招可能教不全 — 复杂的跨模态理解能力可能丢失</li></ul><p><strong>偏见传播</strong>：教师模型的偏见可能在蒸馏过程中被放大</p><ul><li>如果师傅有偏见，徒弟也会学到 — 比如对某些群体的刻板印象</li></ul><p><strong>安全性验证困难</strong>：难以确保学生模型继承了教师模型的安全特性</p><ul><li>很难确保徒弟学到的都是好东西</li></ul><h3>怎么解决？</h3><p><strong>多教师蒸馏 (Multi-teacher Distillation)</strong></p><ul><li>找多个师傅教同一个徒弟，避免单一观点</li></ul><p><strong>对抗性蒸馏 (Adversarial Distillation)</strong></p><ul><li>在教学过程中加入”纠错机制”</li></ul><p><strong>渐进式蒸馏 (Progressive Distillation)</strong></p><ul><li>分步骤教学，循序渐进传递知识</li></ul><h3>为什么要关心安全性和可解释性？</h3><h3>日常例子告诉我们答案</h3><p><strong>医疗诊断AI</strong>：如果AI看了你的X光片和病历说你有病，你肯定想知道它为什么这么判断</p><p><strong>自动驾驶</strong>：如果车子突然刹车，你想知道它是因为看到了什么、听到了什么</p><p><strong>求职AI</strong>：如果AI筛选简历时拒绝了你，你有权知道是因为什么原因</p><h3>主要担忧</h3><p><strong>不透明</strong>：AI像个黑盒子，我们不知道它怎么想的</p><p><strong>不公平</strong>：可能对某些人群有偏见</p><p><strong>不安全</strong>：可能被恶意利用，比如通过特制的图片或声音欺骗AI</p><h3>现在的解决思路</h3><h3>让AI更”诚实”</h3><p><strong>概念激活向量 (CAV — Concept Activation Vectors)</strong></p><ul><li>识别多模态模型中的高级语义概念</li><li>要求AI解释自己的判断过程</li></ul><p><strong>因果推理方法 (Causal Inference)</strong></p><ul><li>分析跨模态因果关系，建立AI的”道德准则”</li></ul><p><strong>神经符号集成 (Neuro-symbolic Integration)</strong></p><ul><li>结合符号推理增强可解释性</li><li>定期检查AI是否有偏见</li></ul><h3>让AI更”安全”</h3><p><strong>联邦学习 (Federated Learning)</strong></p><ul><li>分布式训练保护数据隐私</li><li>像给软件打补丁一样，不断修复AI的漏洞</li></ul><p><strong>差分隐私 (Differential Privacy)</strong></p><ul><li>在多模态学习中引入噪声保护机制</li><li>建立AI的”防火墙”，防止恶意攻击</li></ul><p><strong>形式化验证 (Formal Verification)</strong></p><ul><li>数学化证明多模态模型的安全边界</li><li>设计更好的测试方法</li></ul><h3>让AI更”可靠”</h3><p><strong>神经模块化设计 (Neural Modular Design)</strong></p><ul><li>构建可解释的多模态架构</li><li>多个AI系统互相验证</li></ul><p><strong>持续学习 (Continual Learning)</strong></p><ul><li>在保持安全性的同时适应新数据</li><li>重要决策需要人类最终确认</li></ul><p><strong>元学习 (Meta-learning)</strong></p><ul><li>快速适应新任务的同时保持可解释性</li><li>建立行业标准和法规</li></ul><h3>研究前沿与未来展望</h3><h3>标准化进展</h3><ul><li><strong>IEEE和ISO标准</strong>：正在制定多模态AI的安全标准</li><li><strong>评估基准</strong>：建立可解释性的统一评估体系</li><li><strong>自动化工具</strong>：开发自动化安全验证工具</li></ul><h3>新兴趋势</h3><p>这个领域最新的研究趋势，是将<strong>可解释性、安全性和性能</strong>作为统一的优化目标，而不再是相互权衡的关系。就像设计一辆车，我们不再需要在安全性和速度之间做选择，而是追求既安全又快速的完美结合。</p><h3>结语</h3><p>总的来说，我们希望AI既聪明又值得信任，就像一个既有能力又有品格的助手。这需要技术专家、政策制定者和社会各界共同努力。</p><p>多模态AI正从”黑盒”走向”透明”，从”能用”迈向”可信”。这不仅是技术的进步，更是人工智能走向成熟的标志。</p><p><em>这篇文章整理自我对多模态AI可解释性研究的学习笔记。如果你对这个领域有任何想法或问题，欢迎在评论区讨论！</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2eb46a75a16a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>