<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Token Efficiency on KnightLi Blog</title>
        <link>https://knightli.com/en/tags/token-efficiency/</link>
        <description>Recent content in Token Efficiency on KnightLi Blog</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en</language>
        <lastBuildDate>Fri, 15 May 2026 08:59:33 +0800</lastBuildDate><atom:link href="https://knightli.com/en/tags/token-efficiency/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>What is Token Efficiency? DeepSeek V4, big-model planning, and small-model execution</title>
        <link>https://knightli.com/en/2026/05/15/token-efficiency-agent-orchestration/</link>
        <pubDate>Fri, 15 May 2026 08:59:33 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/05/15/token-efficiency-agent-orchestration/</guid>
        <description>&lt;p&gt;The next important metric for AI coding may not be who has the strongest model, but who can complete more verifiable work with fewer tokens, lower cost, and a more stable process.&lt;/p&gt;
&lt;p&gt;That is the value of Token Efficiency.&lt;/p&gt;
&lt;p&gt;Many people hear Token Efficiency and think only about cheaper models, longer context, or cheaper cache hits. Those are base conditions. Real productivity comes from model division of labor, task orchestration, context budgeting, and evaluation.&lt;/p&gt;
&lt;p&gt;In other words, Token Efficiency is not a cost-saving trick. It is an engineering method for turning tokens into output.&lt;/p&gt;
&lt;h2 id=&#34;deepseek-v4-productizing-the-split-between-planner-and-executor&#34;&gt;DeepSeek V4: productizing the split between planner and executor
&lt;/h2&gt;&lt;p&gt;The missing background in this topic is the positioning of DeepSeek V4.&lt;/p&gt;
&lt;p&gt;DeepSeek V4 is not just another stronger model. It splits the two capabilities needed for Token Efficiency into &lt;code&gt;V4 Pro&lt;/code&gt; and &lt;code&gt;V4 Flash&lt;/code&gt;: &lt;code&gt;V4 Pro&lt;/code&gt; is better suited for planning, reasoning, architecture judgment, and critical review, while &lt;code&gt;V4 Flash&lt;/code&gt; fits high-frequency execution, batch rewriting, code completion, data organization, and ordinary agent-loop nodes.&lt;/p&gt;
&lt;p&gt;That maps directly to two roles in AI coding:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;V4 Pro&lt;/code&gt;: planner / consultant for requirement breakdown, technical design, complex bug analysis, architecture review, and final acceptance.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;V4 Flash&lt;/code&gt;: executor for file scanning, simple implementation, test completion, documentation, candidate generation, and repetitive work.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;DeepSeek&amp;rsquo;s API documentation shows that both &lt;code&gt;V4 Flash&lt;/code&gt; and &lt;code&gt;V4 Pro&lt;/code&gt; support &lt;code&gt;1M&lt;/code&gt; context, JSON Output, Tool Calls, Chat Prefix Completion, and FIM Completion. The pricing page also prices cache-hit input separately and notes that input cache-hit prices have been reduced to one tenth of the launch price.&lt;/p&gt;
&lt;p&gt;Together, these are why it matters for Token Efficiency: &lt;code&gt;1M&lt;/code&gt; context reduces compression in complex agent tasks; low cache-hit pricing lowers the cost of repeatedly loading prompts, project docs, code, and history; the &lt;code&gt;Flash / Pro&lt;/code&gt; split solves the problem of using a flagship model for every step or an unstable small model for every step.&lt;/p&gt;
&lt;p&gt;DeepSeek V4 should therefore be understood in three ways:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Cheap execution layer&lt;/strong&gt;: many agent nodes can run on &lt;code&gt;V4 Flash&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Usable judgment layer&lt;/strong&gt;: key steps can still call &lt;code&gt;V4 Pro&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Long-chain friendly&lt;/strong&gt;: &lt;code&gt;1M&lt;/code&gt; context and cache pricing make codebases, docs, and tool history easier to keep in the usable window.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Its significance for AI coding is not just another model option. It offers a realistic cost structure for the &amp;ldquo;consultant model + executor model + harness orchestration&amp;rdquo; pattern.&lt;/p&gt;
&lt;h2 id=&#34;do-not-let-the-strongest-model-do-everything&#34;&gt;Do not let the strongest model do everything
&lt;/h2&gt;&lt;p&gt;The old approach was to pick the smartest model and let it handle requirement analysis, code, tests, and summaries end to end.&lt;/p&gt;
&lt;p&gt;That is simple but not always efficient. Many tasks do not need frontier reasoning. Expensive models should behave more like consultants, architects, or planners that appear only at key decision points.&lt;/p&gt;
&lt;p&gt;A better structure is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Big models break down problems and make key decisions.&lt;/li&gt;
&lt;li&gt;Small models execute, batch-process, and repeat edits.&lt;/li&gt;
&lt;li&gt;Tools and harnesses manage process, state, context, and validation.&lt;/li&gt;
&lt;li&gt;Humans define product goals, accept results, and make tradeoffs.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This prevents frontier reasoning from being wasted on mechanical execution.&lt;/p&gt;
&lt;h2 id=&#34;context-is-not-always-better-when-larger&#34;&gt;Context is not always better when larger
&lt;/h2&gt;&lt;p&gt;Long context matters for coding agents because code, docs, chat history, test output, and logs all consume the window. When the window fills up, compression, forgetting, and misjudgment appear.&lt;/p&gt;
&lt;p&gt;But long context does not mean dumping everything into the model.&lt;/p&gt;
&lt;p&gt;Token Efficiency means each task should fit inside a clear, controlled context window:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Bring only necessary files.&lt;/li&gt;
&lt;li&gt;Include only decision-relevant documents.&lt;/li&gt;
&lt;li&gt;Keep only the current state from history.&lt;/li&gt;
&lt;li&gt;Give each node clear input and output.&lt;/li&gt;
&lt;li&gt;Compress completed work into structured summaries for the next node.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Cheap context can tempt people to include noise. Noise does not make a model smarter.&lt;/p&gt;
&lt;h2 id=&#34;harness-matters-more-than-a-single-model&#34;&gt;Harness matters more than a single model
&lt;/h2&gt;&lt;p&gt;Connecting Claude Code, Codex, or another coding agent to a cheap model is not enough. Small models drift in long-chain tasks unless a stronger process controls them.&lt;/p&gt;
&lt;p&gt;A harness is a scheduling system. It decides how to split tasks, run nodes, choose models, validate results, retry failures, and pass context.&lt;/p&gt;
&lt;p&gt;A useful orchestration system should answer:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Which tasks need planning?&lt;/li&gt;
&lt;li&gt;Which tasks can execute directly?&lt;/li&gt;
&lt;li&gt;Which nodes can run in parallel?&lt;/li&gt;
&lt;li&gt;Which nodes must be serial?&lt;/li&gt;
&lt;li&gt;Which nodes use big models or small models?&lt;/li&gt;
&lt;li&gt;What is the context budget for each node?&lt;/li&gt;
&lt;li&gt;What structured output does each node produce?&lt;/li&gt;
&lt;li&gt;Who reviews and decides whether to continue?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Without this software layer, small models are merely cheap. With it, they can become leverage.&lt;/p&gt;
&lt;h2 id=&#34;split-tasks-with-dags&#34;&gt;Split tasks with DAGs
&lt;/h2&gt;&lt;p&gt;A good approach is to split complex work into a directed acyclic graph.&lt;/p&gt;
&lt;p&gt;A feature task might become:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Requirement clarification&lt;/li&gt;
&lt;li&gt;Technical design&lt;/li&gt;
&lt;li&gt;Task decomposition&lt;/li&gt;
&lt;li&gt;Implementation&lt;/li&gt;
&lt;li&gt;Test completion&lt;/li&gt;
&lt;li&gt;Code Review&lt;/li&gt;
&lt;li&gt;Fixes&lt;/li&gt;
&lt;li&gt;PR submission&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Each node can be an independent agent with its own role, prompt, tools, permissions, and output format. Nodes should pass structured results, not long chat transcripts.&lt;/p&gt;
&lt;p&gt;This makes each node shorter, easier for small models, and easier to measure.&lt;/p&gt;
&lt;h2 id=&#34;run-multiple-task-replicas&#34;&gt;Run multiple task replicas
&lt;/h2&gt;&lt;p&gt;When tokens are cheap enough, the same task does not have to run only once.&lt;/p&gt;
&lt;p&gt;You can run the same task with different models, prompts, or orchestrations, then pick the best result or merge useful parts. This is suitable for design proposals, copy, test cases, bug hypotheses, refactor options, and code review.&lt;/p&gt;
&lt;p&gt;It is not suitable for tasks with external side effects, shared mutable state, or unclear acceptance criteria.&lt;/p&gt;
&lt;p&gt;The goal is not gambling. It is collecting comparable samples that can improve orchestration, model selection, and node skills.&lt;/p&gt;
&lt;h2 id=&#34;build-an-evaluation-system&#34;&gt;Build an evaluation system
&lt;/h2&gt;&lt;p&gt;Token Efficiency cannot be judged only by price. A cheap model with a high failure rate can consume more human time and become more expensive.&lt;/p&gt;
&lt;p&gt;Start recording:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Completion rate&lt;/li&gt;
&lt;li&gt;Human interventions&lt;/li&gt;
&lt;li&gt;Tool-call failure rate&lt;/li&gt;
&lt;li&gt;Test pass rate&lt;/li&gt;
&lt;li&gt;Review findings&lt;/li&gt;
&lt;li&gt;Token cost per task&lt;/li&gt;
&lt;li&gt;Time per task&lt;/li&gt;
&lt;li&gt;Rework count&lt;/li&gt;
&lt;li&gt;Differences between model combinations&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With this data, you can decide which tasks fit small models, which require big models, and which should stay human-led.&lt;/p&gt;
&lt;h2 id=&#34;make-business-workflows-atomic&#34;&gt;Make business workflows atomic
&lt;/h2&gt;&lt;p&gt;Most users do not need to build a full harness today. But they can start decomposing their business workflow into atomic nodes.&lt;/p&gt;
&lt;p&gt;Content production can become topic selection, research, outline, draft, fact check, style rewrite, SEO title, translation, and publishing check.&lt;/p&gt;
&lt;p&gt;Software development can become requirement confirmation, technical design, data structure, API change, unit tests, implementation, migration script, documentation, and review.&lt;/p&gt;
&lt;p&gt;Each node should have clear input, output, acceptance, and context limits. When harness tools mature, these workflows can plug in directly.&lt;/p&gt;
&lt;h2 id=&#34;hardware-is-not-the-first-priority&#34;&gt;Hardware is not the first priority
&lt;/h2&gt;&lt;p&gt;Many discussions of Token Efficiency jump to local deployment and GPUs. For most people, API should still be the first choice.&lt;/p&gt;
&lt;p&gt;Before the economic model works, local hardware is only prepaid cost. A safer sequence is:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Use API to validate the workflow.&lt;/li&gt;
&lt;li&gt;Record task evaluation and cost.&lt;/li&gt;
&lt;li&gt;Find stable high-frequency execution nodes.&lt;/li&gt;
&lt;li&gt;Consider which nodes should be localized.&lt;/li&gt;
&lt;li&gt;Then calculate hardware, power, maintenance, and depreciation.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For personal productivity, API is often enough. For startups exploring inference frameworks and model boundaries, local CUDA platforms can be useful. For production workloads with clear unit economics, multi-GPU deployment becomes worth discussing.&lt;/p&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary
&lt;/h2&gt;&lt;p&gt;Token Efficiency is not replacing expensive models with cheap ones. It is redesigning the AI workflow.&lt;/p&gt;
&lt;p&gt;Big models make key judgments, small models execute in bulk, the harness schedules and validates, and humans define goals and acceptance. Only when these layers work together can tokens reliably become productivity.&lt;/p&gt;
&lt;p&gt;Models will get cheaper, context windows will grow, and small models will improve. The future gap may not be who calls the strongest model, but who can use the same tokens to produce more real output.&lt;/p&gt;
</description>
        </item>
        <item>
        <title>Drop MCP? Why CLI Is Becoming the Default Tool Layer for Agents</title>
        <link>https://knightli.com/en/2026/04/10/mcp-vs-cli-for-agents/</link>
        <pubDate>Fri, 10 Apr 2026 21:55:12 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/04/10/mcp-vs-cli-for-agents/</guid>
        <description>&lt;p&gt;Over the last year, debates about agent toolchains have increasingly centered on one question:&lt;/p&gt;
&lt;p&gt;Does MCP (Model Context Protocol) make tool calling simpler, or does it make simple tasks more complex?&lt;/p&gt;
&lt;p&gt;For most day-to-day engineering tasks, CLI is becoming the more practical default.&lt;/p&gt;
&lt;h2 id=&#34;cost-gap-is-not-a-ux-issue-but-an-order-of-magnitude-issue&#34;&gt;Cost gap is not a UX issue, but an order-of-magnitude issue
&lt;/h2&gt;&lt;p&gt;The biggest practical pressure in MCP is token overhead.&lt;/p&gt;
&lt;p&gt;In common scenarios, MCP often has to load large tool schemas before actual execution. Using a GitHub MCP Server as an example, initialization alone can consume tens of thousands of tokens. For long tasks, this directly squeezes context budget.&lt;/p&gt;
&lt;p&gt;Community benchmarks keep pointing to the same conclusion:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Single MCP calls commonly cost several to dozens of times more than CLI&lt;/li&gt;
&lt;li&gt;Retry recovery is also more expensive (reconnect plus context reload)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is not just &amp;ldquo;a little slower.&amp;rdquo; It scales into API cost, latency, and reliability issues.&lt;/p&gt;
&lt;h2 id=&#34;why-models-are-naturally-better-at-cli&#34;&gt;Why models are naturally better at CLI
&lt;/h2&gt;&lt;p&gt;A frequently overlooked fact is training distribution.&lt;/p&gt;
&lt;p&gt;LLMs have seen massive amounts of terminal text during training: commands, outputs, errors, scripts, and man pages. In other words, CLI interaction is already close to the model&amp;rsquo;s native input pattern.&lt;/p&gt;
&lt;p&gt;By contrast, MCP&amp;rsquo;s JSON-RPC and tool schema style became widespread only in recent years. Models can learn it, but familiarity and compression efficiency are often still weaker than long-established CLI patterns.&lt;/p&gt;
&lt;p&gt;That also explains why, in many cases:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;for the same goal, CLI commands are shorter&lt;/li&gt;
&lt;li&gt;outputs are easier to continue reasoning over&lt;/li&gt;
&lt;li&gt;error recovery paths are more stable&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;security-and-isolation-mcp-still-has-catching-up-to-do&#34;&gt;Security and isolation: MCP still has catching up to do
&lt;/h2&gt;&lt;p&gt;MCP is not incapable of security, but its ecosystem is still early.&lt;/p&gt;
&lt;p&gt;Common concerns today include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Tool Poisoning in descriptions&lt;/li&gt;
&lt;li&gt;behavior drift (Rug Pull)&lt;/li&gt;
&lt;li&gt;same-name tool override (Shadowing)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;CLI also has security risks (injection, privilege misuse, path risks), but its process model, permission boundaries, and audit chain have been validated through decades of engineering practice. In production, that predictability matters.&lt;/p&gt;
&lt;h2 id=&#34;this-does-not-mean-mcp-has-no-value&#34;&gt;This does not mean MCP has no value
&lt;/h2&gt;&lt;p&gt;I do not think MCP should be abandoned.&lt;/p&gt;
&lt;p&gt;A more reasonable positioning is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;CLI handles the execution layer (local, low-latency, high-frequency calls)&lt;/li&gt;
&lt;li&gt;MCP handles the connection layer (remote service discovery, unified auth, audit, and multitenancy)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That is the commonly discussed hybrid architecture: &lt;code&gt;CLI + MCP Gateway&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;When integrating many remote systems and enforcing unified governance and compliance, MCP still has clear value. But for helping agents complete engineering work quickly, CLI-first usually better matches current model capability boundaries.&lt;/p&gt;
&lt;p&gt;In today&amp;rsquo;s engineering reality, CLI is closer to an agent&amp;rsquo;s working native language; MCP is better positioned as a connection protocol rather than the only execution protocol.&lt;/p&gt;
</description>
        </item>
        
    </channel>
</rss>
