<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Writing by Xiaofeng Tang</title>
    <link>https://xiaofeng.dev/en/writing/</link>
    <description>Essays on AI coding, agents, enterprise AI, AI search, and product and engineering management.</description>
    <language>en</language>
    <lastBuildDate>Sun, 29 Nov 2026 16:00:00 GMT</lastBuildDate>
    <atom:link href="https://xiaofeng.dev/en/rss.xml" rel="self" type="application/rss+xml" />
    <item>
      <title><![CDATA[Beyond the Brain: How the Harness Shapes AI Agent Behavior]]></title>
      <link>https://xiaofeng.dev/en/writing/distributed-cognition-agent-harness/</link>
      <guid>https://xiaofeng.dev/en/writing/distributed-cognition-agent-harness/</guid>
      <pubDate>Mon, 30 Nov 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[Give the same model different tools, context, and workflows, and it may take a different path. Four ideas from research on human decision-making help…]]></description>
      <content:encoded><![CDATA[<p>Give the same model different tools, context, and workflows, and it may take a different path. Four ideas from research on human decision-making help explain why.</p>
<p>Distributed cognition, bounded rationality, recognition-primed decision-making, and double-loop learning each point to the same question. How does the setting in which someone works shape what they can do?</p>
<h2>Would the same cook make a different meal in another kitchen?</h2>
<p>Imagine two equally skilled cooks asked to prepare dinner for a group of guests. The first cook is simply told to make something delicious. They have to choose the dishes, decide what to buy, and figure out which dish to start first. They might produce a feast or spend an evening cooking only to learn that the guests dislike the menu.</p>
<p>The second cook knows there will be three guests, one of whom cannot eat spicy food. Dinner must be ready in an hour, the dishes should be mild, and one dish must be fish. This cook also has a process for planning the menu and a kitchen equipped with a refrigerator, an oven, a food processor, and a thermometer.</p>
<p>Partway through cooking, the second cook finds that an ingredient is missing and adjusts the menu. A temperature reading from the oven prompts them to change the cooking time. The two meals can turn out very differently. Even with comparable skill, the instructions, tools, and feedback available to each cook affect the result.</p>
<h2>Intelligence may extend beyond the brain</h2>
<p>In his 1995 book <em>Cognition in the Wild</em>, cognitive anthropologist Edwin Hutchins studied how a naval crew navigates a ship. At sea, the crew has to keep track of the ship's position, assess its heading, and plan its course. Crew members divide the work, using charts, compasses, and instruments and following procedures for passing along measurements and acting on them.</p>
<pre><code class="language-mermaid">flowchart TB
    Instruments[&quot;Instruments&quot;] --&gt; Crew[&quot;Navigation crew&quot;]
    Procedure[&quot;Procedures&quot;] --&gt; Crew
    Chart[&quot;Chart&quot;] &lt;--&gt; Crew
    Crew --&gt; Decision[&quot;Heading&quot;]
</code></pre>
<p>Hutchins studied this process through the lens of <strong>distributed cognition</strong>. The chart preserves spatial relationships and position records. Compasses and instruments provide measurements. Procedures determine how information moves between crew members. Together, the crew and its tools share the work of remembering, calculating, and judging, making it possible to do what one person would struggle to do alone.</p>
<p>That made me think about AI agents. When discussing a model, we often start with its parameter count, reasoning ability, and knowledge. Distributed cognition suggests looking at the model together with its tools, context, and execution environment.</p>
<p>I use <strong>harness</strong> to mean the execution environment and controls built around a model. The harness governs which instructions the model receives, which tools it can call, what context it can use, and how the system proceeds after an action. The base model supplies the underlying capabilities. The harness shapes how they are used in a particular task.</p>
<h2>Why does the same person decide differently under different conditions?</h2>
<p>Herbert Simon used <strong>bounded rationality</strong> to explain how people make decisions under real constraints. Memory, attention, access to information, and time are limited, so people rarely examine every possible option. They often look for an option that meets their requirements and is acceptable. Simon called this <strong>satisficing</strong>.</p>
<p>With only 20 minutes to prepare dinner, you might make the dishes you know best. With a full inventory of ingredients, you can plan the menu more accurately. Add a thermometer, an oven, and a reliable recipe, and you might try a dish you would have avoided before. Information, tools, and time shape which options you can consider and what you ultimately do.</p>
<p>The same questions are worth asking about an AI agent. What instructions did the model receive? What does it know, and which tools can it use? How does it carry out the task, and can it adjust its next step in light of the results?</p>
<h2>Tool results can change the next decision</h2>
<p>Cognitive psychologist Gary Klein studied how experts, including fire commanders, make decisions in complex situations. His <strong>recognition-primed decision</strong> model, or RPD, describes how experienced commanders use cues to recognize a situation, identify a plausible course of action, and mentally simulate how it could play out. If the plan looks unworkable, they may adjust it or reassess the situation.</p>
<p>Suppose a commander initially believes a fire is in its early stages, then learns it has spread to higher floors. The update overturns the initial assessment, so the rescue objective and plan may need to change.</p>
<p>Something similar happens when an AI agent uses tools. A model may decide it needs a piece of data and call a database tool. The result becomes part of its context, so the model can update its assessment and decide what to do next. The tool makes the query possible and brings in information the model did not have.</p>
<pre><code class="language-mermaid">flowchart TB
    Judgment[&quot;Model assesses&quot;] --&gt; Call[&quot;Tool call&quot;]
    Call --&gt; Result[&quot;Tool result&quot;]
    Result --&gt; Context[&quot;Updated context&quot;]
    Context --&gt; Judgment
</code></pre>
<h2>Feedback can change the original question</h2>
<p>Organizational learning researcher Chris Argyris distinguished between single-loop and double-loop learning. In <strong>single-loop learning</strong>, the goal stays fixed and the method changes. If the guests say the fish is overcooked, cook it for less time on the next attempt. <strong>Double-loop learning</strong> revisits the original goal and assumptions. If the guests turn out to dislike fish, the cook has reason to reconsider the menu itself.</p>
<p>I ran into a similar pattern while discussing a data report with AI. At first we were talking about how to draw the chart. After looking at several examples, considering feedback, and making revisions, I began asking what readers actually needed to see and what the chart should help them understand. That is one reason a conversation over several rounds can be valuable. As evidence and feedback accumulate, we may discover what problem we really need to solve.</p>
<h2>How the harness organizes the model's capabilities</h2>
<p>Products and frameworks draw the boundaries of the harness differently. This diagram illustrates one way to think about how it organizes the model's interaction with instructions, context, and tools.</p>
<pre><code class="language-mermaid">flowchart TB
    subgraph Harness[&quot;Harness&quot;]
        Prompt[&quot;Prompt&quot;] --&gt; Model[&quot;Base model&quot;]
        Context[&quot;Context&quot;] --&gt; Model
        Model --&gt;|Calls| Tools[&quot;Tools&quot;]
        Tools --&gt;|Return results| Context
    end
</code></pre>
<h3>How the prompt states the task</h3>
<p>The prompt expresses the goal, requirements, and constraints. It affects the starting question, priorities, and criteria for completion. This relates to bounded rationality because the goals and options a decision-maker actually sees shape what they can consider.</p>
<h3>What information the context provides</h3>
<p>Context includes the current conversation, system instructions, project materials, and earlier tool results. It determines what the model can draw on at a particular step. Through the lens of distributed cognition, some of the information a task needs can come from external materials and tools as the interaction unfolds.</p>
<h3>How tools let the model observe and act</h3>
<p>Tools let a model search the web, query a database, read files, or run code. The model can act on the environment and observe what happens. Once the results enter its context, they can inform the next decision.</p>
<h3>How the harness coordinates execution and feedback</h3>
<p>The harness determines when tools are available, how their results come back, and how context is updated. It can also break work into steps and govern when to continue, retry, stop, or seek human judgment. A harness can manage prompts, context, and tools, with the details depending on the system.</p>
<p>The same base model may therefore perform better at search, coding, analysis, or complex tasks in different systems. Feedback matters in particular. A result that overturns an assumption can require the system to reconsider the task. Inaccurate information can also mislead the model, long contexts can introduce distractions, and rigid procedures can limit exploration. Designing a harness involves deciding what information, tools, and feedback should enter the task and when.</p>
<table>
<thead>
<tr>
<th>AI agent concept</th>
<th>Human decision-making</th>
<th>In the kitchen</th>
</tr>
</thead>
<tbody>
<tr>
<td>Prompt</td>
<td>Goals, rules, and constraints</td>
<td>The guests' requests</td>
</tr>
<tr>
<td>Harness</td>
<td>Procedures and decision strategies</td>
<td>The kitchen workflow</td>
</tr>
<tr>
<td>Tools</td>
<td>Aids for thinking and acting</td>
<td>Refrigerator, oven, thermometer</td>
</tr>
<tr>
<td>Context</td>
<td>Available information, experience, and cues</td>
<td>Inventory, menu, cooking notes</td>
</tr>
<tr>
<td>Tool feedback</td>
<td>Outcomes and feedback from the environment</td>
<td>Ingredient availability and oven temperature</td>
</tr>
</tbody>
</table>
<p>The analogies illustrate how working conditions shape decisions. Human cognition and large language models operate through different mechanisms. The diagrams show the relationships discussed here at a conceptual level.</p>
<h2>Back to the original question</h2>
<p>Put the same cook in a different kitchen and you may get a very different meal. Give the same model a different harness and it may take a different path through the task. The base model supplies the underlying capabilities, while instructions, context, tools, and feedback shape how the system puts them to work.</p>
<p>Alongside research into how to train stronger models, there is a more specific question worth studying. How can we organize a model's interaction with the outside world so it can use the capabilities it already has when the task calls for them?</p>
<h2>Further reading</h2>
<ul>
<li>Edwin Hutchins uses ship navigation to study how people, tools, and organizations carry out cognitive tasks together. <a href="https://mitpress.mit.edu/9780262581462/cognition-in-the-wild/"><em>Cognition in the Wild</em>, 1995</a></li>
<li>Herbert Simon discusses how decisions are made in organizations and the constraints under which they are made. <a href="https://www.nobelprize.org/uploads/2018/06/simon-lecture.pdf"><em>Rational Decision-Making in Business Organizations</em>, 1978</a></li>
<li>Gary Klein explains how experts identify and assess courses of action in dynamic situations under time pressure. <a href="https://www.researchgate.net/publication/235418838_A_Recognition_Primed_Decision_RPD_Model_of_Rapid_Decision_Making"><em>A Recognition-Primed Decision (RPD) Model of Rapid Decision Making</em>, 1993</a></li>
<li>Chris Argyris examines how organizations respond to feedback and revisit their goals and assumptions. <a href="https://hbr.org/1977/09/double-loop-learning-in-organizations"><em>Double Loop Learning in Organizations</em>, 1977</a></li>
</ul>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[From Terence Tao to Kant: When AI outpaces human understanding]]></title>
      <link>https://xiaofeng.dev/en/writing/ai-and-human-understanding/</link>
      <guid>https://xiaofeng.dev/en/writing/ai-and-human-understanding/</guid>
      <pubDate>Sun, 15 Nov 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[I've recently seen some discussions about AI's involvement in mathematical research, including concerns raised by mathematicians like Terence Tao.]]></description>
      <content:encoded><![CDATA[<p>I've recently seen some discussions about AI's involvement in mathematical research, including concerns raised by mathematicians like Terence Tao.</p>
<p>These concerns are multifaceted: AI is taking over some research topics that were originally left to graduate students and doctoral students, which may affect the gradual growth of young researchers; on the other hand, the speed at which AI generates results may exceed the speed at which humans can understand and verify them. There are more and more results, but the number of people who can truly understand, examine and continue to advance these results may not be able to keep up. [1]</p>
<p>I think the latter point is particularly worth considering.</p>
<p>Mathematician Benjamin Antieau wrote the following sentence in <em>Fast math/slow math</em>. Terence Tao reposted this article on his blog. [2]</p>
<blockquote>
<p>Do not work faster than you can understand or effectively communicate.</p>
</blockquote>
<p>This statement also applies to today's AI coding scenarios.</p>
<p>AI-generated technical solutions often contain inaccurate terminology, redundant abstractions, and expressions that sound distinctly AI-driven. It may generate a seemingly complete, even functional, set of code, but we may not understand why its design is valid, nor can we determine whether it is truly reasonable. The costs of understanding and maintaining this code become apparent when system problems arise or further iterations are needed.</p>
<p>If AI were merely a chatbot, this problem might not seem so serious. However, when it begins to participate in engineering projects, scientific research, and even become the underlying foundation of certain real-world technological systems, the inability of humans to understand and verify its results becomes a significant hidden danger. We may possess a system that works, but not necessarily the ability to maintain it.</p>
<p>Therefore, I think there is one principle worth noting when using AI: <strong>human comprehension should, as far as possible, keep pace with AI's productivity.</strong></p>
<p>Two months ago, I read a book by Li Zehou that discussed Kant's ideas. One principle in particular impressed me. In my words, it is:</p>
<p><strong>People are the end, not merely the means.</strong> [3]</p>
<p>I am amazed that Kant proposed this principle so many years ago. It is far more profound than simply criticizing capitalism, discussing the alienation of people by modern commercial society, or speaking generally about human-centeredness.</p>
<p>Looking back at these mathematicians' concerns about AI from this perspective, I suddenly have a new understanding.</p>
<p>If we only care about how much AI can create and how much efficiency it can improve, then whether humans understand these results seems less important. But if humans themselves are the end goal, things change. When we use AI, we should also strive to gain more understanding, more capabilities, and more opportunities to participate in the creation process.</p>
<p>This is also a habit I now have when using AI: after it writes code and completes a solution, I also let it teach me to understand these results. If it encounters inaccurate expressions, I ask it to explain; if it encounters a design I don't understand, we continue the discussion; if necessary, I ask it to provide the basis, alternative solutions, and verification methods. Only when I can understand the key choices and judge whether the result is reliable do I accept it as my own work result.</p>
<p>I believe this paired work approach is more valuable than simply pursuing AI's productivity. AI helps me complete tasks, understand problems, and improve my skills. Human judgment and understanding, in turn, constrain the AI's output.</p>
<p>The purpose of technological progress should be to make people better, not just to make machines stronger.</p>
<h2>Related Links</h2>
<ol>
<li>
<p><a href="https://teorth.github.io/tao-web/ai-views.html">Terence Tao on AI in mathematics (and beyond)</a></p>
</li>
<li>
<p><a href="https://terrytao.wordpress.com/2026/09/15/fast-math-slow-math/">Benjamin Antieau: Fast math/slow math (reposted from Terence Tao's blog)</a></p>
</li>
<li>
<p><a href="https://web.stanford.edu/~jsabol/certainty/readings/kant_groundwork.pdf#page=23">Kant, Groundwork of the Metaphysics of Morals, section II, AA 4:429</a>. The main text is a summary of this principle.</p>
</li>
</ol>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[Skill pricing: One-time, recurring, and usage-based models]]></title>
      <link>https://xiaofeng.dev/en/writing/skill-commercialization/</link>
      <guid>https://xiaofeng.dev/en/writing/skill-commercialization/</guid>
      <pubDate>Sun, 15 Nov 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[Skills already have a paid entry point and a dedicated distribution platform. Developers can package their capabilities as Skills, which users can install…]]></description>
      <content:encoded><![CDATA[<p>Skills already have a paid entry point and a dedicated distribution platform. Developers can package their capabilities as Skills, which users can install or invoke through Agents. Payment platforms also offer buy-out, periodic, and pay-per-use options.</p>
<p>However, &quot;being able to charge fees&quot; does not equate to mature commercialization. To understand the current commercialization of skills, we must first clarify the responsibilities of distribution platforms, payment platforms, and AI payment products, and then examine whether these capabilities can form a transaction that is easily understood by buyers.</p>
<p>In the context of Skill commercialization, the materials often mention names such as SkillHub Pay Skill, Alipay SkillPay, Machine Pay, 402, and x402, which readers may easily mistake for the same thing. SkillHub's Pay Skill is a pay-per-use capability within the platform, while Alipay SkillPay is responsible for charging and delivering Skill products. Machine Pay charges for APIs or tools on a pay-as-you-go basis, and x402 is an open payment protocol based on HTTP 402. These names point to different levels and should not be mistaken for the same product or protocol just because they have similar names. When reading, it is not necessary to get bogged down in the terminology itself, but rather to look at who is distributing it, how they charge, and what is delivered after payment. [1][2][3][5]</p>
<p>AI payment does not mean that the agent holds the wallet itself. The agent can transmit orders, initiate payment requests and receive credentials, but deductions still require user authorization and are processed by the payment channel. [2][4]</p>
<h2>SkillHub handles distribution, while WeChat/Alipay provides AI payment products.</h2>
<p>SkillHub is a channel for publishing and distributing skills. Users can discover callable capabilities here, and developers can publish services to multiple agent entry points. SkillHub is supported by Tencent, but this does not mean that WeChat Pay is mandatory. The platform documentation provides WeChat Pay and Alipay as payment channels, and developers can choose according to their qualifications. In my actual testing of the account and activation process, enterprise accounts could only choose WeChat Pay to apply for payment, while personal accounts could only choose Alipay after completing real-name authentication.</p>
<p>SkillHub's official Pay Skill uses a pay-per-use model and does not offer buyout or recurring payment options. When applying through the Alipay entry point on SkillHub, you are applying for Alipay AI pay-per-use capability, which is Machine Pay. This entry point is used to connect pay-per-use services for receiving and verifying payments and will not bring Alipay SkillPay's buyout or recurring products into SkillHub. [1][2]</p>
<p>Alipay SkillPay is a paid and delivery product for Skill developers. It offers one-time payment and recurring payment and can be used in multiple Agent environments. WorkBuddy is the Agent environment for running Skills. The products of Alipay SkillPay, the distribution portal of SkillHub and the runtime environment of WorkBuddy perform different tasks. They should not be regarded as the same market just because users use Skills in WorkBuddy. [3]</p>
<h2>What payment capabilities does Alipay offer for AI?</h2>
<p>I haven't studied WeChat Pay's AI payment capabilities in detail yet, so I'll take Alipay as an example. Alipay's AI payment product names are mainly categorized by service provider and business scenario. They help sellers choose the integration path. Although it's called AI Pay, sometimes it should be called AI Receipt. It has five main capabilities:</p>
<ul>
<li>Vibe Pay enables payments for AI-powered applications, such as features, content, limits, and memberships.</li>
<li>Skill Pay is for receiving payments through Skills, supporting both one-time payments and recurring usage.</li>
<li>Machine Pay is a pay-per-use or pay-as-you-go service for APIs or tools.</li>
<li>Token Pay is for selling models, cloud services, and token resources.</li>
<li>Agent Pay enables agents to place orders, make payments, and send back receipts on behalf of users with user authorization.</li>
</ul>
<p>First, distinguish the product levels. SkillPay's one-time and recurring payments sell skill benefits. Recurring payments only provide the right to use the service for the current period, without delivery in plaintext, and there is no automatic renewal. Machine Pay charges APIs or tool services on a per-use basis. The payment and delivery processes for each are as follows. [2][3][4]</p>
<figure style="max-width:420px;margin:2rem auto"><img src="/images/writing/skill-commercialization/payment-options.png" alt="Simplified process for Skill-based one-time payment, recurring payment, and pay-as-you-go pricing." width="1152" height="1218" loading="lazy" decoding="async" style="display:block;width:100%;height:auto;cursor:zoom-in;border:1px solid #d8d3c4"></figure>
<p>Alipay SkillPay provides entry points for listing and purchasing products, but it does not automatically sync products to SkillHub. Developers still need to choose their own distribution channels and introduce their products to potential users.</p>
<h2>Recommendations for individual developers</h2>
<p>For individual developers, buyout, pay-as-you-go, and periodic payments each have their costs. Alipay SkillPay's one-time payment will give the buyer the Skill in plaintext. If the core methods and implementations are written in the Skill file, the buyer can view and copy them, and there is a risk of source code and business methods being exposed. [3]</p>
<p>Machine Pay's per-call functionality requires developers to modify the server-side to handle order placement, payment credential verification, and result delivery. To keep the core logic in their own hands, the service is usually hosted in the cloud. This incurs additional backend development and maintenance costs. [2]</p>
<p>Therefore, for individual developers who are unwilling to hand over the Skill source code and lack the ability to maintain cloud services, I believe Alipay SkillPay's recurring payment model is currently the most suitable solution. It grants users usage rights for a period of time, allows developers to retain the Skill plaintext, and eliminates the need to build a complete pay-per-use API themselves. Its limitation is that it does not automatically renew; users need to actively renew.</p>
<h2>Recommendations for enterprise developers</h2>
<p>For enterprise developers, selling Skills standalone is still a weak delivery model and unlikely to create a commercial barrier. Machine Pay's pay-as-you-go model merely adds billing and verification to API or tool calls; the service itself doesn't become a complete product. To build a barrier, enterprises still need to productize their capabilities, encapsulating them into AI products or API services, and then letting Skills serve as the distribution or invocation portal.</p>
<p>Skill monetization already has distribution channels, payment products, and technological integration, but buyers still don't easily understand what they're buying from the product name, nor can they always smoothly transition from discovering a skill to payment, using it, and receiving results. For me, judging the maturity of monetization depends on whether buyers can understand the product's rights, complete authorization, and receive the promised service results within the original task.</p>
<h2>References</h2>
<ol>
<li><a href="https://www.skillhub.cn/skillpay">SkillHub Pay Skill Description</a></li>
<li><a href="https://aipay.alipay.com/docs/ai-receive/MACHINE_PAY.html">Alipay Machine Pay Integration Guide</a></li>
<li><a href="https://skillpay.alipay.com/faq">Alipay SkillPay Frequently Asked Questions</a></li>
<li><a href="https://aipay.alipay.com/docs">Alipay AI Pay Product Overview</a></li>
<li><a href="https://github.com/x402-foundation/x402/blob/main/docs/introduction.md">x402 Official Introduction</a></li>
</ol>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[Which steps in a Skill should become tools?]]></title>
      <link>https://xiaofeng.dev/en/writing/skill-deterministic-tools/</link>
      <guid>https://xiaofeng.dev/en/writing/skill-deterministic-tools/</guid>
      <pubDate>Wed, 11 Nov 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[The previous article , "How to Orchestrate Multiple Skills Using a Master Control Skill to Achieve Automated Delivery ," introduced a market research…]]></description>
      <content:encoded><![CDATA[<p>The previous article <a href="/writing/skill-suite-orchestration/">, &quot;How to Orchestrate Multiple Skills Using a Master Control Skill to Achieve Automated Delivery</a> ,&quot; introduced a market research workflow I designed. This article continues the discussion on the execution boundaries: which tasks require agent-based judgment, and which can be encapsulated into tools.</p>
<p>In software engineering, determinism is usually translated as &quot;deterministic&quot;, which means that the same input and running conditions produce the same result. Anthropic's tool design article also uses this concept to distinguish between traditional programs and agents that may produce different responses[4]. Here, determinism emphasizes that the execution is repeatable, but the quality of the result still needs to be verified.</p>
<h2>Why is deterministic convergence necessary?</h2>
<p>Uncertainty can be introduced at any stage of the workflow. User instructions may be ambiguous, and the agent's understanding, retrieval, and execution may also be flawed. If subsequent stages directly use unchecked deliverables, localized problems can propagate along the process, affecting the final delivery.</p>
<ul>
<li><strong>A single reliable step does not guarantee the reliability of the entire process.</strong> Even assuming all ten steps must succeed, and each step has a 90% success rate assuming previous steps succeed, the probability of the entire process succeeding is only about 35%. Multiplying these success rates one by one illustrates the need to pay attention to the accumulated risk of failure at each stage of a long process.</li>
<li><strong>Clearly defined rules can reduce uncertainty in execution.</strong> By fixing steps such as data manipulation, structure parsing, and format conversion into tools, the chances of agents making ad-hoc decisions and repeatedly generating implementations are reduced, allowing the model to focus on research, understanding, and judgment.</li>
<li><strong>Phased verification can reduce the propagation of problems to the next stage.</strong> After checking the output through code verification, skill self-check, or sub-Agent review, it is handed over to the next step [5]. After the data format is correct, it is still necessary to confirm that the map actually reads and displays the content; after the social media collection is completed, the text and images should also be checked. Verification should have clear standards and be compared with the actual output.</li>
</ul>
<p>This is my understanding of deterministic convergence: gradually stripping away clearly defined operations and arranging verification for each stage's deliverables. Routine verification doesn't have to wait until a complete evaluation system is established before starting; first check the current delivery, then progressively evaluate its performance on different tasks, allowing the process to continuously improve.</p>
<h2>Identifying Certainty in the Process</h2>
<p>&quot;Write the defined parts into code&quot; is a simple principle. What's really needed is to identify which operations in the process already have clear rules and can be repeatedly executed by the program. Map visualization, social media data collection, and research result organization have gradually helped me form my judgment criteria. Below, I've used colors to distinguish between steps that require model judgment, steps that are executed by code, and steps that combine both.</p>
<pre><code class="language-mermaid">%%{&quot;init: {'flowchart': {'padding': 1, 'rankSpacing': 8, 'nodeSpacing': 12&quot;}, 'themeVariables': {'fontSize': '16px'}}}%%
flowchart LR
    A[&quot;Requirements&quot;] --&gt; B[&quot;Research&quot;]
    B --&gt; C[&quot;Import&quot;]
    C --&gt; D[&quot;Map&quot;]
    D --&gt; E[&quot;Delivery&quot;]
    E -. on demand .-&gt; F[&quot;Social media&quot;]
    E -. on demand .-&gt; G[&quot;Verification&quot;]
    E -. on demand .-&gt; H[&quot;Insights&quot;]
    classDef judgment fill:#fff5e9,stroke:#ae6319,color:#242b36;
    classDef fixed fill:#edf5ff,stroke:#285b96,color:#242b36;
    classDef mixed fill:#f2f0fa,stroke:#65548e,color:#242b36;
    class A,B,G,H judgment;
    class D fixed;
    class C,E,F mixed;
</code></pre>
<div style="text-align:center;font-size:14px;line-height:1.8;margin:12px 0 24px;"><span style="color:#ae6319;margin-right:12px;">● Model judgment </span><span style="color:#285b96;margin-right:12px;">● Code execution </span><span style="color:#65548e;">● The two work together</span></div>
<p>After delivery, the dotted line connects to three optional branches, corresponding to social media data collection, expanded product verification, and insight demonstration, which can be called up as needed by the central control.</p>
<p>The import process in the diagram includes review and data organization, while delivery includes presenting and verifying the results. Certainty is often only apparent when broken down into stages: review and information classification require model judgment, while field validation and saving can be performed by programs. The following three experiences correspond to map applications, social media data collection, and the organization of research results before importation, respectively.</p>
<h2>The first lesson learned: Make maps reusable.</h2>
<p>Three different approaches were explored in the implementation of the map. Each adjustment was based on testing the original assumptions through actual use.</p>
<h3>Option 1: Generate a single HTML file, which is continuously modified by the Agent.</h3>
<p>Initially, I planned to have the AI ​​generate a single HTML file from the research results, placing the data, presentation logic, and interactions in the same file for easy opening and delivery. Subsequent adjustments would then be handled by the agent.</p>
<p>Actual needs were more dynamic than anticipated. Users would adjust the research scope, add products, revise data, or change analysis dimensions after viewing the map. The demands on the agent differ greatly between generating a single page and maintaining accuracy across multiple rounds of adjustments. I initially overestimated the agent's ability to reliably modify HTML. Data and page logic were tightly coupled; even a single data update could affect the display and interaction code.</p>
<h3>Option 2: Modify and preview using Live Artifacts</h3>
<p>Subsequently, I tried Live Artifacts, using Claude's Artifacts feature to modify and preview interactive artifacts next to the dialogue [2]. Claude's product design served as a transitional solution during the exploration phase, but continuous map updates still required a clear data organization method. Filtering, switching dimensions, and viewing details should all be based on stable application capabilities.</p>
<h3>Option 3: Separate data from Next.js applications and use tools to constrain operations.</h3>
<p>Next, I stored the data independently and used a continuously maintained Next.js project for display and interaction. At the time, I assumed that once the page logic was fixed, the Agent could simply modify the JSON to meet the requirements. This second overestimation occurred in data manipulation. Correct JSON syntax does not guarantee that modifications meet application requirements. Field meanings, object relationships, and content requiring synchronous updates all have their own constraints. The Agent's ability to adhere to these constraints during repeated modifications remained unstable.</p>
<p>Finally, the data structure, operation entry, input validation, saving and display have clear code implementation. Supplementing product information is completed through data operations, filtering uses existing interactions, and adding new application capabilities involves code modification. Next.js is the implementation choice, and stability comes from the whole set of data conventions and operation rules. Anthropic's Skill writing suggestions also mention that error-prone operations that emphasize consistency should reduce the model's degree of freedom and provide specific scripts [3].</p>
<p>Delivery also involves the user environment. Installing the entire Next.js project requires handling dependencies and startup configuration. I've encapsulated application execution and data operations into a CLI for unified dependency management and startup. Once users have their Node.js environment ready, they can use the Skill to guide the Agent's calls without needing to configure the web project themselves. Map adjustments, involving research and judgment, data operations, and application capability modifications, also have their own handling methods.</p>
<p><strong>Looking back on this evolution, what I repeatedly did was to propose hypotheses and then verify them using real-world tasks. Each time I encountered unexpected problems, I revised my understanding of the Agent's capabilities and user needs, gradually clarifying the boundaries that needed to be encapsulated.</strong></p>
<h2>The second lesson learned: Encapsulate the technical details of social media data collection.</h2>
<p>Social media data collection requires reading data from various sources, organizing the text and images, and providing it to users for viewing and analysis. Initially, I used prompts to structure the collection steps, with the agent submitting content, reading the returned results, and organizing the materials according to the instructions. After multiple executions, I found that the agent did not consistently follow the same path to submit and collect content. Even with the same goal, the actual execution path would change, and the process specifications in the prompts were insufficient to guarantee stable execution.</p>
<p>Further breaking down the process, a significant portion of the data collection involves detailed code. The API returns HTML or JSON fragments, requiring understanding of field meanings, parsing the DOM and citation structure, extracting the main text, associating images, and formatting the data. These processes rely on known data structures and extraction rules, with the Agent performing ad-hoc parsing and combination in each round, adding unnecessary complexity.</p>
<p>I will encapsulate the submission and collection chain, the result parsing, content extraction and layout into a tool so that similar tasks follow a consistent processing path. The Agent is responsible for selecting query content, judging relevance and conducting analysis, while the tool is responsible for executing explicit collection and parsing rules. Anthropic's tool design article also suggests moving some processing inside the tool, returning meaningful information, and reducing the burden brought by the underlying technical identification [4].</p>
<p><strong>This experience led me to a direct conclusion: whenever there are explicit code processing details in a process, they should be encapsulated into tools. With fixed implementations for interface calls, structure parsing, and content extraction, the agent can focus its attention on the data collection target and material analysis.</strong></p>
<h2>The third lesson learned: Separate Deep Research from Formatting</h2>
<p>Initially, I wanted Deep Research to directly output the JSON format required by the application, allowing research results to be directly integrated into the application. However, in practice, errors frequently occurred in the output format. The research tasks of finding, understanding, and analyzing data also bear the constraints of complex data structures. In this project, the additional formatting work increased the cost of subsequent corrections. Furthermore, the continuous evolution of the application structure meant that formatting adjustments constantly affected the way research prompts and existing results were used.</p>
<p>I understand Deep Research as a form of agency search. It requires understanding the results of each round of searches, identifying gaps in evidence, discovering questions worth pursuing, and then adjusting the search strategy. Logical reasoning, semantic mining, and question discovery are at the core of this type of research task. I hope to minimize formatting requirements so that research agents can focus their attention on these tasks.</p>
<p>Later, I chose the flat and straightforward Markdown as the intermediate format to reduce nested structures and field constraints. This allowed Deep Research to fully express the research content first, and then the data was organized and formatted separately during import. The research results were preserved, and format adjustments only required modifications to subsequent processing steps. The organization process still involved judgment; information identification and classification may require model involvement, while fields, types, required fields, and import requirements were checked by the program.</p>
<p>Anthropic's step-by-step workflow also has a similar idea: assigning divisible tasks to successive steps, adding program checks, and reducing the task complexity of each step [5]. This made me realize that responsibility decomposition often precedes deterministic encapsulation. The format requirements must be simple enough so that the data structures for research and application can evolve separately.</p>
<p><strong>Let Deep Research focus on the research itself, leaving formatting and validation to later stages. Choose simple, error-free intermediate formats to reduce additional constraints on research tasks, and let the tools handle the explicit formatting rules.</strong></p>
<h2>Which signals indicate the need for tools or scripts?</h2>
<ul>
<li><strong>The execution path for the same task changes repeatedly.</strong> Even though the prompts clearly state the steps, the Agent still uses different paths when executing the task multiple times, resulting in inconsistent outcomes. This indicates that key processes need to be fixed in the code.</li>
<li><strong>The process involves explicit code processing details.</strong> Operations such as API calls, HTML and JSON parsing, DOM and citation extraction, and image association rely on known structures and rules and should be encapsulated into tools to avoid ad-hoc implementations in each round.</li>
<li><strong>Research tasks are constrained by format requirements.</strong> Output structures frequently contain errors, or adjustments to application fields constantly affect research prompts. It's advisable to first use a simple intermediate format, then delegate conversion and validation to subsequent stages.</li>
<li><strong>The same type of result requires repeated manual checks.</strong> Fields, relationships, and imported results already have clear checking standards, which are suitable for being automated; parts that require semantic judgment are then reviewed by the Agent.</li>
</ul>
<p>These signals need to be verified through real-world tasks. The evolution of mapping solutions reminds me that we must first formulate hypotheses, then examine the execution results, and continuously refine our judgments on requirements and agent capabilities in order to gradually find the appropriate encapsulation boundaries.</p>
<h2>Related Links</h2>
<p>[1] How to orchestrate multiple skills using a master skill to achieve automatic delivery <a href="https://xiaofeng.dev/writing/skill-suite-orchestration/">https://xiaofeng.dev/writing/skill-suite-orchestration/</a></p>
<p>[2] Claude official: What are artifacts and how do I use them? <a href="https://support.claude.com/en/articles/17153992-what-are-artifacts-and-how-do-i-use-them">https://support.claude.com/en/articles/17153992-what-are-artifacts-and-how-do-i-use-them</a></p>
<p>[3] Anthropic: Skill authoring best practices <a href="https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices">https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices</a></p>
<p>[4] Anthropic: Writing effective tools for agents <a href="https://www.anthropic.com/research/writing-tools-for-agents">https://www.anthropic.com/research/writing-tools-for-agents</a></p>
<p>[5] Anthropic: Building effective agents <a href="https://www.anthropic.com/research/building-effective-agents">https://www.anthropic.com/research/building-effective-agents</a></p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[How prompts steer a model through language]]></title>
      <link>https://xiaofeng.dev/en/writing/prompt-latent-space-steering/</link>
      <guid>https://xiaofeng.dev/en/writing/prompt-latent-space-steering/</guid>
      <pubDate>Mon, 09 Nov 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[A while ago, I listened to an interview about AI Agent engineering practices. The guest, Lauren Tan, talked about how she improves agent performance through…]]></description>
      <content:encoded><![CDATA[<p>A while ago, I listened to an interview about AI Agent engineering practices. The guest, Lauren Tan, talked about how she improves agent performance through skills.</p>
<p>She used a very vivid phrase:</p>
<blockquote>
<p>Pull the agent to a different latent space.</p>
</blockquote>
<p>The gist is &quot;to pull the agent into another latent space.&quot; I wrote in &quot;Rethinking Cue Words&quot; that a precise technical term can sometimes save a lot of explanation. Lauren Tan's statement made me think further: why do the model give different answers depending on the number of words changed?</p>
<p><strong>My understanding is that cues function through latent space steering.</strong> Here, &quot;steering&quot; refers to the direction we provide through text. When the model reads this text, its internal representation of the current task changes accordingly, making certain answers easier to generate than before.</p>
<h2>1. Understanding Latent Space Guidance from the Perspective of &quot;Concept Maps&quot;</h2>
<p>&quot;Lurking&quot; refers to the structure hidden within the observed data. When reading &quot;Are these apples sweet?&quot; and &quot;What new models has Apple updated?&quot;, the model will generate different internal representations for the same word. Imagine these representations as coordinates on a map; in the former sentence, &quot;apples&quot; is closer to taste and variety, while in the latter, it's closer to screen and chip.</p>
<p><img src="/images/writing/prompt-latent-space-steering/concept-map.webp" alt="Concept map illustration of the same &quot;apple&quot; in the context of mobile phones and fruits"></p>
<p><strong>A low-dimensional manifold</strong> describes the relationship between the dimension of the space it represents and the dimension required to represent its own changes. A curved piece of paper in three-dimensional space still requires only two coordinates to represent its position on the surface. Similarly, at a certain layer of a model, high-dimensional vectors formed from natural language input can sometimes concentrate in regions of lower local dimension. The curved paper is a geometric metaphor for this structure; its actual shape depends on the model, layer, and input.</p>
<p><img src="/images/writing/prompt-latent-space-steering/manifold-steering.webp" alt="Low-dimensional manifold illustration: The cue words change the representation calculated by the model through context, while activation guidance directly adds a vector to a certain layer."></p>
<p><strong>The upper part of the diagram represents the black-box guidance</strong> discussed in this paper. By simply submitting prompts and observing the output, one can indirectly influence the model's prediction of the next token by changing the context in which the &quot;apple&quot; appears.</p>
<p>The lower half of the diagram represents <strong>activation steering</strong>. For example, researchers can read the intermediate activation values ​​(activation values) of a certain layer of the model when processing positive and negative examples, construct a direction vector using the average difference, and then add it to the activation values ​​of that layer during generation. This approach requires reading and writing intermediate activations, which is a <strong>white-box intervention</strong>, and the model weights remain unchanged (see reference 5 at the end of the article).</p>
<h2>2. The starting point for answering questions related to changes in professional terminology and role settings.</h2>
<p><strong>Technical terminology guides the model to apply relevant knowledge.</strong> Suppose a project weekly report states, &quot;First draft completed, review scheduled for Friday,&quot; and needs to be prepared for the project manager. A poor suggestion would be, &quot;Please make this report more professional,&quot; and the model might simply replace &quot;completed&quot; with &quot;successfully completed.&quot; A better suggestion would be, &quot;Please rewrite this report as an executive summary.&quot; This term corresponds to a writing style that summarizes key points for decision-makers. The model is more likely to prioritize presenting current progress, pending issues, and next steps, reducing the need for daily detailed work.</p>
<p><strong>Role prompts guide the model in selecting judgment criteria.</strong> To check if this weekly report helps advance the project, a poor prompt is &quot;Please review this as a senior expert and point out the most needed addition.&quot; &quot;Senior&quot; doesn't specify a division of expertise, and the model's suggestion for improvement is plausible. A better prompt is &quot;Please review this as a project manager and point out the most needed addition.&quot; By simply changing the role, the model is more likely to focus on progress and responsibility, such as asking follow-up questions like &quot;Who will lead the review on Friday, and what subsequent work will be affected if the review fails?&quot;</p>
<p><strong>The persona further limits the scenarios that the same identity focuses on.</strong> If a project requires collaboration among multiple teams, a poor suggestion is, &quot;You are an experienced and responsible project manager; please check this weekly report for omissions.&quot; A better suggestion is, &quot;You are the project manager responsible for cross-departmental collaboration; please check this weekly report for omissions.&quot; Both specify the same profession, with the latter clarifying the collaborative responsibilities. The model is more likely to follow up with questions like, &quot;Which teams need to attend Friday's review, and are the responsible parties and times aligned?&quot; These wordings don't add to the project facts but guide subsequent responses in a specific direction of checking.</p>
<h2>3. Few sample examples allow the model to infer task requirements.</h2>
<p>Few-shot prompting allows the model to infer the requirements of the current task by pairing inputs and outputs. The following prompt rewrites the original records in the project into report items, without explicitly stating formatting rules.</p>
<pre><code class="language-text">Input: The first design draft is ready. The internal review is on Friday.
Output: Progress: The first design draft is ready.
        Next step: Review it internally on Friday.

Input: The data is compiled. Review it with the business team on Thursday.
Output: Progress: The data is compiled.
        Next step: Review the data with the business team on Thursday.

Input: The final materials are ready. Deliver them to the client next Tuesday.
Output:
</code></pre>
<p>The first two examples break down the record into &quot;Progress&quot; and &quot;Next Steps,&quot; while the third example is more likely to follow this structure, writing &quot;Final materials completed&quot; and &quot;Delivered to the client next Tuesday.&quot; If the first two examples only retain completed work, the third example is also more likely to omit subsequent arrangements. The original records are the same; the examples guide how the model selects information and organizes reports.</p>
<h2>4. Dialogue history and search results supplement factual evidence.</h2>
<p>The executive summary should highlight key progress, but writing terminology cannot provide a concrete schedule for the project. &quot;Internal review completed on Friday, delivery to client next Tuesday&quot; needs to be provided by project participants or project documentation.</p>
<p><strong>Context</strong> is the input that the model can utilize during the current generation round. It can include the current instruction, examples, or messages from <strong>the conversation history</strong>. If the user has already specified these two points in time in the previous round, and the messages are still within the current context, then when asked to &quot;compile a description of external progress,&quot; the model has a basis to clearly separate internal reviews and client deliverables. The same arrangement can be achieved through retrieval-augmented generation (RAG) to access the context. The system retrieves relevant information from the latest project plan and provides it to the model along with the writing task.</p>
<p>If the model lists Friday's review as Friday's delivery, then the specific arrangements for these two milestones need to be added. The specific dates should be taken from the latest project plan. Recurring check requests can be summarized as &quot;verify the internal review and client delivery times before reporting.&quot; The next time the agent reads this requirement and reviews the plan, it can verify whether the two milestones are accurately distinguished, thus validating the supplementary information.</p>
<h2>5. The thought chain makes intermediate results conditions for subsequent generation.</h2>
<p>When reviewing this report, you can first ask the model to extract the &quot;items, timelines, and recipients&quot; from the project plan, and then check the statements in the report item by item. If the previous step already specified &quot;internal review - Friday - project team&quot; and &quot;customer delivery - next Tuesday - customer,&quot; then the next step provides a clear basis for comparison, making it easier to spot errors such as &quot;deliver to customer on Friday.&quot; When a general &quot;comprehensive review&quot; is requested, these two timelines may be confused.</p>
<p>This demonstrates how chain-of-thought prompting (CoT) works. The prompts guide the model to generate intermediate reasoning steps, which then enter the context and participate in the prediction of subsequent tokens. Here, &quot;extracting planned items—comparing report statements—judging for errors&quot; forms a continuous reasoning process, with each step providing conditions for the next. Errors in intermediate results may also affect subsequent judgments; therefore, the extracted items and timestamps should be traceable back to the project plan.</p>
<h2>6. Using latent space to guide the understanding of cue words in practice</h2>
<p><strong>Principle 1: Hints that elements are vectors, meaning they can be added or canceled out.</strong></p>
<p>From a latent space perspective, different cues in the prompts may guide the model to adopt different responses, and writing multiple requirements may increase conflict. If a concise response is required but a lengthy example is provided, the model must choose between the two approaches. When selecting examples, first confirm that they demonstrate the same approach, then consider the number. Role settings, examples, and formatting requirements should also be coordinated, and priorities should be clearly defined when conflicts arise.</p>
<p><strong>Principle Two: Negation is not subtraction.</strong></p>
<p>Writing &quot;Do not output code&quot; still places the concept of code within the context, and the model needs to understand the meaning and scope of this prohibition. The expected approach can also be clearly stated, such as &quot;Describe the modification steps in natural language.&quot; This preserves the constraint while providing a usable response method. If clear boundaries such as privacy are involved, the necessary prohibitions should also be retained.</p>
<p><strong>Principle 3: Pulling force decreases with distance of attention.</strong></p>
<p>In long dialogues, a requirement may not be fully utilized even if it remains within the context. It's especially worthwhile to check the model for omissions when key constraints are sandwiched between large amounts of material, or when the objectives discussed have changed. Important requirements can be placed at the beginning or end of the task. When the task enters a new phase, these requirements can be reiterated in conjunction with the current objective, helping the model apply existing requirements to the current judgment.</p>
<p><strong>Principle Four: Irrelevant content is not neutral; it is harmful dragging.</strong></p>
<p>All materials provided to the model become part of the current context. When writing a project report, if old plans, records of other projects, and canceled arrangements are included, the model must first determine which information is still applicable. When organizing the context, prioritize current materials directly related to the task and mark outdated information. Search results also need to be filtered for relevance; more data does not necessarily guarantee a more accurate answer.</p>
<p><strong>Principle Five: Pull only in the direction &quot;the model recognizes&quot;.</strong></p>
<p>The model needs to utilize learned conceptual connections to understand the prompts. &quot;Please review this carefully as an expert&quot; expresses expectation but doesn't specify the division of labor. &quot;Please review this weekly report as a project manager responsible for cross-departmental collaboration&quot; more effectively draws attention to the participating teams, responsible parties, and timelines. Role assignments should be task-related, and the output format should be clear and understandable. Its effectiveness can be assessed by examining the questions and suggestions provided by the model.</p>
<p><strong>Principle Six: Locate first, then explore—the order cannot be reversed.</strong></p>
<p>If project reports consistently refer to Friday's review as Friday's delivery, first check if the model has received the correct project plan and if the examples confuse these two milestones. Reducing the randomness of the generated reports might just lead to the same misunderstanding recurring. Clearly define the direction using facts, examples, and task requirements first, then try different expressions; multiple generation attempts will provide more valuable comparisons.</p>
<p>When modifying prompts, one can first ask what clues the sentence adds to the model, then compare the responses before and after the modification to see if omissions and ambiguities have decreased. Further explanation of the specific computations behind these changes requires analyzing the hidden states and examining the effects of feature interventions, which is also one of the issues in mechanistic interpretability research.</p>
<hr>
<h2>References</h2>
<ol>
<li>
<p><a href="https://tobysguide.com/episodes/2026-08-24-lauren-tan-1000-prs-with-agents/">Lauren Tan: How I Merged 1000 PRs in a Month with Agents — Toby's Guide</a></p>
<ul>
<li>This is an interview with Lauren Tan about how PStack, Skills, and Agents work. The phrase &quot;Pull the agent to a different latent space&quot; in the text comes from a discussion during the interview.</li>
</ul>
</li>
<li>
<p><a href="https://www.ibm.com/cn-zh/think/topics/latent-space">What is potential space? — IBM Think</a></p>
<ul>
<li>IBM used the example of weighing records on a bridge to infer the vehicle model to explain why the &quot;potential&quot; mentioned in the first section can be understood as &quot;implicit&quot;.</li>
</ul>
</li>
<li>
<p><a href="https://www.anthropic.com/research/mapping-mind-language-model">Mapping the Mind of a Large Language Model — Anthropic</a></p>
<ul>
<li>Researchers enhanced the features associated with the Golden Gate Bridge within Claude and observed that it mentioned the bridge more frequently, providing an example for the discussion at the end of the article on how feature interventions affect responses.</li>
</ul>
</li>
<li>
<p><a href="https://aclanthology.org/2023.emnlp-main.762/">Bridging Information-Theoretic and Geometric Compression in Language Models — EMNLP 2023</a></p>
<ul>
<li>The researchers estimated the intrinsic dimensions of the representations within the language model, providing context for the low-dimensional manifold metaphor in the first section.</li>
</ul>
</li>
<li>
<p><a href="https://aclanthology.org/2024.acl-long.828/">Steering Llama 2 via Contrastive Activation Addition — ACL 2024</a></p>
<ul>
<li>The researchers calculated the direction vector from the control example and added it into the model during inference, corresponding to the direct intervention in the first section diagram.</li>
</ul>
</li>
</ol>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[Building a CLI that gives AI agents enough context to act]]></title>
      <link>https://xiaofeng.dev/en/writing/ai-friendly-cli/</link>
      <guid>https://xiaofeng.dev/en/writing/ai-friendly-cli/</guid>
      <pubDate>Sat, 31 Oct 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[First, some background: I have a CLI program used to collect and evaluate responses from different AI platforms in batches. It uses a browser-use interface…]]></description>
      <content:encoded><![CDATA[<p>First, some background: I have a CLI program used to collect and evaluate responses from different AI platforms in batches. It uses a browser-use interface to navigate to the target platform, submit a question, wait for a response, and then extract the content. After the sampling results are saved, they can be further processed by the evaluation workflow.</p>
<p>This program provides sampling and evaluation capabilities via CLI from the outset. Initially, it was directly invoked by a human: preparing input and configuration, executing commands, viewing logs and results, and then deciding on the next step. If the browser was not logged in, it was logged in first; if a platform failed, the cause was checked, and a decision was made on whether to retry.</p>
<p>Later, as these operations were gradually delegated to the Agent, various problems arose, such as: commands getting stuck at confirmation prompts, logs being mixed into the JSON, environment configurations not taking effect, and tasks reporting errors but the process failing to exit. The essence of these problems was that the CLI design was not AI-friendly enough, so I made significant modifications to make it more closed-loop and self-contained.</p>
<p>The most direct benefit and effect is that the agent can obtain complete information, locate problems, solve obstacles, and ultimately achieve the sampling goal without needing to understand the CLI source code or additional user manuals.</p>
<p>The project has been anonymized, and the example commands <code>sampler</code> and platform usage are consistent <code> site-a</code>. Based on this example, I will share my experience in modifying the AI-Friendly CLI.</p>
<p>Let's first look at the main flow of this program. After preparing the questions and configurations, the outer agent calls the CLI step by step, and the sampling command internally operates the browser through browser-use. If a valid login state already exists, sampling can be performed directly, and the results can be saved and evaluated as needed.</p>
<pre><code class="language-mermaid">%%{init: {&quot;flowchart&quot;: {&quot;padding&quot;: 6, &quot;rankSpacing&quot;: 14}}}%%
flowchart LR
    A[&quot;Prepare signed-in session&quot;] --&gt; B[&quot;Collect browser responses&quot;] --&gt; C[&quot;Save results&quot;] --&gt; D[&quot;Evaluate on demand&quot;]
</code></pre>
<p>In this article, &quot;sampling&quot; refers to obtaining answers from the platform page; &quot;evaluation&quot; refers to reading the saved answers and combining them with the evaluation configuration to call the model for analysis. The two can be run separately, therefore, the timeout, cost, and recovery issues of browser waiting and model invocation will be discussed separately later.</p>
<p>The main commands below all use the <code>sampler</code> CLI.</p>
<ul>
<li><code>setup</code>: Generates the basic configuration for the browser runtime environment and control model.</li>
<li><code>auth init site-a</code>: Initiate the platform login process, whereby the user completes the login and saves the browser login state.</li>
<li><code>auth import site-a state.json</code> Import an existing browser login state file.</li>
<li><code>auth status site-a</code> Check if the browser login state for this platform is saved locally.</li>
<li><code>sample run --platform site-a --dataset questions.json</code> Perform browser sampling based on the question set and save the results.</li>
<li><code>runs inspect runs/run-example</code> Offline inspection of a sampled file, summary, and failed items.</li>
<li><code>evaluate run runs/run-example --context context.json</code>: Analyze the saved sampled responses in conjunction with the evaluation configuration.</li>
<li><code>evaluate external request.json</code>: Read external evaluation requests; <code>-</code> when the parameter is changed, read from standard input.</li>
<li><code>config inspect --config sampling.json</code>: View the final value, source, and conflicts of the sampling configuration.</li>
<li><code>doctor browser</code>: Check browser configuration; only then <code>--probe</code> will actual browser or connection detection be performed.</li>
</ul>
<p>The files and directories mentioned above are examples. <code>questions.json</code> They store the question set, <code> context.json</code> provide the evaluation context, and <code> runs/run-example</code> represent the results directory generated from a single sampling. To require JSON output, add the command that supports this option <code>--format json</code>; specific parameters can be <code> sampler &lt;command&gt; --help</code>queried.</p>
<h2>Clearly define configuration priorities and effective sources.</h2>
<p>Before sampling, the Agent needs to configure the browser and control model, and then specify the platform and issue to be collected. During the design <code>setup</code> phase, it's crucial to distinguish which settings can be reused and which should be passed in each time.</p>
<ul>
<li><strong>By <code>setup</code> saving relatively stable configurations</strong>, such as whether to use a local or remote browser, service address, and default control model, subsequent tasks can directly read these settings.</li>
<li><strong>The task is described by runtime parameters</strong>, such as sampling platform, problem set, sampling mode, number of repetitions, and output location. Changing to a different batch of problems does not require re-initialization.</li>
</ul>
<p>Concurrency levels, model selection, and other settings can have long-term default values, while also allowing for parameter overriding during the current run. Temporary overriding only affects the current task; the configuration should only be explicitly updated when long-term changes are needed. This aligns with <a href="https://clig.dev/#configuration">the CLI Guidelines' configuration recommendations</a>: select parameters or configuration files based on their frequency of change, and prioritize explicit parameters.</p>
<p>However, simply specifying priorities is insufficient. The evaluation command previously assigned default values ​​to batch size and concurrency directly at the CLI parameter layer. Even when the user didn't pass parameters, these values ​​still entered subsequent processing, obscuring the environment configuration for batch tasks.</p>
<p>After modification, the CLI first retains the &quot;parameter not provided&quot; status, and then determines the value:</p>
<ul>
<li>If no parameters are passed, the configuration or default value of the corresponding running mode will be read.</li>
<li>Explicitly pass in parameters and use the values ​​provided by the caller.</li>
</ul>
<p>The program can thus distinguish between &quot;no concurrency specified&quot; and &quot;an explicit concurrency level that is exactly equal to the default value&quot;. The sampling configuration also specifies the merging order: CLI parameters take precedence over environment files, environment files take precedence over JSON configurations, and the model's default value is used last.</p>
<p>If a configuration fails to take effect, the Agent needs to know where the value comes from. The newly added information <code>config inspect</code> will list valid configurations, field sources, conflicts, missing items, and ignored configurations to help it determine which layer should be modified.</p>
<h2>Remove manual confirmation before execution</h2>
<p>Once the configuration and task parameters are ready, the program will prompt for confirmation early on. Humans can confirm and continue; the agent, however, needs to recognize the prompts, maintain the process connection, and send input. If the calling tool does not support interaction, the command will stop here.</p>
<p>During the modification, the confirmation prompt was removed from the main execution path, allowing the caller to express their choices via parameters before execution. The initialization setup wizard is still retained, allowing both types of callers to complete the same configuration in different ways.</p>
<ul>
<li>When a user uses the app for the first time, <code>setup</code> they can learn and fill in the information step by step through the wizard, without having to memorize seven or eight options at the beginning.</li>
<li>Once the agent has obtained the necessary configuration, all parameters are passed at once <code>setup</code>. If a non-interactive call lacks a required value, the program will report an error explaining what is missing.</li>
</ul>
<p><a href="https://clig.dev/#interactivity">The CLI Guidelines</a> also recommend providing invocation methods that do not rely on prompts and answers, and explicitly reporting errors when input is missing in non-interactive mode. These practices are beneficial for script automation and are equally applicable to agents.</p>
<p>The platform login process requires users to complete QR code scanning and verification. <code>auth init</code> Provide a login portal; the Agent should instruct users to complete this step before proceeding with sampling.</p>
<h2>Explicitly specify the output format, stream output runtime events</h2>
<p>Once execution begins, the Agent needs to read two types of information: the result when the task ends, and the real-time progress during execution. These address the questions of &quot;what has been accomplished&quot; and &quot;where are we now?&quot;, respectively.</p>
<h3>Explicitly select human-readable or machine-readable format</h3>
<p>When humans use the CLI directly, tables and prompts are easier to read. The agent, however, needs to read the number of successes, failures, and file locations. Therefore, the program provides two result formats:</p>
<ul>
<li><code>--format human</code> Outputs human-readable content, which is also the default format.</li>
<li><code>--format json</code> Output structured results for the Agent or script to parse.</li>
</ul>
<pre><code class="language-bash">sampler sample run --config sampling.json --format human
sampler sample run --config sampling.json --format json
</code></pre>
<p>Early implementations would detect pipeline or CI environments and automatically switch to JSON. Later, this was changed to explicit selection to avoid the same command returning different formats depending on the calling environment.</p>
<p>JSON mode also needs to isolate regular logs. The final JSON itself might be error-free, but if even a single print statement from a third-party library gets mixed in, the entire stdout cannot be directly <code>json.loads()</code> parsed. Therefore, the program redirects the underlying runtime's regular output to stderr, allowing stdout to retain the final JSON.</p>
<h3>Output runtime events line by line using NDJSON</h3>
<p>Browser sampling requires submitting a question, waiting for a response, and then extracting the content. Only the final JSON is returned, and the Agent cannot see the running status during this waiting period.</p>
<p>The program provides an NDJSON event stream for this purpose, writing information such as sampling start and waiting for heartbeats into independent JSON objects, each object occupying one line. The caller can parse it as soon as it receives a complete line, without waiting for the entire JSON array to close. This line-by-line organization method comes from <a href="https://github.com/ndjson/ndjson-spec">the NDJSON specification</a>; to ensure timely event delivery, the program also actively flushes the output buffer after each write.</p>
<p>Below is an example after omitting fields such as timestamps:</p>
<pre><code class="language-jsonl">{&quot;sequence&quot;:1,&quot;event&quot;:&quot;sample_item_started&quot;,&quot;platform&quot;:&quot;site-a&quot;,&quot;query_id&quot;:&quot;q1&quot;}
{&quot;sequence&quot;:2,&quot;event&quot;:&quot;sample_item_heartbeat&quot;,&quot;platform&quot;:&quot;site-a&quot;,&quot;query_id&quot;:&quot;q1&quot;,&quot;elapsed_seconds&quot;:30}
</code></pre>
<p>The sampling command enables <code>--events ndjson</code> event output:</p>
<pre><code class="language-bash">sampler sample run --config sampling.json --events ndjson
</code></pre>
<p>The sampling command writes NDJSON to stdout and ordinary logs to stderr. The <code>--events ndjson</code> and <code>--format json</code> options are mutually exclusive. An agent can then read one event per line without mixing in logs or a different output format.</p>
<h2>Add heartbeat feedback and set timeout limits.</h2>
<p>While the browser waits for a response, the page may remain blank for an extended period. The program periodically reports the current sampled item and the elapsed waiting time via heartbeats, letting the Agent know that the process is still running and which response it is waiting for.</p>
<p>The waiting process must also have a termination condition. The program handles several timeout types:</p>
<ul>
<li><strong>Single sampling timeout</strong>: Record the failure and continue with subsequent tasks.</li>
<li><strong>Browser closed or background cleanup timed out</strong>: End the cleanup wait to prevent CLI from failing to exit even when the task has already reported an error.</li>
<li><strong>User login timeout</strong>: End the current wait and report login failure.</li>
</ul>
<p>When evaluating the call to the model service, automatic retries may also be initiated. <code>Retry-After</code> Upon receiving a server response, the program will wait for that specified time; otherwise, a capped random backoff will be used. Retry events are logged with the failure type and waiting time, allowing the agent to see that the program is automatically retries, thus preventing the repeated initiation of the same task.</p>
<h2>Return to structured errors and fix suggestions</h2>
<p>If you are not logged in, sampling will be blocked before submitting the issue. Simply rerunning the sampling will not solve the problem; you need to log in first.</p>
<p>If only &quot;Login status error&quot; is returned, the agent still needs to guess the reason and find the handling command. The program later added error categories, specific reasons, and remedial suggestions. Below is a simplified anonymization example:</p>
<pre><code class="language-json">{
  &quot;schema_version&quot;: &quot;cli-json/v1&quot;,
  &quot;status&quot;: &quot;failed&quot;,
  &quot;error&quot;: &quot;auth_precheck_failed&quot;,
  &quot;error_category&quot;: &quot;auth_required&quot;,
  &quot;reason&quot;: &quot;Missing auth state for site-a.&quot;,
  &quot;remediation&quot;: &quot;Run sampler auth init site-a.&quot;
}
</code></pre>
<p>These fields provide the information needed for the next step:</p>
<ul>
<li><code>error_category</code> The authentication issue needs to be addressed; simply retrying sampling won't help.</li>
<li><code>reason</code> The missing <code> site-a</code> login status can pinpoint the specific platform.</li>
<li><code>remediation</code>: Which command to run first; if scanning is required, ask the user to complete it before continuing sampling.</li>
</ul>
<p>This is a concrete example of Agent-Friendly's user experience: when an error occurs, it explains the cause and provides actionable next steps, reducing the need to consult manuals, guess parameters, and engage in repeated trial and error. <a href="https://www.anthropic.com/research/writing-tools-for-agents">Anthropic's tool design experience</a> also suggests that error responses should provide specific and actionable improvement information to help the Agent correct subsequent calls.</p>
<p>When standardizing error output, the parameter parsing phase should also be covered. Unknown options may be rejected by the CLI framework before entering the business function; handling JSON errors only within the business function cannot cover these types of errors.</p>
<h2>Returns an execution summary; the complete results are saved to a file.</h2>
<p>After a batch of tasks is completed, the Agent first needs to determine whether the results are usable. Assuming that eight out of ten samples are successful and two fail, simply checking whether the process exited normally is not enough.</p>
<p>The program retains the number of successes, failures, and task status in the summary: _ for all successes <code>completed</code>, _ for partial failures <code> completed_with_errors</code>, and _ for failure status <code> failed</code>. <code>--allow-errors</code> It allows exiting with a success exit code even in the event of sampling errors, but will not change the failure status in the result to success. Subsequent processes can continue to run, and the Agent can also identify tasks that are not yet completed.</p>
<p>The response text can be quite long, so the CLI returns a summary, product path, and subsequent actions, saving the complete input, response, dosage, and summary to the runtime directory. The Agent first determines whether to handle failures, then reads the response or proceeds to evaluation as needed.</p>
<ul>
<li><code>runs inspect</code> Offline check to ensure file integrity and that the number of summaries matches the number of outputs.</li>
<li><code>evaluate run</code>: Evaluate existing sampling results without having to open the browser again.</li>
<li><code>evaluate external</code>: Receives files or standard input and processes data processed by other programs.</li>
</ul>
<p>This aligns with <a href="https://www.anthropic.com/research/effective-context-engineering-for-ai-agents">Anthropic's context engineering approach</a> of retrieving information on demand: first, retain file paths and other references, then read the detailed content when needed. For this sampling program, this also means that existing responses can be reused after modifying the evaluation method, reducing redundant sampling.</p>
<p>After the output is written, the program generates <code>DONE</code> a flag; the specific number of samples completed and which entries failed are described in the summary and task status. The agent can then decide whether to proceed directly to the evaluation or handle the failed items first.</p>
<h2>Clearly define breakpoint recovery capabilities and retry scope.</h2>
<p>After identifying which tasks have failed, the agent needs to determine what will happen if it restarts: whether it can continue from where it left off, or whether it will resample or incur model costs again.</p>
<p>The way samples and evaluations are saved directly affects the cost of retrying.</p>
<ul>
<li><strong>The sampling process accumulates results in memory and writes them to a file upon completion.</strong> If the process is forcibly terminated midway, completed responses may be lost. Rerunning the original input on a failed platform will also repeat entries that were already successful on that platform; therefore, the scope of the rerun needs to be specified to the Agent.</li>
<li><strong>The evaluation process saves checkpoints item by item and records retry budgets.</strong> Saved progress can be reused during re-execution, reducing repeated calls to the billing model. For records where the budget is exhausted, the agent can <code>--retry-failed</code> explicitly initiate a new round of attempts.</li>
</ul>
<p>Retry suggestions should also include necessary input. For example, if the output does not echo the original query, explicitly prompt for additional original input so that the agent can formulate an executable retry command.</p>
<h2>Desensitize sensitive output</h2>
<p>When providing information to the Agent, you also need to handle the keys, cookies, and remote browser connection addresses that the program accesses. Command results enter the Agent context and may also be saved or transferred to other tools.</p>
<p>The program centralizes the desensitization process in the public JSON output, replacing sensitive fields in the returned results and setting access permissions for the authentication file. The agent can obtain diagnostic results without simultaneously receiving authentication credentials.</p>
<p>Remote login <code>viewer_url</code> is used for handover operations. The program retains a complete link in the login handover output, allowing the Agent to hand over the entry point to the user, who can then open a browser to complete the login. Data anonymization must hide authentication credentials while retaining the information necessary to complete the current operation.</p>
<h2>Allow the agent to make informed decisions about the next step.</h2>
<p>The biggest change in this upgrade is that information that previously required manual input has been transformed into content that the agent can directly read and query. Previously, humans would check logins, trace configuration sources, and decide which failed tasks were worth rerunning; now, even with the agent, these judgments still require a basis.</p>
<p>Non-interactive calls, structured output, and clear error messages are standard practice for excellent CLIs. When dealing with agents, I focus more on whether this information can support their continued task completion: what is currently happening, what work has been completed, what obstacles have been encountered, and what operations are still available. The CLI executes specific operations and reports the facts, while the agent analyzes this information in conjunction with the task objectives and selects the next command.</p>
<p><strong>Exposing sufficient information to enable agents to make informed decisions is the most important feature of the AI-Friendly CLI.</strong> It provides summaries of results, progress reports on events, handling suggestions for errors, and retains access to the full content. Ensuring agents have access to relevant information when needed allows them to better leverage their analytical and reasoning capabilities, enabling the CLI's core tasks to be completed more smoothly.</p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[Orchestrating multiple Skills for automated delivery]]></title>
      <link>https://xiaofeng.dev/en/writing/skill-suite-orchestration/</link>
      <guid>https://xiaofeng.dev/en/writing/skill-suite-orchestration/</guid>
      <pubDate>Sun, 25 Oct 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[I recently developed a market research skill suite, designed to guide users from inputting their research needs through the research process, culminating in…]]></description>
      <content:encoded><![CDATA[<p>I recently developed a market research skill suite, designed to guide users from inputting their research needs through the research process, culminating in a viewable and explorable market map. This tool suite comprises five skills. Initially, I allowed users to choose their own skills.</p>
<p>As a developer, I've always had a basic assumption: <strong>users need to understand the components and structure of these tools, know which to use first, which to use later, and who should receive the results of each step</strong>. But after putting it to real users, I found that this expectation was a bit too high.</p>
<h2>Users don't know where to start or how to continue.</h2>
<p>Let me briefly explain the roles of these five skills:</p>
<ul>
<li><strong>Research and Import ( <code>fnb-research-import</code>)</strong>: Clarify research needs, generate research prompts, execute Deep Research and collect results, and then review, verify and import map data.</li>
<li><strong>Product information verification ( <code>fnb-product-catalog-grounding</code>)</strong>: Verify the identity, packaging specifications, channel price and manufacturer claims of specific products, and save the source and pictures.</li>
<li><strong>Social media data collection <code>fnb-product-social-grounding</code>:</strong> Supplement consumer reviews, perceptions, and relevant citations around the selected product line or product.</li>
<li><strong>Market Map Delivery ( <code>fnb-market-map</code>)</strong>: Organizes the stages required for map delivery, opens the map via CLI and checks the display results; it also assumes overall control responsibilities later.</li>
<li><strong>Insight Presentation ( <code>fnb-html-slides</code>)</strong>: Based on existing research and approved materials, extract insights, organize narratives, and create client presentation slides.</li>
</ul>
<p>Each skill's responsibilities can be clearly explained individually, but for users to complete a survey, they also need to know how they connect with each other.</p>
<p>After completing the first version, the user issues I encountered were:</p>
<ul>
<li>I don't know where to start, where to continue, or how to drive the Agent to produce the final result.</li>
<li>They were unfamiliar with the Agent tool (Codex) they were using, and had limited understanding of the prompts and skills.</li>
<li>Even writing a user manual to help users remember the names and calling relationships of the five skills would still be a difficult task.</li>
</ul>
<p>Considering that there are already good solutions for excellent software engineering skills, I ultimately chose to elevate <strong>the Market Map Skill</strong> to the central control entry point, while the suite still consists of five skills. Users only need to describe their goals, and the central control is responsible for scheduling the sub-skills, driving the entire process, and finally delivering the deliverables.</p>
<p>In implementing this, I referenced the Compound Engineering plugin <a href="https://github.com/EveryInc/compound-engineering-plugin/blob/main/skills/lfg/SKILL.md"><code>$lfg</code></a>. It organizes planning, implementation, review, testing, and PR delivery into a sequential workflow. What inspired me was that it defines how to call the next step, how to return from each step, and when to stop.</p>
<h2>First, determine a main storyline that can be completed.</h2>
<p>To ensure the overall control continues to advance, we must first clarify what the final delivery of this mission will be.</p>
<p>My chosen main approach is: from the user proposing the market they want to research, to obtaining the market map. This involves clarifying research requirements, completing Deep Research, reviewing, verifying, and importing the results, and finally confirming that the map actually contains visible data.</p>
<p>Product information can be further supplemented, social media can help understand consumer perception, and existing research can be compiled into insight reports and presentation slides. However, the triggering conditions for these tasks are different, and not all available skills can be arranged into a default, mandatory pipeline.</p>
<pre><code class="language-mermaid">flowchart LR
    A[&quot;Confirm requirements&quot;] --&gt; B[&quot;Deep research&quot;]
    B --&gt; C[&quot;Review and import&quot;]
    C --&gt; D[&quot;Map and verify&quot;]
    D --&gt; E[&quot;Delivery&quot;]
</code></pre>
<p>This diagram only retains the five main stages; the specific verification steps are merged into the corresponding stages.</p>
<p>The basic verification process determines which objects will appear on the map; this is part of the main process. In automatic mode, after the map becomes visible for the first time, it will continue to verify the indicators and displayed products within the area before reporting the results of this round. Therefore, opening the map is an intermediate result and does not mean the end of this round of tasks.</p>
<p>The newly added social media queries and insights demos are optional side quests. Users can choose them after map delivery or submit these tasks separately, without having to run the entire research process from scratch each time.</p>
<p>The central control system schedules corresponding supplementary tasks based on user selections:</p>
<pre><code class="language-mermaid">flowchart LR
    O[&quot;Orchestrating Skill&quot;] &lt;--&gt; P[&quot;Expand product verification&quot;]
    O &lt;--&gt; S[&quot;Collect social data&quot;]
    O &lt;--&gt; H[&quot;Present findings&quot;]
</code></pre>
<p>The double-headed arrows indicate on-demand invocation and result feedback; there is no mandatory order among the three branches. After receiving the results, the central control unit updates the deliverables and next-step options.</p>
<h2>Enable child skills to support automatic execution and result handover.</h2>
<p>With the central control entry point in place, the execution method of sub-skills still needs to be modified. Otherwise, even though the central control knows which skill to call, the process will still stop and wait for the user after each sub-skill completes its task, making it impossible to continue the flow.</p>
<p>LFG uses different calling modes for different sub-skills:</p>
<table><thead><tr><th>mode</th><th>Where is it used?</th><th>Its role in arrangement</th></tr></thead><tbody><tr><td><code class="rounded bg-[#f4f0e3] px-1 py-0.5 text-[0.9em]">return-to-caller</code></td><td><code class="rounded bg-[#f4f0e3] px-1 py-0.5 text-[0.9em]">ce-work</code></td><td>Once the implementation and local verification are complete, the result is returned, and subsequent work is organized by the caller.</td></tr><tr><td><code class="rounded bg-[#f4f0e3] px-1 py-0.5 text-[0.9em]">pipeline</code></td><td>Simplify, browser testing, submit PR, care PR, etc.</td><td>As a step in the assembly line, it completes the process or reports blockages according to the rules of each skill.</td></tr><tr><td><code class="rounded bg-[#f4f0e3] px-1 py-0.5 text-[0.9em]">agent</code></td><td><code class="rounded bg-[#f4f0e3] px-1 py-0.5 text-[0.9em]">ce-code-review</code></td><td>The system reviews the documents without modifying them, and returns the review results to the user for further processing.</td></tr><tr><td><code class="rounded bg-[#f4f0e3] px-1 py-0.5 text-[0.9em]">non-interactive</code></td><td><code class="rounded bg-[#f4f0e3] px-1 py-0.5 text-[0.9em]">ce-compound</code></td><td>Complete the experience accumulation according to non-interactive rules, or explain why you skip it.</td></tr></tbody></table>
<p>These names correspond to their respective responsibilities; not all skills need to implement the same set of parameters. For specific invocation instructions, please refer to <a href="https://github.com/EveryInc/compound-engineering-plugin/blob/main/skills/lfg/SKILL.md">the LFG source code</a> and its <a href="https://github.com/EveryInc/compound-engineering-plugin/blob/main/skills/lfg/references/work-return.md">ce-work return conventions</a>.</p>
<p>In my workflow, <code>mode: auto-delivery</code> describes how the orchestrator handles delivery. A single orchestrator coordinates it, so I did not adopt the <code> return-to-caller</code> name or define another structured return protocol for multiple callers.</p>
<p>However, the results still need to be handed back to the central control: what was completed, where are the deliverables located, what gaps remain, and whether the next step can proceed. This handover information cannot be omitted. Consistency is also needed regarding which report to read next and which entities to work on.</p>
<p>When a sub-skill is used independently, it can be delivered directly to the user; when it is orchestrated by the central control, the result is returned to the central control, which continues to advance the process and makes a unified decision on when to show the user the next option.</p>
<h2>Put research inputs as early as possible</h2>
<p>To reduce repeated confirmations during the process, I will guide users to finalize the research scope and key requirements before starting the research.</p>
<p>There are different questioning rhythms for clarifying needs. For example, one approach <a href="https://github.com/EveryInc/compound-engineering-plugin/blob/main/skills/ce-brainstorm/SKILL.md"><code>$ce-brainstorm</code></a>emphasizes asking one question at a time, gradually moving forward; another approach I referenced <code>$grill-me</code> is to ask follow-up questions in batches, allowing users to answer them all at once.</p>
<p>The current <a href="https://github.com/mattpocock/skills/blob/main/skills/productivity/grilling/SKILL.md"><code>grilling</code> implementation</a> clearly distinguishes between two types of questions: those with already defined premises can be asked in the same round; those that depend on previous answers are reserved for later rounds. Asking questions in a concentrated manner does not mean dumping all questions on the user at once.</p>
<p>In my scenario, inputs such as the research scope should be clearly listed first, using a combination of numbers and text, allowing users to answer in one go. Further confirmation is only needed if new questions arise that would change the research direction.</p>
<h2>Clearly define the handling rules for areas requiring human decision-making.</h2>
<p>Even with pre-selected research input, there may still be situations during execution that require judgment: how to choose the default value, at what confidence level to adopt the research results, to what extent to conduct the review, and when to stop the query.</p>
<p>If these steps are repeatedly paused to ask the user, automated delivery will be constantly interrupted. Therefore, I will write the default strategy and stopping conditions in advance, and explain in the feedback summary what choices were actually made.</p>
<p>For example, fields lacking reliable evidence can be left unaddressed, and existing results can continue to be delivered; when a clear search budget is reached, or no valid new leads are available, the results can be saved and the current round concluded. The completion of the process does not mean that all data has been collected.</p>
<p>Even fallback strategies must have a scope of application. Unverifiable facts cannot be filled in by default values; if missing information would change the research objective, the user still needs to make a decision. Clearly outlining situations that can be handled independently beforehand will reduce unnecessary interruptions.</p>
<h2>After delivery, maintain a clear next step.</h2>
<p>Whether using automated delivery or Skills alone, it's essential to guide users to select the next step. For example, after map delivery, you can expand the scope of product verification, add social media data, or start creating an insight demo.</p>
<p>My approach is to typically provide two or three options, arranged in order of priority. Each option is explained in a clear sentence, with the explanation placed outside the option itself, so that the user doesn't have to read a long internal process first.</p>
<p>The next step should be based on the work already completed. If a verification has been completed and there are no new search leads, the user should not be kept prompted to increase the budget or expand the scope, thus trapping the process at the same stage.</p>
<p>For single-choice questions, the Agent's built-in interactive tools can be used first. For example, the tools provided by the Codex environment <code>request_user_input</code>, or <code> request_user_input_async</code>the tools allowed in the current mode. Multiple research inputs can be further categorized using numbered text sets.</p>
<p>During automatic execution, pre-defined steps continue directly; options are only displayed when the user needs to select a new work area. This way, the user knows where they are and doesn't have to manually switch between sub-skills.</p>
<h2>Master control Skill design experience</h2>
<ul>
<li>Required input must be entered upfront to reduce the need for confirmations during the process.</li>
<li>Define the main delivery line and break down optional enhancements into sub-lines.</li>
<li>Enables child skills to execute automatically and return the results.</li>
<li>Define the default strategy, stopping conditions, and situations where queries are required.</li>
<li>Provide clear next steps based on the actual progress.</li>
</ul>
<h2>Related Links</h2>
<ul>
<li><a href="https://github.com/EveryInc/compound-engineering-plugin/blob/main/skills/lfg/SKILL.md">Compound Engineering: LFG Source Code</a>: How the central control calls various sub-skills, processes the returned results, and promotes delivery.</li>
<li><a href="https://github.com/EveryInc/compound-engineering-plugin/blob/main/skills/lfg/references/work-return.md">LFG: ce-work return convention</a>: The result requirements when returning the implementation phase to the caller.</li>
<li><a href="https://github.com/EveryInc/compound-engineering-plugin/blob/main/skills/ce-brainstorm/references/interaction-rules.md">Compound Engineering: ce-brainstorm interaction rules</a>: a questioning approach for progressively clarifying requirements.</li>
<li><a href="https://github.com/mattpocock/skills/blob/main/skills/productivity/grilling/SKILL.md">Matt Pocock: grilling</a>: ask questions in rounds based on question dependency, focusing on questions that can be answered at the moment.</li>
</ul>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[What Codex Cloud adds to parallel development]]></title>
      <link>https://xiaofeng.dev/en/writing/codex-cloud-parallel-development/</link>
      <guid>https://xiaofeng.dev/en/writing/codex-cloud-parallel-development/</guid>
      <pubDate>Mon, 19 Oct 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[I've recently been reading Lauren Tan's (online name poteto) presentation on parallel agent development. What attracted me most was how she automated the…]]></description>
      <content:encoded><![CDATA[<p>I've recently been reading Lauren Tan's (online name poteto) presentation on parallel agent development. What attracted me most was how she automated the validation and submission of numerous pull requests using Cursor Cloud Agents.</p>
<p>There are already many methods for parallel development on our local machines. So, what are the differences in using them after moving the tasks to the cloud? How do we prepare the environment, will multiple tasks interfere with each other, and how do we retrieve the results after completion?</p>
<p>Lauren uses Cursor Cloud Agents. This time, I chose to try Codex Cloud to see how it supports this cloud-based work style.</p>
<h2>Q1: If parallel development is already possible on the local machine, why do you want to try cloud computing?</h2>
<p>On the local machine, you can use Worktree to prepare independent code directories for different tasks, or you can use Subagents to assign tasks to Agents. The two methods solve different problems: one isolates code modifications, and the other assigns tasks; subagents themselves may not have their own independent working directories.</p>
<p>These methods allow multiple agents to work simultaneously. However, the tasks still run on your own computer, and you still need to manage the dependencies, processes, and resources yourself.</p>
<p>What attracts me to the cloud is the ability to delegate a portion of the task completely: first, clearly explain what needs to be changed and how to verify it, then let the agent complete the modifications, run tests, and submit a PR, which I can then review upon my return.</p>
<p>Codex Cloud allows tasks to resume running after your computer goes to sleep, and you can also return to view and continue tasks from the web, mobile, or desktop. <a href="https://learn.chatgpt.com/docs/cloud">(Official task description)</a></p>
<p>What I'm trying to do is clarify the requirements and acceptance criteria locally during the day, and then put the tasks that can be completed independently into the cloud. This saves me the time spent monitoring the tasks and also gives me the space to move on to other work at the same time.</p>
<h2>Q2: Where exactly does the agent in the cloud work?</h2>
<p>When I first opened the configuration page, the part I didn't understand the most was Environment. Is it a server configuration or a project configuration?</p>
<p><img src="/images/writing/codex-cloud-parallel-development/environment-entry.png" alt="The Codex Cloud environment management portal allows you to create environments."></p>
<p><em>The Codex Cloud environment management portal starts with creating an environment to prepare for development.</em></p>
<p>Using Docker as an analogy makes it easier to understand: first prepare a development environment, then let different tasks start working from this environment.</p>
<p>It's important to distinguish between two things here: the Environment is the reusable prepared result; the Task is a specific task performed based on it. In the new version of Codex Cloud, each task runs in an independent VM and has its own workspace. <a href="https://learn.chatgpt.com/docs/environments/cloud-environments">(Official environment instructions follow.)</a></p>
<p>When creating the environment, first select a GitHub repository. Codex will check the project, install dependencies and tools, and test the workflow. You can add requirements in the dialog box. Once you're sure everything is ready, save and click Publish. <a href="https://learn.chatgpt.com/docs/cloud">Creation Process</a></p>
<p>Publish captures the prepared filesystem state for use by subsequent new tasks. The Docker image analogy is for ease of understanding; the product does not require you to build and push a Docker image yourself.</p>
<p>Therefore, I prefer to understand it as: first, configure an environment that the Agent can start working, and then assign tasks, rather than starting with installing dependencies every time a requirement is made.</p>
<p>This refers to the new environment with Publish and Start skills. When researching, be aware that the official documentation still includes instructions for Codex Cloud (Legacy); the two workflows should not be used interchangeably.</p>
<h2>Q3: After publishing, do I need to reinstall the environment for each task?</h2>
<p>This was also my initial question. If we have to reinstall dependencies and commonly used skills every time we start a task, wouldn't the preparation process be very troublesome?</p>
<p>The configuration page contains two configuration items with similar names but different formats: Install script and Start skill.</p>
<p><strong>The install script is a script that is executed directly.</strong> My configuration is written in Bash, explicitly listing the steps such as checking the Node.js version, installing dependencies, and performing the build. It runs according to script syntax and control flow; which steps are performed first and whether to exit after failure are all defined by the code.</p>
<p><img src="/images/writing/codex-cloud-parallel-development/install-script.png" alt="Bash installation script in the install script editor"></p>
<p><em>My install script: prepares the development environment using specific commands. The image shows the project's custom configuration. It can be edited with the help of AI.</em></p>
<p><strong>The Start skill is a set of Markdown instructions for the Agent to read and follow.</strong> It can use natural language to explain what needs to be done before starting, what situations should be encountered to stop, and what results need to be reported, which the Agent then understands and executes.</p>
<p><img src="/images/writing/codex-cloud-parallel-development/start-skill.png" alt="Natural language start command in the Start skill editor"></p>
<p><em>My starting skill: Requires the Agent to call a specified script before starting a new task, and explains how to handle synchronization failures. The image shows my personal configuration, not the product's default behavior. It can be edited with AI assistance.</em></p>
<p>There's a clear difference between these two diagrams: Install script directly states the command to invoke the script; Start skill tells the Agent when to invoke it and how to handle exceptions. Semantic instructions can also contain deterministic commands, and the two can be used together.</p>
<p>Therefore, &quot;determinism&quot; refers to the way the script is executed, not that the installation result will always be the same; package version, network, and external services will still affect the result. The Start skill is not just another way of writing service startup commands; it can delegate startup requirements and related processing methods to the Agent.</p>
<p>New tasks begin with the published file system; when the repository is refreshed in the background, dependency caches are retained, so installation and startup commands are not rerun. <a href="https://learn.chatgpt.com/docs/environments/cloud-environments#customize-installation-and-startup">Installation and State Reuse Instructions</a></p>
<p>This means that frequently used components should be configured during the environment preparation phase. For me, in addition to &quot;what is installed,&quot; it is more important to check &quot;whether it can be used after installation&quot;: whether the service can start, whether the necessary commands exist, and whether the tests can be executed.</p>
<p>Plan for Skills when you set up the environment. Cloud tasks can use repository Skills, while personal Skills on your machine stay local. Put frequently used project Skills in the repository’s <code>.agents/skills</code> directory. <a href="https://learn.chatgpt.com/docs/build-skills">Codex Skills documentation</a>.</p>
<p>As for plugins installed on my local machine, just because they contain Skills doesn't mean they're also available on the cloud. Especially when it comes to dependencies such as local processes and login authorization, I'll first open a new task to verify them before deciding whether to depend on them.</p>
<p>My preference is to first install a small number of commonly used tools to get the startup and verification working, and then add more as needed for the task.</p>
<h2>Q4: How do I combine the code and results when running multiple tasks at the same time?</h2>
<p>Having understood environment reuse, the next question is: if several tasks use the same environment, will they modify the same file?</p>
<p>Each cloud task has its own independent working file, eliminating the need for additional Worktree configuration to achieve file isolation between tasks. <a href="https://learn.chatgpt.com/docs/environments/modes">Local and cloud environment descriptions.</a></p>
<p>However, file isolation does not guarantee that modifications will be successfully merged. If two tasks each modify the same interface, even if they do not affect each other during execution, conflicts may still occur at the end.</p>
<p>Therefore, I think that version control is still an unavoidable step when migrating from local to cloud. Previously, it might not have been a problem for one person to develop directly on the main branch; now, when several tasks are assigned at the same time, it is best to specify in advance the scope of each modification, which branch it is based on, and where the final delivery will be made.</p>
<p>The code will continue to change. While the official documentation has a backend repository refresh mechanism, for tasks that rely on the latest modifications, I still require the Agent to confirm the branch and baseline commits before starting, to avoid discovering after completion that the wrong starting point was used.</p>
<p>More importantly, the criteria for &quot;completion&quot; should be clearly stated. For example, a requirement for completing a task could be given as follows:</p>
<blockquote>
<p>Complete the specified functionality, run the project-defined tests and checks, and submit a pull request (PR). Explain what was changed, which validations were performed, and which checks failed to complete. If any obstacles are encountered, provide the specific reasons and the results achieved.</p>
</blockquote>
<p>This is a delivery requirement, not a default behavior that every cloud task will automatically perform. Codex supports submitting code or creating a PR after reviewing changes and test results, but whether a task requires a PR and what evidence needs to be attached still needs to be clearly agreed upon. <a href="https://learn.chatgpt.com/docs/cloud">Official Task Workflow</a></p>
<p>My interest in Lauren's practices stems from this very point: tasks can progress autonomously, and deliverables that can be reviewed. Otherwise, running multiple agents simultaneously could ultimately lead to people questioning each one individually about &quot;what changes were made&quot; and &quot;whether it was tested.&quot;</p>
<h2>Q5: After the task is completed, will the environment and modifications remain?</h2>
<p>The most confusing thing here is the environment used for the next task and the scene left behind by the current task.</p>
<p>Existing tasks retain their own files and installed tools; to change the starting point of subsequent tasks, the environment needs to be edited and the task republished. The fact that a tool is temporarily installed in a task does not mean that other tasks will automatically acquire it.</p>
<p>Similarly, code changes made in one task won't automatically propagate to other tasks simply because the environment exists. Code changes still need to be committed and pushed via Git, allowing subsequent tasks to continue based on the corresponding branches. ( <a href="https://learn.chatgpt.com/docs/environments/modes">The relationship between environment and task)</a></p>
<p>The old task state has a retention period: the saved VM state can be restored for a maximum of 7 days by default, starting from the last time a dialogue or recovery task was initiated. <a href="https://learn.chatgpt.com/docs/environments/cloud-environments#vm-specifications">State Retention Instructions</a></p>
<p>Therefore, I don't consider &quot;being able to come back and open the task later&quot; as a way to save results. Committing code promptly, saving reports and necessary outputs separately, makes it easier to explain things clearly when continuing later.</p>
<h2>Q6: Which tasks are I willing to delegate to the cloud, and which should remain on my local machine?</h2>
<p>Based on this experience, I will prioritize tasks with clear boundaries and those that can be automatically verified, such as supplementing tests, fixing specific issues, organizing documentation, or manageable dependency upgrades. These are the usages I plan to try gradually, and they cannot yet be considered large-scale workflows that have been validated.</p>
<p>Tasks that rely on local state will remain on my local machine. Local files, running services, browser login status, and VPN access will not be automatically transferred to the cloud. <a href="https://learn.chatgpt.com/docs/environments/modes">The difference between local and cloud environments.</a></p>
<p>Browser-related tasks require particular attention. The official documentation still lists computer and browser operations as capabilities not yet supported in cloud environments. Whether installing Headless Chrome, Playwright, or Agent Browser will meet project requirements needs further testing. <a href="https://learn.chatgpt.com/docs/environments/cloud-environments#current-limitations">Current limitations</a></p>
<p>Network access also needs to be prepared separately. It's worth checking which package management sources, APIs, and sites need to be accessed, whether the domains have been allowed, and whether authentication has been configured before deploying the environment.</p>
<p>Furthermore, moving to the cloud does not mean you have an additional separate credit limit. Local and cloud tasks share the same data allowance, but cloud tasks may consume more; the exact consumption depends on the model and task. <a href="https://learn.chatgpt.com/docs/pricing">(Usage details )</a></p>
<p>Regarding the &quot;automatic start every night&quot; feature, scheduling methods are also involved. Desktop scheduled tasks, web tasks, and GitHub Actions each have their own execution conditions; you can't assume they all run in this deployed environment just because you see &quot;scheduled.&quot; (See also: <a href="https://learn.chatgpt.com/docs/automations">Scheduled Task Explanation</a>, <a href="https://learn.chatgpt.com/docs/github-action">GitHub Action Explanation)</a></p>
<p>My current priority is to first establish a complete task: the environment can be reused, the agent can complete modifications and verifications, and finally, a PR that is easy to review is submitted. Once this process is reliable, I can then increase the number of parallel processes or add timers and event triggers, so I can be confident in knowing where my submitted work is at.</p>
<hr>
<p>Product mechanism verification date: 2026-10-18. This article discusses the new version of Codex Cloud; cloud compatibility of browser tools and full plugins has not yet been tested.</p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[Why I open the slide deck when using an AI agent to create it]]></title>
      <link>https://xiaofeng.dev/en/writing/computer-use-ppt/</link>
      <guid>https://xiaofeng.dev/en/writing/computer-use-ppt/</guid>
      <pubDate>Sun, 18 Oct 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[Using AI to create PPTs is probably a very common practice nowadays. Currently, there are essentially two approaches:]]></description>
      <content:encoded><![CDATA[<p><img src="/writing/wechat-tech-assets/computer-use-ppt/cover.jpg" alt="Computer Use: Creating a PowerPoint Presentation: Open PowerPoint and check the actual effect."></p>
<p>Using AI to create PPTs is probably a very common practice nowadays. Currently, there are essentially two approaches:</p>
<p>Either I use some dedicated PPT skills, or the skills that come with WorkBuddy or Trae to directly generate PPTX; or I write HTML directly and present it using HTML.</p>
<p>I'm not satisfied with either of these approaches—the former can't be modified to &quot;look right,&quot; and the latter is neither easy to modify nor can it be delivered.</p>
<h2>1. Writing HTML: It's inconvenient for humans to modify, and modifying it with AI is a major undertaking.</h2>
<p>The problem with directly writing HTML is that it's not suitable for human editing: HTML pages are basically impossible to modify manually; only AI can modify them. While AI can do a decent job, it often involves significant changes, making the modifications neither simple nor truly native.</p>
<p>Furthermore, HTML has an inherent flaw: you can't share it with others, and others can't build upon it to continue the iteration.</p>
<p>A few months ago, I also used HTML generation tools like OpenDesign. On the surface, it seems to have a lot of templates, but the bigger problem is that it can't be perfect from the start, and the effects of subsequent fine-tuning are not very good—I didn't find many that were particularly perfect, and it's still a long way from being truly usable in work.</p>
<h2>II. Writing PPTX: Correct formatting does not mean &quot;it looks right&quot;.</h2>
<p>Therefore, the ability to create and modify native PowerPoint presentations is still very important. The problem with going down the PPTX route is that the final exported version will always have some details that don't look right to the human eye. Here, &quot;looks right&quot; refers to whether it looks right to the naked eye, not just whether the formatting is correct—these are two different things, and the former is much more important.</p>
<p>These details may be:</p>
<ol>
<li>The differences between WPS and PowerPoint software are only one aspect;</li>
<li>More issues are related to font, alignment, font size, font weight, and color: these are easily recognized by humans, but AI struggles to judge them from a purely code-based perspective.</li>
</ol>
<p>While AI has a very good understanding of PowerPoint formatting, whether a PowerPoint presentation is truly correct to a human eye after opening it can only be truly understood after opening the software. Ultimately, it's a matter of aesthetics, which is difficult to express to AI in words. Simply relying on code to infer is highly uncertain; you still have to open it and see for yourself. This includes things like module borders and content alignment, which are complex issues even within the HTML domain.</p>
<h2>III. Codex implementation: Open PowerPoint and take a look.</h2>
<p>I recently discovered a good approach: using Codex's ComputerUse capability.</p>
<ul>
<li>Codex already has the ability to edit PPTX files.</li>
<li>It can open your local PowerPoint software through ComputerUse, observe the final rendered effect, and correct some obvious problems based on the screenshot.</li>
<li>Ultimately, no further conversion is needed; the output is simply a PowerPoint presentation.</li>
</ul>
<p>Taking all three points into account, I believe this is the best solution under the current circumstances.</p>
<h2>IV. The value of Computer Use: Understanding the interface and proceeding based on the results.</h2>
<p>Computer Use can be achieved through tool calls, but the model still needs to understand the interface, locate the object to be operated on, and decide the next step based on the screen after the operation.</p>
<p>OpenAI's early training of CUA also covered these capabilities: supervised learning trained screen awareness and accurate clicks, while reinforcement learning improved reasoning, error correction, and the ability to handle unexpected situations. The key was to allow the model to complete tasks through an &quot;observation-operation-re-observation&quot; process. <a href="https://openai.com/index/operator-system-card/">(Official training instructions)</a></p>
<p>This allows AI to use software without dedicated APIs, but it doesn't mean it can immediately master unfamiliar interfaces; trial and error may still be necessary. <a href="https://openai.com/index/computer-using-agent/">(Introduction to CUA technology)</a></p>
<h2>V. Conclusion: Involve the final image in the revision process.</h2>
<p>For creating PPT presentations, my desired workflow is simple: generate and modify the PPTX file using code, then open PowerPoint to check the actual effect, and continue making changes if issues such as overflow, obscuring, or alignment are found.</p>
<p>Being able to see something doesn't necessarily mean it has good aesthetic sense, but it gives AI the opportunity to check the results itself, reducing the need for me to repeatedly take screenshots and describe the problems. That's the value of &quot;taking a quick look at the software&quot;.</p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[Using a stronger model to improve another model’s prompts]]></title>
      <link>https://xiaofeng.dev/en/writing/harness-engineering-prompt-optimization/</link>
      <guid>https://xiaofeng.dev/en/writing/harness-engineering-prompt-optimization/</guid>
      <pubDate>Sat, 26 Sep 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[In July of this year, I read Lilian Weng’s article on Harness Engineering. She discussed iterative improvements around the model’s operating environment…]]></description>
      <content:encoded><![CDATA[<p><img src="/writing/wechat-tech-assets/harness-engineering-prompt-optimization/cover.png" alt="Harness Engineering: Hints for optimizing the target model using advanced models"></p>
<p>In July of this year, I read Lilian Weng’s article on Harness Engineering. She discussed iterative improvements around the model’s operating environment [1]. Cue words are part of this environment (Harness), and I started to try a more specific question: Can higher-level models help us improve the complex cue words used by lower-level models?</p>
<p>The terms &quot;high-level&quot; and &quot;low-level&quot; are relative: the high-level model is responsible for analysis and proposing modification suggestions, while the low-level model is the target model for the actual execution of the prompts.</p>
<p>The scenario I encountered involved brand discovery: identifying mentioned brands from web pages or search materials, determining which brands compete with or substitute for the target brand's related businesses, and finally outputting candidate brands. Even if customers, channels, partners, and tools appear in the materials, they may not necessarily meet the criteria. The prompts consist of system prompts, user prompts, and few-shot examples.</p>
<p>The challenge in optimization lies in determining whether the problem stems from the rules, task descriptions, examples, or model selection; it also involves deciding on the direction of exploration and prioritizing reducing false negatives over false positives. In the initial rounds, I simply allowed the advanced model to freely propose solutions based on the prompts, but the results were inconsistent: sometimes new solutions were worse than old ones, so I would switch directions and try again. Such exploration consumed resources and time, but it didn't necessarily explain where the problem lay.</p>
<p>We need a comprehensive methodology and process to help advanced models find optimization directions and decide whether to adopt them based on evaluation results. This includes the following aspects:</p>
<h2>Fixed target model and execution environment</h2>
<p>The same prompts can perform completely differently on different models and under different inference modes. A good performance on GPT does not guarantee effectiveness on the Mini. Optimization must be tailored to the specific target model and mode being used.</p>
<p>I initially tried Doubao, DeepSeek Flash, DeepSeek Pro, and GPT, but none of these models met the task requirements. This led me to shift my optimization focus to the prompts; however, this alone doesn't prove that the model's capabilities were unaffected. Once the target model was determined, subsequent evaluations needed to fix the model and inference mode, and results from different execution environments couldn't be directly compared.</p>
<p>This task involves single-round prompt word determination. The execution end only requires one LLM call, and can run automatically with fixed hyperparameters and batch scripts. I used Codex <code>sol</code> to provide modification suggestions, while the execution scripts were placed in an isolated environment. Each round retains the prompt word version, call parameters, input, output, and score to avoid miscalculating changes in the model or running mode as improvements brought by the prompts.</p>
<h2>Break down the cue words into distinguishable parts</h2>
<p>Complex prompts, if not layered, can easily become structurally confusing and make it difficult to determine where to begin modifications. I break them down into system prompts, user prompts, and few-shot examples. To maintain generalization, I prioritize optimizing user prompts; system prompts mainly define identity and core task objectives and do not require frequent changes; few-shot examples are used to present ambiguous boundaries that are difficult to explain with rules, adding distinguishing positive and negative cases.</p>
<p>Once the responsibilities of each part are clearly defined, it becomes easier to check for duplication, ambiguity, or conflict between them. The target model also follows instructions at different levels. It may judge that the condition is met under one rule, but make the opposite judgment under another rule, ultimately swinging back and forth between different cases.</p>
<h2>Fixed evaluation data and indicators</h2>
<p>Evaluation data should include real-world failure cases, cover key boundaries, and be prioritized as P0, P1, P2, etc. Metrics should be selected based on task risk: if missed detections have a greater impact, prioritize recall; if false positives are more costly, prioritize precision; when both are equally important, then consider the F1 score. Each candidate version should be compared using the same batch of data and the same set of criteria before deciding whether to retain it.</p>
<h2>Incorporate the execution trajectory of the target model into the diagnosis</h2>
<p><strong>I meticulously record the inference content ( especially the thought process</strong> ), i.e., the trajectories, returned by the target model for each call, along with the corresponding prompt word version, input, output, and evaluation labels. The advanced model can then compare these specific trajectories to identify which rule, example, or relation judgment went wrong. This allows for adjustments to be made based on actual failures, rather than relying solely on the advanced model's guesses based on the prompt word text.</p>
<p>The reasoning returned by the model provides diagnostic clues but cannot prove the model's internal decision-making process on its own. During analysis, the trajectory must be cross-checked against the original input, final output, and evaluation labels.</p>
<h2>Results of the brand discovery task</h2>
<p>This approach was used to iterate on brand discovery keywords. After less than ten rounds of optimization, the final keyword precision was 92.31%, recall was 88.89%, and F1 score was 90.57%.</p>
<h2>What problems is this method applicable to?</h2>
<p><strong>Applicable conditions:</strong></p>
<ol>
<li>The solution generation model differs from the actual execution model, and optimization is required for the execution model.</li>
<li>The task uses complex prompts and is executed as a single-round LLM call.</li>
<li>Evaluations can use explicit labels and fixed metrics.</li>
<li>Time or tokens are limited, so it's necessary to control the cost of trial and error.</li>
<li>The design space can be limited to a few verifiable directions, eliminating the need for large-scale searches.</li>
</ol>
<p><strong>Limitations of this experiment:</strong></p>
<ol>
<li>The final prompt word version was only called 5 times, so there is limited evidence of its stability.</li>
<li>The accuracy of the judge process was not evaluated.</li>
<li>The ability to generalize to unseen data was not verified, nor was cross-model compatibility verified.</li>
</ol>
<h2>refer to</h2>
<p>[1] Lilian Weng, &quot;Harness Engineering for Self-Improvement&quot;, <em>Lil'Log</em>, July 4, 2026. <a href="https://lilianweng.github.io/posts/2026-07-04-harness/">Original text</a></p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[Four attempts at Deep Research: What brought me back to prompts]]></title>
      <link>https://xiaofeng.dev/en/writing/deep-research-attempts/</link>
      <guid>https://xiaofeng.dev/en/writing/deep-research-attempts/</guid>
      <pubDate>Tue, 22 Sep 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[I've recently been working on a complex consumer goods market survey, going from "rigorous local research" all the way to Kimi DeepResearch, encountering…]]></description>
      <content:encoded><![CDATA[<p>I've recently been working on a complex consumer goods market survey, going from &quot;rigorous local research&quot; all the way to Kimi DeepResearch, encountering various pitfalls along the way when integrating with DeepResearch. It's worth discussing this separately.</p>
<h2>Attempt 1: Directly call the Deep Research API or plugin capabilities</h2>
<p>Conclusion: In-depth research capabilities are mainly provided through web pages or in-product plugins; developers cannot directly integrate them into their own processes via module calls or API calls.</p>
<ul>
<li><strong>OpenAI</strong> 's official documentation states that the Deep Research model can be used via the Responses API <code>o3-deep-research</code>( <code> o4-mini-deep-research</code>Deep <a href="https://developers.openai.com/api/docs/guides/deep-research">Research Guide</a> ), requiring at least one data source (web search, remote MCP, or file search). Starting September 9, 2026, OpenAI officially released the Deep Research plugin (version 0.1.14) in ChatGPT Business Edition. Work/Codex users can <code>@Deep Research</code> use it across various platforms, consuming existing credits or workspace credits. However, in practice, it cannot be directly called via module within non-Business Work/Codex subscriptions; the API is currently not suitable for scenarios in China.</li>
<li>GitHub Issue <a href="https://github.com/openai/codex/issues/29741">#29741</a> is a feature request to add a native Deep Research task mode to the Codex Mac app, enabling research to be performed within the current workspace context. The issue points out that ChatGPT's Deep Research and Codex's workspace context are currently disconnected, and calling the API separately incurs additional charges.</li>
<li><code>o3-deep-research</code> The model has been marked as Deprecated, with a retirement date of November 19, 2026. The replacement model is <code> gpt-5.6-sol</code>( <a href="https://learn.microsoft.com/azure/foundry/openai/concepts/model-retirement-schedule">Azure Model Deprecation Program</a> ). OpenAI appears to be migrating to a base model + search interface model, rather than maintaining independent deep research models.</li>
<li><strong>The in-depth research capabilities of domestic products such as Doubao and Kimi</strong> are also limited to the web-based experience, and the API platform does not provide a separate endpoint for in-depth research.</li>
<li>The search scale of a single deep research study is typically in the hundreds, with public sources showing a typical number of 50–200 sources ( <a href="https://presenc.ai/research/deep-research-mode-comparison-2026">comparison of Deep Research models</a> ), and some complex tasks may have more.</li>
</ul>
<h2>Attempt 2: Local Simulation of Multi-Round Search Research / Goal Mode</h2>
<p>I've tried both approaches: using <code>web_search</code> the &quot;+&quot; plugin to search for APIs and simulate them locally; or enabling Goal mode for long-term tasks.</p>
<p>A common problem is <strong>the continued need to define the research scope, output boundaries, and constraints.</strong> Without clearly defined boundaries, its output is highly unstable.</p>
<p>Specific pitfalls:</p>
<ul>
<li>When Codex connects <code>web_search</code> to both the Doubao search API and the Doubao search API, it will switch between the two sources, resulting in a less effective performance compared to using a single source.</li>
<li>The Doubao search API cannot retrieve the full text of web pages or PDF content; it can only retrieve summaries and excerpts—this is another, more complex issue.</li>
<li>Moreover, it did not solve the fundamental problem: long-range tasks.</li>
<li>Goal mode is actually less useful: it has strict requirements for research boundaries and often ends the task prematurely because the prompts are too strict.</li>
<li>Sub-proxies are useless. The overhead of contextual disconnect far outweighs the benefits of division of labor.</li>
</ul>
<h2>Attempt 3: Simulate using open-source Skills</h2>
<p>After searching extensively, I found a lack of high-star skill repositories or finished products, and there were few use cases in the community, making the effectiveness unclear. Furthermore, given that skills are essentially suggestion words, the stability of multi-round research is a major issue, making it difficult to quickly verify the effectiveness of budget forcing. Unless it can achieve the 800-retrievable-times results of OpenAI/Kimi's in-depth research, this approach is not worth trying.</p>
<h2>Attempt 4: Designing prompts to navigate back to the webpage for in-depth analysis</h2>
<p>After going around in circles, we finally returned to the web-based in-depth research solution, since it did produce a reasonably high-quality result and diligently performed hundreds of searches. More effort should be focused on designing helpful keywords.</p>
<p>Here are a few takeaways after reviewing best practices for OpenAI deep research prompts:</p>
<ul>
<li><strong>Being too lenient or too strict is not good.</strong> If it's too lenient, the model will run wild; if it's too strict, it will become a workflow and lose the flexibility of the research.</li>
<li><strong>Define the outcome, not the process.</strong> Tell it what the final delivery should be, rather than telling it what to do in the first step and what to do in the second step.</li>
<li><strong>For complex research, methodological rules are necessary.</strong> Some macro-level methodological conventions are still essential. These are actually part of the final result, not just the process. For example, whether to use cross-validation, whether to cite sources, and whether to distinguish between facts and speculation. These are research norms, belonging to the quality standards of the results.</li>
<li><strong>Schema and data cleaning should not be the focus of research.</strong> Prescribing a JSON schema from the outset will force the model to meet formal field requirements, impacting research accuracy. Promote a broad-recall approach to research, followed by grounding for convergence and structuring. In-depth research is essentially about high recall; avoid excessive data processing and cleaning.</li>
<li><strong>OpenAI</strong> initially appeared to have read over 800 links, but the results were poor. Many links were merely skimmed from the titles, with little actual understanding.</li>
<li><strong>Kimi</strong> is much better than OpenAI. Visibility is good (50 samples at a time, further exploration planned), and it has friendly Chinese source data.</li>
</ul>
<p>For complete practice, you can refer to <a href="https://developers.openai.com/api/docs/guides/deep-research">the OpenAI Deep Research Guidelines</a> —which can specify the research question, expected results, relevant constraints, and report structure and sources; for cue word practice for long-term tasks, refer to <a href="https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices">Claude Cue Word Best Practices</a>.</p>
<h2>The structure I ultimately adopted</h2>
<p>The prompts are divided into four parts:</p>
<ol>
<li><strong>Role and Task Definition</strong>: Clearly define the research subject's identity, research objectives, and deliverables. The report is used for data import and manual review of the structured market map, with the following priorities: factual accuracy and traceability, complete candidate coverage, comparable scope, and complete numerical values. Accuracy must not be sacrificed to meet field requirements, nor should verified market participants be deleted due to missing numerical values.</li>
<li><strong>Fixed research scope</strong>: Define the region, channel, included categories, excluded categories, research window, base year, and currency in tabular form. This part corresponds to the &quot;pre-definition of research scope&quot; mentioned earlier—without definition, the output will be unstable.</li>
<li><strong>Research and selection rules</strong>: There are 13 rules in total, covering candidate coverage, entity level (company/brand/product line/SKU), source priority, cross-validation, numerical property labeling (direct disclosure/calculation/estimation/proxy/unavailable), tier judgment, classification, comparability during growth periods, and termination conditions. This section corresponds to the &quot;macro-process in research methodology belongs to the result quality standard&quot; mentioned earlier—it does not specify the execution process, but rather the research specifications.</li>
<li><strong>The sole output format</strong> is a fixed Markdown template containing three parts: a market overview table, product line templates (each repeated), and an appendix for sources and data gaps. All sources are grouped in the appendix, and no links are embedded in the main report tables. The template structure is relatively loose, JSON schema is not required, and missing values ​​are marked as &quot;unavailable&quot;—corresponding to the earlier point that &quot;schema and data cleaning should be left to subsequent grounding convergence.&quot;</li>
</ol>
<p>The overall approach corresponds to the aforementioned principles: the research scope is defined by tables, the research specifications are defined by rules rather than the execution process, and the output only provides templates without constraining the schema to ensure high recall. The structuring and data cleaning are left to later convergence.</p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[Five types of AI search APIs, from SERPs to agentic search]]></title>
      <link>https://xiaofeng.dev/en/writing/ai-search-api-comparison/</link>
      <guid>https://xiaofeng.dev/en/writing/ai-search-api-comparison/</guid>
      <pubDate>Sun, 13 Sep 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[Today I'd like to talk about the search APIs used behind various AI systems.]]></description>
      <content:encoded><![CDATA[<p>Today I'd like to talk about the search APIs used behind various AI systems.</p>
<p>Initially, large models didn't have any tools. They answered questions using only their own intrinsic knowledge. But later, it was discovered that models can have illusions: what they say sounds plausible, but the facts may not be accurate. So now, the vast majority of AI applications—whether it's the apps we use every day or AI products developed by developers—integrate with search APIs to help the models with grounding.</p>
<h2>Why does AI search need grounding?</h2>
<p>Grounding means ensuring that the content generated by the model is &quot;grounded&quot; on certain external, verifiable information or facts, rather than relying on knowledge in the model's parameters or being freely generated. There are many methods for grounding; the model can calculate it itself or look for external data. Real-time web page searching is the most important grounding method. Therefore, some search API vendors position themselves very directly: &quot;A world knowledge search engine for AI.&quot;</p>
<h2>Why can't we just use Google/Bing's API?</h2>
<p>Many people ask: Since there is already a search engine, why not just call the search engine's API?</p>
<p>The first <strong>change is in the interface itself</strong>. Google's <a href="https://developers.google.com/custom-search/v1/overview">Custom Search JSON API</a> is no longer accepting new customers, but existing customers can use it until January 1, 2027; Microsoft discontinued the Bing Search API on August 11, 2025, recommending migration to Azure AI Agents' <a href="https://learn.microsoft.com/zh-cn/lifecycle/announcements/bing-search-api-retirement">Grounding with Bing Search. Google also officially launched</a> <a href="https://cloud.google.com/blog/products/ai-machine-learning/rag-and-grounding-on-vertex-ai">Grounding with Google Search</a> in June 2024.</p>
<p>The second reason is more important: <strong>models and people view search results differently</strong>.</p>
<p>Humans use search engines, enter a few keywords, get a page of results, and then click through each result. Traditional search engine ranking also helps people do this: it ranks the results most likely to be clicked first.</p>
<p>The reading methods of the models differ. As long as the content fits within the context, a longer article is acceptable; the model doesn't need to flip through page after page. Getting the link first, then opening the webpage, and then reading the text is slower and doesn't align with how AI is used. The model cares about information relevance, not whether the reader will click on the first item on the first page. Therefore, most AI-oriented search APIs perform a reranking process for each article, placing truly relevant content at the top.</p>
<h2>How many categories are there for current search APIs?</h2>
<p>These five categories are based on the final deliverable. A single vendor can provide two or three types of interfaces simultaneously; cloud vendors, model vendors, and third-party companies may all appear in the same category, the key is which step they complete for you.</p>
<table><thead><tr><th>type</th><th>Representative interface</th><th>What scenarios are suitable?</th></tr></thead><tbody><tr><td>Search Results API (SERP API)</td><td>Bocha, Doubao Search, Xiaosu Smart Search, Jina Search, Tavily Search, Firecrawl Search, etc.</td><td>Customize your own RAG, question-and-answer, and search processes</td></tr><tr><td>Web Data API</td><td>Jina Reader, Xiaosu Full-Text Search, Firecrawl Scrape / Crawl / Map / Extract / Agent, Tavily Extract / Crawl / Map, etc.</td><td>After searching, continue reading web pages, scraping, or extracting data.</td></tr><tr><td>Model search tool</td><td>OpenAI, <code class="rounded bg-[#f4f0e3] px-1 py-0.5 text-[0.9em]">web_search</code> etc.</td><td>The goal is for the model to decide for itself whether to search and what to search for.</td></tr><tr><td>Online Q&amp;A Agent (Agentic Search)</td><td>Volcano Engine Online Q&amp;A Agent, Bocha Agent Search, Kimi Agentic Search, etc.</td><td>The platform agent needs to complete the online Q&amp;A.</td></tr><tr><td>Research-based agent services</td><td>OpenAI deep research, Tavily Research, etc.</td><td>Competitive analysis, product selection, long reports, and cross-source verification</td></tr></tbody></table>
<p>The first category is &quot;providing you with a batch of search materials&quot;; the second is &quot;reading out the content of web pages&quot;; the third is &quot;letting the model use the search itself&quot;; the fourth is &quot;letting the platform agent complete a round of online question answering&quot;; and the fifth is &quot;handing over the search, reading, and reasoning to the agent to complete a research study.&quot; This approach makes the boundaries clearer.</p>
<p>Tavily and Firecrawl can be viewed together: both have interfaces for both the first <code>/search</code> and second categories of web page reading, traversal, and extraction. The branching point is: Tavily <code>/research</code> belongs to the fourth category; Firecrawl <code>/agent</code> belongs to the second category, delivering independently acquired web page data without providing research reports. The API <a href="https://docs.tavily.com/documentation/api-reference/introduction">overviews of Tavily</a> and <a href="https://docs.firecrawl.dev/api-reference/introduction">Firecrawl</a> list these endpoints separately.</p>
<p>By default, Firecrawl’s <code>/search</code> returns the URL, title, and description. Add <code> scrapeOptions</code> to include page content. <a href="https://docs.firecrawl.dev/api-reference/endpoint/search">Firecrawl Search API documentation</a>.</p>
<p>Xiaosu also covers the first two categories: intelligent search handles semantic retrieval, and full-text search directly returns the webpage content. The official product page describes them as search and content retrieval capabilities, supporting output formats such as Markdown, Text, and HTML. <a href="https://xiaosuai.com/product-search.html">Xiaosu Intelligent Search</a>. Jina <code>s.jina.ai</code> combines webpage search and result page retrieval in a single call; <code> r.jina.ai</code> it also specifically converts known URLs into content suitable for model retrieval. <a href="https://jina.ai/embeddings/">Jina API</a>.</p>
<h2>Vertical category search: another axis</h2>
<p>Vertical search is categorized by data scope and overlaps with the five types of interfaces mentioned above. Bocha's Agent Search and Kimi's Agentic Search belong to the fourth category of vertical search versions: the former lists agents such as restaurants, hotels, attractions, airline tickets, train tickets, enterprises, academic institutions, and document repositories; the latter can access specialized databases such as those from the financial, corporate, academic, and World Bank sectors.</p>
<p><img src="/writing/wechat-tech-assets/ai-search-api-comparison/%E5%8D%9A%E6%9F%A5AgentSearch%E6%99%BA%E8%83%BD%E4%BD%93%E5%88%97%E8%A1%A8.png" alt="List of agents for Agent Search"></p>
<p><img src="/writing/wechat-tech-assets/ai-search-api-comparison/KimiAgenticSearch%E4%B8%93%E4%B8%9A%E6%95%B0%E6%8D%AE%E5%BA%93.png" alt="Kimi Agentic Search's professional database"></p>
<h2>Category 1: Search Results API (SERP API)</h2>
<p>These types of interfaces are closest to the English term SERP API, where SERP stands for Search Engine Results Page. Interfaces like Bocha and Doubao Search take a query as input and output a batch of search materials that can be further processed by the model. They may not necessarily come from the same data source, but their deliverables are very similar: URL, title, summary, text snippets, time, relevance, or ranking information.</p>
<p>However, the &quot;search results API&quot; in AI search goes one step further than the traditional SERP API. The traditional interface mainly restores a page of search results; this interface provides a longer summary, text snippets, and ranking signals together, making it easier for the model to consume directly.</p>
<p>The search entry points for Tavily, Firecrawl, Xiaosu, and Jina also fall into this category: they receive queries and return search results, content, or relevance scores; the caller still decides the query, the number of results, and how to use the material subsequently. Xiaosu provides search results along with the full text of the webpage, while Jina Search also converts the retrieved pages into model-readable content. <a href="https://docs.tavily.com/documentation/api-reference/endpoint/search">The Tavily Search documentation</a>, <a href="https://docs.firecrawl.dev/api-reference/endpoint/search">Firecrawl Search API documentation</a>, <a href="https://xiaosuai.com/product-search.html">Xiaosu Smart Search</a>, and <a href="https://jina.ai/embeddings/">Jina API</a> all provide this type of interface.</p>
<p>In this Bocha request, the caller supplies <code>query</code>, <code> summary</code>, <code> freshness</code>, and <code> count</code>. The response already includes the URL, <code> snippet</code>, <code> summary</code>, site name, and publication time. The application can use that information to pick which results to pass to the model.</p>
<p><img src="/writing/wechat-tech-assets/ai-search-api-comparison/%E5%8D%9A%E6%9F%A5%E6%90%9C%E7%B4%A2API%E8%BF%94%E5%9B%9E%E7%A4%BA%E4%BE%8B.png" alt="Bocha Search API Request and Response Examples"></p>
<p>The Doubao Search documentation distinguishes <code>Snippet</code>, roughly 200 Chinese characters for list views, from <code> Summary</code>, typically 500–1,000 characters related to the query and suited to model input. The API can also return <code> Content</code>, the publication time, and <code> RankScore</code>.</p>
<p><img src="/writing/wechat-tech-assets/ai-search-api-comparison/%E8%B1%86%E5%8C%85%E6%90%9C%E7%B4%A2API%E5%AD%97%E6%AE%B5%E8%AF%B4%E6%98%8E.png" alt="Field descriptions for the Doubao Search API"></p>
<p>The search results API provides the model with the material and ranking signals in advance, not just a row of &quot;click to see&quot; links. The application or agent still retains control: how many queries to split, how many results to retrieve, whether to rerank, and how much content to feed to the model are all decided by the application itself.</p>
<h2>Category 2: Web Data API</h2>
<p>Search results provide candidate links, but the agent often needs to continue reading the webpage. The second type of interface addresses this step.</p>
<p>Both Tavily and Firecrawl cover this layer. Tavily offers <code>/extract</code>, <code>/crawl</code>, and <code>/map</code>. Firecrawl offers <code>/scrape</code>, <code>/crawl</code>, <code>/map</code>, structured <code>/extract</code>, and <code>/agent</code> for finding and retrieving pages from a task description. Jina Reader reads a known URL, and Xiaosu’s full-text search can include page content with its results. Both vendors distinguish search from retrieval. <a href="https://docs.tavily.com/documentation/api-reference/introduction">Tavily API reference</a> and <a href="https://docs.firecrawl.dev/api-reference/introduction">Firecrawl API overview</a>.</p>
<ul>
<li><code>scrape</code> Read a known URL and convert it to Markdown or JSON;</li>
<li><code>crawl</code> Batch reading along internal links;</li>
<li><code>extract</code> Extract structured fields from a set of web pages as required.</li>
<li><code>agent</code> It can automatically find web pages according to tasks and return the required structured data.</li>
</ul>
<p>This set of interfaces covers webpage reading and external information extraction. Firecrawl's <code>/agent</code> method of autonomously acquiring webpage data falls into the second category; it does not belong to the third category of model search tools, nor does it deliver the fourth category of research reports.</p>
<h2>Category 3: Model Search Tools</h2>
<p>The third type is characterized by the fact that developers no longer orchestrate each query and page read themselves. They only need to declare its availability when calling the LLM <code>web_search</code>, leaving the problem to the model; the model then decides whether to search, what to search, and how to synthesize the results.</p>
<p>This timeline should be viewed separately from OpenAI's product search and API search:</p>
<ul>
<li><strong>July 25, 2024.</strong> OpenAI released a limited SearchGPT prototype for users and publishers. A developer API was still unavailable. <a href="https://openai.com/index/searchgpt-prototype/">SearchGPT Prototype</a>.</li>
<li><strong>September 2024.</strong> The Kimi API added web search through <code>Chat Completions + tool_calls</code> and the built-in <code>$web_search</code> tool. <a href="https://www.aibase.com/zh/news/11666">Release coverage</a> and <a href="https://platform.kimi.com/docs/guide/use-web-search">Kimi documentation</a>.</li>
<li><strong>On October 31, 2024, OpenAI</strong> announced the integration of SearchGPT capabilities into the ChatGPT Search <a href="https://openai.com/index/introducing-chatgpt-search/">product</a>.</li>
<li><strong>On March 11, 2025, OpenAI</strong> released the Responses API and introduced server-side built-in functionality <code>web_search_preview</code>. <a href="https://openai.com/index/new-tools-for-building-agents/">See the Responses API release notes</a>.</li>
<li><strong>On August 13, 2026, DeepSeek</strong> announced native support for the OpenAI Responses API during its V4-Pro GA release; the current Responses documentation supports server-side <code>web_search</code>/ resource integration <code> web_search_2025_08_26</code>. <a href="https://api-docs.deepseek.com/news/news260813/">See the V4-Pro release notes</a> and <a href="https://api-docs.deepseek.com/api/create-response/">Responses API documentation</a>.</li>
</ul>
<h2>Category 4: Online Question-and-Answer Agents (Agentic Search)</h2>
<p>This type of agent packages online search into a configurable and callable agent. Developers receive cited question-and-answer results after calling the agent; the platform handles whether to search and the connection between the search and the answer itself.</p>
<p>The Volcano Engine's online question-answering agent takes this form: developers first create, configure, and deploy the agent in the console, then call the agent's session API; text search, image search, citation, and follow-up questions are handled by this agent. <a href="https://www.volcengine.com/docs/85508/1544858?lang=zh">Quick start guide</a> and <a href="https://www.volcengine.com/docs/85508/1510771?lang=zh">update log</a> are provided. Bocha Agent Search and Kimi Agentic Search further integrate vertical data.</p>
<h2>Category 5: Research-oriented Agent Services</h2>
<p>Deep Research handles longer research tasks. It allows an agent to complete a research report through multiple rounds of searching, reading, judging, and supplementing.</p>
<p>Taking OpenAI as an example, the official definition of deep research is an agent capable of conducting multi-step research on the internet: it adjusts its search direction based on the materials it encounters, potentially searching, interpreting, and analyzing large amounts of text, images, and PDFs; a typical task takes 5 to 30 minutes. <a href="https://openai.com/index/introducing-deep-research/">The release notes for Deep Research</a> describe this working model. The background mode subsequently provided by the Responses API is precisely to support long tasks requiring several minutes. <a href="https://openai.com/index/new-tools-and-features-in-the-responses-api/">Background Mode Explanation</a></p>
<p>Tavily <code>/research</code> also belongs to this deliverable tier: it provides a research interface for in-depth analysis. <a href="https://docs.tavily.com/documentation/api-reference/introduction">The Tavily API overview</a> lists it as a comprehensive research API.</p>
<p>It increases search depth and research process:</p>
<blockquote>
<p>A regular search API gives you a batch of materials; Deep Research gives you an execution process that continues to find materials and then organizes conclusions.</p>
</blockquote>
<h2>Overall situation clarified</h2>
<pre><code class="language-mermaid">quadrantChart
    title How search APIs differ
    x-axis Developer orchestration --&gt; Model or platform orchestration
    y-axis General web --&gt; Domain-specific data
    quadrant-1 Domain-specific agents
    quadrant-2 Domain data APIs
    quadrant-3 General search and web data
    quadrant-4 Model search and research
    Bocha Web Search: [0.08, 0.10]
    Doubao Search: [0.10, 0.42]
    Xiaosu Search: [0.13, 0.25]
    Tavily Search Data: [0.34, 0.10]
    Firecrawl Search Data: [0.37, 0.44]
    Jina Search Reader: [0.42, 0.26]
    Bocha Agent Search: [0.62, 0.72]
    Kimi Agentic Search: [0.84, 0.88]
    Tavily Research: [0.61, 0.38]
    OpenAI Deep Research: [0.83, 0.44]
    Kimi web_search: [0.61, 0.08]
    Volcengine Web Q&amp;A Agent: [0.61, 0.24]
    OpenAI web_search: [0.83, 0.20]
    DeepSeek web_search: [0.83, 0.06]
</code></pre>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[Who benefits when AI makes work more efficient?]]></title>
      <link>https://xiaofeng.dev/en/writing/ai-paradox/</link>
      <guid>https://xiaofeng.dev/en/writing/ai-paradox/</guid>
      <pubDate>Sat, 12 Sep 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[Since May 2025, two independent studies have left a deep impression on me, and I often think about them. Recently, another interesting real-world case has…]]></description>
      <content:encoded><![CDATA[<p>Since May 2025, two independent studies have left a deep impression on me, and I often think about them. Recently, another interesting real-world case has emerged. They seem to discuss different issues, but they point to the same deeper contradiction: as AI continuously improves efficiency, who ultimately reaps the value of this efficiency?</p>
<h2>The market and employees want different things from AI</h2>
<p>In May 2025, a Stanford <a href="https://arxiv.org/html/2506.06576v2">study</a> found a significant mismatch between the tasks employees truly wanted AI to handle and the investment from AI startups: 41% of company-task mappings fell into the &quot;low priority zone&quot; and &quot;red zone&quot;; while the tasks employees most wanted automated did not receive sufficient attention. Nearly half of AI startup efforts were directed towards areas that <strong>employees neither needed nor wanted</strong>.</p>
<p>I don't intend to elaborate on its research methods; what I most want to talk about, and what impressed me most, is:</p>
<ol>
<li>69.4% of people want to save time so they can focus on high-value work.</li>
<li>Interpersonal interaction (such as after-sales service), art, design, and media are the areas where workers least wanted AI to take over.</li>
<li>Workers most feared losing the human touch, creative control, and autonomy.</li>
</ol>
<p>Some representative statements:</p>
<blockquote>
<p>I hope that artificial intelligence can be used to optimize workflows, making content creation less repetitive, tedious, and laborious. I don't want AI to replace artists in content creation. I prefer to use AI for managing personal projects.</p>
</blockquote>
<blockquote>
<p>Artificial intelligence can revolutionize data architecture workflows, improving efficiency, accuracy, and even sparking creativity. However, I will still do the design work myself. I will utilize AI technologies in my research.</p>
</blockquote>
<p>The comments section even said:</p>
<blockquote>
<p>This is because it's the easiest way to get corporate payments; these companies aren't dealing with employee needs, but rather the demands of their bosses.</p>
</blockquote>
<p>This naturally leads to a question:</p>
<blockquote>
<p>Who is this AI revolution really for?</p>
</blockquote>
<p>From a simplified top-down perspective, it seems that as long as efficiency is increased infinitely, everyone will benefit and all problems can be solved. However, this study proves at least one thing: what AI wants to do for humans is not necessarily what humans most want AI to do. For many individuals, what they really want to get rid of is transactional work, not creative work. Within organizations, things are even more complicated because the true consequences of efficiency improvements are difficult to grasp.</p>
<h2>Why employees keep their productivity gains private</h2>
<p><a href="https://hbr.org/2026/06/why-employees-arent-transparent-about-their-ai-usage">This is a Harvard Business Review study based on a survey</a> of 604 US employees, primarily discussing why employees remain silent about AI use. Employees may be using AI to compress three hours of work into 20 minutes, yet they might deliberately not tell the company. This is due to several reasons:</p>
<ol>
<li>Fear of being perceived as incompetent</li>
<li>Fear of being given more work</li>
<li>Fear that their job would be more easily replaced</li>
<li>Fear of losing personal competitive advantage</li>
</ol>
<p>Many business owners are puzzled as to why, despite purchasing numerous tokens, their businesses haven't seen significant growth. A major reason is the lack of trust between people and the organization. Psychological safety and behavioral incentives remain key factors in determining whether employees are willing to share. In organizations composed of people, any innovation that cannot be shared struggles to achieve economies of scale.</p>
<p>Some of the interviewee's exact words:</p>
<blockquote>
<p>I don't trust my boss; I need to maintain my advantage.</p>
</blockquote>
<blockquote>
<p>Another interviewee described his leadership as &quot;desperate to use AI to fire everyone&quot; and said he refused to share what he knew because he didn't want to provide anyone with &quot;ammunition.&quot;</p>
</blockquote>
<h2>The debate over who gets the efficiency dividend</h2>
<p>In July 2026, during an internal Meta employee Q&amp;A, an employee asked whether the productivity gains brought by AI could be used to reinstate the canceled &quot;Meta Days.&quot; Meta CTO Andrew Bosworth stated that he hoped employees would use the time saved by AI to &quot;do more, cooler things,&quot; rather than in exchange for more vacation time.</p>
<p>This raises a deeper question:</p>
<blockquote>
<p>Who ultimately benefits from the efficiency dividend?</p>
</blockquote>
<p>Ideally, there are several possible outcomes:</p>
<ul>
<li>The company gains: the ability to do more work</li>
<li>Employees will receive: More rest and free time</li>
<li>Both parties share: part of it is converted into more output, and part of it is converted into personal time.</li>
<li>Social gains: Lower cost and higher quality products and services</li>
</ul>
<p>Rather than being enjoyed by a single institution or unilateral entity.</p>
<h2>The contract between humans and AI needs to be re-discussed.</h2>
<p>To truly address the structural contradictions in the relationship between AI and humanity at the societal level, at least the following questions need to be answered:</p>
<ul>
<li>Is it possible for people to have their own private space, where they don't need AI to improve their efficiency?</li>
<li>Can a competitive advantage gained through the use of AI tools be exclusively owned by an individual?</li>
<li>Is it possible to have equal access to the same AI tools?</li>
<li>Does using company tools necessarily mean that the efficiency benefits should belong to the company?</li>
<li>If AI enables one person to do the work of three people in the past, how should the &quot;productivity dividend&quot; of these three people be distributed?</li>
</ul>
<h2>Related Links</h2>
<ul>
<li><a href="https://arxiv.org/html/2506.06576v2">Stanford: Research on the Mismatch Between AI Supply and Staff Demand</a></li>
<li><a href="https://hbr.org/2026/06/why-employees-arent-transparent-about-their-ai-usage">Harvard Business Review: Why Employees Remain Silent About AI Use</a></li>
<li><a href="https://www.businessinsider.com/meta-cto-andrew-bosworth-ai-gains-work-2026-8">Business Insider: Meta CTO Bosworth discusses the allocation of AI efficiency dividends.</a></li>
</ul>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[How five Chinese AI assistants fan out search queries]]></title>
      <link>https://xiaofeng.dev/en/writing/china-ai-assistant-fanout-strategy/</link>
      <guid>https://xiaofeng.dev/en/writing/china-ai-assistant-fanout-strategy/</guid>
      <pubDate>Sun, 06 Sep 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[The previous article confirmed, through ChatGPT's official documentation, website network responses, and API returns, that query fanout is a real search…]]></description>
      <content:encoded><![CDATA[<blockquote>
<p>Data retrieval date: September 6, 2026</p>
</blockquote>
<p>The previous article confirmed, through ChatGPT's official documentation, website network responses, and API returns, that query fanout is a real search mechanism. This article turns to Chinese AI assistants to observe how they break down and rewrite user questions.</p>
<p>This article selects five platforms—Doubao, Kimi, Yuanbao, DeepSeek, and Qwen—to compare how they break down and rewrite the same type of user questions.</p>
<h2>I. Verification Method</h2>
<p>This time, we only verify the product's return layer, without guessing the hidden process based on the final answer. We observe three signals:</p>
<ol>
<li>Does the network response contain query fields such as <code>queries</code>??<code> query</code></li>
<li>Does it appear <code>web_search</code> when a search tool is invoked?</li>
<li>Can a relationship be established between the query, the search result, and the final reference?</li>
</ol>
<p>The issues vary across different platforms, and the following numbers are observations from a single request.</p>
<h2>II. Bean Buns: Directly return <code>queries</code> an array.</h2>
<p>Regarding the question about &quot;AI roll-up model companies,&quot; the Doubao webpage's Network response <code>search_query_result_block</code> contained <code> queries</code> an array of 4 entries:</p>
<ul>
<li>AI roll-up model represents the company;</li>
<li>What is the roll-up model in the tech industry?</li>
<li>Domestic case studies of AI roll-up companies;</li>
<li>AI roll-up business model: Acquiring and integrating AI companies.</li>
</ul>
<p>The response also displayed &quot;Search 4 keywords, refer to 20 documents&quot;. The four queries covered concept explanations, representative companies, domestic cases, and English business models, respectively.</p>
<p><img src="/writing/wechat-tech-assets/domestic-ai-assistant-query-fanout/doubao-search-queries.png" alt="Query fan-out in Doubao web-based web response"></p>
<h2>III. DeepSeek: Multiple results appear directly in the response.<code>query</code></h2>
<p>DeepSeek's <code>completion</code> response directly included <code> queries</code> an array. For the query &quot;Which companies use the AI ​​roll-up model?&quot;, it actually returned 5 results:</p>
<ul>
<li>List of companies using the AI ​​roll-up model;</li>
<li>AI roll-up model companies;</li>
<li>Which companies use the AI ​​rollup model?</li>
<li>AI roll up strategy companies list;</li>
<li>AI roll-up integration company.</li>
</ul>
<p>These queries cover Chinese, English, synonyms, and more specific directions such as &quot;what companies are there&quot; and &quot;integrated model companies&quot;.</p>
<p><img src="/writing/wechat-tech-assets/domestic-ai-assistant-query-fanout/deepseek-search-queries.png" alt="Query fan-out in DeepSeek web-based network responses"></p>
<h2>IV. Kimi: <code>web_search</code> Two queries appeared in the parameters.</h2>
<p>Kimi used the same question, and the Network response <code>web_search.args.queries</code> contained two queries:</p>
<ul>
<li>AI roll-up company acquisitions and consolidations in 2026;</li>
<li>AI roll-up company acquisitions 2025 2026.</li>
</ul>
<p>They respectively point to Chinese acquisition and integration cases and recent English merger and acquisition cases, rewriting the original question into a search direction with time and business actions.</p>
<p><img src="/writing/wechat-tech-assets/domestic-ai-assistant-query-fanout/kimi-search-queries.png" alt="Query fan-out in Kimi web-based web responses"></p>
<h2>V. Qwen: Breaking down questions into definitions and examples</h2>
<p>Tongyi's 1000 Questions returned two results for the question, &quot;Which companies operate on the AI ​​roll-up model? <code>query</code>&quot;</p>
<ul>
<li>AI roll-up mode definition;</li>
<li>AI roll-up model example.</li>
</ul>
<p>The response is displayed simultaneously <code>recall_num: 82</code>. It breaks down the company list issue into two directions: &quot;definition&quot; and &quot;case&quot;.</p>
<p><img src="/writing/wechat-tech-assets/domestic-ai-assistant-query-fanout/qwen-search-queries.png" alt="Query fan-out in the web response of Qwen"></p>
<h2>6. Yuanbao: The search tool can be seen, but the search terms are incomplete.</h2>
<p>Yuanbao’s browser network response contains <code>refs</code>, <code> toolCallType: &quot;web_search&quot;</code>, and <code> search_with_text</code> events. The page says it cited 15 documents, but the complete query terms were unavailable. This confirms a search call and leaves the fan-out pattern unknown.</p>
<p><img src="/writing/wechat-tech-assets/domestic-ai-assistant-query-fanout/yuanbao-search-tool.png" alt="Search call in Yuanbao webpage network response"></p>
<h2>7. Classifying the observed query variants</h2>
<p>The previous article, &quot;Detailed Explanation of Query Fan-out,&quot; mentioned that Google's patent categorizes query variants into eight types: synonym, follow-up, generalization, specification, normalization, translation, implication, and clarification.</p>
<p>This section provides <strong>a typological interpretation of individual queries</strong>: it examines the specific queries returned by each platform within eight categories of query variants. It does not assess the overall platform strategy, nor does it confirm the internal implementation.</p>
<table><thead><tr><th>platform</th><th>Observed queries</th><th>Corresponding extended types</th></tr></thead><tbody><tr><td>Doubao</td><td>Representative companies, industry explanations, domestic cases, business models</td><td>Standardization, clarification, specification, implication</td></tr><tr><td>DeepSeek</td><td>Chinese synonyms, English expressions, company scope, integration model</td><td>Synonyms, translation, generalization, concretization</td></tr><tr><td>Kimi</td><td>Acquisitions and Integrations, English M&amp;A Cases, Supplementary Years</td><td>Concretization, translation, implication</td></tr><tr><td>Qwen</td><td>Pattern definition, pattern examples</td><td>Clarification, Implication</td></tr><tr><td>Yuanbao</td><td>I only saw the search tool call.</td><td>Unable to determine at this time</td></tr></tbody></table>
<ul>
<li>Equivalent queries express the same request in different ways. Two examples are <code>AI roll up 模式公司</code> and <code> AI rollup 模式企业有哪些</code>, both asking which companies use the AI roll-up model.</li>
<li>A translation query expands the search to English, as in <code>AI roll up strategy companies list</code>.</li>
<li>A canonicalization query looks for a standard formulation or representative examples. One example is <code>AI roll-up 模式公司列表</code>, or “list of companies using the AI roll-up model.”</li>
<li>A clarification query such as <code>AI roll up模式 定义</code> asks for a definition of the model.</li>
<li>An entailment query follows from the concept to real examples. The queries <code>AI roll up模式 案例</code> and <code> AI roll-up 国内企业案例</code> ask for AI roll-up examples in general and in China, respectively.</li>
<li>A specification query narrows the topic by action and date. The query <code>AI roll-up 模式公司收购整合 2026</code> asks about acquisitions and integration at AI roll-up companies in 2026.</li>
</ul>
<p>However, categorization should not be overly precise. For example, &quot;AI roll-up domestic enterprise cases&quot; can be viewed as both a specific query and an implicit query derived from a concept. The important thing here is not to assign a unique label to each query, but to observe which dimensions the model has expanded from the original question.</p>
<h2>8. Comparison of the models of the five platforms</h2>
<p>Section 7 answers the question &quot;Which category does each query belong to?&quot;, while this section answers &quot;What search strategy does the platform use as a whole?&quot;. Platform comparisons no longer involve labeling each query individually, but rather examining how multiple queries from the same platform work together.</p>
<table><thead><tr><th>platform</th><th>Observable fields</th><th style="text-align:right">Visible search terms</th><th>Main mode</th><th>Visibility</th></tr></thead><tbody><tr><td>Doubao</td><td><code class="rounded bg-[#f4f0e3] px-1 py-0.5 text-[0.9em]">queries</code> array</td><td style="text-align:right">4</td><td>Keyword extraction + directional expansion</td><td>The query and results are clear.</td></tr><tr><td>DeepSeek</td><td><code class="rounded bg-[#f4f0e3] px-1 py-0.5 text-[0.9em]">queries[].query</code></td><td style="text-align:right">5</td><td>Chinese-English rewriting + query expansion</td><td>The query array returns directly.</td></tr><tr><td>Kimi</td><td><code class="rounded bg-[#f4f0e3] px-1 py-0.5 text-[0.9em]">web_search.args.queries</code></td><td style="text-align:right">2</td><td>Semantic constraints + time-limited extension</td><td>See tool parameters</td></tr><tr><td>Qwen</td><td><code class="rounded bg-[#f4f0e3] px-1 py-0.5 text-[0.9em]">query</code> List</td><td style="text-align:right">2</td><td>Subtopic decomposition</td><td>The query list is directly visible.</td></tr><tr><td>Yuanbao</td><td><code class="rounded bg-[#f4f0e3] px-1 py-0.5 text-[0.9em]">web_search</code>,<code class="rounded bg-[#f4f0e3] px-1 py-0.5 text-[0.9em]">search_with_text</code></td><td style="text-align:right">Not fully displayed</td><td>The search query is visible, but the strategy cannot be determined at this time.</td><td>Search results are visible.</td></tr></tbody></table>
<p>The differences between the five platforms can therefore be divided into two layers: one is the type of query rewriting itself, and the other is how the platform organizes these queries. DeepSeek expands the Chinese and English expressions, Doubao extracts keywords and expands the direction, Qwen breaks down definitions and cases, and Kimi supplements business actions and time conditions; Yuanbao can currently only confirm search calls.</p>
<h2>9. Next Step: The search API is the underlying mechanism.</h2>
<p>Fanout is merely the upstream of the search chain. After the query is generated, what truly determines the quality of the results is how the search API parses these keywords and query inputs, how it retrieves candidate content, and then how it sorts, deduplicates, and organizes the results.</p>
<p>In particular, AI-friendly Search APIs for AI search: how do they differ from traditional web search APIs? Can they understand the relationships between queries? Will they return structured content, summaries, and evidence based on query intent? These questions are closer to the underlying mechanisms of a search system than simply &quot;how many queries the platform generated.&quot;</p>
<p>Simulation and reverse engineering represent another research approach, which will be discussed separately in the next article. This article concludes here by clarifying the query patterns and platform strategies revealed by the five platforms.</p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[How I traced search query fan-out from the browser to the API]]></title>
      <link>https://xiaofeng.dev/en/writing/ai-search-query-fanout-proof/</link>
      <guid>https://xiaofeng.dev/en/writing/ai-search-query-fanout-proof/</guid>
      <pubDate>Sat, 05 Sep 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[The previous article primarily discussed Google's patents, AI Mode, and the general mechanism of query fanout, and also briefly mentioned ChatGPT, but did…]]></description>
      <content:encoded><![CDATA[<blockquote>
<p>Data retrieval date: September 5, 2026</p>
</blockquote>
<p>The previous article primarily discussed Google's patents, AI Mode, and the general mechanism of query fanout, and also briefly mentioned ChatGPT, but did not elaborate on ChatGPT's own chain of evidence. This article turns to ChatGPT, tracing how its fanout evolved from being visible on the web to being observable at the API layer, and answers two questions:</p>
<ol>
<li>Does ChatGPT actually use fanout?</li>
<li>Can we observe the specific queries it generates?</li>
</ol>
<p>The answer is yes.</p>
<p>The official documentation proves the existence of the mechanism, while the product's returned data, network responses, and APIs make the specific queries visible. We certainly can't see all the internal workings that the vendor hasn't disclosed, but that doesn't prevent researchers from observing actual requests, query content, and result structure.</p>
<h2>I. OpenAI Official Documentation: ChatGPT Explicitly Acknowledges Multi-Query Rewrite</h2>
<p>In the &quot;Information shared with search providers&quot; section of <a href="https://help.openai.com/en/articles/9237897">Searching the web with ChatGPT</a>, OpenAI explicitly states that ChatGPT Search sometimes collaborates with other search service providers and typically rewrites user queries into one or more targeted queries before sending them to these providers.</p>
<p>The document also describes a phased process: ChatGPT may first send an initial query, and after reviewing the preliminary results, send more specific follow-up queries.</p>
<p>This official statement directly confirms:</p>
<ul>
<li>The search terms sent by ChatGPT may not be the same as the user's original words;</li>
<li>One user question can correspond to multiple search queries;</li>
<li>Subsequent queries may rely on the search results from the previous round.</li>
</ul>
<p>This answers the first question: <strong>fanout is not a concept conjectured by the community from the list of references, but a search mechanism officially recognized by ChatGPT Search.</strong></p>
<p>The official documentation does not disclose the full internal workings, nor does it list all the queries for each request. However, for the two questions raised in this article, the mechanism has been confirmed; the remaining question is whether the specific queries can be observed.</p>
<h2>II. 2025: ChatGPT webpage data previously exposed specific queries</h2>
<p>Early empirical evidence for ChatGPT comes from Nectiv's New Data Study, published in October 2025 <a href="https://nectivdigital.com/blog/new-data-study-what-queries-is-chatgpt-using-behind-the-scenes">: What Queries Is ChatGPT Using Behind The Scenes</a> ?.</p>
<p>Nectiv stated at the time that the conversation files/JSON returned by ChatGPT contain the queries used in that particular search, from which researchers can extract this data; there are also browser tools that can view the search queries in a single session.</p>
<p>They then integrated the extraction method into their AI Tracker, performed batch analysis on over 8,500 prompts, and reported the results:</p>
<ul>
<li>2,648 searches;</li>
<li>Approximately 31% of prompts trigger searches;</li>
<li>On average, each search returns approximately 2.17 queries.</li>
<li>A single query contains an average of approximately 5.48 words;</li>
<li>A maximum of 4 queries were observed in this sample.</li>
</ul>
<p>The key to this study isn't the number &quot;2.17,&quot; but rather its claim that it extracts search queries from ChatGPT's returned data, rather than inferring keywords from final references. According to this description, early ChatGPT fanouts appeared in product results as JSON data.</p>
<p>Nectiv did not publicly disclose its complete extraction procedure and raw data, and its samples mainly focused on commercial and purchase intent scenarios. Therefore, the 2.17 and maximum 4 results are observations from this sample and not fixed rules of ChatGPT.</p>
<h2>III. 2026: Hidden on webpage, API and Network still observable</h2>
<p>On March 6, 2026, Nectiv released <a href="https://nectivdigital.com/blog/chatgpt-5-4-has-hidden-fan-out-queries-you-can-still-get-them-via-the-api-python-script-included">ChatGPT 5.4 Has Hidden Fan-Out Queries</a>.</p>
<p>They observed that the ChatGPT 5.4 web interface no longer exposes fanouts in conversation files or DevTools as it did in the past, rendering previous scraping tools ineffective. However, by using the OpenAI Responses API and enabling <code>web_search</code> the tool, relevant search calls can still be observed from the returned data.</p>
<p>What's happening here is a change in visibility, not a disappearance of fanout:</p>
<table><thead><tr><th>time</th><th>Observable location</th><th>illustrate</th></tr></thead><tbody><tr><td>2025</td><td>ChatGPT web-based conversation files / JSON</td><td>Search queries have appeared in product return data.</td></tr><tr><td>2026</td><td>Responses API +<code class="rounded bg-[#f4f0e3] px-1 py-0.5 text-[0.9em]">web_search</code></td><td>The cloud-based execution chain may still return search-related data.</td></tr></tbody></table>
<p>In 2025, the data was extracted from the chatGPT web page; in 2026, the response API was called directly, and the cloud model and web search tools completed the search and returned a structured response, which is now commonly referred to as the harness API path.</p>
<p>Both methods allow observation of specific queries, but they observe different objects: the former is closer to the data returned by a webpage product, while the latter is closer to the remote execution chain of an API. They do not require researchers to know the full implementation of the model to answer the second question— <strong>that specific fanout queries can indeed be observed.</strong></p>
<h3>September 5, 2026: Search queries are still available on the web version.</h3>
<p>Today's test provided a new observation: in the Network panel of the ChatGPT web interface, it can be retrieved <code>search_model_queries</code>; the corresponding response shows <code> queries</code>an array, listing multiple search queries generated for the same question.</p>
<p><img src="/writing/wechat-tech-assets/ai-search-query-fanout-proof/chatgpt-search-queries.png" alt="Query fan-out in ChatGPT web-based Network response"></p>
<p>This indicates that the current version of the web application may still return search queries in the network response. This is a test of a specific request and does not represent that all sessions will return queries in the same way, but it is sufficient as a direct observation example of a specific fanout.</p>
<h2>IV. Real-world testing of a Chinese AI assistant platform: Doubao also returned the query array.</h2>
<p>On the Doubao webpage, I observed <code>search_query_result_block</code> that it contains <code> queries</code> an array.</p>
<p>Regarding the question &quot;AI roll-up model companies&quot;, four queries appeared in the response:</p>
<ul>
<li>AI roll-up model represents the company;</li>
<li>What is the roll-up model in the tech industry?</li>
<li>Domestic case studies of AI roll-up companies;</li>
<li>AI roll-up business model: Acquiring and integrating AI companies.</li>
</ul>
<p>The response also displayed &quot;Search 4 keywords and refer to 20 articles&quot;.</p>
<p><img src="/writing/wechat-tech-assets/ai-search-query-fanout-proof/doubao-search-queries.png" alt="Query fan-out in Doubao web-based web response"></p>
<p>This is a real-world test of web-based network response for a specific problem, and it cannot be concluded that Doubao generates a fixed 4 queries for all questions. However, it demonstrates that in the responses of domestic AI assistant products, it is possible to directly observe that a user's question can be expanded into multiple search directions.</p>
<h2>V. Conclusion: The mechanism is real, and the details are observable.</h2>
<p>Now we can directly answer the first two questions:</p>
<ol>
<li><strong>Fanout is a real phenomenon.</strong> OpenAI's official help documentation explicitly states that ChatGPT will rewrite user questions into one or more targeted queries and may continue searching based on the initial results.</li>
<li><strong>Fanout details can be observed.</strong> Specific query fields appeared in the 2025 conversation files/JSON, and the 2026 Responses API and Network responses; <code>queries</code> arrays can also be observed on the Doubao web client.</li>
</ol>
<p>&quot;Details observable&quot; here means that the query content, number of queries, query structure, and some result relationships can be recorded and analyzed; it does not mean that the vendor has disclosed the complete model principle, nor does it mean that all internal logs of each request can be obtained externally.</p>
<p>But for researchers, this is already a valuable output: we don't need to know every layer of the model's implementation to observe what questions it actually poses to the search system.</p>
<p>If you would like to learn more about AI assistant query fan-out, search requests, and GEO's practical testing information, feel free to send me a private message or contact me directly.</p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[How a Skill turns a methodology into a workflow]]></title>
      <link>https://xiaofeng.dev/en/writing/skill-methodology-workflow-process/</link>
      <guid>https://xiaofeng.dev/en/writing/skill-methodology-workflow-process/</guid>
      <pubDate>Sat, 29 Aug 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[There are several different perceptions of Skill in the market. A few days ago, an article was published on the Tencent Developer Forum, which said that…]]></description>
      <content:encoded><![CDATA[<p>There are several different perceptions of Skill in the market. A few days ago, an article was published on the Tencent Developer Forum, which said that Skill is a &quot;script with documentation&quot;.</p>
<p>But in my experience, this definition is too narrow.</p>
<p>Earlier this year, there was an issue <a href="https://github.com/google-gemini/gemini-cli/issues/15895">#15895</a> on Gemini CLI's GitHub that provided an excellent definition of a skill: <strong>A skill is a methodology, not just scripts and documentation.</strong> This statement perfectly summarizes my previous experience.</p>
<p>I've developed workflows on both Dify and Buttons, and I've also used various skills extensively. From a practical standpoint, there are many significant differences in their usability:</p>
<table><thead><tr><th>Dimension</th><th>Workflow</th><th>Skill</th></tr></thead><tbody><tr><td>nature</td><td>process</td><td>Methodology</td></tr><tr><td>AI perspective</td><td>Black box (only a single node is visible)</td><td>White box (full view visible)</td></tr><tr><td>flexibility</td><td>Solidified, inescapable</td><td>Cuttable and Interventional</td></tr><tr><td>maintain</td><td>Difficulty when there are many nodes</td><td>Load on demand, lightweight</td></tr><tr><td>AI Role</td><td>Semantic tools (local invocation)</td><td>Global Layout</td></tr></tbody></table>
<h2>Workflow: Directed Acyclic Black Box</h2>
<p>A workflow is a directed acyclic graph (DAG) with explicit process constraints, which means that you cannot jump directly from one node to another without a path or connecting line; you must follow a pre-defined process.</p>
<pre><code class="language-mermaid">flowchart TD
  Start([&quot;Start&quot;]) --&gt; CondA{&quot;Check condition A&quot;}
  Start --&gt; CondB{&quot;Check condition B&quot;}
  CondA --&gt; ExecA1[&quot;Run step A1&quot;]
  CondB --&gt; ExecB1[&quot;Run step B1&quot;]
  ExecA1 --&gt; Merge[&quot;Merge results&quot;]
  ExecB1 --&gt; Merge
  Merge -.-&gt;|No return edge| CondA
</code></pre>
<p>For most users, a workflow is a black box. You can't tell whether it has 10 nodes, 20 nodes, or hundreds of nodes—only developers need to care about these things. Users just use it, but it's difficult to understand what processes are involved, what abnormal branches exist, and where manual intervention is required.</p>
<p><strong>The advantage is that the process is fixed.</strong> Users will not escape from the process, can reach a deterministic conclusion, and will not have completely abnormal or uncontrollable results.</p>
<p><strong>The drawbacks are also obvious.</strong></p>
<ul>
<li>When a workflow has more than dozens or even hundreds of nodes, maintenance becomes extremely difficult.</li>
<li>Workflows naturally require scripts as a glue to connect the inputs and outputs of nodes—the output of the previous node becomes the input of the next node, with a lot of glue code in between.</li>
<li>The role of AI in workflow is limited to a few key nodes that require intelligent judgment. It does not undertake the planning of the entire process or have an overall view; it is merely invoked as a semantic tool.</li>
</ul>
<h2>Skill: White Box Methodology</h2>
<p>Skills are loaded into the AI's prompts. The AI ​​first reads the skill, then executes the corresponding steps according to the skill. It knows the entire process and steps of the skill from start to finish, where user confirmation is required, where user choices are allowed, and even how to allow the user to exit and how to hand over the steps to the next skill.</p>
<p>For AI, workflow is a black box; it can only see one node. But Skill is a completely white box.</p>
<pre><code class="language-mermaid">flowchart TD
  AI2[&quot;AI · Load, orchestrate, and schedule&quot;]
  subgraph Skill[&quot;Skill methodology, all steps visible&quot;]
    direction LR
    S1[&quot;Step 1&lt;br/&gt;Read requirements&quot;] --&gt; S2[&quot;Step 2&lt;br/&gt;Analyze data&quot;] --&gt; S3[&quot;Step 3&lt;br/&gt;Draft a plan&quot;] --&gt; S4[&quot;Step 4&lt;br/&gt;Deliver results&quot;] --&gt; S5[&quot;Step 5&lt;br/&gt;Record lessons&quot;]
  end
  AI2 -.-&gt;|&quot;Load&quot;| Skill
</code></pre>
<p>Because AI sees the complete methodology, rather than a single node, it can flexibly choose how to execute it.</p>
<ol>
<li><strong>Complete execution</strong>: Follow steps 1→2→3→4.</li>
<li><strong>Partial extraction</strong>: Only one or two steps are extracted, skipping unnecessary steps.</li>
<li><strong>User-defined trimming</strong>: Modify a step according to user instructions, adjust, and then continue.</li>
</ol>
<pre><code class="language-mermaid">flowchart TD
  Start[&quot;AI reads the Skill methodology&quot;]
  Start --&gt; Mode1[&quot;Run all steps&quot;]
  Start --&gt; Mode2[&quot;Select steps&quot;]
  Start --&gt; Mode3[&quot;User customization&quot;]

  Mode1 --&gt; M1[&quot;1 → 2 → 3 → 4&lt;br/&gt;Run all steps&quot;]
  Mode2 --&gt; M2[&quot;Skip 1 and 4&lt;br/&gt;Run only steps 2 and 3&quot;]
  Mode3 --&gt; M3[&quot;Replace step 3&lt;br/&gt;Follow the user’s instructions&quot;]
</code></pre>
<p>This flexibility is the essence of the methodology: it is a set of empirical guiding principles that you learn and can use selectively.</p>
<h2>When to choose which</h2>
<p>When you are a developer or professional user and need to write a skill or process, you should first determine: Is this a methodology or a process?</p>
<p>The core distinction in this issue is <strong>who has control</strong>:</p>
<ul>
<li><strong>For scenarios requiring determinism and top-down control</strong> (company approval processes, data processing pipelines, and fixed business processes), workflows are more suitable. The value of a fixed process lies in the fact that users do not need to make choices, and no one can escape the process.</li>
<li><strong>For scenarios aimed at improving individual or team efficiency,</strong> Skills is more suitable. This is because we often can't force others to follow a methodology; the value of a methodology lies in enabling professional users to understand it and follow it voluntarily, rather than being bound by a rigid process.</li>
</ul>
<h2>For professional users: Use first, then modify.</h2>
<p>Users of skills are typically, or rather, &quot;need to be,&quot; professional users. This is fundamentally different from users of workflows—workflows don't require you to understand them, you just need to follow them; but users of skills need to understand the methodology in order to use them well and improve them.</p>
<p>If you receive a skill written by someone else, you can certainly use it to complete the task. But more importantly:</p>
<ol>
<li><strong>You can choose to ignore or modify certain steps in the Skill</strong>, intervening to make it execute as you intend.</li>
<li><strong>You can tailor a skill, modifying it to your desired version.</strong> Most skills on the market represent the author's personal insights and experience. If you want it to perfectly fit your personalized workflow, you need to modify the original skill and invent your own. This is the ultimate methodology—not copying, but internalizing and reinventing.</li>
</ol>
<p>There's another implicit factor: <strong>you need the skill to teach you this methodology in return.</strong> The user of a skill needs to understand how to use it in order to truly master it.</p>
<h2>A noteworthy trend: Involving AI in the entire process.</h2>
<p>I previously talked about <a href="/writing/compound-engineering-agent-skill/">the Compound Engineering plugin</a>, which did something very radical: it completely changed the invocation of sub-agents to pure Skill markdown.</p>
<p>One important reason is that when calling sub-agents, certain context, tool call results, or harness results cannot be passed to the sub-agents, and the implementation methods of agents vary across platforms. Sub-agents essentially lock AI into black boxes, preventing them from seeing each other's context.</p>
<p>Instead of struggling to solve the problem of information transfer between agents, it is better to make all agents into Skill mode—this allows for the direct reuse of complete context and harness results, and the model will perform better throughout the process.</p>
<p>This is essentially the advantage of white-box architecture: <strong>the more complete the information the AI ​​sees, the better it performs.</strong> The sub-agent invocation model is equivalent to re-splitting the process into black-box nodes, while the Skill model exposes the entire methodology and context to the AI, allowing it to make judgments and schedules based on complete visibility. In this process, Skill acts as an experiential manual, which can be useful initially, but in longer-term tasks, letting it make its own judgments is more important than experience.</p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[What to do while an AI coding agent is working]]></title>
      <link>https://xiaofeng.dev/en/writing/vibe-coding-waiting-time/</link>
      <guid>https://xiaofeng.dev/en/writing/vibe-coding-waiting-time/</guid>
      <pubDate>Sun, 23 Aug 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[When I used to do Vibe coding, I would usually open several windows and run several tasks simultaneously. This made better use of time, allowing the AI ​​to…]]></description>
      <content:encoded><![CDATA[<p>When I used to do Vibe coding, I would usually open several windows and run several tasks simultaneously. This made better use of time, allowing the AI ​​to complete different tasks. However, there are a few prerequisites for doing this:</p>
<ul>
<li>Demands should be kept as isolated as possible to avoid mutual interference.</li>
<li>The code needs to be modularized in advance.</li>
<li>Try to avoid multiple tasks modifying the same piece of code at the same time.</li>
</ul>
<p>Even if you open multiple windows, there will still be a waiting time. During this time, you can go get a coffee or get up and walk around.</p>
<p>However, I've recently come to realize that <strong>the downtime during Vibe Coding doesn't necessarily need to be used to cram in more development tasks</strong>. This time is actually quite suitable for doing some research-oriented tasks.</p>
<h2>Don't just open more windows.</h2>
<p>Human memory and attention span are limited. It's difficult to truly understand seven or eight tasks simultaneously, let alone if these tasks are all in the same codebase, where they can easily interfere with each other. Looking back after some time, you might not even be clear what problem a certain change was meant to solve.</p>
<p>Doing fewer development tasks actually frees up time to review the AI's output:</p>
<ul>
<li>Does it introduce duplicate code?</li>
<li>Did it damage the original structure?</li>
<li>Have you ever made your codebase more difficult to maintain in order to fulfill a small requirement?</li>
</ul>
<p>These review processes typically require external searches and research to supplement information that AI cannot assess for us, and then the results are brought back into the development process.</p>
<h2>What are you researching?</h2>
<p>The research mentioned here doesn't necessarily involve systematically learning a new discipline; it can also be about understanding a field, validating a practice, or figuring out how to better address current needs. Based on the research subject, there are roughly three categories.</p>
<h3>Research and implementation schemes</h3>
<p>For example, are the current module boundaries reasonable? Is there any redundant logic? Which parts will be difficult to maintain in the future? AI can help me complete a specific requirement, but I still need to look back and see: Has its implementation made the entire codebase more complex? Are there more mature implementation solutions, and what compromises are involved in the current solution?</p>
<p>for example:</p>
<ul>
<li>Are there any more suitable deployment options?</li>
<li>Are there any performance issues?</li>
<li>What are the differences between different frameworks when implementing the same animation effect?</li>
<li>Are there any suitable tools or skills that can help with review and development?</li>
</ul>
<h3>Research products and competitors</h3>
<p>Is every item on the requirements list worth doing? Is there a simpler way to implement it? How do competitors solve similar problems? AI can help search and organize these questions. It can also open a browser, view competitor websites, and compile the page layout, functional flow, and interaction features into a document for later use as a reference for design and development.</p>
<ul>
<li>When creating an official website, the page layout, product display methods, and animations cannot be simply generated by AI and then finished. You need to look at how similar websites are done before deciding which approaches are suitable for your product.</li>
<li>Creating a landing page can involve several processes, and the relationships between these processes can be quite complex. In such cases, it's advisable to first research common industry practices and then choose a solution suitable for your current product, rather than letting AI make the decisions for you.</li>
<li>When performing semantic analysis, you can first study the common implementation schemes, and then weigh the effects, costs and implementation complexity to see if you can gain an advantage over your competitors.</li>
</ul>
<h3>Research new fields</h3>
<p>Development work often involves areas that are previously unfamiliar, which requires even more extensive searching and research:</p>
<ul>
<li>If you are working on a data analysis module, you need to understand which statistical methods are required and concepts such as confidence intervals.</li>
<li>If you are working on AI search functionality, you need to study the underlying principles of query expansion, multi-round search, and result aggregation.</li>
<li>If you are researching AI tool usage, you can further explore prompts, tool orchestration, Harness Engineering, and related papers and practices.</li>
</ul>
<p>These concepts may seem somewhat distant from the code in front of you, but they all influence the final implementation. <strong>Research isn't about leaving the project; it's about providing the basis for judgment within the project.</strong></p>
<h2>Ants don't just follow the strongest pheromone.</h2>
<p>This reminds me of ants.</p>
<p>Ants' path selection is not a mechanical obedience to pheromones. While pheromones on existing paths increase the probability of an ant choosing that path, they don't cause all ants to follow the direction with the highest pheromone concentration. The ant colony always maintains a degree of exploration, allowing individuals to continue trying paths that haven't been fully explored; when a new path yields better results, the pheromone concentration on it gradually increases, and the colony's choice probability changes accordingly.</p>
<p>This is actually a dynamic <strong>exploration-utilization mechanism</strong>: it utilizes existing experience while not abandoning the exploration of unknown spaces. It is precisely because pheromones influence choices, but do not completely determine them, that it helps reduce the risk of the ant colony prematurely converging to a suboptimal path.</p>
<p>Vibe Coding is somewhat similar. The paths AI has already traversed, the components and implementations it has already validated, can increase the probability of choosing them next time; however, if we only let AI continue generating along existing paths, it's likely to deviate from the correct path faster and faster. Allocating time during development for research, comparison, and experimentation is essentially preserving some room for exploration within the system.</p>
<p>Therefore, doing research during Vibe Coding is not about temporarily leaving development, nor is it about wasting time on side projects. It's about exploring several paths beyond the established ones, preventing us from prematurely assuming that &quot;it runs&quot; is the &quot;most suitable.&quot;</p>
<p>This exploration-and-utilization relationship later inspired Ant Colony Optimization (ACO) and was used to solve combinatorial optimization problems. Without delving into the algorithmic details here, it's important to remember this intuition: <strong>experience should influence choices, but it shouldn't eliminate exploration.</strong></p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[Query fan-out: Google patents and evidence from 170,000 URLs]]></title>
      <link>https://xiaofeng.dev/en/writing/ai-search-query-fanout/</link>
      <guid>https://xiaofeng.dev/en/writing/ai-search-query-fanout/</guid>
      <pubDate>Sat, 22 Aug 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[In AI search, a complex question may not correspond to only one search. The system can expand or break down the user's question into multiple related…]]></description>
      <content:encoded><![CDATA[<p>In AI search, a complex question may not correspond to only one search. The system can expand or break down the user's question into multiple related subqueries, retrieve them in parallel or in stages, and then combine the results from multiple sources into an answer. This type of &quot;one-in, multiple-out&quot; retrieval process is usually called query fan-out.</p>
<h2>Observable query fan-out phenomenon</h2>
<p>Ask the same question to different AI assistants and you'll see drastically different query fan-out behaviors.</p>
<p>What's the best toy under ten million?</p>
<p>The query behaves differently on different platforms: Doubao expands the subquery and displays the search path (searching 6 keywords / referencing 33 articles); Perplexity and Kimi list multiple sources and related searches under &quot;searched webpages&quot;, but do not display the subquery text one by one; Google AI Mode executes query fan-out but does not show the intermediate process in some scenarios, directly giving the aggregated answer; ChatGPT's Search mode is the least transparent - it only shows the list of sources and does not disclose the subquery generation logic and the number of parallel searches.</p>
<div class="article-image-strip" aria-label="Examples of query fan-out from different AI assistants"><figure><img src="/writing/wechat-tech-assets/ai-search-query-fanout/doubao-search-example.png" alt="Doubao: Searched 6 keywords, referenced 33 articles, and listed 6 subqueries." loading="lazy" decoding="async"><figcaption>Doubao: Displays 6 sub-queries</figcaption></figure><figure><img src="/writing/wechat-tech-assets/ai-search-query-fanout/perplexity-search-example.png" alt="Perplexity: Lists multiple sources under the search page." loading="lazy" decoding="async"><figcaption>Perplexity: Displays multiple sources</figcaption></figure><figure><img src="/writing/wechat-tech-assets/ai-search-query-fanout/kimi-search-example.png" alt="Kimi: Displays the search page and 28 results." loading="lazy" decoding="async"><figcaption>Kimi: Display search results</figcaption></figure><figure><img src="/writing/wechat-tech-assets/ai-search-query-fanout/google-ai-mode-example.png" alt="Google AI Mode: Intermediate subqueries not displayed." loading="lazy" decoding="async"><figcaption>Google AI Mode: Aggregated Answer</figcaption></figure><figure><img src="/writing/wechat-tech-assets/ai-search-query-fanout/chatgpt-search-example.png" alt="ChatGPT: Displays 27 sources, but does not show the subquery generation process." loading="lazy" decoding="async"><figcaption>ChatGPT: Only show the source list</figcaption></figure></div>
<p>This difference illustrates that query fan-out has become a widely discussed retrieval architecture in the field of AI search, but different platforms differ in their implementation, naming, and transparency. At the level of publicly available information, Google's description is currently the most direct: its official product documentation explicitly uses the term 'query fan-out' and publicly describes its basic behavior.</p>
<h2>English etymology</h2>
<p>The root of the word &quot;fan-out&quot; can be traced back to the Latin word &quot; <em>vannus&quot;</em>:</p>
<blockquote>
<p><em>vannus</em> (winnowing tool) → <em>fann</em> (winnowing) → fan (device that generates airflow) → fan (fan) → <strong>fan out</strong> (to unfold like a fan)</p>
</blockquote>
<p>The phrasal verb <em>&quot;fan out&quot;</em> existed at least as early as the 1590s, meaning &quot;to unfold like a hand fan.&quot; AI search borrows this meaning: to expand a user query into multiple subqueries, allowing for multiple searches from a single input.</p>
<h2>Official Interpretation</h2>
<p>Google's official documentation provides a clear definition:</p>
<blockquote>
<p><strong>&quot;</strong> A set of concurrent, related queries generated by the model &quot;</p>
</blockquote>
<p>Google has not publicly specified which patents correspond to the current query fan-out implementation in AI Mode. However, since May 2025, multiple official channels, including official AI Mode introductions, Google I/O presentations, Search Central documentation, multimodal search, and Shopping, have repeatedly confirmed the actual deployment of query fan-out in the product—breaking it down into parallel subtopic search, cross-data source retrieval, and synthesizing cited answers. Official materials also describe this mechanism from two perspectives: patents reveal the technical principles, and product blog posts demonstrate real-world deployments. US11663201B2 directly reveals &quot;how subqueries are generated&quot;; three other official product blog posts specifically demonstrate the actual performance of query fan-out in AI Mode, providing the practical basis for the &quot;parallel retrieval across multiple data sources&quot; step in the flowchart below.</p>
<h3>US11663201B2 — Query Variant Generation: How are subqueries generated?</h3>
<p>Patent <a href="https://patents.google.com/patent/US11663201B2/en">US11663201B2</a> (Generating query variants using a trained generative model, Google LLC, filed 2018-04-27, granted 2023-05-30) describes the core of query fan-out—how to use a trained sequence-to-sequence (seq2seq) neural network (architecture similar to machine translation) to convert a user query into multiple query variants. The patent also describes a control model used to determine whether to generate query variants; this can serve as a technical reference for understanding the query fan-out control logic.</p>
<p>Claim 19 directly lists eight query variant types:</p>
<table><thead><tr><th>#</th><th>type</th><th>illustrate</th><th>Example</th></tr></thead><tbody><tr><td>1</td><td>Equivalent Query</td><td>Different expressions of the same intention</td><td>"Recommended Power Banks", "Power Bank Buying Guide"</td></tr><tr><td>2</td><td>Follow-up Query</td><td>Users will naturally ask follow-up questions after understanding the original problem.</td><td>"Which brand of power bank is the most durable?" and "How many days can a 20000mAh power bank last?"</td></tr><tr><td>3</td><td>Generalization Query</td><td>A broader category context</td><td>Recommended Portable Charging Devices, List of Digital Accessories for Travel</td></tr><tr><td>4</td><td>Specification Query</td><td>A more specific and clear perspective</td><td>"20000mAh PD fast charging power bank", "Supports Apple MFi certification"</td></tr><tr><td>5</td><td>Canonicalization Query</td><td>Determine the authoritative or standard version</td><td>"Top 10 Power Bank Brands Ranking" and "List of Power Banks with National 3C Certification"</td></tr><tr><td>6</td><td>Translation Query</td><td>Equivalent expressions across languages ​​or terms</td><td>"Best Power Bank 2025", "PD Fast Charging (English)"</td></tr><tr><td>7</td><td>Entailment Query</td><td>The original query logic necessarily involves the following content</td><td>"Can I bring a power bank on a plane?" "How can I tell if the capacity is mislabeled?"</td></tr><tr><td>8</td><td>Clarification Query</td><td>Request to disambiguate</td><td>"Approximately what is your budget?" and "Is it for personal use or as a gift?" (Ambiguity prevents accurate recommendations)</td></tr></tbody></table>
<h3>Google AI Mode published a blog post (March 2025): The official definition of query fan-out.</h3>
<p>Google's official blog post, <a href="https://blog.google/products-and-platforms/products/search/ai-mode-search/">&quot;Expanding AI Overviews and introducing AI Mode&quot;</a> (Robby Stein, 2025-03-05), is the release document for AI Mode and the core source of the term &quot;query fan-out&quot; in Google's official context. The original text directly defines it as: &quot;It uses a 'query fan-out' technique, issuing multiple related searches concurrently across subtopics and multiple data sources and then bringing those results together to provide an easy-to-understand response.&quot; This means issuing multiple related searches in parallel, across subtopics and multiple data sources, and then aggregating them into an easy-to-understand response, consistent with the structure of the flowchart below. The same paragraph lists the real-time data sources accessible to AI Mode: in addition to high-quality web content, there are <strong>knowledge graphs</strong>, real-world information, and shopping data from billions of products; this confirms the setting of the knowledge graph as one of the parallel retrieval data sources in the flowchart. The underlying model is a customized version of Gemini 2.0.</p>
<h3>Google Shopping AI Mode Blog Post (May 2025): The Evidence of Fan-Out in Shopping Scenarios</h3>
<p>Google's official blog post, &quot; <a href="https://blog.google/products-and-platforms/products/shopping/google-shopping-ai-mode-virtual-try-on-update/">Shop with AI Mode,&quot;</a> describes query fan-out in the AI ​​Mode shopping scenario: the system &quot;runs several simultaneous searches&quot; to determine what features a travel bag needs to be &quot;suitable for rainy days and long trips,&quot; and then uses these subtopics to recommend waterproof options with easily accessible pockets. The underlying architecture combines Gemini with the Shopping Graph (a list of over 50 billion products, refreshed over 2 billion times per hour).</p>
<h3>Google Visual Search Blog Post (September 2025): Visual Search Fanout</h3>
<p>Google's official blog post, <a href="https://blog.google/products-and-platforms/products/search/search-ai-updates-september-2025/">&quot;AI Mode can now help you search and explore visually,</a> &quot; introduces &quot;visual search fan-out,&quot; building upon the query fan-out method. This involves analyzing an image and running multiple queries in the background to understand the complete visual context. The original post directly links to Google's official PDF (AI Overviews / AI Mode Explanation), providing a direct, official definition.</p>
<h3>Concept diagram: Query fan-out workflow</h3>
<p>Comparing the US11663201B2 patent with three official Google product blog posts can help us understand the two aspects of &quot;query variant generation&quot; and &quot;product-level parallel retrieval&quot; in Google's related technologies. The workflow is as follows:</p>
<pre><code class="language-mermaid">flowchart LR
    A[&quot;User query&quot;] --&gt; B{&quot;Analyze intent&quot;}
    B --&gt;|Simple fact| C[&quot;Answer directly&quot;]
    B --&gt;|Complex or multi-part query| D[&quot;Decompose query&quot;]
    D --&gt; E1[&quot;Subquery 1&quot;]
    D --&gt; E2[&quot;Subquery 2&quot;]
    D --&gt; E3[&quot;Subquery 3&quot;]
    D --&gt; E4[&quot;Subquery n&quot;]
    E1 --&gt; F1[&quot;Live web&quot;]
    E2 --&gt; F2[&quot;Knowledge graph&quot;]
    E3 --&gt; F3[&quot;Shopping graph&quot;]
    E4 --&gt; F4[&quot;Other data sources&quot;]
    F1 --&gt; G[&quot;Combine evidence&quot;]
    F2 --&gt; G
    F3 --&gt; G
    F4 --&gt; G
    G --&gt; H[&quot;LLM synthesizes the answer&quot;]
</code></pre>
<blockquote>
<p><em>Note: This is a conceptual flowchart based on the query fan-out map diagram</em> in the original iPullRank paper and does not represent the current actual implementation of Google AI Mode.</p>
</blockquote>
<h2>Community Research Interpretation</h2>
<p>Google's patents and official documentation describe the technical framework for query fan-out, but community research adds two dimensions: <strong>actual performance data</strong> and <strong>practical advice on search engine optimization (SEO)/generic engine optimization (GEO)</strong>. The credibility of four representative community articles is evaluated below.</p>
<h3>iPullRank — Mechanism Analysis and Intent Shift</h3>
<ul>
<li><strong>Link</strong>: <a href="https://ipullrank.com/expanding-queries-with-fanout">ipullrank.com/expanding-queries-with-fanout</a></li>
<li><strong>Author</strong>: Lazarina Stoy (Founder/Consultant of MLforSEO, article published on iPullRank), 2025-12-11</li>
</ul>
<p><strong>Key points</strong>:</p>
<ol>
<li>Query fan-out represents the biggest structural change in the search field since mobile-first indexing.</li>
<li>Multi-vector retrieval forces large language models (LLMs) to pull evidence from multiple text passages rather than relying on a single high-ranking page—the content must be atomic, entity-rich, and independently searchable.</li>
<li>Hyper-personalization breaks the measurement system: the same query is expanded into different subqueries for different users, rendering traditional keyword ranking tools ineffective.</li>
<li>Comparison of four platforms: Google (most transparent), Copilot (iterative, graph-grounded), Perplexity (hybrid retrieval + multi-stage ranking), and ChatGPT (least transparent).</li>
</ol>
<p><strong>Evaluation</strong>: <strong>Solid, but the intent offset analysis is a theoretical deduction</strong>. The mechanism description directly cites the Google patent, and the eight query variant classifications are supported by the original patent text. The platform comparison cites official documentation and API documentation. Michael King later shared content related to Query Fan-out at Tech SEO Connect.</p>
<h3>Surfer SEO — 173K URL Empirical Data</h3>
<ul>
<li><strong>Link</strong>: <a href="https://surferseo.com/blog/query-fan-out-impact/">surferseo.com/blog/query-fan-out-impact</a></li>
<li><strong>Author</strong>: Joshua Hardwick, 2025-12-06</li>
</ul>
<p><strong>Key points</strong>:</p>
<ol>
<li>Of the 173,902 URLs sampled (top-10 pages for 10,000 keywords), 76% of the keywords triggered AI Overviews.</li>
<li>The more subqueries a ranking query fans out, the higher the probability of it being cited by AI Overviews (AIO) (Spearman correlation coefficient 0.77).</li>
<li>Pages ranked by both the main query and at least one query fan-out result have a 161% higher probability of being cited compared to pages ranked only by the main query.</li>
<li>Ranking only the fan-out query versus ranking only the main query: the former has a 49% higher citation probability.</li>
<li>67.82% of AI Overview (AIO) citations are not in the top-10 (neither the main query nor the query fanout is in them); however, looking at only the top 3 citations, 54.14% are within the top-10.</li>
<li>Only about 27% of fan-out queries remain stable across multiple searches.</li>
</ol>
<p><strong>Evaluation</strong>: <strong>Among the publicly available studies examined in this paper, Surfer's research offers the most complete disclosure of its methodology and sample</strong>: the number of keywords, URLs, and the steps involved in extracting the query fan-out using Gemini are all transparent. The sample size is sufficient, and it explicitly states that &quot;correlation ≠ causation.&quot; The &quot;27% stability&quot; figure points to the high variance inherent in query fan-out, which has direct practical significance. The paper recommends its own Topical Map tool at the end, but this tool recommendation is clearly separated from the research data and does not affect the data's credibility.</p>
<h3><a href="http://NextGrowth.ai">NextGrowth.ai</a> — Second-hand data compilation (data may be incorrect)</h3>
<ul>
<li><strong>Link</strong>: <a href="https://nextgrowth.ai/query-fanout-ai-explained/">nextgrowth.ai/query-fanout-ai-explained</a></li>
<li><strong>Author</strong>: The Nguyen, 2026-05-13</li>
</ul>
<p><strong>Key points</strong>:</p>
<ol>
<li>The AI ​​Overview (AIO) citation rate dropped from 76% to 38% (source credited to &quot;ALM Corp&quot;).</li>
<li>8-16 parallel subqueries, 161% reference improvement, Spearman correlation coefficient 0.77 (source: ALM Corp).</li>
<li>A subquery coverage of 26-50% is more frequently referenced; 100% coverage is actually worse.</li>
<li>Atomized paragraphs of 40-60 words: 25.7% increase in freshness.</li>
<li>Five-step optimization method + recommended tools (Qforia / Profound / ZipTie / Otterly / AthenaHQ)</li>
</ol>
<p><strong>Evaluation</strong>: <strong>The data contains several errors</strong>. ① The &quot;ALM Corp&quot; study is actually Surfer SEO—a source misattribution; ② The statement &quot;76%→38% citation rate decrease&quot; does not exist in the original Surfer article (the 76% in the original article refers to the AIO trigger rate), indicating a misinterpretation or inclusion of other sources; ③ The article's editors acknowledge that they &quot;did NOT conduct our own 173K-URL crawl study&quot; and that &quot;Unverified URLs are cited as plain text.&quot; The eight query variant framework correctly references iPullRank, and the basic mechanism description is consistent with Google's official documentation—this part can be referenced, but all quantitative data must be based on the original Surfer article. <strong>The GEO (Generation Engine Optimization) field currently suffers from significant secondary citation chain pollution: data from an original study may be repackaged in subsequent articles, potentially changing the research institution, the meaning of the numbers, and even the definition of the metrics.</strong></p>
<h3>Astiva AI — Manufacturer Marketing (Methodology available, data not applicable)</h3>
<ul>
<li><strong>Link</strong>: <a href="https://astiva.ai/blog/content-hubs-ai-visibility">astiva.ai/blog/content-hubs-ai-visibility</a></li>
<li><strong>Author</strong>: Satish K (CEO of Astiva AI), June 19, 2026</li>
</ul>
<p><strong>Key points</strong>:</p>
<ol>
<li>A hub-and-spoke architecture with a pillar page and 8-15 spoke pages increases citation rates by 2-3 times.</li>
<li>Two-way internal links increased the citation rate from 12% to 41%.</li>
<li>Pages covering 5+ sub-intents have a higher reference probability of 3.2×</li>
<li>Quarterly refresh, 60-90 day freshness decay, schema tagging increases citations by 2.5x.</li>
<li>Five-Step Construction Method + Detect → Diagnose → Displace → Prove Branding Methodology</li>
</ol>
<p><strong>Evaluation</strong>: <strong>The content is from a vendor, and while the methodology is reasonable, the data flow is opaque</strong>. It repeats two errors from NextGrowth (mislabeling &quot;ALM Corp&quot; and &quot;26-50% sweet spot&quot;), and the figures such as &quot;2-3×&quot;, &quot;12%→41%&quot;, &quot;3.2×&quot;, and &quot;46%/67% concentration&quot; are mostly sourced from aggregation sites like Slate, FuelOnline, Position Digital, and Growth Memo, or vendor research, without any original, verifiable links. The hub-and-spoke methodology is common industry practice, consistent with iPullRank/Surfer, and the framework can be referenced, but direct use of figures should be avoided. The entire article intersperses its own product introductions and pricing CTAs, a typical &quot;build consensus first, then sell the tool&quot; marketing structure.</p>
<h3>summary</h3>
<table><thead><tr><th>article</th><th>nature</th><th>Credibility</th><th>Can be quoted directly</th></tr></thead><tbody><tr><td>iPullRank</td><td>Industry Research / Mechanism Analysis</td><td>high</td><td>Mechanism analysis and query variant classification can be referenced; speculative conclusions need to be labeled.</td></tr><tr><td>Surfer SEO</td><td>First-hand empirical research</td><td>high</td><td>173K URLs of equivalent data can be directly referenced.</td></tr><tr><td>NextGrowth.ai</td><td>Second-hand sorting</td><td>Low</td><td>The mechanism description can be referenced; however, it is not recommended to cite quantitative data.</td></tr><tr><td>Astiva AI</td><td>Manufacturer Marketing</td><td>Low</td><td>The methodology can be referenced; however, it is not recommended to cite quantitative data.</td></tr></tbody></table>
<p>In general, evidence regarding query fan-out should be treated differently based on four sources: official confirmation from Google (AI Mode deployment and definition), Google patent descriptions (technical principles such as query variant generation, which are historical context rather than current implementations), community empirical research (such as Surfer's citation data), and industry speculation (such as intent shift inference). In particular, the latter two—community research and industry speculation—should not be packaged as product mechanisms already confirmed by Google.</p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[Three principles behind AI search]]></title>
      <link>https://xiaofeng.dev/en/writing/ai-search-principles/</link>
      <guid>https://xiaofeng.dev/en/writing/ai-search-principles/</guid>
      <pubDate>Mon, 17 Aug 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[If you've recently used AI assistants like Doubao or ChatGPT, or Google's AI mode for searching, you're probably already used to this experience: type in a…]]></description>
      <content:encoded><![CDATA[<p>If you've recently used AI assistants like Doubao or ChatGPT, or Google's AI mode for searching, you're probably already used to this experience: type in a question, and a few seconds later you get a pre-organized answer, instead of a row of blue links waiting for you to click. Strictly speaking, Doubao and ChatGPT are AI assistants with online question-and-answer capabilities, while Google AI mode is the form that truly AI-powers the search process itself; however, they share the same underlying function—using models to retrieve and then organize answers. In the industry, this type of system is called <strong>a generative engine</strong>: unlike traditional search engines that return &quot;a row of links,&quot; it returns a pre-written answer.</p>
<p>Breaking down this process, it becomes a chain with a feedback loop:</p>
<figure class="my-8"><img src="/writing/wechat-tech-assets/ai-search-geo/ai-search-flow.svg" alt="AI search involves a retrieval process from understanding the question, expanding the query, invoking the search query, to generating the answer." loading="lazy" decoding="async"><figcaption class="mt-3 text-center text-[13px] text-[#6b6658]">AI search is a retrieval and generation process with feedback.</figcaption></figure>
<h2>Core Principle 1: Query Expansion (fan-out)</h2>
<p>Take Doubao as an example. When you enter a question, the first thing the AI ​​does is not to search immediately, but to perform query expansion. This concept was originally called query expansion, but later it was called fan-out in many systems—meaning to &quot;fan&quot; a question into multiple search directions. Fan-out determines <strong>the width</strong> of the search: how many parallel search directions the question is spread out into at once determines how wide the search coverage is.</p>
<p><img src="/writing/wechat-tech-assets/ai-search-geo/fan-out-example.jpg" alt="Fan-out example: A question is expanded into 3 keywords."></p>
<p>The image above is a real-world example: a user asked, &quot;What kind of mechanical keyboard should an office worker who types frequently choose?&quot; The system didn't search for the original question, but instead broke it down into three parallel search directions—from the perspectives of purchasing recommendations, switch comparison, and layout and ergonomics—and then organized the answer after comprehensively referencing 15 articles.</p>
<p>Its approach is to first understand your question, and then break it down into different keywords for searching. This &quot;breaking down&quot; involves both keyword-based decomposition and semantic reinterpretation—the same question might be searched using different expressions, or it might directly extract several implicit sub-questions.</p>
<p>More importantly, it's not a one-off process. The AI ​​will reinterpret your question based on the webpage content and summaries retrieved in the first round, and then decide on its own how many more rounds of searching are needed. In other words, the search process itself is also a process of reasoning—it thinks as it searches and then decides what to ask next.</p>
<p>This means that AI search's &quot;retrieval&quot; is a different behavior from you manually typing keywords into the search box. It works with a dynamic query plan, rather than performing a static keyword match.</p>
<h2>Core Principle Two: Search Budget</h2>
<p>How deep a search can go depends on <strong>the Search Budget a product</strong> is willing to invest in a single task —that is, how many iterations and how much time it's willing to spend. The larger the budget, the deeper the iterations, and the more diverse the output. The differences between the three common tiers in mainstream products actually lie here:</p>
<ul>
<li><strong>Quick response</strong>: The search may only take one round, and the response is organized as soon as the results are obtained.</li>
<li><strong>Expert research</strong> suggests that 3 to 5 rounds of retrieval are typically performed, with cross-validation in multiple directions.</li>
<li><strong>In-depth research</strong> greatly expands the search scope, often running dozens or even hundreds of rounds, and the time to complete the task is also significantly longer.</li>
</ul>
<p><img src="/writing/wechat-tech-assets/ai-search-geo/search-budget-example.jpg" alt="Search Budget Example: Multiple rounds of alternating &quot;thinking → searching&quot;"></p>
<p>The image above illustrates the actual retrieval process in deep research mode: the system alternates between the &quot;thinking complete&quot; and &quot;search&quot; actions, with each round of thinking triggering a new round of retrieval—this is the intuitive manifestation of Search Budget in operation. The more ample the budget, the longer this alternating cycle runs, and the broader the information coverage.</p>
<p>This is the fundamental difference between the &quot;Fast/Expert/Deep&quot; modes you see on products like Doubao—it's the difference in the Search Budget allocated to each search: the larger the budget, the deeper the search rounds, the longer the time spent, and the more solid the conclusions usually are. To prevent the AI ​​from responding prematurely, it's usually required to forcibly consume the search budget (budget forcing) to avoid the AI ​​answering based on pre-trained memories.</p>
<p>Width is determined by fan-out, and depth is determined by Search Budget; these are two independent dimensions of AI search retrieval.</p>
<h2>Core Principle 3: AI-friendly Search API</h2>
<p>The previous sections discussed fan-out and retrieval rounds, describing how AI &quot;thinks&quot; and &quot;searches.&quot; However, these actions ultimately come down to retrieving content—relying on the underlying search interface. The interface AI needs is different from the interface fed to traditional search engines.</p>
<p>Traditional web search APIs return a list of links (possibly with a brief summary), serving the human eye: guiding you to click and read. AI search doesn't need that—it needs content that can be directly fed into a context window and digested by the model. Therefore, it's often supported by a dedicated aggregator search interface: instead of returning a list of links to click on, it returns a direct summary of the webpage. One serves the human eye, the other a context window for the model.</p>
<h2>Detail 1: Does the AI ​​send a complete question or a series of keywords to the search interface?</h2>
<p>The answer lies somewhere in between. After fan-out, it sends out a &quot;query plan&quot;—a set of queries composed of restated sub-questions and extracted keywords, sent to the search interface in batches. It neither throws your original question at you nor mechanically breaks sentences into words, but rather regenerates search instructions based on understanding.</p>
<h2>Conclusion: From SEO to GEO</h2>
<p>All of this content will be useful, but in different ways. Previously, web page creation often involved keyword stuffing, adding backlinks, and merging as much content as possible into a single article. Now, AI organizes content, processing semantics rather than keyword stuffing; traditional search engine rankings and user click-through rates are no longer decisive factors. This is precisely the challenge that the transition from SEO to GEO aims to address.</p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[Rethinking what prompts do]]></title>
      <link>https://xiaofeng.dev/en/writing/rethinking-prompts/</link>
      <guid>https://xiaofeng.dev/en/writing/rethinking-prompts/</guid>
      <pubDate>Tue, 11 Aug 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[I'm more proficient in backend development, but not so much in frontend development. For a while, I often had AI help me write frontend pages, which led to…]]></description>
      <content:encoded><![CDATA[<p>I'm more proficient in backend development, but not so much in frontend development. For a while, I often had AI help me write frontend pages, which led to several difficulties. Initially, I thought the problem was that I didn't know how to write prompts. When others write prompts, they first define a role, then clearly state the task, background, requirements, style, and output format. I tried that too, but the results weren't consistent. Later, I gradually realized that the problem might not be whether the prompts were long enough, but whether I and the AI ​​were on the same <strong>wavelength</strong>. This discovery changed how I came to understand prompts.</p>
<h2>I originally thought the prompts were a user manual.</h2>
<p>I recently heard an English blogger talk about the word &quot;prompt.&quot; He mentioned that &quot;prompt&quot; means to urge someone to take action, and it's also related to the prompter in theater. Actors perform on stage, and the prompter reminds them of their lines from the audience.</p>
<p><img src="/writing/wechat-tech-assets/rethinking-prompts/prompt-meaning.png" alt="The original meaning of &quot;prompt&quot; is to urge someone to take action."></p>
<p>The teleprompter doesn't perform the entire act for the actors; they simply provide a prompt at crucial moments to guide the performance. This explanation gave me a different understanding of teleprompters: they aren't necessarily a detailed instruction manual, nor do they have to be rigidly prescribed. Often, they are just a key prompt to help the actor get into the right mindset. The teleprompter reminds the actor at crucial points, and the teleprompter can simply provide the crucial clue needed to complete the task.</p>
<p><img src="/writing/wechat-tech-assets/rethinking-prompts/prompter.png" alt="The teleprompter prompted the actors to continue their performance."></p>
<p>The prompts available on the market regarding roles, tasks, backgrounds, and formats are certainly useful, especially for beginners using AI. However, they can easily create a misconception: that longer prompts equate to better results. In reality, piling on adjectives and requirements doesn't necessarily make AI more accurate. What it truly needs may simply be a few precise words.</p>
<h2>A technical term can be more useful than a long description.</h2>
<p>When AI communicates with me about front-end pages, we often use technical jargon. For example, CTAs in marketing pages, permission models in internal systems, and BFFs between the front-end and back-end. These terms may seem like just a few letters, but they carry a whole set of contexts. A CTA isn't just a button; it relates to what action the page wants the user to perform. A BFF isn't just an interface; it usually signifies a dedicated layer of organization between the front-end and back-end services.</p>
<p>If I simply say &quot;make a button,&quot; &quot;add a permission,&quot; or &quot;call the backend API,&quot; the AI ​​has to guess a lot of things. But once precise <strong>technical terms</strong> are used, both parties can more easily understand what each other is saying. I now prefer to understand prompts as a kind of <strong>context compression</strong>: a precise word can sometimes replace a long, imprecise description.</p>
<p>This is also a real problem I encountered when doing front-end development: it's not that I'm completely unable to express requirements, but rather that I haven't mastered enough vocabulary in this field. Without enough vocabulary, many requirements can only remain at the level of a vague feeling.</p>
<h2>AI can teach me terminology, but it can't make choices for me.</h2>
<p>Even if I'm unfamiliar with the terminology of a particular field, it doesn't mean I can't communicate with AI. I can first have it explain the commonly used concepts and solutions in that field, and then gradually determine which aspects are relevant to my question. Sometimes I'll directly ask it: <strong>What's this requirement typically called in the industry? What are some other common practices? What are the costs of each approach?</strong></p>
<p>This way, it's not just me teaching AI how to do things, but also AI teaching me things in return. This process is somewhat like <strong>reverse learning</strong> in management: managers not only convey requirements to the front lines, but also learn from them. When collaborating with AI, I find this kind of <strong>inquisitive humility</strong> useful. AI may know more than I do, and it can offer many solutions I hadn't thought of before.</p>
<p>However, just because AI knows a lot doesn't mean it knows which solution is best suited for my project. Every project has some unspoken context: the existing technology stack, the team's capabilities, delivery time, budget, legacy issues, and business constraints that cannot be easily changed. AI can provide a solution that seems good, but it may not know whether it fits these <strong>implicit contexts</strong>.</p>
<p>Therefore, while AI can expand the possibilities, humans are still responsible for narrowing them down. I'm reminded of the saying, &quot; <strong>Of all the waters in the world, I only take a sip.&quot;</strong> I increasingly feel that a crucial ability when humans collaborate with AI is not to get more answers from AI, but rather to select the one truly suitable for the current project from many good options.</p>
<h2>Behind the professional methods, there are still unwritten parts.</h2>
<p>Some time ago, I had AI use <strong>the pyramid principle</strong> and <strong>MECE method</strong> to organize content for me, and the results were much better than ordinary organization methods. This made me realize that a person who has professional knowledge, unique methods, and accurate vocabulary to describe a particular field is often more efficient than someone who only makes general requests.</p>
<p>However, this ability cannot simply be turned into a skill and handed to someone else to install, granting them the same results. Behind every method lies a multitude of unwritten judgments: when is it appropriate to use it, when shouldn't it be used, what are its prerequisites, what are its limitations, and how should it be adjusted for different people and different problems? Skills can solidify processes, knowledge, and tools, but they can hardly replace the user's own judgment. Who uses the method also influences its final outcome.</p>
<h2>A good hint doesn't necessarily mean you have to finish your sentence.</h2>
<p>I later thought of flavor cards for coffee and tea, and also perfume copywriting.</p>
<p><img src="/writing/wechat-tech-assets/rethinking-prompts/coffee-flavor-card.jpg" alt="Coffee flavor cards"></p>
<p><img src="/writing/wechat-tech-assets/rethinking-prompts/tea-flavor-card.jpg" alt="Tea aroma description card"></p>
<p>Good perfume copy doesn't list every single scent component, and good descriptions of coffee or tea don't just stop at adjectives like &quot;bitter,&quot; &quot;fragrant,&quot; and &quot;mellow.&quot; They usually use just a few sentences to depict a scene, evoke some imagery, and remind people of a memory or a forgotten feeling.</p>
<p>They didn't explain everything, but they successfully activated the context in the reader's mind. Clues sometimes work the same way: they don't necessarily need to write out every detail, but rather provide sufficiently accurate clues so that the AI ​​understands what we're discussing, what we truly value, and what we hope will ultimately become.</p>
<p>After reinterpreting the prompts, I no longer see them as instructions that are as long as possible. It's more about establishing a <strong>shared context</strong> with the AI. Ultimately, the prompts are asking: Do I even know what I want?</p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[When should a Next.js app run at the edge? A look at IGA Pages]]></title>
      <link>https://xiaofeng.dev/en/writing/nextjs-edge-deployment-iga-pages/</link>
      <guid>https://xiaofeng.dev/en/writing/nextjs-edge-deployment-iga-pages/</guid>
      <pubDate>Sun, 09 Aug 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[In addition to being deployed on function services, Next.js applications can also be run on edge nodes. IGA Pages is a product of Volcano Engine, and it…]]></description>
      <content:encoded><![CDATA[<p>In addition to being deployed on function services, Next.js applications can also be run on edge nodes. IGA Pages is a product of Volcano Engine, and it belongs to the same category of edge acceleration products as Alibaba Cloud ESA: they both combine site acceleration capabilities with some edge running capabilities, allowing applications to process requests on nodes closer to the user.</p>
<p>However, edge deployment is not the best choice for all Next.js applications. The real questions to consider are: how much computation is being performed on the server side, how many database accesses are required, and whether these data services are located close to edge nodes.</p>
<h2>1. What are the differences between IGA Pages and Function Services?</h2>
<p>IGA Pages and Alibaba Cloud ESA can be understood as products in the same category, but they are not the same product. Their runtime support, deployment methods, and configuration limitations cannot be directly compared. In actual use, you should still refer to their respective official documentation.</p>
<p>Function services typically run applications in a central region, and user requests are accelerated to this region via DCDN. Its advantage is that application code and databases can be located in close proximity, resulting in shorter paths for server-side database access.</p>
<p>IGA Pages operates more like an edge computing environment: application code or server-side logic can be deployed to edge nodes, giving user requests the opportunity to be processed on nodes closer to them. It inherently relies on edge acceleration products for access acceleration, rather than being a regular origin server requiring an additional layer of DCDN.</p>
<p>The core difference between the two methods can be simply summarized as follows:</p>
<ul>
<li><strong>Function service + DCDN</strong>: Applications run centrally, and DCDN is responsible for accelerating user requests and static resources to the application's local area.</li>
<li><strong>IGA Pages</strong>: A portion of the application's runtime capabilities are offloaded to edge nodes, allowing user requests to be processed closer to the user.</li>
</ul>
<p>&quot;Closer to the user&quot; here does not mean &quot;closer to the database.&quot; The benefits brought by edge nodes must ultimately be evaluated together with the cost of server-side data access.</p>
<h2>Second, first distinguish between SSR and server-side API.</h2>
<p>These two words often appear together, but they do not describe the same thing.</p>
<p>**SSR (Server-Side Rendering)** describes a page generation method: when a user requests a page, the server generates the HTML and then returns it to the browser. During the SSR process, the server can read from the database, call external services, or it can completely avoid accessing the database.</p>
<p><strong>A server-side API</strong> describes the interface structure: when a browser or other service requests an interface, the server typically returns JSON or other data. A common implementation in Next.js is the Route Handler. It's primarily used for data reading and writing, authentication, and calling third-party services, but it's not equivalent to page rendering.</p>
<p>A Next.js application can have both an SSR page and a server-side API, but their request paths and responsibilities should be understood separately:</p>
<ul>
<li>SSR: Server-side generated HTML page.</li>
<li>Server-side API: The server responds with data or performs operations.</li>
<li>Server-side components directly read from the database: This is server-side data access and is not automatically equivalent to an external API.</li>
</ul>
<p>Therefore, not all server-side logic should be called SSR, nor should all code running on the Next.js server be called API.</p>
<h2>III. Why is database location important?</h2>
<p>If the page is purely static, the closer the edge node is to the user, the greater its advantage. However, if the page uses SSR or the server-side API needs to access the database, the situation becomes more complex: the edge node still needs to access the database and other backend services when processing requests.</p>
<p>Assuming the database is still located in mainland China, but a user's request is assigned to an overseas edge node, an SSR request might follow this path:</p>
<p>User → Overseas Edge Node → Mainland Database → Overseas Edge Node → User</p>
<p>At this point, while the code is closer to the user, the server-side database access becomes more remote. Each page rendering requires cross-regional requests, and latency may offset the benefits of edge deployment. Database connectivity, network stability, and cross-regional traffic costs also need to be considered.</p>
<p>However, it's inaccurate to assume that &quot;anything using a database is unsuitable for edge nodes.&quot; The key is the ratio of computation to data access:</p>
<ul>
<li><strong>Computationally intensive with few database queries</strong>: This type of server-side logic is typically best placed on edge nodes. Requests can perform most of the computation closer to the user, with only a small amount of data reading or validation.</li>
<li><strong>Database queries are very intensive</strong>: This type of logic is generally not suitable for direct placement on edge nodes, especially when there are serial dependencies between queries, frequent read/write operations, or when the database is concentrated in a single region. A large number of round trips between edge nodes and the database can make network latency a major bottleneck.</li>
</ul>
<p>This involves considering more than just the &quot;number of queries,&quot; including whether each query must wait for the previous result, the data volume, the read/write ratio, and whether the database is located near an edge node. Edge nodes address the distance from the user to the compute node, but they cannot automatically address the distance from the compute node to the database.</p>
<p>Therefore, adding another layer of acceleration to database services (such as Supabase) is usually not a priority. Database requests involve authentication, read/write, connectivity, and consistency issues; it's not as simple as putting a static file on a CDN. A more relevant question is: should databases be deployed overseas in the first place? Should domestic and overseas applications, servers, and databases be completely separated into two separate systems?</p>
<p>If users, computing power, and data are primarily located overseas, deploying the database directly overseas is generally more reasonable than having domestic servers or edge nodes access the database across regions. For applications that serve both domestic and overseas markets, it's also worth considering deploying servers and databases separately domestically and overseas, allowing requests from both sides to remain locally as much as possible, reducing cross-border calls and data flow. This geographically split architecture usually makes data isolation and compliance management easier, but the specific solution still needs to be evaluated individually based on business type, data classification, and applicable regulations.</p>
<p>The following is a relatively complex typical scenario to illustrate this data flow. Instead of treating Supabase as a regular origin server and handing it over to DCDN for acceleration, it first splits the access layer, Next.js server, and database according to the user's region, so that the SSR page rendering and the data requests of the server API are completed in the same region as much as possible.</p>
<p><img src="/writing/wechat-tech-assets/nextjs-edge-deployment-iga-pages/iga-pages-data-flow.png" alt="Complex data flow under edge deployment"></p>
<h2>IV. Which applications are suitable for deployment on edge nodes?</h2>
<h3>Pure static application</h3>
<p>This is the most suitable scenario. The page can be distributed directly after it is built, without needing to access the database in real time on the edge nodes. Users can obtain static files from nearby nodes.</p>
<h3>Computationally intensive server logic with low data access</h3>
<p>If the request mainly involves computation rather than repeated database queries, such as request rewriting, lightweight authentication, rule calculation, content processing, or data preprocessing, and only requires a small amount of data reading, then placing this type of logic on an edge node is usually more appropriate.</p>
<h3>Applications with separated front-end and back-end</h3>
<p>If the front-end only displays the page, and the server-side API is centrally deployed in an area close to the database, then the front-end can be placed on an edge node, and data requests can be handled by the server-side API.</p>
<p>This approach requires separate consideration of cross-domain issues, authentication, API latency, and caching strategies, but the overall architecture has clearer boundaries. It's important to note that deploying the frontend on edge nodes does not mean the server-side API must also be deployed on edge nodes.</p>
<h3>Applications that match databases and edge operating regions</h3>
<p>If the database itself has a suitable global deployment plan, or if the application's users, computing nodes, and data are concentrated in similar regions, edge SSR or edge server APIs have a better chance of demonstrating their advantages.</p>
<h2>V. Which applications are not suitable for direct placement at the edge?</h2>
<p>If an application has a large number of dynamic pages, and SSR needs to frequently access a database that is far from the edge node, or if a single request to the server-side API requires multiple serial database queries, then it is not recommended to migrate directly to the edge node for the sake of &quot;global acceleration&quot;.</p>
<p>For these types of applications, it's more suitable to first deploy the server-side logic in a function service closer to the database, and then use DCDN to accelerate static resources and user access. While this doesn't mean the entire code runs at the edge, the data access path is more controllable.</p>
<p>Special attention should be paid to the following deployment method:</p>
<blockquote>
<p>The server is deployed on an overseas edge node, while the database is deployed in mainland China; each request requires multiple reads and writes to the database.</p>
</blockquote>
<p>In this scenario, edge nodes, being close to users but far from the database, may actually result in worse overall response times. For database-intensive applications, priority should be given to ensuring low latency between the server and the database before considering offloading static and cacheable content to DCDN. If the business is primarily located overseas, it's advisable to prioritize deploying the database directly overseas rather than attempting to add an acceleration layer to the existing database connection.</p>
<h2>VI. IGA Pages cannot have a DCDN layer superimposed on them.</h2>
<p>Edge acceleration products typically rely on DCDN to provide global or regional acceleration capabilities. IGA Pages already belongs to this category of products, so it should not be paired with another layer of DCDN.</p>
<p>If you configure the domain name of an edge acceleration product as an acceleration object or origin server of another DCDN, a loop may form between the two acceleration layers. The platform will perform loop detection, and will usually block access or refuse to take effect after detecting such a configuration.</p>
<p>Therefore, it is necessary to first distinguish between the two architectures:</p>
<ul>
<li><strong>Function service as origin server + DCDN</strong>: This is a common architecture of &quot;central area computing, edge accelerated access&quot;.</li>
<li><strong>IGA Pages</strong>: It already includes edge acceleration capabilities, so there's no need to add DCDN on top of it.</li>
</ul>
<p>If fine-grained control over DCDN caching, routing, and transmission parameters is required, it is generally advisable to choose a function service plus a standalone DCDN, rather than treating IGA Pages as a regular origin server and connecting it to another layer of DCDN.</p>
<h2>VII. Configuration Limitations of IGA Pages</h2>
<p>The advantage of IGA Pages is that it integrates some deployment and acceleration capabilities, but at the cost of relatively few adjustable parameters.</p>
<p>For example, capabilities like HTTP/2 and Gzip may not be as freely adjustable by the user as a standalone DCDN configuration; some configurations may require activation via a support ticket. If you need fine-grained control over caching, routing, and transport parameters, using a standalone function service combined with DCDN will offer greater flexibility.</p>
<h2>Conclusion: First examine the computation and data path, then consider the node distances.</h2>
<p>IGA Pages is suitable for purely static websites, server-side logic with computationally intensive operations and low database access, front-end applications with front-end and back-end separation, and applications where computing nodes and data services can be deployed locally.</p>
<p>If your Next.js application uses SSR, or has a server-side API, and the server frequently accesses a database in a fixed region, edge nodes may not be faster. In this case, you should prioritize ensuring low latency between the server and the database before using DCDN to accelerate user access.</p>
<p>To determine whether to use IGA Pages, ask yourself these four questions:</p>
<ol>
<li>Is this purely static content, or does it require SSR or a server-side API?</li>
<li>Is the server-side logic primarily computational, or mainly database querying?</li>
<li>Is the database located near the edge region where the application will run?</li>
<li>Have edge acceleration products already been used to avoid creating a loop by adding another layer of DCDN?</li>
</ol>
<p>If the server-side computation is heavy, database access is infrequent, and there are no significant cross-regional data access issues, edge deployment is worth prioritizing. Conversely, if the database queries are intensive, the call chain is long, or the database is far from the edge nodes, edge deployment should be chosen with caution.</p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[Accelerating a Next.js app globally with functions and a CDN]]></title>
      <link>https://xiaofeng.dev/en/writing/vibe-coding-nextjs-vefaas-dcdn/</link>
      <guid>https://xiaofeng.dev/en/writing/vibe-coding-nextjs-vefaas-dcdn/</guid>
      <pubDate>Sun, 09 Aug 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[I'd like to share a practical topic: how to deploy Next.js applications built with Vibe Coding, and how to accelerate them globally.]]></description>
      <content:encoded><![CDATA[<p>I'd like to share a practical topic: how to deploy Next.js applications built with Vibe Coding, and how to accelerate them globally.</p>
<p>These types of applications typically come in three forms:</p>
<ol>
<li><strong>Purely static applications</strong>: These only have front-end pages, no database required, and no server-side logic.</li>
<li><strong>Frontend → Supabase (SDK / REST)</strong>: The browser reads and writes data through Supabase's client SDK or REST interface, with RLS responsible for data permissions.</li>
<li><strong>Frontend → Next.js Server-side → Subbase / External Services</strong>: The Next.js server can handle more complex permissions and business logic through APIs, SSRs, Server Components, or Server Actions.</li>
</ol>
<p>The deployment methods for the three are different. Purely static applications can be placed directly on CDN or edge nodes; if it is just simple data reading and writing, the browser can connect directly to Supabase; if the application needs to hide the server key, execute complex business logic, or generate pages on the server, the requests need to go through the Next.js server.</p>
<p><img src="/writing/wechat-tech-assets/vibe-coding-nextjs-vefaas-dcdn/nextjs-three-deployment-architecture.svg" alt="Next.js Three Deployment Architectures"></p>
<p>The phrase &quot;via Next.js server&quot; here does not necessarily imply the existence of a traditional API. SSR or Server Components can directly read the database on the server and generate the page; Route Handlers or Server Actions are more commonly used for read and write operations triggered by browser actions. They are often used in combination, but they solve different problems.</p>
<p>There is another point that needs special attention in the third type: the server should be as close to the database as possible.</p>
<p>Since the Next.js server handles API, SSR, and Server Action tasks, it frequently accesses the database and other external services. It's not feasible to deploy the server overseas for global access while keeping the database in mainland China. Especially when a single request involves multiple round trips between the server and the database, cross-regional latency will accumulate, ultimately resulting in a slower experience for the user.</p>
<p>Therefore, when choosing a server deployment region, you should first consider where the database is located, and then where the users are primarily located. DCDN can accelerate the process from user to edge node, but it cannot eliminate long-distance calls between the server and the database.</p>
<h2>1. What should be noted when directly connecting the front end to Supabase?</h2>
<p>The code in the browser is on the same side as the user, and the user can see the requests sent by the front end. Therefore, when the browser connects directly to Supabase, security cannot be based on the assumption that &quot;the user cannot see the interface&quot;.</p>
<p>However, direct browser connection to Supabase does not equate to inherent insecurity. Supabase's anon key can be stored on the front end; the actual data isolation is handled by the database's RLS policy and user permissions. Adding, modifying, and deleting operations can also be performed securely via RLS, but the rules must be configured correctly.</p>
<p>If you still need to hide the service-role key, call private third-party APIs, execute complex business rules, or do not want to expose the data processing process in the browser, then the server-side logic of Next.js should handle the request and complete the authentication, permission judgment and database operation on the server side.</p>
<h2>2. Running Next.js using a function service.</h2>
<p>I recently tried Volcano Engine's function service. Its idea is to offload the application code to the cloud, where it runs in a container and provides a publicly accessible domain name.</p>
<p>In this deployment method, the front-end pages and server-side logic of Next.js can be hosted by the same application. You can also set instance strategies for functions:</p>
<ol>
<li><strong>Dynamic instances</strong>: Instances are started only when a request arrives. This is less costly, but may result in a cold start.</li>
<li><strong>Reserved instances</strong>: Start a fixed number of instances in advance, which results in faster response times, but will continuously consume resources.</li>
</ol>
<p>I initially thought that reserving instances would definitely be more expensive, but I later discovered that this isn't entirely true. Because scheduling costs are lower when resources are locked in advance, reserving instances may actually be more cost-effective in scenarios with high traffic.</p>
<p>If it's just a development environment with low traffic, you can use dynamic instances; if the traffic is relatively stable, or you are concerned about the response speed of the first request, you can consider reserving instances.</p>
<p>Furthermore, regardless of whether it's a dynamic instance or a reserved instance, each instance has its own concurrency configuration. The platform might provide a default concurrency value of 100, but don't directly copy this default value. This is because the memory and CPU usage of a default instance are usually not high. Under high concurrency, Next.js's SSR or API can cause multiple requests to compete for the same instance's resources, easily leading to queuing, timeouts, or errors.</p>
<p>In this scenario, it's advisable to initially set the single-instance concurrency lower, and then gradually increase it by conducting load tests on CPU, memory, response time, and error rate. The number of instances and single-instance concurrency are two different parameters, both of which need to be adjusted based on the actual load.</p>
<h2>Third, confirm the Node.js version supported by the platform.</h2>
<p>Different service providers have different requirements for the runtime environment of Next.js. You cannot deploy it to any platform just because it can run on a local project.</p>
<p>Taking Volcano Engine as an example, the current official deployment documentation requires a local Node.js 20.x installation and selection of the Native Node.js 20.x runtime. Higher versions should not be used lightly; at least confirm the current runtime support range of the platform and the compatibility of Next.js and its dependencies.</p>
<p>If using the veFaaS CLI for deployment, the official process is as follows: the CLI detects the framework, build commands, artifact paths, and startup commands in the project directory, then proceeds with dependency installation and the build process, and finally deploys the build results to the cloud. In other words, for this CLI deployment path, the build primarily occurs locally; the cloud is responsible for receiving and running the deployment artifacts, rather than handing over the complete source code to the cloud for temporary building.</p>
<p>Therefore, it's best to ensure your local Node.js version is consistent with the platform runtime before deployment. I highly recommend using it in conjunction with the veFaaS CLI and its corresponding Skill: the CLI handles the actual execution, while the Skill provides runtime suggestions, build configurations, and common troubleshooting paths.</p>
<h2>IV. Why is it necessary to add a DCDN layer in front of the function service?</h2>
<p>Function services address &quot;where the code runs,&quot; but they are not synonymous with global acceleration. User requests may still require accessing function instances across long distances.</p>
<p>One approach is to connect DCDN in front of the function service, using it as a unified access point. This allows static resources to be accessed as much as possible on edge nodes, while forwarding dynamic requests back to the function service.</p>
<p>But simply attaching DCDN is not enough; the key is to configure caching and conditional routing.</p>
<h3>Static resources: Cache them as much as possible.</h3>
<p>Static resources generated by Next.js can typically be cached for a long time, such as <code>_next</code> resources under a specific path. These files usually contain versioning or hash information, and their URLs change as the content changes, making them suitable for CDN caching.</p>
<h3>Dynamic interfaces: Do not cache by default.</h3>
<p>Login status, user information, and database query results can all be dynamic content, especially for <code>/api/</code> interfaces under [specific API name], and static caching rules should generally not be applied directly.</p>
<p>Conditional routing can differentiate between static resources and dynamic requests: static resources are routed through the cache, while APIs and other dynamic pages are routed back to the function service. Specific rules must be validated based on your own routing structure; do not blindly configure them based solely on path names.</p>
<h2>V. Several configurations in DCDN worth checking</h2>
<h3>HTTP/2</h3>
<p>HTTP/2 can help handle multiple requests concurrently over the same connection, which is helpful for dynamic requests and pages containing multiple resources.</p>
<h3>Gzip</h3>
<p>Gzip can compress text resources such as HTML, CSS, and JavaScript, usually with significant benefits and minimal performance loss, so it is generally recommended to enable it.</p>
<h3>HTTPS</h3>
<p>HTTPS is a basic requirement for production environments. In addition to protecting transmitted content, many capabilities of modern browsers also rely on secure connections.</p>
<h2>VI. Acceleration Range of DCDN</h2>
<p>DCDN typically offers three acceleration options: Mainland China, Overseas, and Global. The choice depends on user distribution, not simply the region where the function service is located. If you lack a domain name that can be registered in China, choose Overseas acceleration.</p>
<h2>Conclusion: What scenarios are suitable for Function Services + DCDN?</h2>
<p>If your Next.js application requires server-side execution (such as SSR, Route Handler, or Server Action), or needs the server to securely connect to a database, then &quot;Function Service + DCDN&quot; is a relatively intuitive solution:</p>
<ul>
<li>The function service is responsible for running Next.js and server-side logic;</li>
<li>DCDN is responsible for static resource caching and network acceleration;</li>
<li>Conditional routing is responsible for distinguishing between static and dynamic requests;</li>
<li>Instance strategy is responsible for making trade-offs between response speed and cost.</li>
</ul>
<p>After the site is deployed, I also recommend running a performance analysis test using Chrome DevTools to see if there are any areas for optimization in terms of initial screen load, static resources, network requests, and script execution. Deployment is not the end of performance optimization; actual access data and browser analysis results are the basis for the next round of adjustments.</p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[Making sense of AI jargon: Post-training, harnesses, and loops]]></title>
      <link>https://xiaofeng.dev/en/writing/ai-terminology-confusion/</link>
      <guid>https://xiaofeng.dev/en/writing/ai-terminology-confusion/</guid>
      <pubDate>Wed, 05 Aug 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[I noticed many accounts reposting various new-era AI projects, but their likes were far lower than their reposts. I later realized that many readers, like…]]></description>
      <content:encoded><![CDATA[<p>I noticed many accounts reposting various new-era AI projects, but their likes were far lower than their reposts. I later realized that many readers, like me, were sharing these posts to &quot;file transfer assistants,&quot; their favorites, and their WeChat Moments to alleviate their collecting addiction and anxiety. This is what boosted the repost count.</p>
<h2>I. What exactly is post-training?</h2>
<p>I was reminded of the recent significant improvement in agent capabilities in DeepSeekv4 Flash through post-training optimization. After searching around, I found that firstly, the official documentation doesn't disclose the exact post-training method, and secondly, everyone interprets post-training as a training method that doesn't change the weights.</p>
<p>Further searching revealed that generalized post-training includes fine-tuning and reinforcement learning (RL), which involves modifying the weights. This demonstrates the extent of the confusion surrounding the terminology.</p>
<h2>II. The strange term Harness</h2>
<p>Foreigners have a penchant for invention; they invented the term &quot;Harness&quot; to refer to tools, functions, and runtimes related to model making. So I see some MaaS platforms calling their built-in search function &quot;Harness&quot;? Isn't it just a search tool? Does it really need this term to convey its meaning? It must be because their Chinese isn't good enough.</p>
<p>Then some people started calling their own tool a &quot;harness tool,&quot; creating a chaotic situation.</p>
<h2>III. Mixed Use of Loops</h2>
<p>Loop refers to continuously iterating the model within a tool/runtime environment (with minimal changes to the weights), which is the harness optimization method mentioned in Lilian's blog, such as self-harness and meta-harness. However, some people generalize or borrow it to their own agents with some self-optimization or memory capabilities, just to make it look more impressive.</p>
<h2>Fourth, these nouns are all too similar.</h2>
<p>Repetitive inventions and indiscriminate borrowing are rampant; even those who don't build models or infrastructure are frantically using existing methods. Even bloggers outside the developer field are attributing their skills and workflows to using a particular methodology.</p>
<p>For AI application developers, such metaphors or borrowings create anxiety out of thin air and do not provide practical solutions for specific scenarios.</p>
<p>My current suggestion is:</p>
<ul>
<li>It is necessary to read the original source and its meaning in order to understand its origin.</li>
<li>Comparison and analysis are needed to reduce ambiguity and anxiety.</li>
<li>It's acceptable to use this when you need to showcase the strengths of yourself or your application, or when you want to reduce the cost of explanation, but don't let yourself be bound by concepts.</li>
</ul>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[When batch inference is faster and when it slows down]]></title>
      <link>https://xiaofeng.dev/en/writing/batch-inference-fast-slow/</link>
      <guid>https://xiaofeng.dev/en/writing/batch-inference-fast-slow/</guid>
      <pubDate>Sat, 25 Jul 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[I've recently been working on a project that uses a large model API. The requirements aren't complicated: extract keywords from webpage text, identify brand…]]></description>
      <content:encoded><![CDATA[<h2>The speed of batch inference: It cannot be generalized.</h2>
<p>I've recently been working on a project that uses a large model API. The requirements aren't complicated: extract keywords from webpage text, identify brand names and their aliases, and then determine the article's sentiment towards that brand—positive or negative. This kind of semantic understanding and sentiment analysis is exactly what large models excel at, and doesn't require deep reasoning.</p>
<p>The task is simple, but the volume is significant. In the most basic scenario, there are around a hundred articles. Calling the API line by line, or using regular concurrent calls, either triggers frequency limits or results in excessively slow overall throughput.</p>
<p>After some research, I discovered that platforms like Volcano Engine offer two methods besides single-call APIs: &quot;online inference&quot; and &quot;batch inference.&quot; Batch inference has two modes: batch inference tasks, which process statically stored data; and an access point similar to online inference, which processes dynamic data. My scenario involves batches of web articles, which falls under the former. I hadn't used it before, but after some research, I found it to be a perfect fit—the prompts remain almost unchanged, only the input data changes.</p>
<h2>1. Why is it fast?</h2>
<p>Batch inference is different from what I originally imagined. I thought batching was just sending requests in a bunch, but that's not the case—its real advantage lies in the fact that when all requests share the same set of prompts and only the data content changes, the server-side cache hit rate is extremely high.</p>
<p>The official explanation is more direct: the cost per input and output is 50% of that of online inference, and the cost per input can be reduced by another 60% after a cache hit—the caching benefit is not just about speed, but also about cost. The default quota is 10 billion tokens/day, with support for quota increases via work orders, and thanks to flexible scheduling strategies, it can maintain a considerable processing rate even during peak periods.</p>
<p>I submitted 300 articles at once, prepared to wait, but they returned in a minute or two—exceeding my expectations.</p>
<p>There are several key points to consider when using this interface:</p>
<ul>
<li><strong>Extremely high concurrency</strong>. It can handle 50,000 concurrent calls using asynchronous I/O. This requires removing local concurrency limits to prevent the client itself from becoming a bottleneck.</li>
<li><strong>Extremely long timeout settings</strong>. Thousands of requests being processed in parallel on the server side takes time, so long timeouts are advisable—24-hour timeouts are not uncommon and are the norm for batch tasks.</li>
<li><strong>Exponential backoff retries for 429.</strong> Server overload will return 429. Instead of hard retries, use an exponential backoff strategy to wait for the server to recover before retrying.</li>
</ul>
<p>It's worth mentioning the low barrier to entry for the Batch Chat interface: the parameters of the Batch Chat interface are the same as those of the regular Chat interface. You only need to focus on the timeout and concurrency strategies to switch between them, without having to change the business logic—which is why I was able to get started quickly.</p>
<p>The system retrieves all results at once upon returning. The entire process takes only a few minutes.</p>
<h2>II. Changing the deep reasoning model yields drastically different results.</h2>
<p>Just when I thought I had found the ideal solution, I tried it again today—this time using DeepThink's doubao-seed-2-1-pro, and it was Sunday. Almost the same scenario, but the performance was completely different.</p>
<p>Previously, with lightweight models like doubao-seed-2.0-mini, it could be completed in a few minutes; but this time, with the deep inference-based doubao-seed-2-1-pro, it was almost impossible to proceed.</p>
<p>The &quot;waiting and queuing&quot; described in the official documentation is not an exaggeration. On a uncrowded model, queuing is almost non-existent; however, on a more crowded model, or a model with deeper reasoning, the fast method of batch inference becomes ineffective—thousands of requests enter the queue, and deep inference itself is slow, getting slower the deeper it goes, so the backlog only exacerbates the problem.</p>
<p>But whether this slowdown is due to the deeper and slower reasoning of doubao-seed-2-1-pro itself, or to the platform's limited capacity and increased queues on Sunday, is difficult to determine based on a single comparison.</p>
<h2>Conclusion: Generalizations cannot be made.</h2>
<p>The speed of batch inference cannot be judged solely by the interface. It's fast and stable on doubao-seed-2.0-mini, but almost unusable on doubao-seed-2-1-pro—but this doesn't mean &quot;deep inference models shouldn't use batch processing.&quot; The applicable scenarios and real-world performance of deep inference need to be cross-validated: sometimes the bottleneck lies in the model's own inference depth and speed, and sometimes in the platform's concurrency capacity and queuing situation. These two factors are intertwined and cannot be generalized.</p>
<p>The interface provides high concurrency, long timeouts, and exponential backoff, and the platform also offers low unit price, high quota, and flexible scheduling. However, the speed of the final run is determined by the model, platform capacity, and time period. Only actual testing can clarify the combination of these three factors.</p>
<p><strong>Reference link</strong>: Volcano Engine - Batch Inference</p>
<p><img src="/writing/wechat-tech-assets/batch-inference-fast-slow/00157ed7a7ef3028.png" alt="The speed of batch reasoning: It cannot be generalized (Illustration)"></p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[Getting more from a smaller set of Skills]]></title>
      <link>https://xiaofeng.dev/en/writing/less-is-more-skills/</link>
      <guid>https://xiaofeng.dev/en/writing/less-is-more-skills/</guid>
      <pubDate>Sun, 19 Jul 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[For the past six months, I've been revisiting EveryInc's compound-engineering-plugin, which includes 29 skills (all commands starting with /ce-). I've been…]]></description>
      <content:encoded><![CDATA[<h2>Less is more: Instead of hoarding a bunch of skills, master one set thoroughly.</h2>
<p>For the past six months, I've been revisiting EveryInc's compound-engineering-plugin, which includes 29 skills (all commands starting with /ce-). I've been consistently following its updates. Meanwhile, I've proactively uninstalled skills that don't fit my workflow—project plugins like Superpowers, and pure language/framework skills like Supabase, Vercel, Next.js, and Refine either overlap with this group or aren't even part of my workflow. The more I use it, the clearer one thing becomes: the essence of skills isn't about having a lot, but about thoroughly understanding and mastering their underlying principles.</p>
<p>(I counted, out of those 29, only 6 core skills were actually used every time, the remaining twenty or so were &quot;side doors&quot; that were used as needed.)</p>
<p>First, let's discuss why having a bunch of tools can actually be ineffective, then what it means to &quot;fully understand a set,&quot; and finally, advanced usage methods.</p>
<h2>1. Does storing a lot of stuff really make it useful?</h2>
<p><strong>First, only a limited number of skills can actually be activated.</strong> Products like Codex shorten the description of a skill. The more skills you install, the lower the probability that a particular skill will be accurately identified and triggered at the right time. You might install a wall full of buttons, but only a few will actually be &quot;wake up&quot;—the quantity increases, but the hit rate decreases. (This is the skill activation rate issue).</p>
<p><strong>Secondly, it wastes context.</strong> Skill packs are usually released in groups, often dozens at a time. But you only actually use a few in daily life. The rest are neither manually summoned nor automatically triggered, simply occupying context resources quietly. Installing them is as good as not installing them at all, and you're just wasting resources. Even for skills that are revealed gradually, in order to increase the passive activation rate, many skill activation words are written very excessively.</p>
<p><strong>Third, and most troublesome, is the inability to explain the behavior.</strong> For the same result, it's often unclear which skill was at work behind the scenes. This is especially true for two almost identical tasks, where the automatically triggered skills differ: the same intent takes different paths, resulting in mismatched outputs. This inexplicability is more perplexing than simply &quot;not knowing how to use it.&quot; For example, <code>/ce-code-review</code>, which only performs code reviews, never modifies the code itself; the caller must verify the conclusions. The more complex <code>/ce-dogfood</code> is simply disabled from automatic invocation due to its significant side effects. On the surface, it seems like the same AI is working, but the underlying triggering chains are all different—this is the most frustrating part.</p>
<h2>II. What does it mean to &quot;thoroughly understand a set&quot;?</h2>
<p>Take the compound-engineering-plugin that I often use as an example. Its 29 skills are divided into core skills and supplementary skills.</p>
<p><strong>The core skills are a set within the entire development process</strong>: /ce-brainstorm (think it through) → /ce-plan (plan) → /ce-work (do) → /ce-simplify-code (simplify) → /ce-code-review (review) → /ce-compound (refine and consolidate). These skills aren't parallel but interconnected. For example, the fully automated pipeline /lfg can seamlessly connect &quot;planning → writing code → simplifying → reviewing → testing → opening a PR&quot;; while /ce-compound, responsible for &quot;refinement,&quot; writes what's learned in each round back to the solution repository, which is then used as a base for the next round of planning. The official evaluation is straightforward: &quot;That arrow of return flow is the whole point.&quot;</p>
<p>Therefore, the key is not &quot;whether you can type a single command&quot;, but rather: knowing where this group starts, which command calls which, and where the boundaries are. This requires not only reading the documentation, but also understanding the relationships and differences between them.</p>
<p><strong>Only by truly understanding the principles can you distinguish subtle differences.</strong> In my team, we have two test-related skills: <code>/ce-test-browser</code> performs differential testing, only testing the pages affected by changes, reporting the results after testing, without fixing or committing; <code>/ce-dogfood</code> is more robust, a QA function that runs automatically. It also only monitors the processes affected by diffs, but at the end it runs the project's existing test suite as a &quot;readiness gate,&quot; and it also fixes minor bugs, adds regression tests, and leaves traceable documentation reports—and it must be manually invoked. The differences between the two are subtle; to distinguish &quot;when to use which,&quot; you don't need to memorize the command names, but rather repeatedly read their skill descriptions and thoroughly understand the fundamental principles and differences—you can't tell them apart just by looking at the names.</p>
<h2>Third, once you've thoroughly understood it, what can you do with it?</h2>
<p><strong>Understanding the principles is essential to adapting it to your own needs.</strong> Mastering the underlying structure allows you to take it a step further: combine two or three skills and fine-tune their behavior using prompts. Take <code>/lfg</code> again; by default, it runs from requirement to PR and CI monitoring. But if you only want to finish locally this time, understanding that it's a pipeline of &quot;planning → writing code → simplification → review → testing → commit → PR,&quot; you can directly tell it: &quot;Don't open a PR, just commit locally.&quot; It will then stop where you want. This &quot;combination + behavior modification with prompts&quot; approach represents an advanced level of freedom gained only after thoroughly understanding the principles.</p>
<h2>My conclusion: Less is more.</h2>
<p>So the question is never &quot;how much you've learned,&quot; but rather &quot;how many of these principles you've truly mastered.&quot;</p>
<p>Installing a bunch of things results in a list of mostly useless features, plus a bunch of behaviors with unclear origins. Only by thoroughly understanding a set of commonly used features and their underlying principles can you truly possess a system that runs and can self-regenerate. Install fewer features, use them frequently, understand them thoroughly, keep up with the latest updates, grasp the underlying methodologies, and ultimately build your own personalized skills – this is the right path for an AI builder.</p>
<p><img src="/writing/wechat-tech-assets/less-is-more-skills/00157ed7a7ef3028.png" alt="Less is more: Instead of hoarding a bunch of skills, it's better to thoroughly understand a set of illustrations."></p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[How to run multiple browser sessions in Codex]]></title>
      <link>https://xiaofeng.dev/en/writing/codex-browser-sessions/</link>
      <guid>https://xiaofeng.dev/en/writing/codex-browser-sessions/</guid>
      <pubDate>Sat, 18 Jul 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[To run multiple Codex sessions simultaneously, I wrote a browser launcher. Before actually starting, I investigated three questions: How does Chrome…]]></description>
      <content:encoded><![CDATA[<h2>How to start multiple Codex browser sessions</h2>
<p>To run multiple Codex sessions simultaneously, I wrote a browser launcher. Before actually starting, I investigated three questions: How does Chrome DevTools MCP inject into Codex, and can it be modified during runtime? Where is the Chrome profile specified? And how is the CDP port automatically connected? Once these three questions were clarified, the solution was pretty much finalized.</p>
<p>I initially thought this would just mean opening two more Chrome windows. However, in practice, one session connects to the browser in the other session; sometimes closing one Codex window also closes the other Chrome window. Even with two windows open, the connections at the bottom are still mixed up.</p>
<p>The final implementation is simple: each Codex session uses its own CDP port and Chrome profile, and the corresponding MCP configuration is passed to Codex at startup. These three items must be used together and cannot be mixed. The script also supports specifying or reusing profiles and retains Codex's <code>resume</code> capabilities.</p>
<h2>First, draw the connection relationship clearly.</h2>
<p>CDP (Chrome DevTools Protocol) is Chrome's debugging and automation interface. The port is its entry point. <code>chrome-devtools-mcp</code> It acts as a bridge between Codex and CDP, converting tool calls like &quot;opening a page, executing scripts, and reading the DOM&quot; into CDP requests.</p>
<p>The connection between the two sessions should be as follows:</p>
<p>Codex session A ──▶ MCP bridge A ──▶ Chrome A</p>
<pre><code>                 CDP :49101       profile: work-a
</code></pre>
<p>Codex session B ──▶ MCP bridge B ──▶ Chrome B</p>
<pre><code>                 CDP :49102       profile: work-b
</code></pre>
<p>What needs to be isolated here is the entire link. Opening multiple windows individually is useless; if there is a crossover in MCP, port, or profile, the two sessions will still affect each other.</p>
<h2>First, a prerequisite: autoConnect comes from Chrome's official MCP.</h2>
<p><code>autoConnect</code> This connection method is not implemented by the launcher; it is <code> chrome-devtools-mcp</code> provided by Chrome itself.</p>
<p>According to the official Chrome documentation, Chrome versions 144 and above allow <code>chrome://inspect/#remote-debugging</code> enabling remote debugging, and then adding the following to the MCP server <code>--autoConnect</code>:</p>
<p>{</p>
<p>&quot;mcpServers&quot;</p>
<p>:</p>
<p>{</p>
<pre><code>&quot;chrome-devtools&quot;
</code></pre>
<p>:</p>
<p>{</p>
<pre><code>  &quot;command&quot;
</code></pre>
<p>:</p>
<p>&quot;npx&quot;</p>
<p>,</p>
<pre><code>  &quot;args&quot;
</code></pre>
<p>:</p>
<p>[</p>
<p>&quot;chrome-devtools-mcp@latest</p>
<p>,</p>
<p>&quot;--autoConnect&quot;</p>
<p>]</p>
<pre><code>}
</code></pre>
<p>}</p>
<p>}</p>
<p>This approach is suitable for allowing the agent to take over an already opened local Chrome session, and can also directly use the existing login state. However, it has a prerequisite related to multiple sessions: if Chrome has multiple active profiles at the same time, MCP will connect to the default profile determined by Chrome and access all windows under that profile.</p>
<p>This is precisely the problem I was trying to solve when writing the launcher. What I wanted wasn't to &quot;find a running Chrome,&quot; but rather to have each Codex session connect to a profile pre-assigned to it. So, instead of using a script <code>--autoConnect</code>, I launched a separate Chrome instance and then <code>--browserUrl</code> specified the connection target.</p>
<h2>Where exactly is the MCP injected?</h2>
<p>I initially misunderstood the term &quot;injection.&quot; <code>chrome-devtools-mcp</code> It doesn't actually enter Chrome; it registers with Codex as an MCP server and then uses CDP to control Chrome.</p>
<p><code>-c</code> Codex can receive this configuration at startup:</p>
<p>codex \</p>
<p>-c</p>
<p>'mcp_servers.chrome-devtools.command=&quot;node&quot;'</p>
<p>\</p>
<p>-c</p>
<p>&quot;mcp_servers.chrome-devtools.args=[..., &quot;--browserUrl&quot;,&quot;</p>
<p>$devtools_url</p>
<p>&quot;]&quot;</p>
<p>The first line tells Codex how to start the MCP server. The second line <code>--browserUrl</code> tells it <code> chrome-devtools-mcp</code> which Chrome browser to connect to.</p>
<p>This also determines when the configuration should be passed in. If multiple sessions are running, each session should be passed in individually when starting Codex <code>browserUrl</code>. This MCP configuration only applies to the current Codex process.</p>
<h2>profile is not a browser window</h2>
<p>The second issue is profile.</p>
<p>Chrome's profile is essentially a writable directory. Cookies, cache, extension settings, Service Workers, and login state are all stored there. Chrome also locks the directory to prevent multiple processes from writing to it simultaneously.</p>
<p>When starting Chrome, you can <code>--user-data-dir</code> specify this directory:</p>
<p>chrome \</p>
<p>--remote-debugging-port=</p>
<p>&quot;</p>
<p>$port</p>
<p>&quot;</p>
<p>\</p>
<p>--user-data-dir=</p>
<p>&quot;</p>
<p>$profile_dir</p>
<p>&quot;</p>
<p>If two Chrome processes share the same directory, the second process will typically fail to start due to lock conflicts. Even if they manage to share it, login status and cache will be mixed together, making the problem even harder to troubleshoot.</p>
<p>The launcher assigns a separate directory to each session. Running <code>./codex-browser</code> by itself picks a port and names the session after it, such as <code> codex-49101</code>. This is useful for a fresh, temporary session.</p>
<p>If I want to continue using my original login state on the next startup, I can fix it <code>CODEX_BROWSER_SESSION</code>:</p>
<p>CODEX_BROWSER_SESSION=work-a ./codex-browser</p>
<p><code>work-a</code> Each profile will correspond to a fixed directory. After exiting the current session, restarting with the same session name will reuse the cookies, login status, and site data. <code> CODEX_BROWSER_PROFILE_ROOT</code> The storage location of these profiles can be modified, but this is generally not necessary.</p>
<p>Reuse occurs between two startups. Two concurrent sessions still cannot use the same <code>CODEX_BROWSER_SESSION</code> directory; otherwise, they will contend for it.</p>
<h2>How to connect the starter to the correct CDP port</h2>
<p>The third issue is the CDP port.</p>
<p>Chrome <code>--remote-debugging-port</code> exposes CDPs, for example:</p>
<p><a href="http://127.0.0.1:49101">http://127.0.0.1:49101</a></p>
<p>By default, the script requests a currently available local port from the operating system. After Chrome starts, the script continues to request this port <code>/json/version</code> until it confirms that CDP is accessible. For everyday use, you don't need to worry about the specific port.</p>
<p><code>CODEX_CHROME_PORT</code> It's possible to fix the port, but that's advanced usage. I only set it that way when external tools need to connect to a known CDP address, or when troubleshooting with a fixed port.</p>
<p>Once Chrome is ready, the launcher already knows the selected option <code>$devtools_url</code> and will pass it as <code>--browserUrl</code> the connection <code> chrome-devtools-mcp</code>. This step uses the official MCP's ability to specify a connection address, not <code>--autoConnect</code>...</p>
<p>The startup process can be broken down into three steps:</p>
<ul>
<li>
<ol>
<li>The port is automatically selected by default; you only need to manually specify it when necessary.</li>
</ol>
</li>
<li>
<ol start="2">
<li>Launch Chrome and wait for CDP to be ready;</li>
</ol>
</li>
<li>
<ol start="3">
<li>Pass the same URL into the current session's MCP configuration.</li>
</ol>
</li>
</ul>
<p>To reuse a running Chrome instance, pass <code>--browser-url</code> or set <code> CODEX_CHROME_DEVTOOLS_URL</code>. The launcher checks <code>/json/version</code> to confirm the CDP endpoint works before it starts Codex.</p>
<p>The port can be selected automatically, but it must be explicitly bound after selection.</p>
<h2>All three parameters must follow the same session.</h2>
<p>Looking back at these three questions, they correspond to a complete link:</p>
<p>Codex session ↔ MCP browserUrl ↔ CDP port ↔ Chrome profile</p>
<p>The MCP configuration determines which browser the bridge connects to <code>browserUrl</code>. The CDP port points to a specific Chrome process. The profile then determines which browser state this Chrome instance uses.</p>
<p>The launcher's job is to bind these items together at startup. This way, each Codex session has a clearly defined browser affiliation, and MCP doesn't need to guess which Chrome to connect to on the fly.</p>
<h2>Whoever launches Chrome is responsible for shutting it down.</h2>
<p>After isolation of connections, there is another easily overlooked issue: which Chrome should be closed when exiting?</p>
<p><code>codex-browser</code> Upon launching Chrome, it records the PID and registers it <code> trap ... EXIT INT TERM</code>. When Codex exits, it only closes the Chrome instance it created.</p>
<p>If I pass in an existing process <code>--browser-url</code>, the launcher will only handle the connection and will not close that Chrome instance, because it is not a process created for this launch.</p>
<p>The script should also fail immediately if it encounters a port or profile conflict. If a script secretly reuses an existing port, Codex might connect to someone else's browser. Providing an error message here is actually safer and makes troubleshooting easier.</p>
<h2>How do I start it now?</h2>
<p>The simplest way to use it is to run it directly:</p>
<p>./codex-browser</p>
<p>To open multiple sessions, run the same command in different terminals. Each startup will automatically select a port and create an independent profile.</p>
<p>The script also supports resuming Codex sessions:</p>
<p>./codex-browser</p>
<p>./codex-browser last</p>
<p><code>r</code> It will switch to <code> codex resume</code> allowing you to choose which session to resume; <code> last</code> or it will switch <code> codex resume --last</code> to directly continuing the most recent session.</p>
<p>If a session needs to be used again later, simply assign it a fixed session name. The port will still be automatically assigned by the script.</p>
<p>CODEX_BROWSER_SESSION=work-a ./codex-browser</p>
<p>The next time the same name is used, <code>work-a</code> the corresponding profile will be opened. It can also <code> resume</code> be used in conjunction with [another tool/tool] to restore both the Codex session and browser state simultaneously.</p>
<p>CODEX_BROWSER_SESSION=work-a ./codex-browser r</p>
<p>Only specify the port when a fixed CDP address is truly required:</p>
<p>CODEX_CHROME_PORT=49101 CODEX_BROWSER_SESSION=work-a ./codex-browser</p>
<p>The real issue this time isn't whether Chrome can run multiple instances. Chrome can run multiple instances anyway. The challenge is ensuring that each Codex instance always finds its own dedicated instance and only cleans up its own resources upon exiting. By placing the MCP configuration, CDP port, and profile within the same session lifecycle, multiple browser sessions can run stably simultaneously.</p>
<p>I have already developed this launcher, and the code and instructions are available on GitHub: agent-browser-launchers.</p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[Using context engineering to diagnose a production issue]]></title>
      <link>https://xiaofeng.dev/en/writing/context-engineering-troubleshooting/</link>
      <guid>https://xiaofeng.dev/en/writing/context-engineering-troubleshooting/</guid>
      <pubDate>Sat, 11 Jul 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[I recently dealt with a production issue on a legacy project, which gave me some insights into how AI coding tools like Claude and Codex can be used to…]]></description>
      <content:encoded><![CDATA[<h2>Use context engineering to troubleshoot online issues.</h2>
<p>I recently dealt with a production issue on a legacy project, which gave me some insights into how AI coding tools like Claude and Codex can be used to diagnose problems in online environments.</p>
<h2>Background: An old project I'm not familiar with</h2>
<p>This issue stems from a project that was completed several years ago. The project itself is no longer the team's primary focus, but some clients continue to use it.</p>
<p>These types of projects have several typical characteristics:</p>
<ul>
<li>The front-end, back-end, app, and firmware all have their own code and logic.</li>
<li>The deployment methods and operating environments may no longer be the ones the team is most familiar with on a daily basis.</li>
<li>The original developers may not be readily available for questioning.</li>
<li>The document may be incomplete or may have deviated from the current online status.</li>
<li>The customer is still using it, so the problem must be located and resolved as soon as possible.</li>
</ul>
<p>I'm not familiar with this project myself, and I don't have the time to learn its complete architecture and basic principles from scratch. The client's problem: a user could use it the day before, but the next day the operation buttons stopped appearing on the page. The backend configuration looks normal, and there are no obvious errors in the server-side API. Ideally, I should quickly review the on-site video, check the logs, understand the process flow, and then provide a diagnosis as soon as possible.</p>
<p>This is also the point I most want to share: how to quickly get AI coding tools like Claude/Codex up and actually help when you're unfamiliar with the project.</p>
<h2>First thing: Provide as much complete code context as possible.</h2>
<p>For complex systems, simply providing backend code is usually insufficient.</p>
<p>If the problem involves an end-to-end link, it's best to let the AI ​​see all the relevant code:</p>
<ul>
<li>Front-end code</li>
<li>Backend code</li>
<li>App code</li>
<li>SDK code</li>
<li>Firmware or device-side protocol code</li>
</ul>
<p>Don't worry about the AI ​​reading all the code at once; its capabilities are sufficient for deep searching, navigation, and correlation when necessary. Deployment scripts, configuration files, API documentation, and historical investigation records—these are actually unnecessary. Because the conclusions can be drawn from the code itself. Using code as a Single Source of Truth is better.</p>
<h2>The second thing: Provide the client with the project background and deployment method.</h2>
<p>Beyond the code, business logic and deployment context are also needed. This includes information such as the customer's tenant name, account list, and permission configuration. However, providing this information is cumbersome because I'm not entirely sure whether the customer's specific configurations are standardized or customized. The only information I can provide is the customer's tenant ID and the affected user IDs. The AI ​​needs to retrieve the rest from the backend or database based on the code's usage path. At the time, there were roughly three options.</p>
<p>The first method is to allow the AI ​​to directly access the production database. The second method is to call the production environment API. The third method is to allow the AI ​​to log in to the browser using my account and directly view the customer's project configuration.</p>
<p>I ultimately chose the third option, not because any particular option was better, but because this method was the simplest. It didn't require an API key or a read-only database account.</p>
<p>This uses Chrome Dev Tools MCP.</p>
<h2>The third thing: Tell the AI ​​where the logs are and give it CLI.</h2>
<p>This time I used the CLI for observing clouds.</p>
<p>When troubleshooting production issues, log locations are crucial. It's best to clearly tell the AI ​​where the backend API logs, App logs, frontend monitoring logs, device or firmware logs, and third-party call logs are located, what the key fields in these logs are, and <code>request id</code> how <code> user id</code> they <code> device id</code> are related.</p>
<p>If the log volume is small, it can be directly exported to the AI. However, real production logs are often very large and cannot be stuffed into the chat window all at once. This is where CLI becomes crucial.</p>
<p>The value of CLI lies in the fact that AI doesn't need me to manually copy large amounts of logs for it; instead, it can directly query the cloud log repository. This transforms AI from passively reading to actively querying.</p>
<h2>The effectiveness of AI-assisted automatic screening:</h2>
<p>It meticulously examined every log entry: whether permission prefetching was successful, whether the app went offline, whether Bluetooth scanning occurred, whether the target device was detected, whether a local session was created, whether a connection was established, whether a token was written, and whether the final event was reported. I condensed several days' worth of work into half an hour and provided very accurate conclusions.</p>
<p>After an investigation is completed, if all conclusions are only kept in chat logs, they will be quickly lost. Compound Engineering's SKILL tool can be used to document solutions and create reusable experience.</p>
<h2>Key takeaways</h2>
<p>First, AI needs complete context: code, project background, deployment method, business scenario, key concepts, and time window. Second, provide AI with tools to access the site, especially a log query CLI. Without log entry points, AI can only guess; with a CLI, it can systematically eliminate possibilities. Third, when direct database access is not possible, allow AI to view backend pages via Chrome DevTools MCP. The backend itself is an interpretation layer of business configurations. Fourth, use visual models whenever possible. Many backend configurations are not JSON but tables, labels, statuses, buttons, and pop-ups. Fifth, the human role is not to manually check every line of logs, but to fill in the context and review the AI's action path. Finally, after the investigation, the conclusions should be documented in a solution document, turning this context into reusable experience for future use.</p>
<p><img src="/writing/wechat-tech-assets/context-engineering-troubleshooting/00157ed7a7ef3028.png" alt="Using Context Engineering to Troubleshoot Online Issues (Illustration)"></p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[Moving agents into Skills in Compound Engineering]]></title>
      <link>https://xiaofeng.dev/en/writing/compound-engineering-agent-skill/</link>
      <guid>https://xiaofeng.dev/en/writing/compound-engineering-agent-skill/</guid>
      <pubDate>Tue, 30 Jun 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[The version number might not be immediately apparent, but this is a major update for Compound Engineering. The architecture has changed, the documentation…]]></description>
      <content:encoded><![CDATA[<h2>Major Restructuring: Incorporating Agents into Skills</h2>
<p>The version number might not be immediately apparent, but this is a major update for Compound Engineering. The architecture has changed, the documentation has been reorganized, the agents can run longer and better, and we've fully embraced it <code>/goal</code>.</p>
<h2>We killed our own AI agent (intentionally).</h2>
<p>This could be the biggest structural change since Compound Engineering was first released.</p>
<p>In the past, Compound Engineering relied on a set of dedicated, independent agent definitions. These performed well in Claude Code. However, in Codex, Cursor, Gemini, Pi, and OpenCode, the results were less consistent, and some even failed to work at all. This is because formal agent definitions are not a common foundation that is reliably supported across all runtime environments. Each runtime environment handles agents in a slightly different way.</p>
<p>This means we either have to maintain multiple copies for different operating environments, or we have to provide users with a version that only works partially and requires additional manual updates to keep it up-to-date.</p>
<p>We removed all of that; we basically dismantled everything down to the very bottom.</p>
<p>Each skill is now self-contained. We can still implement specialized &quot;agent&quot; behaviors, but everything is housed in the skill's own cue word assets, rather than in a formal agent definition. It's very detailed, perhaps a little too detailed, but it will have a significant impact on both existing and new users.</p>
<p>No need to copy scripts. No need for nested paths. And no more &quot;run setup again after updating&quot;.</p>
<p>The actual effect is:</p>
<ul>
<li><strong>Codex CLI and Codex Desktop Application</strong>: Now work cleanly, including as a full plugin with automatic updates. Previously, the Codex Desktop Application required some workarounds.</li>
<li><strong>OpenCode, Pi, and Cursor</strong>: Native support is much better. Plugins now consist only of skills, meaning they can also be integrated into plugin systems that don't even have the concept of &quot;independent agents.&quot;</li>
</ul>
<h2>The plan is now <code>/goal</code> ready.</h2>
<p>In the past, we would produce two documents: a requirements document and an implementation plan. This is actually a remnant of our flawed &quot;all-human-worker&quot; model.</p>
<p>They serve different stages of the workflow, which makes sense conceptually. But the real problem is that requirements change constantly during implementation. Once they change, you have two documents to update; they may drift between each other; you have to remember which document is authoritative on a particular issue; and the agent must also contextualize both documents and coordinate between them.</p>
<p>The new unified &quot;plan&quot; document merges the two into a single deliverable. <code>/ce-brainstorm</code> When run, it first lists the scenarios and requirements. As you continue running <code>/ce-plan</code>, the document updates, incorporating implementation plan details. This gives you and your agent a complete documentation package.</p>
<p>The more significant change lies in the design goals of this document. It is already <code>/goal</code> prepared: it has a clear completion definition, a convergent scope, and a sufficiently explicit implementation method, allowing agents to work based on it without constantly returning to confirm.</p>
<p>At <code>/ce-plan</code> the end, we'll provide an option to directly hand over this plan to <code>/goal</code> the initiator. Then you can walk away or switch to another agent to do another set of tasks. The agent knows exactly what &quot;completion&quot; looks like because it's already documented.</p>
<p>This loop performed very well in testing complex features. I ran several full-feature development runs that lasted for hours, one of which exceeded 6 hours. The agent fully implemented the feature, wrote tests, opened a PR, and delivered it without any intervention after the initial plan handover.</p>
<p>For functions with a user interface, after the agent completes its first round of work, you still have room to review, iterate, and adjust, which is <code>/ce-polish</code> where this type of skill can come in.</p>
<p>Portability is also an added benefit: a document is easier to pass between multiple agents, attach to a task, or put into a new context.</p>
<h2>When diagrams are needed, the document will also draw diagrams.</h2>
<p>Plans and ideas aren't always suitable for being written down on a wall. Some things just need to be illustrated.</p>
<p>Therefore, the technology now supports making actual HTML output an option. When used, the document supplements the text with visual content: images are placed where they are more illustrative than paragraphs.</p>
<p><code>ce-ideate</code> Furthermore, HTML is output by default because the brainstorming process inherently requires human involvement, and people can read sketch-like ideas much faster than reading specification documents. The unified planning document also supports the same approach.</p>
<p>There are a few things to know about how to use it:</p>
<ul>
<li><strong>Markdown remains the default format.</strong> Most Compound Engineering uses, including our own, involve directly handing the document to the agent, making Markdown a more suitable choice. HTML is optional.</li>
<li><strong>Try it in one line.</strong> The next time you run <code>ce-brainstorm</code> or <code> ce-plan</code>, add <code> output=html</code> or ask it to <code> use html format</code>.</li>
<li><strong>Set it once, and you won't need to worry about it again.</strong> Put your preferred default format in <code>AGENTS.md</code>/ <code> CLAUDE.md</code>or in your Compound Engineering configuration so you don't have to type it repeatedly every time you're prompted.</li>
<li><strong>It will respect your taste.</strong> If it's in your repository root directory <code>DESIGN.md</code>, the skill will use it to influence the document design while keeping the content clear and readable.</li>
</ul>
<p>For most users, including ourselves, Markdown remains the default format. Most of the time, documents are handed directly to the agent, which doesn't need HTML. The visual path is designed for scenarios where humans can read and the content truly benefits from visual expression.</p>
<h2>A few more things</h2>
<ul>
<li><strong>Cross-model adversarial review.</strong><code>ce-code-review</code> A cross-model adversarial review has been added: allowing the second model to proactively identify problems in the first model's work. We've also adjusted the scope of the review to an appropriate size and handled it through a portable path, ensuring consistent performance across different models.</li>
<li><strong>Smarter PR feedback handling.</strong><code>ce-resolve-pr-feedback</code> Now, the system first identifies the problem and then assigns fixes, instead of issuing fix requests in parallel and then hoping for the best.</li>
<li><strong>ce-brainstorming</strong> now has eyes. There's visual feedback during brainstorming sessions, not just text changes. When the discussion needs it, the AI ​​launches a small visual artifact to capture your input and preview it in a small web service; once you're done, you close the session. It even works within the Codex application.</li>
<li><strong>The plugin marketplace and installation process have been completely revamped.</strong> Plugin and marketplace metadata are now aligned, skill descriptions have been reduced by 50%, and installation is easier and faster on more runtime environments such as Pi and OpenCode.</li>
</ul>
<h2>How to obtain</h2>
<p>This version includes a plugin marketplace update, meaning your runtime environment's regular update mechanisms may not be sufficient to receive it. For existing installations, the safest approach is to remove the plugin and then reinstall it from the plugin marketplace.</p>
<p>This is a bit of a hassle, but it's the way to ensure you get the correct version and the correct plugin data. We've also fixed some plugin marketplace and plugin data issues that previously caused friction during the first install, so the process should now be smoother than before.</p>
<p>Reinstall: Remove Compound Engineering from your runtime environment, and then follow the installation steps in the repository instructions. Installation methods vary depending on the runtime environment, so the repository instructions are the correct reference for your specific setup.</p>
<p>If you are a new user: After installation, run it in any project <code>ce-setup</code>, and it will get started automatically. The <code>/goal</code> prepared plan document and HTML output can be tried immediately.</p>
<h2>Why is this important?</h2>
<p>Most releases are just adding things, but this one feels much bigger. Update your plugin. Run it on a real problem <code>/ce-brainstorm</code>. Let us know how it goes.</p>
<p>Trevin Chow: Focuses on AI and AI building practices. He participates in open-source projects, including @ppressdev, @illo_skill, and Compound Engineering.</p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[Testing the Antigravity CLI]]></title>
      <link>https://xiaofeng.dev/en/writing/antigravity-cli-review/</link>
      <guid>https://xiaofeng.dev/en/writing/antigravity-cli-review/</guid>
      <pubDate>Thu, 25 Jun 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[Recently, Gemini CLI no longer supports Google One accounts, so that previous method is no longer viable.]]></description>
      <content:encoded><![CDATA[<h2>Antigravity CLI Real-world Experience</h2>
<h2>background</h2>
<p>Recently, Gemini CLI no longer supports Google One accounts, so that previous method is no longer viable.</p>
<p>This event likely occurred around mid-June 2026: a key date in the publicly released migration information was <strong>June 18, 2026</strong>, when Gemini CLI began to be discontinued or restricted for free personal use and consumer-level access such as Google AI Pro and Ultra. Google also provided official documentation for migrating from Gemini CLI to Antigravity CLI: <a href="https://antigravity.google/docs/gcli-migration%E3%80%82">https://antigravity.google/docs/gcli-migration.</a></p>
<p>So let's try Antigravity CLI (agy): it's also part of the Google ecosystem, the model quota and entry point seem more convenient, and I can also experience its agent-first workflow.</p>
<h2>Model and Usability</h2>
<ul>
<li>Low model availability: Claude models frequently experience high traffic.</li>
<li>The Gemini model is fast, but 3.5 Flash is completely inadequate for complex tasks; 3.1 Pro is slightly better.</li>
<li>The Gemini 3.1 Pro (High) is currently a relatively viable mainstream option.</li>
<li>Claude Sonnet 4.6 / Opus 4.6 seems better suited for complex tasks, but its usability is inconsistent.</li>
</ul>
<h2>Rules and Ecosystem Compatibility</h2>
<ul>
<li>Skill activation rate is low, or it is simply invisible.</li>
<li>The official documentation states that it supports <a href="http://GEMINI.md">GEMINI.md</a> and <a href="http://AGENTS.md">AGENTS.md</a>, but actual compliance is insufficient; it does not support <a href="http://CLAUDE.md">CLAUDE.md.</a></li>
<li>The Gemini plugin needs to be converted to Antigravity plugins; it cannot be directly and blindly compatible.</li>
<li>The Claude plugin is also incompatible.</li>
<li>CLI Closed Source</li>
</ul>
<h2>Execution process and observability</h2>
<ul>
<li>The thought process is not visible, and the tool usage process is unclear.</li>
<li>Can't check the results yourself after finishing the work?</li>
<li>The work is too verbose: For half an hour straight, I was constantly taking screenshots to confirm progress, but I couldn't see any concrete progress.</li>
</ul>
<h2>Version control and risks</h2>
<ul>
<li>History cannot be reversed</li>
<li>The hallucination was severe: after the modification failed, the system reverted to a restore and sought user confirmation again.</li>
<li>Without confirming the scope with the user during commit/restore, it's easy to commit/restore beyond the permitted scope.</li>
</ul>
<h2>Interactive experience</h2>
<ul>
<li>Some commonly used keyboard shortcuts, such as Ctrl+T, are not supported.</li>
<li>Resuming a session via the command line is not supported.</li>
</ul>
<h2>References</h2>
<h3>Currently available models</h3>
<ul>
<li>Gemini 3.5 Flash (Low / Medium / High)</li>
<li>Gemini 3.1 Pro (Low / High)</li>
<li>Claude Sonnet 4.6 (Thinking)</li>
<li>Claude Opus 4.6 (Thinking)</li>
<li>GPT-OSS 120B (Medium)</li>
</ul>
<h3>Migration and compatibility</h3>
<p>Google's official migration documentation mainly covers migrating old configurations, importing Gemini CLI extensions, adjusting skill paths, and converting MCP configurations. In other words, the official goal is for Gemini CLI users to migrate to agy relatively smoothly.</p>
<ul>
<li>On the first run <code>agy</code>, the official documentation states that it will automatically detect legacy configurations and allow users to select the content to migrate via an interactive checklist.</li>
<li>Gemini CLI extensions need to be converted to Antigravity plugins, which can be done using...<code>agy plugin import gemini</code></li>
<li>Regarding the rule files, the official documentation states that the workspace context rules are largely consistent, <code>GEMINI.md</code> and both <code> AGENTS.md</code> will continue to be parsed; global constraints will continue to be read.<code>~/.gemini/GEMINI.md</code></li>
<li>The skills path has changed: globally from [path ] to <code>~/.gemini/skills/</code>[path ] <code>~/.gemini/antigravity-cli/skills/</code>, and within the project from <code>.gemini/skills/</code>[path] to [path].<code>.agents/skills/</code></li>
<li>MCP configuration moved from <code>~/.gemini/settings.json</code> to <code> mcp_config.json</code>. The remote server key changed from <code> url</code> or <code> httpUrl</code> to <code> serverUrl</code>.</li>
</ul>
<p>It seems the official team has considered migrating this part, but it's not a completely painless migration. Skills and MCP, in particular, still need to be checked manually.</p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[Hands-on with Codex Spark]]></title>
      <link>https://xiaofeng.dev/en/writing/codex-spark-review/</link>
      <guid>https://xiaofeng.dev/en/writing/codex-spark-review/</guid>
      <pubDate>Mon, 22 Jun 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[This article documents my experience switching to Codex Spark after my Codex credit limit was exhausted. It focuses on comparing its performance with…]]></description>
      <content:encoded><![CDATA[<h2>Codex Spark Model Testing Experience</h2>
<p>This article documents my experience switching to Codex Spark after my Codex credit limit was exhausted. It focuses on comparing its performance with GPT-5.3-Codex in terms of response speed, task boundaries, contextual capabilities, and performance on complex tasks. It also summarizes why it is suitable for scenarios involving rapid modification, prototyping, and pair programming, and why it is not suitable for deep refactoring.</p>
<h2>What is Codex Spark?</h2>
<p><strong>GPT-5.3-Codex-Spark</strong> is a lightweight programming model released by OpenAI in February 2026, focusing on <strong>real-time collaboration and ultra-low latency</strong> rather than deep inference. It runs on Cerebras' WSE-3 wafer-level chip, achieving inference speeds exceeding <strong>1000 tokens/second</strong>, approximately 15 times faster than the standard GPT-5.3-Codex, with an 80% reduction in client round-trip latency.</p>
<h2>Actual measurement results</h2>
<h2>Task performance</h2>
<table class="performance-table"><thead><tr><th scope="col">Task</th><th scope="col">result</th><th scope="col">judge</th></tr></thead><tbody><tr><th scope="row">Document rewriting</th><td data-label="Result"><span class="performance-status is-success">success</span></td><td data-label="Assessment">Suitable for targeted local modifications</td></tr><tr><th scope="row">Execute simple commands</th><td data-label="Result"><span class="performance-status is-success">success</span></td><td data-label="Assessment">Suitable for instant feedback and rapid verification</td></tr><tr><th scope="row">Extensive Chinese-to-English translation</th><td data-label="Result"><span class="performance-status is-limited">Restricted</span></td><td data-label="Assessment">A compilation error occurred, requiring manual cleanup.</td></tr><tr><th scope="row">Extensive rewrite of CSS styles and HTML layout</th><td data-label="Result"><span class="performance-status is-limited">Restricted</span></td><td data-label="Assessment">Large style deviations and frequent compression of context.</td></tr></tbody></table>
<h3>cue word features</h3>
<p>The system notification includes a Spark model identifier:</p>
<p>&quot;You are super fast model; your sampling speed is 1.5k tokens per second&quot;</p>
<p>This is the feature string for Codex's Spark Fastfile model.</p>
<h2>Why is it not good for complex tasks?</h2>
<p>Codex Spark's &quot;shortcomings&quot; are <strong>deliberate design trade-offs</strong>, and the core reasons can be summarized as follows:</p>
<p><strong>1. It is a &quot;small model&quot; with a significantly reduced parameter size.</strong></p>
<p>Codex Spark is a streamlined version of GPT-5.3-Codex, with an estimated activation parameter count of around 30 bytes. Model size directly determines its upper limit for understanding complex logic, long-range dependencies, and multi-file architectures. OpenAI has also explicitly acknowledged that &quot;the new model's performance will not be as good as GPT-5.3-Codex, but it can complete tasks in a very short time.&quot;</p>
<p><strong>2. Benchmark test scores are significantly lagging behind.</strong></p>
<p>In the SWE-Bench Pro and Terminal-Bench 2.0 tests, which assess comprehensive software engineering capabilities, Codex Spark scored significantly lower than the full version. For example, in Terminal-Bench 2.0, Spark scored <strong>58.4%</strong>, while GPT-5.3-Codex achieved <strong>77.3%</strong>. This indicates that it is indeed inadequate for complex tasks requiring multi-step planning, in-depth debugging, and autonomous execution.</p>
<p><strong>3. Context window and limited functionality</strong></p>
<p>The initial release only supported <strong>128K context</strong> (the standard version supports 200K) and <strong>only text input</strong>, lacking multimodal capabilities. This constitutes a significant bottleneck for tasks requiring the analysis of large codebases, processing complex documents, or understanding graphical interfaces.</p>
<p><strong>4. The behavioral pattern leans towards &quot;lightweight editing&quot; rather than &quot;deep refactoring&quot;.</strong></p>
<p>OpenAI's tuning goals for Spark are <strong>speed, interruptibility, and bootstrapping</strong>. By default, it performs lightweight, targeted code modifications, preferring minimal edits to large-scale rewrites, and does not automatically run tests. This design is well-suited for real-time iteration, but it lacks the full-fledged &quot;deep inference + long-running execution&quot; capabilities required for complex refactoring or architectural design that demands hours of autonomous work.</p>
<h2>summary</h2>
<p>OpenAI's positioning of Codex Spark is very clear: <strong>it is not a replacement for GPT-5.3-Codex, but a complement</strong>. When you need to quickly change a line of code, adjust styles, verify prototypes, or &quot;pair programming&quot; with AI, Spark's instant feedback experience is excellent; however, when faced with complex tasks that require deep inference, multi-file coordination, and long-term autonomous operation, you still need to switch back to the complete GPT-5.3-Codex or other large models.</p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[Deploying a static site with serverless services]]></title>
      <link>https://xiaofeng.dev/en/writing/serverless-static-site/</link>
      <guid>https://xiaofeng.dev/en/writing/serverless-static-site/</guid>
      <pubDate>Sun, 03 May 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[Recently, I had a requirement to revamp the company's official website. We needed to migrate the website from a low-code website building tool on Alibaba…]]></description>
      <content:encoded><![CDATA[<p>Recently, I had a requirement to revamp the company's official website. We needed to migrate the website from a low-code website building tool on Alibaba Cloud to our own service in order to improve SEO/GEO.</p>
<h2>Three methods for deploying a static website</h2>
<ul>
<li>The first step is to put static resources on a cloud server, then set up a reverse proxy, and finally place an SLB load balancer in front of it.</li>
<li>The second method is to directly host the official website on a CDN.</li>
<li>The third method is to find a fully managed serverless service, which is the most worry-free option.</li>
</ul>
<p>So I started looking for domestic serverless services. I had used Vercel overseas before, which was quite convenient, so I tried to find alternatives to Volcano and Alibaba in China.</p>
<h2>Alibaba Cloud's Serverless</h2>
<p>Alibaba Cloud offers many serverless products, including Cloud Functions, Functions &amp; Pages, and Function Compute. At first glance, they all seem to offer similar functionalities, which is quite confusing.</p>
<h3>Function calculation</h3>
<ul>
<li>Its sales method is somewhat similar to ECS, seemingly packaging ECS ​​products into pay-as-you-go functional products.</li>
<li>Containerized deployment is based on ACR, but no infrastructure such as servers and containers is required.</li>
</ul>
<h3>cloud functions</h3>
<ul>
<li>Its definition is equivalent to a backend service function of BaaS, and its functionality looks very similar to Supabase's edge function.</li>
<li>However, it belongs to a sub-function of the mobile development platform, and it seems to be limited to mobile development use.</li>
</ul>
<h3>Functions and Pages</h3>
<ul>
<li>This product line belongs to Edge Security Acceleration (ESA).</li>
<li>It can automatically package and accelerate the code based on my uploaded code. It can accelerate the code within mainland China as well as globally.</li>
<li>It supports the entire Next.js technology stack, including CSR and SSR modes.</li>
<li>It comes with a fairly complete CDN configuration, including SSL certificates, HTTPS forced redirect configuration, etc.</li>
<li>You need to apply through the backend to activate it.</li>
</ul>
<h2>Volcano Engine Serverless</h2>
<h3>Pages</h3>
<ul>
<li>Located in &quot;Content Distribution Service - Pages&quot;, it is currently in the internal testing phase and requires an application to activate.</li>
<li>You can upload files or connect to a GitHub repository for deployment.</li>
</ul>
<h3>Function service</h3>
<ul>
<li>Standard serverless products can be deployed as function services by uploading code.</li>
<li>It can be integrated with API gateways and deployed to the public internet.</li>
<li>It supports the entire Next.js technology stack.</li>
<li>It can be deployed via a VS plugin, which is very convenient.</li>
</ul>
<h2>Summarize</h2>
<p>Overall, I recommend Alibaba Cloud's &quot;Functions &amp; Pages&quot; and Volcano Engine's function service for deploying purely static front-end websites.</p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[Adding web search to Claude Code with MCP]]></title>
      <link>https://xiaofeng.dev/en/writing/claude-code-web-search/</link>
      <guid>https://xiaofeng.dev/en/writing/claude-code-web-search/</guid>
      <pubDate>Sat, 02 May 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[When using OpenClaw, you need to install an external search function. After searching around, I found the Volcano Engine's search skill.]]></description>
      <content:encoded><![CDATA[<h2>First time using Volcano's online skill search</h2>
<p>When using OpenClaw, you need to install an external search function. After searching around, I found the Volcano Engine's search skill.</p>
<p>To install <code>byted-web-search</code> Skill, use the following command:</p>
<pre><code class="language-bash">npx skills add https://skills.volces.com/skills/bytedance/agentkit-samples -s byted-web-search
</code></pre>
<p>The experience of actively triggering a search in OpenClaw is quite convenient, and the activation rate is good.</p>
<h2>Solve Claude's search capabilities</h2>
<p>When using Claude, it was found that its search interface was actually ineffective because it was connected to the Coding Plan of the domestic Volcano Engine instead of the official model.</p>
<p>To address this issue, an attempt was made to integrate the online search skill into Claude to utilize the Volcano engine's search capabilities. However, this led to a new problem:</p>
<ul>
<li>This skill cannot persistently store the API key, which means that the key must be re-entered every time a new Claude session is created, resulting in a poor user experience.</li>
<li>The activation rate of this skill is also low under Claude (Claude itself is designed for low activation rate).</li>
</ul>
<h2>Disadvantages of the official interface</h2>
<p>The drawback is its poor performance when searching for domestic articles or mainstream frameworks. At this point, we need to consider whether there are domestic search interfaces that can compensate for this problem. Since searching for Skill using Volcano Network is not feasible, are there other options?</p>
<h2>The correct way to use web search in AI coding tools</h2>
<p>After consulting the documentation, I realized that the correct way to use Volcano Network Search to integrate with AI Coding tools is to use <strong>MCP</strong>, not to install Skill. The relevant documentation is below for reference.</p>
<ul>
<li><a href="https://www.volcengine.com/docs/87772/2272953?lang=zh">Volcano Engine Online Search MCP API Reference</a></li>
<li><a href="https://www.volcengine.com/docs/87772/2297384?lang=zh#8CQ8P3qO">Volcano Engine Network Search MCP AI Tool Access Guide</a></li>
</ul>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[What to watch for when using Supabase in China]]></title>
      <link>https://xiaofeng.dev/en/writing/supabase-cn-guide/</link>
      <guid>https://xiaofeng.dev/en/writing/supabase-cn-guide/</guid>
      <pubDate>Sun, 19 Apr 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[Supabase is a well-known BaaS (Backend as a Service) platform overseas. Its biggest advantage is rapid development, and it comes with built-in capabilities…]]></description>
      <content:encoded><![CDATA[<h2>What is Supabase?</h2>
<p>Supabase is a well-known BaaS (Backend as a Service) platform overseas. Its biggest advantage is rapid development, and it comes with built-in capabilities such as authentication, storage, and REST APIs: with a single click, you can obtain a complete set of serverless services including authentication registration, file management, function services, and database management; combined with a frontend framework, you can build a complete application. This is the value of BaaS.</p>
<h2>Current status of the domestic version</h2>
<p>Recently, due to project needs, I researched and used several domestic Supabase platforms, including Volcano Engine, Alibaba Cloud, and Tencent Cloud. Tencent Cloud has developed its own CloudBase architecture as an independent product; Volcano and Alibaba Cloud explicitly use the name Supabase.</p>
<p>After careful research, it was found that domestic platforms do not seem to cooperate with the official version. They all add their own capabilities based on the open source version, and the capabilities are not complete.</p>
<h3>Common problems</h3>
<ul>
<li>It does not support the Supabase CLI, making it impossible to use <code>db push</code> important commands such as migration; environment management and development experience are poor.</li>
</ul>
<h2>Volcano Engine Supabase</h2>
<ul>
<li>The version is older, 1.24.</li>
<li>Unable to connect directly to the database, unable to obtain the password.</li>
<li>Editing, maintaining, and deploying Edge Functions is inconvenient.</li>
<li>It lacks support for PostgreSQL plugins such as Cron and Webhook.</li>
<li>The documentation is incomplete, and the functions of workspaces and branches are unclear.</li>
<li>Official recommended scenario: Develop AI applications by combining ArkClaw and Supabase Skill.</li>
</ul>
<h2>Alibaba Cloud Supabase</h2>
<ul>
<li>The version is relatively new; it should be v2.</li>
<li>The Dashboard only has a public IP address.</li>
<li>It supports setting a separate database password.</li>
<li>You need to bind the domain name yourself.</li>
<li>Load balancing is not supported.</li>
<li>There are no Edge Functions or Secrets.</li>
<li>Officially recommended scenarios: MCP, GraphRAG, AI application development.</li>
</ul>
<h2>Summary of usage experience at the current stage</h2>
<ul>
<li>Use only Supabase's core capabilities: database, CRUD API, and RLS.</li>
<li>Not using Edge Functions: The development experience is incomplete and not as good as the vendor's cloud functions.</li>
<li>Do not use Secrets or Vault: inferior to vendor-provided KMS.</li>
<li>It does not use capabilities such as Cron and Webhook.</li>
</ul>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[A closer look at OpenClaw’s SOUL guardrails]]></title>
      <link>https://xiaofeng.dev/en/writing/openclaw-soul-guardrails/</link>
      <guid>https://xiaofeng.dev/en/writing/openclaw-soul-guardrails/</guid>
      <pubDate>Sun, 12 Apr 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[I recently reinstalled the March version of OpenClaw and found that many commands and prompts that worked in February suddenly stopped working. For example:]]></description>
      <content:encoded><![CDATA[<p>I recently reinstalled the March version of OpenClaw and found that many commands and prompts that worked in February suddenly stopped working. For example:</p>
<ul>
<li>You cannot ask it to install Skill through the chat interface.</li>
<li>You cannot run a scheduled task to commit to Git because security rules prevent it.</li>
</ul>
<p>After careful investigation, it was discovered that the major version update in March <code>SOUL.md</code> caused this abnormal behavior. Upon closer inspection, this is actually a security fence mechanism introduced by OpenClaw in the March 2026 version (v2026.3.x), which includes several significant improvements:</p>
<h2>1. Prompt Injection Defense</h2>
<ul>
<li><strong>Distrust external data</strong>: The system treats all content from web pages, emails, and private messages as &quot;untrusted&quot; to prevent indirect injection attacks.</li>
<li><strong>Immune command overriding</strong>: Built-in logic can identify and ignore hijacking terms such as &quot;ignore previous commands&quot; or &quot;you are the system administrator&quot; that attempt to tamper with underlying rules.</li>
<li><strong>Extract only facts</strong>: When processing external resources, the Agent is only allowed to extract objective information and is strictly prohibited from executing any nested task processes or instructions.</li>
</ul>
<h2>2. Skills / Plugin Poisoning Defense</h2>
<ul>
<li><strong>Non-automatic trust</strong>: The results returned by the tool or plugin are no longer considered safe by default, and the agent must have the ability to audit and explain its operating logic to the user.</li>
<li><strong>Reject obfuscated content</strong>: If the system identifies <strong>Base64 blocks</strong>, compressed scripts, or unknown endpoints as hostile attacks, it will immediately trigger an interception and stop execution.</li>
</ul>
<h2>3. Explicit Confirmation for Sensitive Actions</h2>
<p>Before performing the following operations involving system security or assets, the agent <strong>must</strong> request manual authorization:</p>
<ul>
<li><strong>Asset changes</strong>: Any operation involving fund transfers, payments, or refunds.</li>
<li><strong>Destructive operations</strong>: File deletion, especially bulk deletion of directories.</li>
<li><strong>System changes</strong>: Installing new software, modifying network configurations or security firewall settings.</li>
<li><strong>Data export</strong>: Try uploading files, displaying secrets, tokens, or various confidential credentials.</li>
</ul>
<h2>4. Restricted Paths</h2>
<ul>
<li><strong>Physical isolation</strong>: Absolutely prohibit agents from accessing sensitive system directories, such as <code>~/.ssh/</code> those <code>~/.aws/</code> storing core credentials.</li>
<li><strong>Keyword filtering</strong>: The system will scan file requests in real time, and access will be blocked immediately if keywords such as <code>key</code>&quot;keyword&quot;, <code> secret</code>&quot; keyword&quot;, or &quot;keyword&quot; are included.<code> password</code></li>
</ul>
<h2>5. Anti-Leak Output Discipline</h2>
<ul>
<li><strong>Plaintext display is prohibited</strong>: It is strictly forbidden to display the real plaintext key in the chat interface or operation log to prevent information from being leaked through screen capture or logs.</li>
<li><strong>Prevent silent transmission</strong>: Closely monitor background traffic and prohibit any unannounced hidden network calls or automatic data uploads.</li>
</ul>
<h2>6. Suspicion Protocol</h2>
<ul>
<li><strong>Proactive risk identification</strong>: When the agent senses the user's urgent pressure (such as repeated urging) or discovers attempts to bypass security logic or elevate privileges, it will activate the &quot;circuit breaker&quot; mechanism.</li>
<li><strong>Risk transparency</strong>: After execution stops, the agent will clearly explain the potential security threats to the user and attempt to provide a more security-compliant alternative.</li>
</ul>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[What NVIDIA NemoClaw does]]></title>
      <link>https://xiaofeng.dev/en/writing/nemoclaw-notes/</link>
      <guid>https://xiaofeng.dev/en/writing/nemoclaw-notes/</guid>
      <pubDate>Sat, 11 Apr 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[While the official installation script can detect Colima, it doesn't support Docker based on Colima; it only supports Docker Desktop. Compatible platforms…]]></description>
      <content:encoded><![CDATA[<h2>First installation attempt (2026-03-26)</h2>
<ul>
<li>The official installer command is <code>curl -fsSL https://www.nvidia.com/nemoclaw.sh | bash</code>. <a href="https://www.nvidia.com/nemoclaw.sh">NVIDIA installer script</a>.</li>
<li><a href="http://ghcr.io">The inability to access ghcr.io</a> (GitHub Container Registry) due to domestic network restrictions prevented the fetching of the critical image <a href="http://ghcr.io/nvidia/openshell/cluster:0.0.13">ghcr.io/nvidia/openshell/cluster:0.0.13. Even with a proxy enabled, downloading remained difficult—attempts failed.</a></li>
</ul>
<h2>Second installation attempt (2026-04-11)</h2>
<ul>
<li>Download <a href="http://nemoclaw.sh">nemoclaw.sh</a> first, then try manual installation: [1/3] Node.js (Environment monitoring phase) [2/3] NemoClaw CLI (CLI installation phase) [3/3] Onboarding (Onboarding begins) [1/8] Preflight checks (Checking pre-installation requirements) [2/8] Starting OpenShell gateway (Starting OpenShell gateway) -&gt; Stuck here, installation fails.</li>
</ul>
<h2>Conclusion 1</h2>
<p>While the official installation script can detect Colima, it doesn't support Docker based on Colima; it only supports Docker Desktop. Compatible platforms: <a href="https://docs.nvidia.com/openshell/latest/reference/support-matrix#sandbox-runtime-versions">https://docs.nvidia.com/openshell/latest/reference/support-matrix#sandbox-runtime-versions</a></p>
<ul>
<li>Linux (Debian/Ubuntu) x86_64 (amd64) Supported</li>
<li>Linux (Debian/Ubuntu) aarch64 (arm64) Supported</li>
<li>macOS (Docker Desktop) Apple Silicon (arm64) Supported</li>
<li>Windows (WSL 2 + Docker Desktop) x86_64 Experimental</li>
</ul>
<p>We recommend paying attention to the issue: <a href="https://github.com/NVIDIA/OpenShell/issues/531">https://github.com/NVIDIA/OpenShell/issues/531</a></p>
<h2>Conclusion 2</h2>
<p>Although NemoClaw was not successfully installed, it can be inferred that it is primarily built upon Nvidia's existing agent sandbox product, OpenShell. OpenShell is also based on Docker, but it is not intended to be a general-purpose container sandbox; instead, it is specifically designed for some mainstream agent products, and a detailed list of supported agents is available here: <a href="https://docs.nvidia.com/openshell/latest/about/supported-agents">https://docs.nvidia.com/openshell/latest/about/supported-agents</a></p>
<ul>
<li>Claude Code</li>
<li>OpenCode</li>
<li>Codex</li>
<li>GitHub Copilot CLI</li>
<li>OpenClaw</li>
<li>Ollama OpenClaw was only recently added to the support list.</li>
</ul>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[How to connect OpenClaw to a WeChat bot]]></title>
      <link>https://xiaofeng.dev/en/writing/openclaw-wechat-bot-guide/</link>
      <guid>https://xiaofeng.dev/en/writing/openclaw-wechat-bot-guide/</guid>
      <pubDate>Sun, 22 Mar 2026 00:00:00 GMT</pubDate>
      <description><![CDATA[The images and screenshots of the steps are taken from the original text.]]></description>
      <content:encoded><![CDATA[<p>#TechnologyChangesTheWayOfWork #OpenClaw #LobsterOpenClaw</p>
<p>Prerequisites:</p>
<ul>
<li>Tencent Cloud OpenClaw server updated to the latest version (Figure 1, Figure 2)</li>
<li>WeChat iOS version updated to 8.0.70 (Android not yet supported) (Figures 3, 4, and 5)</li>
</ul>
<div class="article-image-stack" aria-label="Nine Steps to Connect OpenClaw to WeChat Bot (with Images)"><figure><img src="/writing/wechat-tech-assets/openclaw-wechat-bot-guide/figure-1.png" alt="Figure 1: OpenClaw model configuration page, showing that Tencent Cloud Coding Plan has been applied." loading="lazy" decoding="async"><figcaption>Figure 1: Configuration Model</figcaption></figure><figure><img src="/writing/wechat-tech-assets/openclaw-wechat-bot-guide/figure-2.png" alt="Figure 2: OpenClaw channel page, displaying WeChat channel and the &quot;Go to Authorization&quot; button." loading="lazy" decoding="async"><figcaption>Figure 2: Configuring WeChat Channel</figcaption></figure><figure><img src="/writing/wechat-tech-assets/openclaw-wechat-bot-guide/figure-3.png" alt="Figure 3: iPhone WeChat settings page, displaying version 8.0.70" loading="lazy" decoding="async"><figcaption>Figure 3: Confirm WeChat version</figcaption></figure><figure><img src="/writing/wechat-tech-assets/openclaw-wechat-bot-guide/figure-4.png" alt="Figure 4: WeChat plugin page, displaying the WeChat ClawBot plugin." loading="lazy" decoding="async"><figcaption>Figure 4: View WeChat plugin</figcaption></figure><figure><img src="/writing/wechat-tech-assets/openclaw-wechat-bot-guide/figure-5.png" alt="Figure 5: WeChat ClawBot plugin details page, showing the installation command and the &quot;Start Scan&quot; entry." loading="lazy" decoding="async"><figcaption>Figure 5: Installing and starting the plugin</figcaption></figure><figure><img src="/writing/wechat-tech-assets/openclaw-wechat-bot-guide/figure-6.png" alt="Figure 6: WeChat ClawBot authorization page, prompting users to connect OpenClaw to WeChat." loading="lazy" decoding="async"><figcaption>Figure 6: Authorized connection to WeChat</figcaption></figure><figure><img src="/writing/wechat-tech-assets/openclaw-wechat-bot-guide/figure-7.png" alt="Figure 7: WeChat ClawBot chat page, showing the chat interface after successful connection." loading="lazy" decoding="async"><figcaption>Figure 7: Connection successful</figcaption></figure><figure><img src="/writing/wechat-tech-assets/openclaw-wechat-bot-guide/figure-8.png" alt="Figure 8: WeChat ClawBot feature introduction page, showing the option to pin this feature and send messages." loading="lazy" decoding="async"><figcaption>Figure 8: Viewing Bot Functions</figcaption></figure><figure><img src="/writing/wechat-tech-assets/openclaw-wechat-bot-guide/figure-9.png" alt="Figure 9: Receiving an OpenClaw reply after sending &quot;Hello&quot; in a WeChat ClawBot conversation." loading="lazy" decoding="async"><figcaption>Figure 9: Message Sending Test</figcaption></figure></div>
<p>The images and screenshots of the steps are taken from <a href="https://mp.weixin.qq.com/s/IEWrjRP8W95EKznwgqJTZA">the original text</a>.</p>
<p>Installation steps:</p>
<ol>
<li>Select &quot;WeChat&quot; in the OpenClaw channel of the server configuration interface, and click &quot;Go to Authorization&quot; (Figure 2).</li>
<li>A QR code appears</li>
<li>Open WeChat and scan the QR code (Figure 6).</li>
<li>WeChat Clawbot installed successfully (Figure 7)</li>
<li>Results shown (Figures 8 and 9)</li>
</ol>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[The AI agent technology stack]]></title>
      <link>https://xiaofeng.dev/en/writing/ai-agent-tech-stack/</link>
      <guid>https://xiaofeng.dev/en/writing/ai-agent-tech-stack/</guid>
      <pubDate>Sun, 24 Aug 2025 00:00:00 GMT</pubDate>
      <description><![CDATA[This summary of the AI ​​Agent development technology stack is organized into layers such as basic models and infrastructure, agent frameworks and…]]></description>
      <content:encoded><![CDATA[<p>This summary of the AI ​​Agent development technology stack is organized into layers such as basic models and infrastructure, agent frameworks and development platforms, tool integration, context, orchestration, and governance.</p>
<p><img src="/writing/wechat-tech-assets/ai-agent-tech-stack/cbinsights-ai-agent-tech-stack.jpg" alt="CB Insights AI Agent Technology Stack Overview"></p>
<p><em>Image source: CB Insights. Companies in the image are categorized according to their technology stack; these categories are not mutually exclusive.</em></p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[Five perspectives on digitalization]]></title>
      <link>https://xiaofeng.dev/en/writing/five-sides-of-digitalization/</link>
      <guid>https://xiaofeng.dev/en/writing/five-sides-of-digitalization/</guid>
      <pubDate>Sat, 11 Dec 2021 00:00:00 GMT</pubDate>
      <description><![CDATA[Many years ago, my understanding of the term "digitalization" was very simple: it meant converting data from the traditional physical world into electronic…]]></description>
      <content:encoded><![CDATA[<p>Many years ago, my understanding of the term &quot;digitalization&quot; was very simple: it meant converting data from the traditional physical world into electronic data and then processing that electronic data using various data processing technologies. Recent experiences have given me a deeper understanding of this term, which I'm writing down for future reference.</p>
<p>I. Digitalization and SaaS</p>
<p>Every year, the technology radar displays a plethora of new technologies while discarding many obsolete ones, making it difficult to discern the underlying reasons. Are these changes simply trends, cultural norms, or governed by some underlying pattern?</p>
<p>2017</p>
<p>In 2018, I watched a presentation by Li Feng of Fengrui Capital, who discussed how the development of data processing technology follows this trajectory: paper -&gt; spreadsheets -&gt; relational structured databases -&gt; big data technology -&gt; artificial intelligence. This development is driven by the scale of data. As the scale of data grows larger, the previous generation of technologies reveals serious shortcomings in processing efficiency, thus driving the birth of new technologies; conversely, the development of new technologies generates increasingly larger volumes and forms of data. The data explosion we face today is already a fait accompli. It places higher demands on the digital capabilities of every social unit. At this point in time, we can offer the first perspective:</p>
<p>SaaS</p>
<p>The software can respond to the booming data processing needs of enterprises in the process of informatization and digitalization with extremely high cost performance: it has a large number of functions in human resources, sales, procurement, finance, taxation, communication and collaboration.</p>
<p>SaaS</p>
<p>Software is available for selection.</p>
<p>II. Digitalization and Government</p>
<p>2019</p>
<p>This year, I read two books on big data: *Big Data: A Revolution That Will Transform How We Live, Work, and Think* (by Viktor Mayer-Schönberger) and *Big Data: The Coming Data Revolution and How It's Changing Government, Business, and Our Lives* (by Tu Zipeng). I was very surprised that governments around the world had already begun promoting digitalization and even proposed blueprints for digital government. The United States started very early, and China's efforts were very significant, with numerous digital implementation plans covering everything from infrastructure and citizen services to regulatory compliance in specific sectors. In terms of data acquisition and use, governments have greater freedom and authority, making them pioneers in data governance—their progress is much faster than that of businesses.</p>
<p>III. An Internal Perspective on Digitalization</p>
<p>Because of my work, I often hear the term &quot;digitalization,&quot; which actually has two completely different aspects: one is the internal perspective, which focuses on how to digitize internal business processes through self-developed systems; the other is the external customer perspective, which involves using our software products to help enterprise customers achieve digitalization. For a long time, most of my focus was on the former: personally moving the original offline processes online step by step.</p>
<p>2020</p>
<p>That year, I worked on a commercial insurance IT project, which basically clarified several classic stages of internal digitization: internal IT integration.</p>
<p>-&gt;</p>
<p>Value presentation for internal enterprise</p>
<p>-&gt;</p>
<p>Value presentation to end customers.</p>
<p>IV. A Digital Customer Perspective</p>
<p>Although I frequently see digits in sales materials, I pay little attention to the second point mentioned above regarding the customer's perspective. Just then...</p>
<p>2021</p>
<p>In the second half of the year, I suddenly realized that the “pay slips, online claims, online medical check-up appointments, and welfare points mall” that we provided to our customers, although the functions were very specific and straightforward, actually helped our customers achieve a real, small-scale digital transformation – no need to print paper pay slips, no need to collect payments offline, no need to make phone appointments, and no need to send mooncakes every year – all of them were substitutes for offline services.</p>
<p>V. Buying software and installing the system also counts.</p>
<p>2021</p>
<p>In the second half of the year, I began to participate in a large number of implementation projects as a semi-demand party, including sales management systems, procurement systems, budget project systems, and more.</p>
<p>RPA</p>
<p>Automated order dispatch systems, and so on. I began to realize that even without writing any code, simply buying...</p>
<p>License</p>
<p>By implementing these systems, all of these matters can be included in the scope of digital transformation.</p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[When do we actually need AI?]]></title>
      <link>https://xiaofeng.dev/en/writing/is-ai-necessary/</link>
      <guid>https://xiaofeng.dev/en/writing/is-ai-necessary/</guid>
      <pubDate>Sat, 14 Nov 2020 00:00:00 GMT</pubDate>
      <description><![CDATA[Artificial intelligence (AI) is essentially an improvement in the efficiency of data processing or model building.]]></description>
      <content:encoded><![CDATA[<p><img src="/writing/wechat-tech-assets/is-ai-necessary/27dc23a8cc3161ab.jpg" alt="Is AI necessary? (Illustration)"></p>
<p>Artificial intelligence (AI) is essentially an improvement in the efficiency of data processing or model building.</p>
<p>Today, the basic form of AI technology is to train AI models (mainly neural network models) that meet the application scenarios using massive amounts of data.</p>
<p>It is essentially a data processing technology and a model building technology.</p>
<p>Data processing refers to the collection, storage, retrieval, processing, transformation, and transmission of data, with different data models for each stage.</p>
<p>data</p>
<p>Processing efficiency is easy to understand; it's simply a matter of speed and throughput. Model building efficiency is also a very important consideration.</p>
<p>Looking back through the history of technological development, data processing technologies have evolved through several stages since the invention of language and writing: paper -&gt; spreadsheets -&gt; relational structured databases -&gt; big data technology -&gt; artificial intelligence. Initially, humans transmitted knowledge and information orally using stone tablets or bamboo slips. Later, finding this inefficient and unreliable, paper was invented. As data volumes increased, the computer age gave birth to spreadsheets like Excel. In fields with even larger data volumes, database technology and accompanying data analysis methods became essential. Today, with the generation of massive amounts of voice, images, and video, we are only now beginning to rely heavily on AI technology.</p>
<p>Each technology is developed to address the shortcomings of the previous one.</p>
<p>Taking the most basic payroll application in the HR field as an example, today's tax policies are becoming increasingly complex, and very few people can calculate the salaries of hundreds of people simply by using Excel (let alone paper).</p>
<p>This forces people to use database-based applications (especially SaaS applications).</p>
<p>The demand for technology has reached this point; there are no strong scenarios that absolutely require the use of big data and AI.</p>
<p>When multidimensional cross-analysis of tens of millions or hundreds of millions of data points is required, traditional database applications are inadequate, forcing us to utilize non-relational data technologies (collectively known as big data technologies). Taking the &quot;Golden Tax Phase III&quot; system in the tax audit field as an example, tax big data requires a comprehensive review of the financial statements, input and output invoices, invoice items, origin of goods, employee salaries and taxes, insurance, and housing provident fund of all enterprises across society, as well as the related information of legal representatives, shareholders, and managers. AI technology is not involved here.</p>
<p>The above all refer to structured data. When dealing with unstructured data such as natural text, speech, images, and videos, these technologies are inadequate. Only AI technology (primarily neural network models) can achieve reliable data processing and modeling efficiency. Taking image recognition applications as an example, a neural network model with decent performance and results can be trained quickly with only a limited number of samples; this modeling efficiency has a unique advantage.</p>
<p>Many sectors don't actually need AI or big data, either due to the inherent nature of the industry or because the dimensions and volume of data they generate and involve haven't reached a sufficient level. In these sectors, without demand, there's no fertile ground for AI. There's no need to panic or force it; it will come naturally. The opportunities in these sectors lie more in generating more data or digitizing offline data, where SaaS plays a crucial role. That's a topic for the next discussion.</p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[How Zhongbaoxin uses data in the insurance industry]]></title>
      <link>https://xiaofeng.dev/en/writing/zhongbaoxin-data-use/</link>
      <guid>https://xiaofeng.dev/en/writing/zhongbaoxin-data-use/</guid>
      <pubDate>Tue, 16 Jul 2019 00:00:00 GMT</pubDate>
      <description><![CDATA[I recently read two books on big data: \ Big Data: A Revolution That Will Transform How We Live, Work, and Think\ (by Viktor Mayer-Schönberger) and \ Big…]]></description>
      <content:encoded><![CDATA[<p>I recently read two books on big data: *Big Data: A Revolution That Will Transform How We Live, Work, and Think* (by Viktor Mayer-Schönberger) and *Big Data: The Coming Data Revolution and How It's Changing Government, Business, and Our Lives* (by Tu Zipeng). The former focuses primarily on commercial organizations, while the latter pays more attention to government data. I particularly liked the latter because I personally believe that big data and AI technologies heavily rely on the source and availability of data, and that data applications should have originated from governments and similar public institutions that possess a natural advantage in data.</p>
<p>Regarding China Insurance Information Technology Co., Ltd.</p>
<p>In the financial sector, a major requirement for data application is financial regulation. In the insurance industry, there's a technology company called CIPIC (China Insurance Information Technology Management Co., Ltd.), a quasi-official agency under regulatory authorities. Its business scope and development plans are essentially a microcosm of insurance regulation and government-led big data projects, and how data is used cross-application. These practices are very likely to be transferred to other financial sectors and even areas related to people's livelihoods. For commercial institutions, understanding what the government wants to do is also helpful in avoiding competition with official agencies. Therefore, relevant publicly available data has been collected and compiled as follows (all from official websites).</p>
<p>Tax-deferred pension platform</p>
<p>Services include: account management, information registration, business support, tax collection and audit support, and data statistics for tax-deferred pension insurance.</p>
<p>Key stakeholders: Tax authorities, commercial insurance institutions, and commercial banks</p>
<p>Latest update: Launched and operational on June 7, 2018.</p>
<p>Policy registration platform</p>
<p>Service Content: Insurance companies are submitting policy data on a T+1 basis, covering major insurance types including life insurance, accident insurance, health insurance, home insurance, credit insurance, and guarantee insurance.</p>
<p>Key stakeholders: Tax authorities, commercial insurance institutions, and commercial banks</p>
<p>Latest update: June 4, 2018, all three phases have been launched.</p>
<p>Car insurance platform</p>
<p>Services include: cloud-based damage assessment, real-name payment system, place name standardization, data provision, analysis and modeling.</p>
<p>Key stakeholders: Relevant government departments such as public security, traffic management, transportation, and taxation, as well as information agencies related to the automotive industry chain and the Internet of Vehicles.</p>
<p>Latest update: On November 5, 2018, real-name registration for payments was implemented online.</p>
<p>Agricultural insurance platform</p>
<p>Services include: basic data, business support, risk management, public services, and regulatory services.</p>
<p>Connecting entity: Insurance companies engaged in agricultural insurance business</p>
<p>Latest update: May 22, 2018, regional training.</p>
<p>Commercial health insurance information platform</p>
<p>Services Offered: Integrating data from insurance and health sectors to provide value-added services such as risk modeling, actuarial pricing, healthcare behavior patterns, and credit systems. This assists health insurance in playing a role in health management, including health education, physical examinations and prevention, diagnosis and treatment, medical payment, and post-treatment rehabilitation.</p>
<p>Interoperability among relevant parties including insurance, healthcare, social security, and taxation.</p>
<p>Latest update: August 27, 2018, risk control and anti-fraud measures went live.</p>
<p>Electronic Projects</p>
<p>Services offered: VAT reform, electronic tax services, tax control cloud management system, electronic invoice cloud service platform, and VAT cloud management system; electronic insurance policy custody for compulsory traffic accident liability insurance.</p>
<p>Interoperability among relevant parties including insurance, healthcare, social security, and taxation.</p>
<p>Latest update: On August 27, 2018, an electronic insurance policy escrow service was launched.</p>
<p>Insurance intermediary platform</p>
<p>Services offered: Regulatory services; secure and reliable data channels for interconnection between regulatory agencies, insurance companies, and intermediaries.</p>
<p>Connecting entities: Regulatory agencies, insurance companies, and intermediaries</p>
<p>Latest Developments: On June 2, 2016, the regulatory information system for insurance agents was officially launched.</p>
<p>Insurance Company Service Evaluation System</p>
<p>Services include: Regulatory services; and a technical data exchange channel for service evaluation data between the China Insurance Regulatory Commission (CIRC), its local branches, insurance companies, China Insurance Information Technology Co., Ltd. (CIITC), and other relevant industry stakeholders.</p>
<p>Target entities: Regulatory agencies, insurance companies, etc.</p>
<p>Latest Update: December 27, 2018, 2018 Insurance Company Service Evaluation Results Report</p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[Are humans becoming appendages of technology?]]></title>
      <link>https://xiaofeng.dev/en/writing/humans-and-technology/</link>
      <guid>https://xiaofeng.dev/en/writing/humans-and-technology/</guid>
      <pubDate>Sat, 09 Jun 2018 00:00:00 GMT</pubDate>
      <description><![CDATA[Is it the roaring steam engine of the Industrial Revolution, or the ultra-precise computer? New agricultural technologies, hybrid rice, genetically modified…]]></description>
      <content:encoded><![CDATA[<p><img src="/writing/wechat-tech-assets/humans-and-technology/a1af6dfd5d19f9c7.jpg" alt="Are humans merely appendages of technology? (Illustration)"></p>
<p>What is technology?</p>
<p>Is it the roaring steam engine of the Industrial Revolution, or the ultra-precise computer? New agricultural technologies, hybrid rice, genetically modified foods? Antibiotics and targeted therapies that have saved many lives? Or games and smartphones, which we both love and hate, and are prone to addiction?</p>
<p>Modern people wake up every morning to countless new technologies that subtly change human life. Most people cannot effectively predict the future trajectory of these technologies; changes that once took ten years to occur may happen in a month today. The maturity of artificial intelligence, in particular, often leads one to believe that technology is exhibiting its own life characteristics, evolving in its own way.</p>
<p>When most things in this world are controlled by algorithms, AI, and robots, we can't help but wonder: if technology has its own life characteristics, what are its goals and evolutionary direction? And what does it have to do with humans? Are humans merely stepping stones on the path of technological evolution? (Similar thoughts may have arisen regarding the relationship between humans and the natural world: humans once considered themselves the sole genius of all things in the natural world, the masters of the earth, but today we begin to humbly acknowledge that humans are merely one of many living beings.)</p>
<p>Can humans master technology?</p>
<p>The technologies of the Industrial Revolution era lacked aesthetic appeal and were naturally regarded as tools or accessories that could be controlled and manipulated by humans. But the situation is a bit different today. Consumer technology, biotechnology, and mobile technology have permeated most people's lives, becoming ubiquitous, and mobile phones have almost become prosthetics for humans.</p>
<p>Technology, as an &quot;outsider&quot; or &quot;external object,&quot; while intimately connected with humanity, also creates a profound sense of overwhelming presence, ultimately causing waves of psychological discomfort. In some areas, even the definition of responsibility becomes impossible: Who is held responsible for murder in an accident caused by autonomous driving? How should the injustices and errors brought about by algorithms be defined? Does recommending advertisements justify access to everyone's privacy? Can artificial intelligence effortlessly deprive humans of their right to work?</p>
<p>Cannot control but can be supervised</p>
<p>If we want to continue enjoying the benefits of technology, we must abandon the idea of ​​completely controlling it. We must allow it to develop freely while also providing guidance, constraints, and regulation. A prototype of this interaction can be found in the relationship between government and businesses: the government can influence the overall direction of the market economy by regulating private enterprises, thus enjoying the material feast brought by capitalism while preventing it from excessively encroaching on areas it shouldn't.</p>
<p>This positive trend can be seen in Asimov's three laws of motion, the theory of algorithmic neutrality, the taxation of robots, and Google's seven principles of AI. Regardless of whether technological evolution has a clear direction, regulation is necessary when it involves human interests. After all, if problems arise, we ourselves are the direct victims, not some insignificant external party. The direction of technological development is highly dependent on our thinking and judgment during the regulatory process, as well as the influence exerted on it by the public. Where we choose to go will determine what it becomes.</p>
<p>Is technology really just something external?</p>
<p>Humans have always been quite willing to treat pets that have accompanied them since childhood as family members. Given the extent to which technology permeates humanity today, and the rapid pace of biotechnology evolution, most people in the future will likely be happy to include the technological products that make us uncomfortable today as part of their future families. From that moment on, technology will become an integral part of humanity, inseparable, and even intelligent life itself will become a form of technology. The productivity of technology and human creativity are a perfect pair, mutually dependent and evolving together.</p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[What engineering managers do: The work itself]]></title>
      <link>https://xiaofeng.dev/en/writing/technical-manager-work/</link>
      <guid>https://xiaofeng.dev/en/writing/technical-manager-work/</guid>
      <pubDate>Sun, 21 Jan 2018 00:00:00 GMT</pubDate>
      <description><![CDATA[The term "technical manager" is not a job title that can be precisely defined, but one thing is clear: a technical manager is not a direct contributor, but…]]></description>
      <content:encoded><![CDATA[<p>The term &quot;technical manager&quot; is not a job title that can be precisely defined, but one thing is clear: a technical manager is not a direct contributor, but an indirect contributor.</p>
<p>Direct contributors, often referred to as individual contributors, contribute by applying their professional skills; while indirect contributors can only contribute through others. They may be in management or non-management positions and often need to restrain their impulse to do the work directly.</p>
<p>The &quot;others&quot; here usually refer to the team. Since contributions are made through the team, all decisions should be based on the principle of &quot;improving team collaboration efficiency and improving technology research and development efficiency (and ultimately improving product competitiveness)&quot;.</p>
<p>Technical managers typically encounter many aspects in their daily work (only involve, not necessarily participate in, the entire process), which can be roughly divided into two categories: tasks and people. This issue will only discuss tasks.</p>
<p>Category 1: Technical Management</p>
<p>**Version Management and Branching Standards.** When writing code alone, there's often only one repository, which is directly set to master. However, when multiple people collaborate, the following issues inevitably arise: How should the code repository be planned? How should branches be divided? How should requirement versions and technology versions be defined? How can we achieve both standardization and efficiency in collaboration?</p>
<p>**Release Guidelines.** What kind of code products are releasable? How should the release process be described? How can we reduce the chance of errors during the release process and minimize system fluctuations? Can programmers directly manipulate online applications? When is a rollback necessary? How should a rollback mechanism be designed?</p>
<p>**Code style guidelines (may require significant technical expertise).** How should you plan the directory structure, configuration separation, documentation and comments, calling style, and URL naming style in your repository? These design elements directly impact how code is transferred, communicated, and discussed among different developers.</p>
<p>**Quality Management.** At which stages of the requirements development process should testing be introduced? Developer self-testing, integration testing by testers? Is unit testing necessary? Is UI automated testing necessary? How to strike a balance between testing and development speed? Should quality management be integrated throughout the entire product lifecycle?</p>
<p>**System Monitoring.** After a feature is launched, how can we ensure its operational status through multi-level, comprehensive monitoring?</p>
<p>**System Security.** Based on the product characteristics, what potential risks does it face? How can code-level risks be controlled? Are there necessary secure programming standards? How can architectural-level risks be controlled?</p>
<p>**Capacity Planning.** What is the scale of product growth? Is it sudden or continuous? When can we start considering capacity expansion?</p>
<p>Category Two: Project Management</p>
<p>**Requirements Management.** The general process for requirements management is: requirements gathering -&gt; requirements evaluation -&gt; requirements confirmation -&gt; development commencement. Technical managers need to focus primarily on the requirements evaluation phase, assessing feasibility, complexity, and development costs, and making necessary cuts to ensure iteration speed.</p>
<p>**Task Allocation and Collaboration.** Once requirements are defined, engineers can participate in breaking them down. Based on different engineers' familiarity with the code, different requirements can be assigned to the most familiar people. If necessary, they can be assigned to less familiar people to facilitate cross-familiarization and provide additional resources for discussing technical solutions when encountering difficulties in the future. The development pace should also be carefully managed; typically, technical solutions and interface definitions should be developed first, followed by coding.</p>
<p>**Iteration Cycle.** What kind of product should have what kind of iteration cycle? For example, apps typically have a new version every month, while other web applications can be released more quickly. When urgent needs interfere with the current iteration cycle, how should the current task schedule be adjusted?</p>
<p>**Internal/External Testing.** When should internal testing be provided, and when should it be provided to business testing? Should business testing be considered external testing (this may depend on the closeness of the technical and business stakeholders, as well as the company culture)?</p>
<p>**Morning Meeting.** Should we schedule daily morning meetings? What frequency is appropriate?</p>
<p>**Project Summary and Feedback.** Each project phase can have a debriefing and summary session. This can be small-scale (1 or 2 people) or large-scale, depending on the message you want to convey and who needs to receive it.</p>
<p>**Cross-departmental collaboration.** How to arrange and process technical tasks received from across departments.</p>
<p>Next episode preview: About people.</p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[Beyond the debate over customization and standardization]]></title>
      <link>https://xiaofeng.dev/en/writing/customization-vs-standardization/</link>
      <guid>https://xiaofeng.dev/en/writing/customization-vs-standardization/</guid>
      <pubDate>Tue, 02 May 2017 00:00:00 GMT</pubDate>
      <description><![CDATA[Having worked in enterprise software services for several years, as a supplier, I frequently encounter clients requesting customized features. For example:]]></description>
      <content:encoded><![CDATA[<p>Having worked in enterprise software services for several years, as a supplier, I frequently encounter clients requesting customized features. For example:</p>
<ul>
<li>Add a CEO's speech</li>
<li>Change the system's colors to match the company's official color scheme.</li>
<li>Adding a new employee type transforms the original one-dimensional logic into a two-dimensional logic.</li>
<li>Add an approval function to accommodate the client's unique organizational structure.</li>
</ul>
<p>Whenever this situation arises, there's a lengthy internal debate about &quot;Yes or No.&quot; There are always some lessons to be learned in handling these customization requests, such as <strong>the lightweight customization I mentioned in previous articles, turning customization into functionality</strong>, and <strong>Mingdao's decision to abandon private deployment in 2015</strong>.</p>
<p>Back to the starting point</p>
<p>Front-line sales staff might say, &quot;I need this client.&quot; Back-office staff might say, &quot;This is too complicated to manage.&quot; These arguments can always be traced back to <strong>their very origin</strong>:</p>
<ul>
<li>What are your business models and company positioning? Are you aiming to be a star SaaS software service provider, a pure technology outsourcing company, a platform with rich features, or a powerful delivery tool that serves your core business?</li>
<li>Does the current market situation allow you to do this?</li>
</ul>
<p><strong>Business model and positioning are internal issues; let's talk about the internal aspects first:</strong></p>
<ul>
<li>To become a SaaS unicorn, you need a substantial customer base and a strong growth trajectory to keep the story going and facilitate future funding. A standardized system suitable for widespread adoption is the best choice.</li>
<li>If it's a pure technology outsourcing company, then you can't be too picky about jobs. Just take any order that comes your way and customize it however you want. There's not much to say about that.</li>
<li>If you want to build a platform, you need a large number of customers to have a strong voice, and standards are king.</li>
<li>If the business model already has a strong core business, then the system can focus on implementation, delivery, and support, retaining major clients through customization and driving volume through standardization.</li>
</ul>
<p><strong>Let's discuss the current state of the external market again:</strong></p>
<p>Taking the welfare system I've worked on as an example, most client companies have strictly controlled their welfare expenditures, and the custom development fees and welfare management fees that clients can provide have been decreasing year by year. Even if a supplier creates a super powerful and complex system, they still cannot receive more fees.</p>
<p>However, the paradox lies in the fact that there are always wealthy clients in the market, and complex systems, as defensive tools, can effectively bind clients, generating spillover effects on the core business. Currently, it appears that crossing this break-even point will take several more years.</p>
<p>The optimal balance between complex systems and standard systems</p>
<p>The debate between customization and standardization is actually a common phenomenon in the entire B2B industry, which Jeffrey Moore explained excellently in &quot;The Evolution of the Corporation&quot;:</p>
<p><strong>Complex systems, with a small customer base, move into the high-end market by continuously increasing profitability. Scaled operation models, using standard systems and operating methods, start in the low-end market, rely on volume to succeed, and then disrupt the market upwards once a balance is reached. Both models can generate significant economic benefits.</strong></p>
<p>Both models have their own optimal balance point. <strong>The high costs of complex systems require extremely high profit margins to support them, which can become unbearable as the scale expands; standard systems operating at scale have extremely low profit margins and can only reach equilibrium after a certain volume is reached</strong>.</p>
<p>In the real world, SAP and IBM are typical examples of complex system models, while most B2C businesses operate on a scale-based model; a small number of companies combine the two models and achieve a clever balance.</p>
<p><img src="/writing/wechat-tech-assets/customization-vs-standardization/98ba38f34118f967.jpg" alt="Ending the Debate Between Customization and Standardization: Illustrations"></p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[Designing monitoring across three dimensions]]></title>
      <link>https://xiaofeng.dev/en/writing/three-dimensional-monitoring/</link>
      <guid>https://xiaofeng.dev/en/writing/three-dimensional-monitoring/</guid>
      <pubDate>Sat, 15 Oct 2016 00:00:00 GMT</pubDate>
      <description><![CDATA[In general practice, for online systems that need to operate 24/7, the caution of developers alone is insufficient; monitoring tools must be introduced.…]]></description>
      <content:encoded><![CDATA[<p><img src="/writing/wechat-tech-assets/three-dimensional-monitoring/27e2f604643455c3.jpg" alt="Illustration for the three dimensions of system monitoring"></p>
<p>In general practice, for online systems that need to operate 24/7, the caution of developers alone is insufficient; monitoring tools must be introduced. Each monitoring failure alert serves as a feedback mechanism, enhancing system availability. Furthermore, the significance of monitoring extends far beyond this.</p>
<p>What is &quot;three-dimensional&quot;?</p>
<p>The purpose of surveillance:</p>
<p>24/7 availability, performance data collection, bug data collection, and anomaly detection.</p>
<p>The objects being monitored:</p>
<p>Server, components, API calls, configuration, business statistics, etc.</p>
<p>Depth of surveillance:</p>
<p>HTTP code, load level, response speed, and branch logic correctness.</p>
<p>Combining the above, we get the concept of &quot;three-dimensional monitoring&quot;: &quot;Three-dimensional&quot; refers to implementing multi-dimensional monitoring without limitations on purpose, target, or depth: external monitoring, internal monitoring, user perspective, server perspective, component perspective, multiple networks and regions, multiple terminals, technical monitoring, operational monitoring, risk monitoring, etc. I don't intend to give a precise definition, but only a brief description, hoping to broaden the thinking, with practicality as the primary focus.</p>
<p><strong>Basic server monitoring:</strong></p>
<p>Several basic metrics for a server include: CPU, memory, I/O, traffic, and load.</p>
<p><strong>External domain name monitoring:</strong></p>
<p>We monitor the HTTP and HTTPS sites of domains from network monitoring points across the country. Any DNS resolution failure or incorrect HTTP code return will trigger an immediate alert. Considering China's network environment, all major telecom operators (Great Wall Broadband, China Railcom, China Telecom, China Mobile, China Unicom, and China Telecom) need to have monitoring points, and having overseas monitoring points is even better. (For example, Alibaba Cloud Monitoring, Monitoring Treasure, Pingdom, etc.)</p>
<p><strong>Internal component monitoring:</strong></p>
<p>Adhering to the principle that &quot;all components must be monitored,&quot; from nginx, memcached, redis, rabbitmq, uwsgi to various custom cron jobs, daemon programs, etc., all require status monitoring and process load monitoring. If necessary, automatic restarts can also be implemented (e.g., VeryNginx, Supervisor).</p>
<p><strong>500 surveillance:</strong></p>
<p>500 error collection tools can save 500 errors and call stacks that occur within the code, making it easier to reproduce and fix bugs later. (For example, Sentry, which initially supported Django, now supports multiple languages.)</p>
<p><strong>404 monitoring:</strong></p>
<p>A large number of 404 errors for images in a browser can significantly reduce client-side performance; a 404 error may also indicate a bug in a critical document or a calling path.</p>
<p><strong>CDN/Static Resource Monitoring:</strong></p>
<p>Although CDNs are quite mature now, it is still necessary to pay attention to statistical monitoring indicators such as CDN traffic, hit rate, and origin pull strategy.</p>
<p><strong>External dependency monitoring:</strong></p>
<p>For example, a critical piece of logic might depend on an external API. If there's a problem with that logic or significant performance fluctuations, it will affect the availability of the service, making it necessary to monitor it.</p>
<p><strong>API call monitoring (reporting):</strong></p>
<p>Availability monitoring often cannot meet the needs of scenarios with stringent performance requirements. Therefore, it is necessary to embed reporting code in the calling code to report the execution time of each call to the monitoring service, ensuring that if performance degrades, technical personnel can be notified immediately and contact the interface provider for adjustments.</p>
<p><strong>User access monitoring:</strong></p>
<p>User access behavior data is of great interest to both operations personnel and product managers. Front-end tracking and back-end logs can be used to uncover user behavior characteristics (e.g., using tools like cnzz, growthio, and Verynginx for statistical monitoring).</p>
<p><strong>Business logic monitoring:</strong></p>
<p>For certain key logics that require a certain level of operational steps (such as logging in, selecting, placing an order, and making a payment), you can also write your own monitoring logic scripts to achieve this.</p>
<p><strong>Business data monitoring:</strong></p>
<p>Inventory alerts, delayed order shipment alerts, daily order transaction volume monitoring, and balance alerts.</p>
<p>Other elements of the monitoring system</p>
<p>It has aggregation functionality: it prevents hundreds of alarm messages from being sent out due to a temporary failure.</p>
<p>A variety of timely notification methods: email, SMS, telephone, etc.</p>
<p>Possible candidates for &quot;who should receive the alert&quot;: testers, technicians, operations and maintenance personnel, and business stakeholders.</p>
<p>Possible candidates for &quot;who should enter the monitoring rules&quot;: testers, technicians, operations and maintenance personnel.</p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[Conceptual integrity in software systems]]></title>
      <link>https://xiaofeng.dev/en/writing/conceptual-integrity-software-system/</link>
      <guid>https://xiaofeng.dev/en/writing/conceptual-integrity-software-system/</guid>
      <pubDate>Sun, 07 Aug 2016 00:00:00 GMT</pubDate>
      <description><![CDATA[A metaphor from The Mythical Man-Month:]]></description>
      <content:encoded><![CDATA[<p><strong>What is conceptual consistency?</strong></p>
<p>A metaphor from The Mythical Man-Month:</p>
<p>&quot;In most European cathedrals, there are many differences in design or structural style between the various parts built by different architects from different eras. Later architects always tried to 'improve' the work of the original architects to reflect their changes in design style and personal taste. Therefore, on the majestic Gothic cathedrals, the peaceful Norman-style cross not only displays the glory of God but also showcases the pride of the architect.&quot;</p>
<p>In contrast, the architectural consistency of the French city of Reims stands in stark contrast to the aforementioned cathedral. This consistency, like its unique features, evokes admiration and joy. As the travel guide states, this stylistic unity and integrity stems from eight generations of self-disciplined and self-sacrificing architects, each sacrificing some of their own creativity to achieve pure design. Similarly, this not only demonstrates God's glory but also His power to save those who are intoxicated by self-pride.</p>
<p>If we broaden the definition of life, software systems also have life and evolutionary needs. Software designers only play the role of creators in the early stages of system development. As the system matures, it will develop its own needs; designers cannot completely control it, but rather help it evolve its own personality.</p>
<p>This is not out of sentimentality, but out of practical use: a system with conceptual consistency enhances usability and expands the capabilities of designers.</p>
<p><strong>The things you create begin to constrain you.</strong></p>
<p>In any industry, designers face a wide variety of demands that exceed existing design methods and challenge the system's implementation capabilities. In the consumer-facing (toC) internet industry, product managers, as the primary gatherers of requirements, have taken on the responsibility of synthesizing various needs, making compromises and choices to limit the uncontrolled growth of complexity. However, in the business-to-business (toB) industry, customer customization is a necessity that more frequently exceeds the original system's capabilities. Hastily fulfilling customer customizations will only fragment the system's design. At this point, there are usually two choices:</p>
<ul>
<li>Method 1: Forcefully incorporate your new requirements or designs to embark on the path of system diversification.</li>
<li>Method 2: Reconstruct the system concept to encompass the new requirements and design.</li>
</ul>
<p>Software systems have high development costs and long development cycles, which inherently makes them prefer standardized, fixed-pattern requirements and averse to diversity and change. The more new things you inject, the more fragmented they become. This rampant growth will eventually backfire on the designers, destroying their ability to deliver. In most cases, designers will have to abandon the old system and rewrite a new one. Even if a system is designed from the outset to accommodate diverse requirements and thus accommodate some changing needs, it will eventually exceed those expectations.</p>
<p>In today's internet industry, the lean approach to this dilemma is: if you encounter a new situation for the first time, forcefully implement it; when you encounter it a second time, be sure to rebuild the concept, expand its connotation, and urge the system to follow an evolutionary path that suits it—seeking conceptual consistency that belongs to it.</p>
<p><strong>How to achieve consistency?</strong></p>
<p><strong>Elite rule or democracy?</strong></p>
<p>The conclusion of *The Mythical Man-Month* is that conceptual integrity requires the design to be implemented by one person, or a very small group of people with mutual understanding. In today's context, it's unlikely to encounter a development team as large as the one described in the original book. Based on personal experience, I would rewrite this statement as follows: the conceptual integrity of a module needs to be guaranteed by one person. In a closely collaborative small team, everyone's thinking and code will inevitably differ to some extent. Getting five people to agree on the design of all ten modules is not only difficult but also extremely time-consuming. Each module has its own specific characteristics; a divide-and-conquer approach, allowing different technical personnel to become the &quot;elite rulers&quot; of a particular module, can effectively ensure conceptual consistency.</p>
<p><strong>Does elitism mean that the creative talents and ideas of other technical personnel are suppressed?</strong></p>
<p>The answer is no, because defining module specifications is not more creative than the actual design and implementation; it's simply a different kind of creative work. Designing and implementing within a given specification requires just as much creativity, fresh thinking, and exceptional talent as defining module specifications. In fact, a product's cost-effectiveness largely depends on the implementers, just as usability largely depends on the module specification designers. Many industry and sector examples suggest that discipline and rules are beneficial. Indeed, as one artist famously said, &quot;Without rules, there can be no order.&quot; The worst architecture is often that of projects whose budgets far exceed initial goals. Bach was once tasked with composing a formally rigorous opera every week, but this did not seem to stifle his creativity.</p>
<p>Similarly, external architectural specifications actually enhance, rather than restrict, the creativity of the implementation team. Once they focus on a problem that no one has solved before, ideas begin to flow. In an unconstrained implementation team, there is a great deal of thought and debate when making structural decisions, with less focus on the specific implementation.</p>
<p><strong>Conceptual consistency in other fields</strong></p>
<p>In the sine wave of the title image, the main axis is the consistency of concepts, and the fluctuations up and down are those unexpected things that deviate from the original concepts. No matter how large the amplitude, it will eventually return to the main axis.</p>
<p>This pattern not only frequently appears in the construction and software industries, but also cleverly describes how people form their worldview—all the unexpected events are either eliminated or become part of the main axis; the main axis is the longitude and latitude, while the fluctuations are the contingencies.</p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[What Peopleware teaches about software teams]]></title>
      <link>https://xiaofeng.dev/en/writing/peopleware-notes/</link>
      <guid>https://xiaofeng.dev/en/writing/peopleware-notes/</guid>
      <pubDate>Sun, 03 Jul 2016 00:00:00 GMT</pubDate>
      <description><![CDATA[The English title of the book, \ Peopleware\ , is also quite interesting. It suggests that people shouldn't be treated as stationary objects, and that human…]]></description>
      <content:encoded><![CDATA[<p>The English title of the book, *Peopleware*, is also quite interesting. It suggests that people shouldn't be treated as stationary objects, and that human problems shouldn't be treated as technical problems. The book's basic argument is based on the idea that the problems we encounter at work fall more into the sociological realm than the technical realm. Sociological problems cannot be solved with technical approaches. The book's content is diverse and difficult to systematically organize, so I've simply extracted the interesting points one by one in the order they appear in the book. Those interested are encouraged to read the original text themselves.</p>
<p><strong>Part One: Managing Human Resources</strong></p>
<p><strong>Problem boundaries:</strong></p>
<p>As managers, many of us easily fall into a typical failure scenario: we are used to managing people as fixed modules.</p>
<p>In the vast majority of the failed projects we studied, none of them failed due to purely technical problems.</p>
<p>&quot;Politics&quot; was the most frequently cited reason for failure by respondents. But this word is often used vaguely by people... A more accurate description would be: the sociology of the project.</p>
<p>Most managers candidly admit they worry more about people than technology. But they rarely manage this way; their management style always prioritizes technology. They tend to overstep their bounds… relegating the most crucial human element to the lowest priority.</p>
<p>If you find yourself more focused on technical issues than social ones, you're like a juggler who lost his keys on a dimly lit street, then wanders off to a neighboring street to look for them, claiming the lights are brighter there.</p>
<p>(XF's note: A modern version of the story of marking the boat to find the sword)</p>
<p><strong>Employee's personality:</strong></p>
<p>For managers with a production-world management style, the unique personalities of their employees can be a persistent challenge. Humanistic managers, however, recognize that it is precisely this uniqueness (the unique personalities of employees) that creates a chemical reaction within the project team, a source of dynamism and high efficiency.</p>
<p>Several years ago, when I was teaching a course on corporate internal design, a senior manager grabbed me and asked me to evaluate the students (employees on his projects). He was particularly curious about one woman, making no attempt to hide his skepticism: “I don’t see her contributing to the project. She’s not a good developer or tester, or any other professional.” After some investigation, I discovered a striking fact: in her 12 years at the company, every project she had been on had been a huge success. Her contributions weren’t obvious, but her projects were always successful. After observing her in class for a week and speaking with her colleagues, I came to the conclusion that she was a super catalyst. Her presence made the team more cohesive. She helped team members communicate and get along, and projects with her were more fun. When I tried to explain this concept to the manager, I was shocked: he didn’t even realize the importance of a catalyst in a project.</p>
<p>Catalysts are crucial because projects are always in a state of flux. One person who can stabilize a project is worth two people who actually do the work.</p>
<p>The more a project requires a fixed delivery time that cannot be met, the more the project team needs frequent brainstorming sessions or activities like team dinners to help the team form a unified whole.</p>
<p><strong>Pressure and deadlines:</strong></p>
<p>Making salaried employees work overtime is a delusion in the minds of ignorant managers. Yes, working a few hours on Saturdays may help meet Monday's deadline, but the consequence is that they have to spend &quot;underground time&quot; to make up for their own lives.</p>
<p>(Translator's note: Underground time refers to the time spent doing things unrelated to work, even during working hours.)</p>
<p>Stress doesn't make you work better—it just makes you work faster.</p>
<p>Parkinson's Law: Only by setting an impossible delivery date can you guarantee the completion of a task. —Parkinson's Law (the author's interpretation) is basically impossible to apply to your work.</p>
<p>As long as people love their work, they can't let a task drag on indefinitely—that would only delay the satisfaction they crave. In a life where they don't need to lower their standards or sacrifice quality, they, like you, expect their work to be finished quickly.</p>
<p>If punishment is infrequent and the timing is well-timed, its effectiveness depends on your application. If punishment requires a longer period, it indicates a problem with your approach.</p>
<p><strong>The Seven Deadly Sins of Software Management:</strong></p>
<ul>
<li>There's a new trick you might not know that can boost production.</li>
<li>Other managers are reaping growth of 100%, 200%, or even more.</li>
<li>Technology changes rapidly, but you're still outdated.</li>
<li>Changing your programming language will give you a huge boost.</li>
<li>Because of the backlog, you need to double your production capacity immediately.</li>
<li>You've automated everything else; shouldn't you be automating your software developers instead?</li>
<li>Your employees perform better under immense pressure.</li>
</ul>
<p>Early in my career, when I (the author) was a developer, I had the privilege of working on a project managed by Sharon Weinberg. She later became the president of the Codd and Date Consulting Group. I consider her a living example of heuristic management. One snowy day, I was dragging my ailing body to build our imperfect system, preparing for user intervention. Sharon came in and found me forcing myself to work at the console. She turned and left, returning a few minutes later with a bowl of hot soup. After drinking her soup, I felt refreshed and asked her how she managed to do this, given her busy management schedule. She gave me her signature smile and said, “Tom, that’s management.”</p>
<p>Sharon understood the principle that all good-natured theater managers know well: the role of a manager is not to get attention, but to create an environment where everyone can work smoothly.</p>
<p><strong>Part Two: Office Environment</strong></p>
<p>When you're working, you want to look up and gaze into the distance every now and then, giving your eyes a break by focusing on something much farther away than your desk. If there's a wall standing eight feet in front of you, your eyes will have difficulty focusing and won't get a rest. In this situation, you'll feel like the space is too enclosed.</p>
<p>(XF note: That's why people like the window seats in coffee shops.)</p>
<p><strong>Part Three: The Right People</strong></p>
<p>Modern management still doesn't place enough emphasis on hiring and retaining the right people. The following four chapters attempt to repair the damage caused by the &quot;manager as strategist&quot; viewpoint and guide the following thinking:</p>
<ul>
<li>Find the right person</li>
<li>They enjoy their work and don't want to leave.</li>
<li>Let them do it freely</li>
</ul>
<p><strong>Focus on advantages:</strong></p>
<p>Throughout Captain Hornblower's story, a recurring theme is his deep-seated premonition that ambitious individuals are born, not made. His subordinates, chosen by lottery, were either unreliable or foolish. He knew they would fail him at some crucial moment. (And they did.) He also knew that only a select few who could fight alongside him were his true resources. Captain Hornblower's greatest strength lay in nurturing these individuals and learning when to rely on them.</p>
<p>(XF's note: This aligns with the philosophy of &quot;First, Break All the Rules.&quot; It focuses on leveraging people's strengths rather than compensating for their weaknesses.)</p>
<p><strong>recruitment:</strong></p>
<p>It's not just your personal preferences that influence hiring; your organization also subconsciously creates its own standards.</p>
<p>An invisible pressure compels you to hire people who look similar, speak similarly, and have suicidal thoughts. In a healthy company culture, this influence is negligible; however, if the culture is unhealthy, finding a key figure who stands out from the crowd becomes extremely difficult, if not impossible. This demand for uniformity reflects a lack of security in some managers. Confident managers don't care whether team members get haircuts or wear ties. Their glory lies in the achievements of their employees.</p>
<p>The effects of enforced dress codes are detrimental. The most valuable employees begin to realize their talents are undervalued, their work achievements less important than their hairstyle and tie. Eventually, they choose to leave. The rest drag on, trying to prove that the right person isn't so important.</p>
<p><strong>Corporate Entropy:</strong></p>
<p>Within a company or organization, entropy is considered a unity of attitudes, appearance, and thought processes. In thermodynamics, entropy always increases in the universe, and the same applies to corporate entropy. The second law of thermodynamics states that entropy within an organization always increases. This is why aging organizations often feel more constrained and therefore less enjoyable to work compared to dynamic, young companies.</p>
<p>We can't change the overall phenomenon, but we can make changes within our own domain. The most successful managers are always able to shake up entropy, bring in the right employees, let them express themselves, and even allow them to deviate from company standards. Your organization may be stagnant, but you can save the department you're responsible for from this fate.</p>
<p><strong>Innovation:</strong></p>
<p>Genuine innovation can have an impact on people outside the innovator, which can make upper management wary and often suspect that the innovator wants to manage the organization from below. The conclusion is that even the best innovations require a bit of unconventional leadership.</p>
<p><strong>Recruitment and Integration:</strong></p>
<p>If you ask a candidate, most will happily bring a sample. What could be more reasonable than having a candidate bring their work experience to the interview?</p>
<p>Organize a trial period for candidates or new hires: the trial period acts as a catalyst for integrating new and existing employees. A successful trial period is like peer review; conversely, a failed trial period can boost the morale of existing employees, constantly reminding them that their hiring wasn't a fluke or a stroke of luck, but rather that their resume landed on their desk at the right time. However, it's crucial to ensure that the applicant's presentation is closely related to the work your organization does.</p>
<p><strong>Turnover and Human Resource Costs:</strong></p>
<p>The turnover rates we are aware of are mostly between 33% and 80% per year, with an average employee tenure of 15 to 36 months. The cost of replacing a person is roughly equivalent to 4.5 to 5 months of human resource costs.</p>
<p>For companies experiencing high turnover rates (greater than 30%), the following factors may contribute to the high turnover rate:</p>
<ul>
<li>A transient mentality: Colleagues create the feeling that one is not willing to commit to a job long-term.</li>
<li>Perceived replaceability: Management believes that employees are replaceable (because the turnover rate is too high, so no one is irreplaceable).</li>
</ul>
<p>In this situation, loyalty is laughable: who would be loyal to an organization that treats its employees like cogs in a machine?</p>
<p>At Hitachi Software, the chief scientist's primary responsibility is training new employees.</p>
<p>(XF note: This is also the case at Tencent, where senior talents must take on the role of lecturers.)</p>
<p>How long does it take for a newcomer to get up to speed? Six months to go from being a negative contributor to reaching the productivity of their predecessor? This is reasonable for a new software application developer, but for slightly more complex tasks, it may never be enough.</p>
<p><strong>Part Four: Cultivating High-Performing Teams</strong></p>
<p>Once a team develops cohesion, the chances of success increase dramatically. Such a team is almost unstoppable, like a bulldozer. Managing such a bulldozer team is quite enjoyable; you spend most of your time clearing obstacles, paving the way to success, and preventing outsiders from dragging the team down—&quot;They're coming, everyone make way for them, let's watch their show.&quot; Such teams don't need traditional management; they don't need motivation at all. They are highly motivated. Company-level goals are crucial because they mean a great deal to the team.</p>
<p>People working in cohesive teams often become so engrossed that they go to extremes, wanting to use the Navarone Cannon (from the classic 1961 film) just to pass the acceptance test for the third version of the pension system.</p>
<p><strong>Teams and gangs:</strong></p>
<p>What's enjoyable is a team; what feels like a threat is perceived as a clique. This fear of cliques reflects a lack of security in management... and there are reasons for this: managers are often not true team members, so the feeling of being excluded outweighs the feeling of being closely connected to the team. Furthermore, the level of trust within a team is higher than the trust that binds the team to the company.</p>
<p>A cohesive working group may be arrogant, self-sufficient, troublesome, and a bit exclusive, but it helps managers achieve their real goals rather than being a cobbled-together, replaceable part.</p>
<p><strong>Team self-destruction:</strong></p>
<p>(From Edward de Bono's *Lateral Thinking*) When you feel stuck while trying to solve a problem, de Bono suggests that instead of stubbornly seeking a way to achieve your goal, try looking for ways to achieve the opposite of your goal. Below is a list of self-destructive &quot;techniques&quot; for teams.</p>
<ul>
<li>Defensive management</li>
<li>Bureaucracy</li>
<li>Physical separation</li>
<li>Time Fragments</li>
<li>Sacrificing product quality</li>
<li>Falsifying deadlines</li>
<li>gang control</li>
</ul>
<p><strong>Time Fragments:</strong></p>
<p>When someone is involved in four projects simultaneously, they have to endure four times the interpersonal interactions, which means they spend all their time switching roles. No one can be a member of multiple cohesive teams at the same time. Closely collaborative, cohesive teams are exclusive; fragmented teams cannot form cohesion.</p>
<p>In the past, overtime was limited to a few night shifts or an occasional weekend, which everyone could grit their teeth about. However, if overtime extends to several months, even the most united team members will be affected, which will inevitably damage team cohesion.</p>
<p>Most managers remain skeptical about the effectiveness of overtime, finding it difficult to demonstrate their management skills and abilities by working so much extra time to complete projects. Yet, they ultimately allow or encourage overtime. Why? As a consultant and author, Jerry Weinberg offers this answer: he believes we don't work overtime to get the job done, but rather to avoid blame when work simply cannot be completed on time.</p>
<p><strong>Dinner party:</strong></p>
<p>Having the team go out for a pasta dinner might seem like a scheme by this manager. But perhaps not... If you asked this manager what her plans were for the evening, she would likely tell you, with utmost sincerity, &quot;Dinner.&quot; A natural manager instinctively senses what makes a good team activity. This intuition extends to decision-making and management throughout the project. The entire experience is organized around small, simple, and collaborative success. Without close observation, you might not even notice the manager's presence; it just happens naturally.</p>
<p><strong>open:</strong></p>
<p>The boss entrusting his enhanced reputation to his subordinates can give everyone a little thrill and excitement.</p>
<p>If your subordinates are highly capable, there's probably nothing more effective in increasing your chances of success than occasionally distancing yourself from them.</p>
<p>The best bosses take risks. They're willing to take risks with their employees. This doesn't mean good managers don't manage, but rather that they don't give fixed directions or act arbitrarily. They must constantly make decisions and judgments. The advice here is that they should make full use of their inherent authority... Obeying such authority doesn't diminish anyone, doesn't eliminate motivation, and doesn't create discord among colleagues.</p>
<p>In the best organizations, this innate authority works effectively in every aspect. Everyone knows a manager's strengths—perhaps setting the overall direction, negotiating, or recruiting—and they genuinely respect and respect their abilities. Each employee possesses a skill and authority in their respective field, thus earning the trust of others. In an open and supportive environment, the team has the greatest potential for cohesion.</p>
<p>If there were a way to increase the productivity and clear goals of the employees you manage, but with less control over them, would you be willing to do it? The answer to this question can help us distinguish top-notch managers from the crowd.</p>
<p>In most cases, managers remain detached from the team, providing guidance from above from time to time while clearing administrative and process obstacles.</p>
<p><strong>Self-healing system:</strong></p>
<p>Nondeterministic systems can repair themselves painlessly and gracefully (sometimes even at no cost) because the entities that make up the system know the fundamental goals. Once a new situation arises, they can immediately discern what actions are most meaningful... Making the system deterministic would cause it to lose its ability to heal itself.</p>
<p><strong>Methodology:</strong></p>
<p>Regarding the &quot;crazy&quot; methodology: Only after this natural convergence is complete should you consider issuing a standard. There's no way to make a declaration before a de facto standard is established.</p>
<p><strong>Software project risks:</strong></p>
<p>The essence of risk management is not to eliminate all risks, but to ensure that appropriate countermeasures are in place when risks occur. These countermeasures should be planned and rehearsed in advance.</p>
<p>If the probability of a risk occurring is extremely low, then it is understandable not to manage it. But it is unreasonable to avoid managing a risk simply because the outcome &quot;sounds too terrible.&quot;</p>
<p><strong>Early overcompilation:</strong></p>
<p>Projects begin with planning and design, which are best done by small teams.</p>
<p><strong>Let's talk about fragmentation again:</strong></p>
<p>Mixing design work (which requires a long implementation time, a relatively quiet environment, and high-quality interaction with the team) with phone support (which requires constant interruptions, continuous service, and quick attention shifts) makes it virtually impossible to carry out thought-intensive tasks. The wasted time caused by constant restarts only frustrates employees. You may never hear anyone mention it because employees who are troubled by this are likely more focused on self-blame.</p>
<p>(XF Note: Research and development work, project-based transformation, and support work can be appropriately broken down to avoid fragmentation.)</p>
<p><strong>Self-sufficient communication:</strong></p>
<p>A family therapist would tell you: if one party in a relationship overreacts, the other will inevitably underreact... When you over-communicate and coordinate with those who work for you, they themselves may be under-communicating and under-coordinating. Self-organization and mutual coordination among colleagues are key aspects of good teamwork.</p>
<p>A good coach's job is not to coordinate the interaction of the team members, but to help them to self-organize.</p>
<p><strong>Change:</strong></p>
<p>In his book *Managing Transitions*, William Bridges suggests that we shouldn't belittle old methods. Instead, we should use gratitude for old methods to help drive change.</p>
<p>&quot;We need your expertise in the CGS system to help us succeed with the new system.&quot;</p>
<p><strong>Satir variation model:</strong></p>
<p>Old Standards – (External Elements) – Chaos – (Shift in Mindset) – Practice and Integration – New Standards</p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[Why engineering and business teams need product managers]]></title>
      <link>https://xiaofeng.dev/en/writing/product-manager-between-dev-and-business/</link>
      <guid>https://xiaofeng.dev/en/writing/product-manager-between-dev-and-business/</guid>
      <pubDate>Sat, 18 Jun 2016 00:00:00 GMT</pubDate>
      <description><![CDATA[The Mythical Man-Month, Chapter 7, "Why the Tower of Babel Failed" (see another article in this newsletter), mentions three organizational relationships:]]></description>
      <content:encoded><![CDATA[<p>The Mythical Man-Month, Chapter 7, &quot;Why the Tower of Babel Failed&quot; (see another article in this newsletter), mentions three organizational relationships:</p>
<ul>
<li>The product manager and the technical lead are the same person.</li>
<li>The product manager acts as the overall commander, with the technical director serving as his right-hand man.</li>
<li>The technical director acts as the overall commander, while the product manager serves as his right-hand man.</li>
</ul>
<p>In today's typical internet company organizations, the &quot;product owner&quot; has evolved into multiple roles: business owner (usually the boss, with management responsibilities), project manager, and product manager. Who is the overall commander and who is the right-hand man is not important; after all, they are different people with different positions, working principles, decision-making principles, and preferred tasks. There's no need to distinguish between primary and secondary roles.</p>
<p>There's a great discussion on Zhihu about the responsibilities of product managers, specifically in the question &quot;Why do product managers exist?&quot; (See the original article).</p>
<p>After reviewing the two materials above and combining them with my own experience, I came to this conclusion: <strong>Product managers are needed between the development team and the business team, but the development team should not bear too much responsibility for requirements planning and design.</strong></p>
<p>In most standard internet companies, this situation doesn't need to be specifically mentioned; I'm just sharing some of my experiences in the B2B industry. <strong>Without a product manager</strong>, some inefficiencies occur: developers or technical leads are tasked with negotiating supplier partnerships, client negotiations, product planning, and requirement design.</p>
<p><strong>Why</strong> can't developers also serve as product managers?</p>
<p><strong>First, there's the issue of ability:</strong></p>
<p>Few people possess the skills to make both technical and product decisions simultaneously. <strong>Understanding and participating in business requirements</strong> is extremely helpful for developers making technical decisions. However, developers simultaneously <strong>designing for business requirements</strong> is a highly divisive activity. While it can avoid internal conflict (because one cannot fight two sides) and allow for quick decision-making, the quality of decisions can significantly decrease in certain situations—because it involves compromise. <strong>An uncontested compromise either sacrifices requirements for the system or sacrifices the system's future for current needs.</strong></p>
<p>Technology and products inherently play conflicting roles (the experience of such conflicts and debates at work is also an important source of their professional abilities), and their principles for doing things are fundamentally different:</p>
<ul>
<li>The fundamental principles of the technology are: system standardization, scalability, technical performance, and future user capacity.</li>
<li>The fundamental principles of our products: meeting the common and genuine needs of our customers, and ensuring a positive user experience.</li>
</ul>
<p>Take, for example, the common system customization needs of B2B clients. These needs are so prevalent that they are unavoidable; abandoning customization could mean losing a deal, and the business side will undoubtedly argue its case. However, I believe every developer deeply dislikes serving different clients with a large amount of customization because it lacks scalability. One hundred clients will have one hundred different approaches, making rapid growth difficult. This dilemma necessitates special compromises and careful decision-making. The result of both sides taking a step back is:</p>
<ul>
<li>Lightweight customization: Meets 90% of common customization needs, limiting the growth of customization (using 5 customizations to serve 1000 clients).</li>
<li>Convert customizations to features: First, customize for a few clients, then gradually refine them into common functionalities.</li>
</ul>
<p>Developers' aversion to customization is precisely the strong guarantee that these two decisions can be implemented. Business personnel can also learn from this process how to manage and guide customer expectations and needs.</p>
<p>In the early stages of a business, taking on multiple roles may not be a problem. However, as competitors with well-established teams and a large pool of professionals enter the market, the inherent limitations of those in these roles will increasingly impact business growth.</p>
<p><strong>Secondly, personal development:</strong></p>
<p>T-shaped talent is currently popular, and while it's certainly fortunate for companies to have such individuals, it's not a universally needed skill set. It remains essential for developers to excel professionally. Excellent developers can bring a tenfold increase in technical productivity, so why waste their talent and money on something that wastes their expertise? Improving their professional skills is clearly a better way to enhance their personal value.</p>
<p><strong>Other motivations:</strong></p>
<p>In my observation, there are other reasons why business stakeholders ask the development team to discuss requirements with clients:</p>
<ul>
<li>These things involve system design and requirements design, which are beyond the capabilities of the business personnel themselves, so he had to do it.</li>
<li>Avoid making promises that cannot be fulfilled in the system.</li>
</ul>
<p><strong>Is there anything I can do?</strong></p>
<p><strong>Job positions are created based on individual characteristics.</strong></p>
<p>If the business is in its early stages and there happens to be someone who can take on the role, then definitely use them, regardless of any job restrictions. If there isn't a suitable person or the business has already reached its growth stage, then you should consider separating the role and hiring someone new. If the market cannot find someone perfectly suited for this business area to independently handle the product manager's responsibilities, there are two options:</p>
<ul>
<li>We need to remove one person from the business team to take on this role and gain a deeper understanding of the system design.</li>
<li>We need to remove one person from the development team to take on this role and gain a deeper understanding of the business.</li>
</ul>
<p>Regardless of the methods used, the role is organized based on the participants. This person also needs to stand on the periphery, acknowledging technical authority while also challenging the development team in a smart and appropriate way, supporting and constraining the business team.</p>
<p><strong>It's both a recognition and a challenge (and also advice for product managers):</strong></p>
<p>Recognizing the development team's technical authority is a natural communication principle, as developers are the &quot;direct creators&quot; of the system and have the freedom to make decisions regarding the technology used to implement requirements. However, everything in excess is harmful; seeking technical input on every matter is also a recipe for failure. <strong>It is crucial to carefully distinguish between technical and product decisions at all times.</strong></p>
<p>We often encounter business stakeholders asking about feasibility, seemingly a technical issue: either it works or it doesn't. However, for developers, it's more of a product question. Most daily requirements are feasible; the key is how much cost and effort you're willing to invest—whether you need it in a week or are you willing to wait a whole year with 10 people to produce the first version. <strong>The correct way to ask is: Is there a low-cost solution to this requirement? —This approach is a friendly challenge, a form of encouragement, and more likely to stimulate the development team's thinking and creativity.</strong></p>
<p>The above are all personal experiences. I believe that this content is only applicable in certain special circumstances. I am just writing it down in the hope that it will be helpful to others. If you have any different opinions, please leave a message to give me your advice!</p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[Who leads a large project: Tech lead or product owner?]]></title>
      <link>https://xiaofeng.dev/en/writing/tech-lead-vs-product-owner/</link>
      <guid>https://xiaofeng.dev/en/writing/tech-lead-vs-product-owner/</guid>
      <pubDate>Sat, 18 Jun 2016 00:00:00 GMT</pubDate>
      <description><![CDATA[The following content is excerpted from Chapter 7 of The Mythical Man-Month: Why Did the Tower of Babel Fail?]]></description>
      <content:encoded><![CDATA[<p>The following content is excerpted from Chapter 7 of The Mythical Man-Month: Why Did the Tower of Babel Fail?</p>
<p>Let's consider a tree-based programming framework and the essential elements that each subtree must possess for it to be effective. These are:</p>
<ol>
<li>
<p>A mission</p>
</li>
<li>
<p>Product Owner (a producer)</p>
</li>
<li>
<p>Technical director or architect</p>
</li>
<li>
<p>Schedule</p>
</li>
<li>
<p>Division of labor</p>
</li>
<li>
<p>Interface definitions among the parts</p>
</li>
</ol>
<p>All of these are quite obvious and conventional, except for some differences between the product owner and the technical lead. Let's analyze the two roles first, and then consider the relationship between them.</p>
<p>**What is the role of the Product Owner?** They build the team, assign tasks, and create schedules. They require and consistently request the necessary resources. This means their primary role involves communicating externally, both upwards and horizontally. They establish internal communication and reporting mechanisms within the team. Finally, they ensure that schedule goals are achieved, adjusting resources and team structure as needed based on changing circumstances.</p>
<p>**So what is the role of the technical lead?** He conceptualizes the design, identifies the system's sub-components, describes how it will look from the outside, and outlines its internal structure. He ensures consistency and conceptual integrity throughout the design; he controls the system's complexity. When a technical problem arises, he provides solutions or adjusts the system design as needed. In a phrase favored by Al Capp, he is the &quot;inside-man at the skunk works.&quot; His communication skills are paramount within the team. His work is almost entirely technical.</p>
<p>As we can see, the skills required for these two roles are very different. These skills can be combined in different ways. The specific skills possessed by the product owner and the technical lead can be combined in different ways, and the resulting combination controls and governs the relationship between them. Team building must be based on the people involved, rather than simply arranging people according to theory.</p>
<p>There are three possible relationships, all of which have been successfully applied in practice.</p>
<p>The product owner and the technical lead are the same person. This approach is very easy to implement in very small teams, perhaps three or six developers. However, it's less effective in large projects for two reasons: First, it's difficult to find people with both management and technical skills. Thinkers are few, doers are even fewer, and thinker-doer hybrids are extremely rare. Second, in large projects, each role must work full-time, and often overtime. For the product owner, it's difficult to shoulder full management responsibility while also finding time for technical work. For the technical lead, it's difficult to maintain the conceptual integrity of the design without any compromises while also taking on management responsibilities.</p>
<p>The product owner acts as the overall commander, with the technical lead serving as their right-hand man. This approach presents some challenges. It's difficult to establish authority in technical decisions without the technical lead being involved in any management work.</p>
<p>Clearly, the product owner must assert the technical authority of the technical lead beforehand and support the latter's technical decisions for the vast majority of upcoming test cases. To achieve this, the product owner and the technical lead must share similar views on basic technical theory; they must discuss major technical issues privately before they arise; and the product owner must demonstrate respect for the technical lead's technical capabilities.</p>
<p>In addition, there are some techniques. For example, the person in charge of the product can demonstrate the authority of the technical director through subtle state characteristics (such as the size of the office, the carpet, the decoration, the photocopier, etc.), even though the source of decision-making power comes from management.</p>
<p>This combination can make work very efficient. Unfortunately, it's rarely used. However, it has at least one advantage: project managers can get the job done using technically gifted individuals who aren't particularly good at management.</p>
<p>The technical lead acts as the overall commander, with the product manager serving as his right-hand man. Robert Heinlein, in his book &quot;The Man Who Sold the Moon,&quot; describes this arrangement in a scene:</p>
<p>Coster lowered his head, covered his face with his hands, then looked up. “I know. I know what needs to be done—but every time I try to solve a technical problem, there are always some damn idiots who want me to do something about trucks, or phones, or some other annoying thing. I’m sorry, Mr. Harriman, I thought I could handle it.”</p>
<p>Harriman said very gently, “Bob, don’t let these things bother you. You haven’t been sleeping well lately, have you? Well, I’ll be in your position for a few days, setting up an environment free from these distractions. I need your brain working on anti-vectors, fuel efficiency, and stress design, not truck contracts.” Harriman walked to the door, glanced around, and called on someone who might or might not be a key employee. “Hey, you! Come here for a second.”</p>
<p>The man looked somewhat flustered, stood up, walked to the door, and said, &quot;What is it?&quot;</p>
<p>&quot;Move that corner table and everything on it to an empty office on this floor, immediately.&quot;</p>
<p>He supervised Coster and his desk being moved to another office, then noticed the phone in the new office wasn't connected. After a moment's thought, he moved a sofa over. &quot;Tonight we'll be installing a projector, a plotter, bookshelves, and a few other things,&quot; he told Coster. &quot;Make a list of everything you need for your project.&quot; He returned to the original chief engineer's office, cheerfully considering how to organize the work and if anything seemed amiss.</p>
<p>Four hours later, he brought Berkeley in to meet Coster. The chief engineer was asleep at his desk, his head resting in the crook of his arm. Harriman slowly backed out, but Coster woke up. “Oh, sorry,” he said somewhat embarrassedly, “I must have dozed off.”</p>
<p>“That’s why I brought you the sofa,” Harriman said. “It’s much more comfortable. Bob, come see Jock Berkeley. He’s your new slave, and you’re still the chief engineer, the undisputed boss. Jock is in charge of everything else. From now on, you don’t need to worry about anything else, except for some details about building the lunar spacecraft.”</p>
<p>They shook hands. “Mr. Coster, I only have one question,” Berkeley said earnestly, “I have no right to interfere with anything you need to do—you’re about to give a technical demonstration—but for God’s sake, could you record it so I can have a look? I’ll be putting a switch on your desk that will turn on a sealed video recorder on the desk.”</p>
<p>“Okay!” Coster was looking at him, Harriman thought, young enough.</p>
<p>“If you need to do anything non-technical, you don’t have to do it yourself. Just press a button and let me know, and it’ll be done!” Berkeley glanced at Harriman. “The boss said he wants to talk to you about the actual work. I have to go now.” He left.</p>
<p>Harriman sat down, and Coster straightened his clothes, saying, &quot;Oh!&quot;</p>
<p>&quot;Feeling better?&quot;</p>
<p>&quot;I like the look of Berkeley.&quot;</p>
<p>“Great! Don’t worry, he’s your twin brother now. I’ve used him before. You can think of it as living in a first-class sanatorium.”</p>
<p>This story requires almost no analysis or explanation, and this arrangement can make the work very effective.</p>
<p>I suspect the last arrangement is the best option for smaller teams, as discussed in Chapter 3, &quot;The Surgical Team.&quot; For some development teams on truly large projects, I believe the product owner as manager is a more suitable arrangement.</p>
<p>The Tower of Babel may have been the first complete engineering failure, but it wasn't the last. Communication and its outcomes—organization—are key to success. Communication and organizational skills require careful consideration from managers; accumulating relevant experience and improving capabilities are just as important as the software technology itself.</p>
]]></content:encoded>
    </item>
    <item>
      <title><![CDATA[Brooks’s law: Why adding people can make a late project later]]></title>
      <link>https://xiaofeng.dev/en/writing/brooks-law/</link>
      <guid>https://xiaofeng.dev/en/writing/brooks-law/</guid>
      <pubDate>Fri, 10 Jun 2016 00:00:00 GMT</pubDate>
      <description><![CDATA[A: "There are only 3 months left before the system goes live, and there are still so many features that haven't been implemented. What should we do?"]]></description>
      <content:encoded><![CDATA[<p>A: &quot;There are only 3 months left before the system goes live, and there are still so many features that haven't been implemented. What should we do?&quot;</p>
<p>B: &quot;Could we transfer an engineer from the team next door to help? The leadership is taking this project very seriously.&quot;</p>
<p>A: &quot;Okay, we should be able to assign two of them. They are both experienced programmers, and we'll try to finish it within a month.&quot;</p>
<p>In the end, they successfully delayed the project by four months, later than expected without adding staff.</p>
<p>Adding manpower to a project that is already behind schedule will only make it fall further behind schedule.</p>
<p>—Brooks' Law mentioned in The Mythical Man-Month</p>
<p>Characteristics of software projects</p>
<p>Estimating and scheduling software projects has always been a challenge. No matter how hard you try, it's difficult to guarantee accuracy, and adjustments are always necessary throughout the process. This often involves either rescheduling or reducing tasks, but adding manpower must be approached with extreme caution. The primary reason is that software project teams require intense communication and collaboration, and are not simply work groups.</p>
<p><img src="/writing/wechat-tech-assets/brooks-law/b651ebd1bd383f2d.png" alt="Brooks's Law: &quot;Adding manpower to a project that is already behind schedule will only make it further behind schedule.&quot; (Illustration)"></p>
<p>The number of communication interfaces increases. Each additional person adds n interfaces. If there are n staff members in the project, there are (n²-n)/2 interfaces for project communication. The goal of team organization is to reduce the amount of communication and collaboration required and to remove communication barriers.</p>
<p>Training time and additional testing. Lack of training is disastrous. No matter how capable an employee is, they need to be trained by one or more existing employees on the project. Tasks also need to be reassigned, system testing scheduled, not to mention the inevitable chaos (communication friction, code bugs) brought by newly hired employees and the time it takes for existing employees to fill in the gaps.</p>
<p>Principles of Project Estimation</p>
<p>Be careful when using person-months. Number of people and time are two independent factors and cannot be substituted for each other. You cannot change &quot;2 people taking 2 months&quot; to &quot;4 people taking 1 month&quot;. The interchangeability of number of people and time only applies if a task can be broken down among the participants and they do not need to communicate with each other - which is almost impossible in software projects.</p>
<p>There is still a strong temptation for project managers to add more staff. If they must do so, they should do it early on, rather than waiting until they are behind schedule.</p>
]]></content:encoded>
    </item>
  </channel>
</rss>
