跪拜 Guibai
← Back to the summary

Dewu's 'TuiChaCha' Agent Turns Recommendation-System Debugging Into a Self-Learning Assembly Line

This article is a technical record compiled from a presentation by Dewu technical experts at AICon Shanghai.

It is the middle installment of the 'Dewu Recommendation AI Harness Engineering Practice Series,' a three-part serial. This installment (the middle) further details the complete technical system for AI code generation, protection verification, and safe deployment in Dewu's complex recommendation business scenarios. It covers the overall architecture framework of the self-developed AI Harness, the full-process safety protection mechanism, the core algorithm implementation of the hybrid agent, and the practical details of industrial-grade engineering implementation.

1. Past and Present: From 'Manual Troubleshooting' to 'Systematic Accumulation'

'A notification sound rings, and an abnormal recommendation case alert is pushed. On the screen is an anomalous recommendation case; behind the screen, developers face the thorny problem of massive trace logs. Recall, coarse ranking, fine ranking, strategy filtering... In this multi-layered logical maze, every filter_code or abnormal score is like a puzzle to be solved. In the past, we relied heavily on individual experience, even requiring multi-party consultations, to dig out the hidden 'landmine' from the dense code. If logical coupling or experimental conflicts were involved, the troubleshooting process was no different from a long marathon, which was not only inefficient but also trapped the team in low-efficiency, repetitive manual labor. Under this deep black-box operational pressure, developers were always passively handling various online emergencies.'

Now, the emergence of 'TuiChaCha' is ending this era of blind troubleshooting. It is the 'autonomous driving diagnostic expert' in the recommendation system domain, making complex algorithmic logic transparent, traceable, and predictable. From today onwards, say goodbye to late-night anxiety and let the recommendation system truly enter the 'white-box era'! The anxiety of recommendation system troubleshooting is, in essence, knowledge asymmetry and information fragmentation.

Breaking the Ceiling: The 'Three Cognitive Dilemmas' of Traditional Recommendation Diagnostic Solutions

In the exploration of automated troubleshooting, we have implemented various technical solutions and summarized three typical limitations common in traditional architectures:

2. The Solution: 'TuiChaCha' Takes the Stage

In the early construction phase of 'TuiChaCha,' we deeply weighed the options: customize based on a general open-source framework, or adopt the more engineering-certain OpenClaw? Ultimately, we chose the latter, aiming to bridge the 'last mile' of landing intelligent diagnosis in a production environment:

3. Highway and ATV, the 'Fast' and 'Thorough' Dual Modes of Diagnosis

In system design, developers often face a choice: pursue a linear logic for ultimate response speed, or pursue autonomous intelligence for deep reasoning? Our answer is: refuse to compromise, embrace both. Based on this concept, 'TuiChaCha' has built a unique 'Highway & ATV' hybrid agent architecture. It is not a simple stacking of two modes, but a deep integration of efficiency and intelligence.

The key lies in the intermediate intelligent scheduler (judgment engine). When a user's question comes in, it first quickly matches against the knowledge base. If a standard Story is hit, it takes the Highway; if no match is found or the Highway execution gets stuck, it immediately switches to ATV mode. Dual-track complementarity and intelligent switching ensure that any problem has a path to follow and a method to use.

'TuiChaCha' Highway & ATV Dual-Track Architecture Diagram

The left side's highway handles common problems, the right side's off-road vehicle tackles complex anomalies, and the middle intelligent scheduler achieves seamless switching.

4. Core Technology Dissection: A Hardcore Breakdown from Principle to Implementation

Having told the story of the 'AI diagnostic expert,' it's time to open the hood and see how this 'diagnostic sports car' actually runs.

Story Foundation: Atomic Skills

We have built a set of Skill tools based on internal APIs that follow the MCP standard (due to data security issues, they were not uploaded to the company's Skill library). This tool library acts like a 'universal interface' for recommendation capabilities, not only supporting the precise scheduling of the current Agent but also forming a reusable skill base. Through simple field adaptation, this capability can rapidly radiate to scenarios like communities and advertising (welcome to communicate), becoming a 'booster' for various fields to quickly launch their own Agent capabilities. Several core Skills are introduced below:

These Skills are like Lego bricks; Highway's scripts can be assembled in order, and ATV's reasoning engine can call them on demand. Need a new troubleshooting capability? Just encapsulate another Skill and add it in—hot-swappable, no downtime.

Highway Story Orchestration: Script-Driven Deterministic Execution

The core of the Highway mode is the Story mechanism — solidifying an expert's troubleshooting path into a reusable standard script. Each Story is essentially an ordered Skill orchestration template, defining a standard execution path.

Story Structure Example:

Story: Product Recommendation Anomaly - Standard Diagnosis ├── Step 1: screenshot-trace-query # Screenshot recognition, auto-match Trace ├── Step 2: user-profile-query # Check user purchase/click history ├── Step 3: layer-items-query # Check product exposure at each layer ├── Step 4: strategy-logs-query # Verify strategy intervention (dedup/filter) ├── Step 5: commodity-forward-query # Check product forward index info └── Step 6: output_diagnosis # Output diagnostic conclusion

Core Features of Story:

How Stories are Born:

This is the essence of 'Highway' — turning the 'experience' in an expert's mind into an executable, reusable, and evolvable standardized script.

ATV's ReAct Loop: Giving AI 'Rules to Follow'

The ATV mode uses the OpenClaw framework to implement the classic ReAct loop:

Question → Thought → Action(Skill) → Observation → Final Answer

But an 'unbridled' AI easily falls into an infinite loop, like getting lost in a maze and obsessively exploring every fork, forgetting to find the exit. We equipped it with three constraints.

Auxiliary Diagnosis: Vector Retrieval in the Knowledge Base

As TuiChaCha deepened its involvement in the business, the accumulation of technical documents, code architecture, and business memory became a bottleneck. For example, the recall channel TIDE, it didn't know it was the tidal recall for the homepage waterfall flow, and would only interpret it literally as a non-personalized recall based on site-wide popularity/trends; simultaneously, traditional RAG solutions had obvious shortcomings in code understanding and cross-scenario association. We explored a hybrid architecture of 'Context Engine + Knowledge Graph.'

Core Components

OpenViking is not a traditional RAG tool, but a local context engine centered on 'context-driven,' integrating memory storage, document indexing, semantic retrieval, and multi-Agent isolation and sharing. It mainly serves AI application scenarios requiring long-term memory, large-scale document retrieval, and multi-Agent collaboration, and is particularly adapted to the OpenClaw plugin ecosystem, solving problems like weak native memory retrieval and difficulty in multi-Agent data isolation.

Graphify (often called Graphify Viki by the community) is an open-source tool that exploded in popularity in 2026. Its core positioning is to transform local folders (code, documents, images, etc.) into a knowledge graph of 'entities + relationships,' focusing on extreme token saving, code engineering understanding, and multi-modal adaptation, precisely compensating for OpenViking's shortcomings in deep parsing of technical documents.

We used the combination of OpenViking + Graphify to reconstruct the construction logic of the local knowledge base — OpenViking is responsible for 'managing memory, managing collaboration, managing retrieval,' while Graphify is responsible for 'doing structuring, doing parsing, doing simplification.' The synergy of the two achieves:

The entire knowledge base content is divided into three layers by detail level, loaded on demand to avoid context bloat.

In the past, troubleshooting was a two-step process: manually locate the problem, then independently look up the solution. Now, AI completes root cause identification and repair guidance in one stop, simultaneously providing the anomaly location and the corresponding execution plan. For example: it won't just coldly tell you: 'Conclusion: Blocked by the deduplication strategy.' It will combine the company's business Wiki and SOP manual to add: 'Action Suggestion: Please go to the product management platform to confirm and check if the product ID was mistakenly added to the 'Product Search/Recommendation Blacklist'.' It has paved the last mile from diagnosis to repair for you. Now, for many simple problems, product and operations colleagues can figure them out themselves, and we are finally freed from the work of 'repetitive Q&A.'

Subsequent Optimization Points: The way we currently use the knowledge base is semantic triggering. When asking TuiChaCha a question, as long as the question involves memory retrieval or background knowledge queries, OpenViking is automatically triggered. This method has a triggering strategy problem; TuiChaCha 'doesn't know when to check documents' or 'checks when it shouldn't, and doesn't check when it should.' There are a few ideas now, to be explored and tested for effectiveness later, and everyone is welcome to discuss:

Evolution Layer: The Full Evolution Process from 'Troubleshooting Records' to 'General Methodology'

The core of the evolution layer is the three-stage closed loop of 'Reflection - Abstraction - Verification,' referencing Hermes' self-evolution mechanism, allowing the system to learn 'general methodology' from 'troubleshooting records':

Step 1: Trajectory Pruning and Efficiency Purification

Step 2: Feature Dimension Elevation and Logic Generalization

Step 3: Story and Skill Generation

Step 4: Sandbox Dry Run and Admission Verification

From then on, every time the system solves a new problem, it automatically learns a new skill and automatically optimizes existing skills. Knowledge no longer gets lost with personnel changes but is systematically accumulated within the system. It truly achieves 'the more it's used, the smarter it gets,' evolving from a 'tool' into an intelligent agent with 'diagnostic capability.'

Why Didn't We Directly Copy Hermes?

Actually, before Hermes came out, we already had a preliminary daily summary and reflection mechanism, but Hermes still gave us great inspiration, especially its 'reflection-distillation' mechanism. However, in the production environment of a recommendation system, what we need is 'deterministic evolution.'

Our evolution layer has its own 'TuiChaCha characteristics':

Senior Engineer's Note: 'True evolution is not blindly pursuing automation, but achieving the streamlined accumulation of knowledge while maintaining system determinism.'

5. Real-World Case: Diagnosis of Duplicate Product Recommendations

This is a real case from the internal testing group: 'Why does it keep pushing phone cases to me?' TuiChaCha automatically executes the diagnostic process.

Story: Product Recommendation Anomaly - Standard Diagnosis ├── Step 1: screenshot-trace-query # Screenshot recognition, auto-match Trace ├── Step 2: user-profile-query # Check user purchase/click history ├── Step 3: layer-items-query # Check product exposure at each layer ├── Step 4: strategy-logs-query # Verify strategy intervention (dedup/filter) ├── Step 5: commodity-forward-query # Check product forward index info └── Step 6: output_diagnosis # Output diagnostic conclusion

Diagnostic Conclusion (AI Auto-Generated):

6. Final Words: When AI Becomes the System's 'Diagnostic Expert'

Looking back at the growth path of 'TuiChaCha,' it is not just a troubleshooting tool. It is an intelligent diagnostic system with diagnostic capability, learning ability, and even some 'practical experience.' It frees us engineers from the repetitive, inefficient, and uncertain 'metaphysical debugging,' allowing us to focus more on the iteration and innovation of the algorithms themselves. Of course, 'TuiChaCha' is still continuously growing and iterating, and occasionally there are still some unexpected answers. Its significance lies in the fact that we are starting to use AI to solve the most troublesome troubleshooting problems of the recommendation system itself. This might be a feasible path towards AI for System, and even autonomous operation and maintenance in the future AGI era. The next step, we can expect it to move from 'diagnosis' to 'prevention,' issuing warnings before problems occur.

Isn't the essence of technological development to free people from tedious, repetitive labor so they can engage in more creative work? 'TuiChaCha' has brought us one small step closer to this goal.

Past Reviews

  1. From Wild Code to Goal-Oriented Production: Engineering Practice of Dewu's Recommendation AI Harness | AICon Speech Compilation

  2. Dewu OceanBase Implementation Practice

  3. AI UITester: A New Paradigm for AI-Native UI Automation Testing | Dewu Technology

  4. From Forms to Agents: The AI Practice Path for Building Dewu Community Activities

  5. From Tracking Requirements to Rule Assets: Hermes Agent Reconstructs Dewu's Data Warehouse Workflow

Text / Yan Yang

Follow Dewu Technology for weekly technical干货 (practical content)

If you find the article helpful, feel free to comment, forward, and like ~

Reproduction without permission from Dewu Technology is strictly prohibited, otherwise legal liability will be pursued according to law.