Premises for the deep_think Implementation — The Goal Is Structuring Decisions, Not Extracting CoT

deep_thinkを意思決定用scratchpadとして設計する方針を示す図

To state the conclusion first: deep_think to be added to OpenClaw is not designed as “a device for extracting the AI's hidden Chain of Thought,” but as a scratchpad for decision-making. That is the fundamental premise I settled on at the outset.

The purpose is on the practical side: when OpenClaw makes a difficult judgment, have it sort out the following four points all at once.

現在分かっていること
不確かなこと
追加調査すべきこと
次に取るべき行動

This time, I take the idea explored in my previous article and apply it to my own news-collecting agent. This article is the design stage before implementation; operational verification will follow in later posts.

[Image: a diagram illustrating the design principles of deep_think]

Where to Insert the Thinking Step in the News Collection Flow

OpenClaw's current news collection basically follows this flow.

ニュース候補発見
↓
記事取得
↓
内容を評価
↓
採用 / 不採用
↓
記事生成

Here, I wedge deep_think and verify into the flow.

ニュース候補発見
↓
記事取得
↓
deep_think
↓
追加調査
↓
verify
↓
採用 / 不採用
↓
記事生成

The key point is not to run deep_think every single time. If it thinks through every news item, even trivial articles incur thinking costs, inflating processing time and tokens. Narrowing the trigger conditions is the crux of the design.

When to Use deep_think — and When Not To

deep_think is triggered only in cases like the following.

複数の情報源で内容が食い違う
一次情報が見つからない
confidenceが低い
発表日が分からない
同じニュースか別ニュースか判断できない
次に取れる行動が複数ある
重要度判定が微妙
外部へ変更を加える直前

Conversely, if the following conditions are all met, deep_think is not called and the flow simply proceeds.

公式発表あり
内容が明確
日付確認済み
複数ソース一致

In short, the aim is to “spend extra thinking cost only on hard jobs.” If the conditions are too loose, it fires on every single item; if too strict, it becomes unclear why it was added at all. As I discuss later, once this is actually running, I will check the usage rate itself in the logs.

Don't Leave the Output as Free-Form Text — Make It Write into Structured Fields

deep_thinkの構造化出力フィールドの一覧図

I want to avoid simply handing deep_think a “think carefully” instruction. Even if it produces a long monologue, that is hard to handle mechanically in the next processing step.

So I structure the output — for example, in a form like this.

deep_think({
  "current_assessment": "",
  "confirmed_facts": [],
  "uncertainties": [],
  "conflicting_evidence": [],
  "missing_information": [],
  "options": [],
  "recommended_next_action": "",
  "confidence": 0.0
})

recommended_next_action is especially important. deep_think does not stop at thinking. Have it decide what to do next, and the workflow moves forward.

[Image: a diagram showing the structure of deep_think's structured output]

A Concrete Example — Processing News with Conflicting Announcement Dates

Suppose OpenClaw finds news that “OpenAI has announced a new model.” One article says “announced on August 21,” while another says “released on August 22.” In this case, deep_think is invoked.

As a result, it is made to return a judgment like the following.

confirmed_facts:
- 新モデルが公開された

uncertainties:
- 正式な発表日時

conflicting_evidence:
- Source A: Aug 21
- Source B: Aug 22

missing_information:
- OpenAI公式発表

recommended_next_action:
- 公式サイトを確認する

confidence:
- 0.62

The next action is then clearly determined: “search the official OpenAI website.” The advantage of this structure is that it prevents an ambiguous judgment from flowing into the next stage.

verify Becomes a Separate Tool — Thinking and Verifying Have Different Goals

At first, I thought it would be fine to let deep_think handle everything. But once I sorted things out, “thinking” and “verifying” turned out to have different purposes. So I made verify independent.

For news verification, verify looks at items like the following.

一次情報は確認したか
発表日は確認したか
記事公開日とイベント発生日を混同していないか
数字は一致しているか
引用元は実際にその内容を言っているか
古い情報を最新情報として扱っていないか

An output at about this level is sufficient.

verify({
  "primary_source_found": true,
  "date_verified": true,
  "factual_conflicts": [],
  "unsupported_claims": [],
  "status": "PASS"
})

status is narrowed down to about three values: PASS, RESEARCH_MORE, and REJECT. The simpler the verdict, the easier later aggregation and log analysis become.

plan Is Used Only for Complex Tasks with Three or More Steps

I gave plan some thought as well, but it does not seem necessary for every task. I limit it to complex jobs with three or more steps.

For example, a task like “research this AI service's features, pricing, supported models, API, and competitors” would follow this flow.

plan
↓
公式サイト
↓
料金
↓
ドキュメント
↓
競合
↓
deep_think
↓
verify

On the other hand, for processing a single simple news article, plan is skipped. The premise is to use tools as the purpose demands; stuffing a tool into every step only makes the workflow heavier.

Final PoC Configuration — Why I Narrowed It Down to Three Tools

plan・deep_think・verifyの3ツールの構成図

For the initial PoC, I judged that just the following three are enough.

plan()
deep_think()
verify()

The roles are divided as follows.

plan     → どう調べるか
deep_think → どう判断するか
verify   → 判断は正しいか

Things like final_review will be added once they become necessary. Adding too many tools from the start risks putting the cart before the horse: a mechanism meant to make the agent smarter ends up making it more complicated.

[Image: a diagram showing the three-tool configuration of plan, deep_think, and verify]

Logging Decision History — Eliminating “It Kind of Feels Better”

In this experiment, log design matters too. For each news item, for example, keep data like the following.

{
  "deep_think_used": true,
  "reason": "source_conflict",
  "additional_searches": 2,
  "confidence_before": 0.58,
  "confidence_after": 0.91,
  "verify": "PASS"
}

Why go this far? Because “it somehow seems to have gotten better” is meaningless. To talk about effects in numbers, you need records in a form that allows comparison.

What I want is not a mass of long-form reasoning. What I want is the decision history: what was uncertain, what was investigated further, what evidence led to adoption, and what the final confidence was. Implementations like internalcot also do not directly obtain native hidden reasoning — they have the agent itself write explicit, visible memos, which fits this way of thinking well.

Why “Think Harder” in the System Prompt Is Not Enough

Without building a tool like deep_think, simply writing “Always think deeply before answering” in the system prompt may appear, at a glance, to accomplish the same thing.

However, with that approach, the following information ends up separated from the workflow.

いつ追加検索したのか
なぜ追加検索したのか
何に不確実性を感じたのか

Make it a tool, and it remains as a record of actions.

Search
↓
Think
↓
Search
↓
Verify

Having this “thinking” appear in the history as an action in its own right is a big deal. When debugging an AI agent, being able to trace what was decided at which point is a considerable advantage.

Pinpointing Where the Agent Failed — An Example of Reading Causes from Logs

As a side effect of this design, identifying the cause of failures becomes easier. Suppose the agent generated an incorrect article.

Traditionally, all you could do was guess afterward: “Why did it get it wrong?” But what if the logs contained a record like this?

confidence: 0.91
primary_source_found: false
verify: PASS

verify returned PASS even though no primary source was found. In other words, the problem is likely not in the search step but in verify's judgment criteria.

This is significant. It becomes easier to pinpoint where an AI agent failed — from records, not gut feeling. The value of turning thinking into a tool lies not only in creating a place to think, but also in making the results of that thinking observable.

This Idea Connects to Harness Engineering

In recent AI development, the idea of improving the mechanisms surrounding the model — rather than the model itself — has become increasingly important. This is the so-called Harness Engineering perspective.

Just listing the design targets gives you items like these.

どんなツールを与えるか
どの情報をコンテキストに入れるか
いつ検索するか
どこで検証するか
どうログを残すか

Even with the same model, results change depending on this design. Earlier research such as ART has also shown a direction of drawing out the capabilities of a fixed LLM by combining reasoning and tool use, and I see this experiment as lying on that same line.

The Initial PoC — A Plan for A/B Comparison on 50 Items

I have no intention of putting this into production from the start. First, the target is around 50 news items. Using the same model and the same news candidates, I run the following two tracks.

A: 現在のOpenClaw
B: deep_think + verify版

The items to compare are as follows.

正確性
重複
取りこぼし
検索回数
処理時間
トークン
コスト

Only after going this far can I judge whether deep_think truly has value. Rather than being satisfied with having built a tool, I judge by results.

Conclusion: The Essence Is Not Building Tools, but Whether Results Actually Improve

What I settled on at this stage are the division of roles among plan, deep_think, and verify, along with the trigger conditions, structured output, and log design for decision history.

What matters, though, is not building the tools themselves. It is whether they actually make the results better.

If accuracy barely changes and the cost is “+40% tokens, +35% processing time,” there is little value in adopting it. Conversely, “−30% misinformation, −40% duplicates, +8% cost” would be quite attractive.

Next time, I will design the experiment methodology itself: under what conditions I will judge that “it worked.”

References: morluto/internalcot, ART: Automatic multi-step reasoning and tool-use for large language models, RecThinker