Manuscript Offprint
arXiv:2611.06777WISE: An Agentic Framework for Whole-page Multimodal Search Experience Attribution
Abstract
Algorithm-driven services, including search, recommendation, and advertising, rely on multi-stage model pipelines. While research prioritizes model optimization, post-deployment monitoring focuses on operational reliability. Yet operationally healthy systems may still produce poor-quality results, exposing a gap in existing evaluation and monitoring practices. However, a systematic problem formulation and benchmark for this task remain lacking. To bridge this gap, we formulate System Quality Diagnosis (SQD) for algorithm-driven services, a new task that extends quality evaluation beyond identifying poor outcomes to attributing their causes across system components. Focusing on industrial search, we propose WISE, an agentic framework for end-to-end quality diagnosis that discovers user-facing issues and traces their origins to underlying algorithmic components. To improve diagnostic reliability, we introduce ReTrace for constructing evidence-consistent trajectory supervision and Adaptive Harness–Policy Optimization (AHPO) for failure-guided optimization of the agent harness and model policy. To enable systematic evaluation, we construct WISE-BENCH, a real-world multimodal search benchmark that combines user-facing evidence, internal pipeline traces, and expert diagnosis annotations. Extensive experiments show consistent gains across model scales, with WISE achieving 75.20% end-to-end accuracy on Qwen3.5-35B-A3B. In production, WISE supports quality auditing, online quality assurance, and model optimization, reducing diagnosis costs and improving downstream relevance models.
Keywords: System Quality Diagnosis; Search Quality Evaluation; LLM Agents; Agent Optimization.
1 Introduction
Modern algorithm-driven services, including search, recommendation, and advertising, rely on multi-stage pipelines of learned models [4, 17]. While research has extensively studied model evaluation and optimization, post-deployment monitoring primarily focuses on operational reliability, such as latency, availability, and errors. Yet operationally healthy systems may still produce poor-quality outcomes. For example, a search request may successfully pass through retrieval and ranking while returning results that fail to satisfy user intent. Such failures highlight a gap between ensuring that a system operates correctly and understanding whether it delivers high-quality results, as well as where quality problems originate.
Existing studies have advanced quality evaluation and optimization for algorithm-driven services [3, 7], while recent agentic RCA methods focus on diagnosing operational failures [1, 23]. However, a unified formulation and benchmark for diagnosing outcome-quality failures remain lacking. To bridge this gap, we formulate System Quality Diagnosis, SQD extending quality evaluation beyond identifying poor outcomes to attributing their causes across system components. Unlike conventional fault diagnosis, SQD must recognize implicit, context-dependent quality issues and investigate their origins across interacting algorithmic components. Similar quality problems may arise from different stages, while heterogeneous internal evidence may require different investigation paths. These characteristics make SQD a challenging task that demands both semantic quality understanding and evidence-grounded reasoning.
To address these challenges, we propose WISE, an agentic framework for end-to-end quality diagnosis in industrial search. WISE integrates multimodal quality assessment with internal evidence investigation through a structured diagnostic workflow, supported by an LLM policy and an execution harness. However, building a reliable diagnostic agent presents further challenges. Expert annotations provide diagnostic outcomes but lack the execution trajectories required for agent training. We therefore introduce ReTrace, which constructs evidence-consistent supervision through trajectory repair. Moreover, diagnostic failures may arise from either incorrect model decisions or limitations in the execution harness. To address these distinct failure modes, we propose Adaptive Harness–Policy Optimization (AHPO), which adaptively optimizes the agent policy or harness based on localized diagnostic failures.
To bridge the gap between search quality evaluation and pipeline-level diagnosis, we introduce WISE-Bench, a real-world multimodal search benchmark combining user-facing evidence, internal pipeline traces, and expert diagnostic annotations. Extensive experiments demonstrate the effectiveness of WISE across model scales and validate the contributions of ReTrace and AHPO. Furthermore, WISE has been deployed
These authors contributed equally to this work.
Corresponding author: zhuojw@gmail.com.
in production for quality auditing, online quality assurance, and model optimization, demonstrating its practical value in improving search quality and operational efficiency.
The main contributions of this paper are:
-
We formulate SQD and introduce WISE-BENCH to jointly evaluate the discovery of quality issues and the attribution of their causes to internal system components in industrial search.
-
We develop WISE for agentic diagnosis, together with Re-Trace for evidence-consistent trajectory supervision and AHPO for failure-guided harness-policy optimization.
-
We demonstrate substantial diagnostic gains across model scales and validate the practical value of WISE in production search quality auditing, online quality assurance, and model optimization.
2.1 Quality Evaluation and Optimization
Existing studies have extensively explored quality evaluation in search and recommendation systems [25]. Recent benchmarks, including M-BEIR, MMSearch-Plus, and SVFSearch, evaluate multimodal retrieval and agentic search capabilities [13, 20, 21]. Recent methods leverage LLMs to assess user-facing quality, such as BloomIntent [3], which evaluates search results against fine-grained user intents. Beyond evaluation, agentic frameworks increasingly connect quality assessment with optimization. A case-driven multi-agent framework [7] automates bad-case analysis and resolution in e-commerce search. Self-EvolveRec [10] combines qualitative user feedback with internal model diagnosis to guide recommendation optimization, while SR-Agent [24] refines post-ranking strategies based on identified experience issues. Despite these advances, existing search benchmarks primarily evaluate user-facing outcomes, lacking the internal pipeline evidence and attribution annotations needed for system-level quality diagnosis.
2.2 Root Cause Analysis
Root cause analysis (RCA) has been widely studied for diagnosing failures in complex software systems. Traditional methods, such as MicroRCA [22], localize performance anomalies through system metrics and dependency information. Recent LLM-based approaches, such as RCACopilot [1], further automate incident diagnosis. Meanwhile, OpenRCA, OpenRCA 2.0, ORCA-bench, and AIOpsLab provide benchmarks and environments for evaluating automated fault diagnosis using heterogeneous operational evidence [2, 5, 8, 23]. However, these works primarily focus on operational failures rather than the quality of algorithmic outputs. In contrast, SQD requires identifying semantic quality issues from multimodal search results and attributing them to internal algorithmic components. Existing benchmarks therefore do not jointly evaluate
user-facing quality issue discovery and evidence-grounded pipeline attribution.
2.3 Agent Training and Optimization
Process supervision studies feedback beyond final answers [11]. Search-R1 and ReTool learn search and tool-use behavior through reinforcement learning [6, 9], while Agent Lightning separates agent execution from policy training [12]. We use GRPO for policy optimization [19], with endpoint-supervised trajectory repair providing the initial SFT data. Unlike unrestricted regeneration, repair preserves the observations in a recorded execution and revises the supported decision. Causal Agent Replay attributes failures through intervention and re-execution [18]. Our failure analyzer instead identifies the earliest supported error from the observed trace; without counterfactual replay, this localization does not establish a causal effect.
3 Problem and Benchmark
3.1 Problem Formulation
We formulate SQD as the task of identifying quality issues in the outputs of algorithm-driven services and attributing their causes to underlying system components using available evidence. In this work, we instantiate SQD in industrial search. A search case is denoted by , where is the query, is the request time, is the search scenario or source, and is the displayed result list in exposure order. We distinguish two sources of evidence. Experience evidence describes the request and user-facing result content, including text, ASR, OCR, visual content, publication time, and author or source information. Pipeline evidence describes how the search system produces the displayed results, including candidate supply, recall paths, model scores, and stage-wise ranking information. Given a search case and the available evidence, search experience diagnosis aims to produce a structured diagnosis
where indicates whether the case contains an experience problem, is the set of problematic items, denotes the experience issues, denotes the pipeline attributions, and contains the supporting evidence.
3.2 WISE-BENCH
Existing search benchmarks focus on result quality but lack internal evidence for pipeline attribution [13, 20, 21], while RCA benchmarks primarily target operational failures rather than search quality issues [2, 5, 8, 23]. To bridge this gap, we construct WISE-Bench with 12,000 real-world search cases, integrating multimodal experience evidence, pipeline traces, and expert annotations to support problem discovery, pipeline attribution, and end-to-end diagnosis.

Figure 1: Construction and evaluation of WISE-BENCH. Experts first label experience issues from request and content evidence, then inspect internal traces to annotate pipeline problems. The resulting labels support discovery, attribution, and end-to-end evaluation.
3.2.1 Data Selection
WISE-Bench is constructed from Kuaishou online search requests. The requests are randomly sampled from the main search scenario of a large-scale short-video platform between July 1 and July 10. Each case contains the query, request time, search scenario, and displayed top-10 results. We collect two types of evidence. Experience evidence includes text, OCR, ASR, visual content, publication time, and author information. Pipeline evidence includes candidate supply, recall channels, model scores, and stage-wise ranking positions. We exclude records with missing or corrupted metadata, incomplete user-facing content, or inconsistent identifiers that prevent reliable linkage to pipeline traces. Queries that are clearly nonsensical or contain no meaningful search intent are excluded during data filtering to ensure reliable quality assessment.
3.2.2 Data Annotation
As illustrated in Figure 1, WISE-Bench adopts a two-stage annotation protocol that separates experience assessment from pipeline attribution. In the first stage, annotators use only user-facing evidence to identify query-, case-, and item-level issues, including query ambiguity, page redundancy, problematic items, and their experience issues. In the second stage, annotators inspect internal pipeline traces to attribute confirmed problems. System-level failures, such as insufficient candidate supply or recall failures, are attributed at the case level without further item-level attribution. Otherwise, problematic items are attributed to relevance scoring, ranking, or reranking based on execution evidence. Annotations are finalized through majority voting and disagreement resolution. WISE-Bench contains 12,000 annotated cases, split into
8,000 training, 2,000 validation, and 2,000 test cases. Detailed annotation criteria and examples are provided in Appendix A.
3.2.3 Evaluation Tasks
WISE-Bench contains multi-labels for experience issues and pipeline attribution. Since standalone page-level diversity issues are rare in the sampled traffic, our evaluation primarily focuses on case-level problem detection, item-level localization, and pipeline attribution. To systematically assess these capabilities, we define three core tasks: problem discovery, pipeline attribution, and end-to-end diagnosis.
Problem discovery. Given a search case and its experience evidence, the system predicts whether the result page contains an experience problem and identifies the problematic items. We report Case Accuracy over all search cases, including both normal and bad cases, and Item Accuracy over all displayed items. We additionally report Bad-item Exact Match, which measures the proportion of gold bad cases for which the predicted problematic-item set exactly matches the ground truth, with neither missing nor falsely identified items.
Pipeline attribution. Given gold problematic items and their pipeline evidence, the system predicts the responsible pipeline components. Providing gold items isolates attribution capability from upstream discovery errors. We report Item Attribution Accuracy over all gold problematic items with evaluable attribution labels. We also report Case Attribution Exact Match over cases containing at least one such item; a case is counted as correct only if every evaluated problematic item within it is correctly attributed.
End-to-end diagnosis. The system receives the original search case and performs the complete diagnosis without gold

Figure 2: Overview of the WISE framework. The bottom row shows the staged analysis process, while the agent harness coordinates model inference, context construction, evidence access, state management, and validation throughout execution.
problematic items. Let denote all test cases, including normal and bad cases. Let and denote the gold and predicted problem-presence indicators, and and the gold and predicted problematic-item sets, respectively. Let indicate whether all case-level and item-level attributions match the gold annotations, excluding gold-unresolved fields from this comparison. We compute
A case is correct only if its problem-presence label, problematic-item set, case-level supply/recall attributions, and all gold-item attributions are correct. For normal cases, this requires predicting no problem, an empty problematic-item set, and no case-level attribution. E2E EM focuses on problem localization and component attribution. Fine-grained issue labels are excluded to evaluate this core objective separately from issue categorization. Supporting evidence is excluded because different valid evidence sets may support the same attribution, making exact match against a single reference unsuitable for assessing evidence quality.
4 WISE Framework
4.1 Agentic Formulation
Search experience diagnosis is not a single-step prediction problem. It requires the system to first identify user-facing experience issues, then acquire the necessary internal evidence and attribute confirmed issues to specific stages of the search pipeline. These decisions depend on different sources of evidence and may involve intermediate reasoning and tool interactions, making the task naturally suited to an agentic formulation. Based on this formulation, we propose WISE, a diagnostic agent represented as
where is the LLM policy and is the agent harness. As illustrated in Figure 2, reasons, diagnoses, and selects actions, while manages context, available evidence, tools, state, and validation.
The bottom of Figure 2 shows how the agent executes search experience diagnosis. WISE first discovers user-facing problems, consolidates the identified issues, and then performs pipeline attribution for confirmed issues before producing the final diagnosis. A key constraint throughout this process is the separation of evidence: problem discovery is performed using experience evidence only, while internal pipeline evidence is introduced only after an issue has been confirmed for attribution. The harness enforces this boundary by controlling the context and evidence available to the policy at each stage.
The same decomposition also provides the basis for optimizing WISE. As shown in Figure 2, a failed execution produces a diagnostic trace that is localized to the earliest supported failure. If the failure results from an incorrect decision under sufficient execution support, the policy is optimized; if the harness fails to provide the required evidence, action, or execution condition, the harness is revised. We detail the failure-driven optimization procedure in Section 4.3 and the agent workflow and harness implementation in Appendix B.
4.2 Policy Supervised Fine-Tuning
Expert annotations provide the desired diagnostic outcomes but do not contain the execution trajectories needed for agent policy training. To bridge this gap, we first employ a teacher model to generate agent execution trajectories by performing the complete diagnostic workflow, including intermediate decisions, tool calls, and evidence acquisition. However, these initial trajectories may contain incorrect decisions or deviate from the expert annotations. Directly using such trajectories for supervised fine-tuning may propagate diagnostic errors, while correcting only their final outputs can introduce inconsistencies with the evidence observed during execution. We therefore introduce ReTrace to construct evidence-consistent supervision through minimal trajectory repair.
Formally, an execution trajectory is represented as , where x is the search case, denotes a structured decision, a tool call, the corresponding observation, and y the final diagnostic output. Let g denote the corresponding expert annotation. For trajectories inconsistent with g, ReTrace identifies the earliest repairable decision and divides the trajectory into an immutable prefix and a repairable suffix. All decisions, tool calls, and observations preceding are preserved. Starting from , the teacher repairs the affected decisions and their downstream dependencies. When additional evidence is required, the teacher may introduce new tool calls, whose observations must be obtained through actual execution rather than generated or modified. The repaired trajectory is accepted only if its final diagnosis agrees with g and its decisions are supported by the evidence available at the corresponding execution steps.
The accepted repaired trajectories are then used to construct supervised training data for the student policy. For each corrected decision node, we extract a training pair , where h is the execution prefix available at that node and is the teacher-repaired response. The expert annotations serve as constraints for the teacher during repair but are excluded from the student's input. The student policy is initialized through autoregressive supervised fine-tuning:
This enables the student to learn diagnostic decisions grounded in actual execution evidence rather than merely imitating corrected final labels.
4.3 Adaptive Harness–Policy Optimization
After supervised fine-tuning, the diagnostic agent may still fail for different reasons. Some failures arise because the harness does not expose the required evidence, support the necessary action, or preserve the correct state. Others occur even when the execution environment is sufficient, because the policy misinterprets the available evidence or makes an incorrect decision. We therefore propose Adaptive Harness–Policy Optimization (AHPO), a failure-driven procedure that determines which optimization surface should be updated for each localized failure.
Starting from the current agent , we execute the complete diagnostic workflow on development cases and compare the resulting predictions with the benchmark annotations. For each failed case, a failure analyzer inspects the recorded execution trace and identifies the earliest observable decision that is inconsistent with the expected behavior and supported by the available evidence. The analysis records the erroneous node, the actual and expected decisions, the evidence available at that point, and the downstream outputs affected by the error. Missing evidence and suspected annotation problems are flagged separately rather than being forced into a model failure. The resulting localization is a trace-based account of error propagation, rather than a counterfactual causal claim.
Given a localized failure , the intervention router determines whether the next update should target the harness or the policy. We consider three conditions: whether the evidence required for the correct decision was accessible, whether the harness supported the required action, and whether the current state representation and schema could express and preserve the correct result. Let , , and denote these three conditions. The routing rule is
A HARNESS route indicates that the current execution framework prevents or obscures the correct decision. Such failures are grouped by shared mechanisms and converted into localized revisions of prompts, context construction, tool interfaces or boundaries, schemas, and validation or recovery rules. A POLICY route indicates that the required evidence and actions were available but the model nevertheless made an incorrect decision. These failures are collected as hard cases for the corresponding decision node and are combined with contrast cases near the decision boundary and anchor cases that the current policy already handles correctly. We use GRPO [19] for policy-routed updates while keeping the harness fixed. We adopt a schema-gated hierarchical reward with node-specific evaluation criteria:
where denotes the target diagnostic node, checks whether the output satisfies the required schema, measures the correctness of the primary diagnostic decision, and evaluates dependent fine-grained decisions. The primary decision receives a base reward of 1 when correct, while controls the contribution of fine-grained correctness and penalizes invalid outputs. The reward prioritizes primary decision correctness, granting fine-grained rewards only when the primary decision is correct. The evaluation criteria are adapted to the diagnostic task at each node.
Each intervention produces a candidate agent by updating either the harness with the policy fixed or the policy with the harness fixed. The candidate is re-evaluated through the complete diagnostic workflow using training and validation cases only; the held-out test set does not influence candidate acceptance. Updates are accepted only if they fix more cases than they regress, preserve all protected cases, and do not decrease case- or item-level accuracy on non-targeted evaluations. Rejected harness patches are reverted. The accepted agent becomes , after which the remaining failures are re-executed and localized again. In this way, harness revisions change the execution conditions under which subsequent policy decisions are made, while policy updates change the failure distribution that guides later harness revisions.
Table 1: Overall performance on WISE-BENCH (%). SFT uses ReTrace-constructed supervision. AHPO adaptively optimizes the harness and policy, while Harness Opt. updates only the harness with model weights fixed.
| Model | Method | Case Acc. | Item Acc. | Bad-item EM | Item Attr. Acc. | Case Attr. EM | E2E EM |
|---|---|---|---|---|---|---|---|
| Harness optimization (fixed model weights) | |||||||
| Kimi-K2.6 | Baseline | 67.95 | 72.29 | 44.86 | 25.63 | 16.23 | 48.55 |
| Harness Opt. | 73.05 | 79.84 | 49.57 | 30.15 | 23.67 | 51.60 | |
| GPT-5.6-Luna | Baseline | 64.25 | 69.95 | 39.41 | 41.82 | 20.32 | 50.10 |
| Harness Opt. | 67.30 | 73.23 | 41.64 | 47.36 | 26.77 | 52.15 | |
| GPT-5.6-Terra | Baseline | 72.50 | 77.83 | 50.06 | 74.20 | 51.43 | 65.85 |
| Harness Opt. | 81.75 | 85.43 | 57.62 | 82.80 | 59.73 | 69.75 | |
| SFT and Adaptive Harness–Policy Optimization | |||||||
| Qwen3.5-4B | Baseline | 49.30 | 59.68 | 15.14 | 43.06 | 12.27 | 20.25 |
| SFT | 73.00 | 83.91 | 51.92 | 86.67 | 57.87 | 58.25 | |
| SFT + AHPO | 77.70 | 83.48 | 59.36 | 87.51 | 71.25 | 69.85 | |
| Qwen3.5-35B-A3B | Baseline | 64.20 | 71.41 | 29.74 | 59.87 | 15.86 | 35.25 |
| SFT | 75.70 | 84.39 | 60.59 | 89.41 | 80.42 | 69.80 | |
| SFT + AHPO | 80.25 | 84.48 | 64.19 | 89.95 | 81.29 | 75.20 | |
5 Experiments
5.1 Experimental Setup
5.1.1 Baselines
We evaluate WISE on WISE-Bench using Qwen3.5-4B and Qwen3.5-35B-A3B [16] under three settings: the base harness, supervised fine-tuning (SFT), and SFT followed by AHPO. AHPO uses GRPO [19] for policy-routed updates while allowing harness-routed updates to revise the execution framework. WISE-Bench contains 12k annotated cases, split into 8k training cases, 2k validation cases, and 2k held-out test cases. To assess the benefits of harness optimization with fixed model weights, we additionally evaluate GPT-5.6-Luna, GPT-5.6-Terra [15], and Kimi-K2.6 [14] before and after harness optimization. Unless otherwise specified, reported results are evaluated on the held-out test set. Detailed model versions, decoding settings, training hyperparameters, and data splits are provided in Appendix E.
5.1.2 Metrics
For evaluation, we report Case Accuracy (Case Acc.), Item Accuracy (Item Acc.), and Bad-item Exact Match (Bad-item EM) for problem discovery; Item Attribution Accuracy (Item Attr. Acc.) and Case Attribution Exact Match (Case Attr. EM) for pipeline attribution; and End-to-End Exact Match (E2E EM) for complete diagnosis. EM requires all relevant items in a case to be correctly predicted, thereby emphasizing complete case-level correctness over partial matches.
5.2 Overall Performance
Table 1 reports the overall diagnostic performance on WISE-BENCH. For both Qwen backbones, SFT with ReTrace-constructed supervision substantially improves end-to-end diagnosis, and AHPO provides further gains. On Qwen3.5-4B, E2E EM increases from 20.25% to 58.25% after SFT and reaches 69.85% with AHPO. On Qwen3.5-35B-A3B, it increases from 35.25% to 69.80% and then to 75.20%. Taken together, these results show that the gains are not confined to the final prediction, but extend across multiple stages of the diagnostic workflow.
The improvements are particularly pronounced on case-level consistency metrics. For Qwen3.5-4B, AHPO improves Bad-item EM from 51.92% to 59.36% and Case Attribution EM from 57.87% to 71.25%, despite a slight decrease in Item Accuracy from 83.91% to 83.48%. For Qwen3.5-35B-A3B, Case Attribution EM improves more modestly, from 80.42% to 81.29%, while E2E EM increases by 5.40 percentage points. These metrics assess different aspects of diagnosis: attribution evaluation provides gold problematic items, whereas end-to-end evaluation requires the agent to discover and correctly attribute all problematic items. The results therefore highlight the importance of evaluating the complete workflow alongside its individual stages.
Table 1 further shows that harness optimization provides consistent gains even when the underlying model weights are fixed. Harness Opt. improves all reported metrics for Kimi-K2.6, GPT-5.6-Luna, and GPT-5.6-Terra. For GPT-5.6-Terra, Case Accuracy increases from 72.50% to 81.75%, Case Attribution EM from 51.43% to 59.73%, and E2E EM from 65.85% to 69.75%. E2E EM also improves from 50.10% to 52.15% for GPT-5.6-Luna and from 48.55% to 51.60% for Kimi-K2.6. These gains further show that harness optimization can improve diagnosis without updating model weights.
5.3 Effectiveness of ReTrace
Table 2 compares ReTrace with three alternative strategies for constructing trajectory supervision. Raw Trace retains the original execution without correction; Endpoint-only Correction

Figure 3: Overview of ReTrace. It preserves the unaffected prefix and repairs only the affected trajectory suffix with evidence-consistent execution.
Table 2: Trajectory construction comparison. Accuracy and Attr. EM are reported in %; Tokens measure teacher-generation cost.
| Method | Case Acc. | Item Acc. | Case Attr. EM | Tokens |
|---|---|---|---|---|
| Raw | 71.25 | 82.88 | 50.31 | 0.0k |
| Endpoint-only | 73.05 | 81.96 | 53.90 | 0.0k |
| Full regen. | 71.75 | 84.62 | 57.87 | 32.0k |
| ReT (ours) | 73.00 | 83.91 | 57.87 | 20.4k |
modifies only the final target decision; and Full Regeneration regenerates the entire trajectory. In contrast, ReTrace preserves the unaffected prefix and repairs the affected suffix.
ReTrace achieves 57.87% Case Attribution EM, outperforming Raw Trace (50.31%) and Endpoint-only Correction (53.90%), while matching the performance of Full Regeneration (57.87%). It also achieves competitive performance on case-level and item-level accuracy. Compared with Full Regeneration, ReTrace reduces teacher-generation tokens from 32.0k to 20.4k, a 36.25% reduction, without sacrificing Case Attribution EM. These results suggest that endpoint-only correction is insufficient to recover trajectory-level diagnostic performance, while full regeneration incurs substantially higher construction cost. ReTrace offers a favorable trade-off between diagnostic accuracy and trajectory construction efficiency.

Figure 4: Development- and test-set performance across optimization iterations under different harness-policy update strategies.
5.4 Effectiveness of Adaptive Harness–Policy Optimization
We evaluate AHPO from two complementary perspectives: whether it can correctly identify the optimization surface associated with a diagnostic failure, and whether such failure-conditioned routing leads to more effective optimization than fixed update strategies. We first assess routing accuracy on manually adjudicated failures, then compare optimization strategies under matched intervention budgets.
We evaluate routing quality on item-level failure instances extracted from 200 manually adjudicated development cases, with each failure labeled as requiring either a harness or policy intervention. As shown in Table 3, Direct Routing predicts the intervention target directly from the execution trace, achieving 58.9% Accuracy and 43.6% Macro-F1. Adding the Failure Analyzer, which localizes and summarizes the earliest supported failure, improves these scores to 69.2% and 60.0%, respectively. The full AHPO Router additionally applies the evidence-availability, action-support, and workflow-expressiveness checks defined in Section 4.3, reaching 84.2% Accuracy and 84.1% Macro-F1. Its Harness F1 and Policy F1 are 83.5% and 84.8%, respectively, indicating comparable performance across the two intervention targets. These results show that reliable optimization routing benefits from both explicit failure localization and structured analysis of the execution conditions surrounding the failure.
We next compare AHPO with three alternative optimization strategies: Harness only, Policy only, and Harness then Policy, using the same number of candidate interventions and full-workflow evaluations. Figure 4 separates the development-set performance used to guide optimization from the held-out test performance used to assess generalization. At each iteration, development-set failures guide candidate interventions, and development-set evaluation determines whether a candidate is accepted or rolled back. The test set is used only to evaluate the resulting agent versions and does not influence optimization or update acceptance. The development curves therefore show
Table 3: Failure-routing performance of different routing strategies.
| Router | Acc. | Macro-F1 | Harness F1 | Policy F1 |
|---|---|---|---|---|
| Direct Routing | 58.9 | 43.6 | 14.2 | 73.0 |
| + Failure Analyzer | 69.2 | 60.0 | 40.8 | 79.2 |
| AHPO Router | 84.2 | 84.1 | 83.5 | 84.8 |
Table 4: Operational efficiency and estimated diagnosis cost of manual auditing and WISE. Average latency in s/case; throughput in cases/day; cost in RMB/1K cases.
| Metric | Manual | WISE |
|---|---|---|
| Discovery Time | 180.00 s | 23.9 s |
| Attribution Time | 300.00 s | 37.6 s |
| End-to-End Time | 480.00 s | 61.5 s |
| Throughput | 52.5/person | 120K/cluster |
| Cost | 5,714.29 | 25.60 |
progress under the optimization criterion, whereas the test curves reveal whether these gains transfer to unseen cases. Harness only and Policy only show limited gains in later iterations, while Harness then Policy follows a fixed update schedule. AHPO achieves the strongest final performance on both sets, although intermediate development-set gains do not always translate into test-set improvements.
6 Deployment and Applications
To evaluate the practical utility of WISE in a production search system, we integrated it into the search quality management workflow of a large-scale short-video platform. In the following subsections, we describe three representative use cases in which WISE has been applied in practice.
6.1 Automated Quality Auditing
Traditional search quality auditing relies on periodic manual evaluations and bad-case feedback. Human evaluators first identify search experience issues, after which engineers inspect internal pipeline signals to investigate their causes. This process is labor-intensive and difficult to scale. WISE automates this process by identifying experience issues from search results and tracing them to underlying pipeline components, replacing much of the manual evaluation and investigation effort. Table 4 compares the efficiency and cost of WISE with the traditional manual workflow. With concurrent inference, WISE processes approximately 120K search cases per day, with an estimated cost of RMB 25.60 per 1,000 cases, compared with RMB 5,714.29 for manual diagnosis. This represents an estimated cost reduction of 99.55%, highlighting the efficiency of automated diagnosis at production scale.
6.2 Online Quality Assurance
Frequent model updates and A/B experiments in industrial search systems may introduce localized quality regressions that are not reflected in aggregate business metrics. To address this, we deploy WISE for online quality assurance. We use the optimized Qwen3.5-35B-A3B as the backbone, with eight inference instances, each equipped with four NVIDIA L20 GPUs. WISE performs daily inspections of approximately 120,000 search requests across different experiment buckets, identifying search experience issues and attributing them to pipeline components.
By aggregating diagnosis results for each bucket, we monitor the incidence of different quality issues and detect abnormal changes through statistical comparisons across buckets and analysis of historical trends. This enables us to identify and quantify fine-grained quality regressions following model or strategy rollouts, even when aggregate business metrics remain stable. Pipeline attribution further reveals how these issues arise within the search pipeline, providing insights for evaluating and improving deployed strategies.
6.3 WISE-Guided Model Optimization
Beyond online quality assurance, WISE’s diagnostic results can further guide the optimization of different components in the search pipeline. For example, identified intent understanding errors can inform intent model improvements, while retrieval failures can provide targeted examples for optimizing recall strategies. As an initial case study, we focus on relevance model optimization. Specifically, we leverage WISE’s pipeline attribution to identify relevance-overestimation cases, where the relevance model assigns high scores to results that fail to satisfy the user’s search intent. Over a 30-day period, we collect approximately 2.2 million such query-item samples and incorporate them into the relevance model’s training data to improve its ability to distinguish relevant from superficially relevant results.
6.3.1 Offline Evaluation
We compare the baseline relevance model with WISE-Guided Training, which augments the original training data with WISE-mined samples. Both models share the same architecture and training configuration and are evaluated on 3,385 held-out query-item pairs using MSE, Accuracy, Precision, Recall, and F1. As shown in Table 5, WISE-Guided Training improves all reported metrics. MSE decreases from 0.0638 to 0.0606 (5.0% relative reduction), while F1 increases from 0.573 to 0.631 (10.2% relative improvement), demonstrating improved relevance prediction.
6.3.2 Online Evaluation
We further evaluate the WISE-guided relevance model in the Kuaishou production search system. In a human GSB evaluation comparing the top-4 search results against the production baseline, WISE-Guided Training achieves a 4.16% advantage, as shown in Table 6. We also conduct a 7-day online A/B test covering 5% of search traffic, measuring Intent Query Reformulation Rate (IQRR), Click-Through Rate (CTR),
Table 5: Relevance model performance with and without WISE-guided training, reported as weighted averages across test sets for three relevance types.
| Method | MSE ↓ | Acc. ↑ | P. ↑ | R. ↑ | F1 ↑ |
|---|---|---|---|---|---|
| Baseline | 0.0638 | 0.612 | 0.503 | 0.665 | 0.573 |
| + WISE-Guided | 0.0606 | 0.636 | 0.558 | 0.727 | 0.631 |
Table 6: Human GSB evaluation against the production baseline. Annotators compare the top-K results of each method with the baseline and label Good/Same/Bad. .
| Method | Good | Same | Bad | Adv | p-value |
|---|---|---|---|---|---|
| WISE-Guided | 387 | 1304 | 304 | 4.16% | < 0.01 |
and Long-View Ratio (LVR). Compared with the production baseline, WISE-Guided Training reduces IQRR by 0.11% (CI: [-0.17%, -0.05%]), while increasing CTR by 0.15% (CI: [0.06%, 0.24%]) and LVR by 0.20% (CI: [0.07%, 0.33%]). These results are consistent with the improvements observed in offline evaluation and human assessment.
7 Conclusion
In this paper, we formulate System Quality Diagnosis, extending conventional quality evaluation beyond identifying poor outcomes to attributing their causes across underlying system components. Focusing on industrial search, we propose WISE, an agentic framework that integrates multimodal experience assessment with evidence-grounded pipeline attribution, and construct WISE-BENCH, a real-world benchmark combining user-facing evidence, internal pipeline traces, and expert annotations. To improve diagnostic reliability, we introduce ReTrace for evidence-consistent trajectory supervision and AHPO for failure-guided harness–policy optimization. Experiments show that WISE improves end-to-end diagnosis success from 35.25% to 75.20% on Qwen3.5-35B-A3B. Beyond offline evaluation, WISE has been deployed in a large-scale production search system, supporting a broad range of applications, including automated quality auditing, online quality assurance, and relevance model optimization. These results demonstrate the practical value of integrating quality evaluation, pipeline attribution, and downstream optimization in industrial search.
References
[1] Yinfang Chen, Huaibing Xie, Minghua Ma, Yu Kang, Xin Gao, Liu Shi, Yunjie Cao, Xuedong Gao, Hao Fan, Ming Wen, Jun Zeng, Supriyo Ghosh, Xuchao Zhang, Chaoyun Zhang, Qingwei Lin, Saravan Rajmohan, Dongmei Zhang, and Tianyin Xu. Automatic root cause analysis via large language models for cloud incidents. In Proceedings of the Nineteenth European Conference
on Computer Systems, pages 674–688, 2024. doi: 10.1145/3627703.3629553.
[2] Yinfang Chen, Manish Shetty, Gagan Somashekar, Minghua Ma, Yogesh Simmhan, Jonathan Mace, Chetan Bansal, Rujia Wang, and Saravan Rajmohan. AIOpsLab: A holistic framework to evaluate AI agents for enabling autonomous clouds. In Proceedings of Machine Learning and Systems, volume 7, 2025. URL https://openreview.net/forum?id=3EXBLwGxtq.
[3] Yoonseo Choi, Eunhye Kim, Hyunwoo Kim, Donghyun Park, Honggu Lee, Jin Young Kim, and Juho Kim. BloomIntent: Automating search evaluation with LLM-generated fine-grained user intents. In Proceedings of the 38th Annual ACM Symposium on User Interface Software and Technology, 2025. doi: 10.1145/3746059.3747677.
[4] Paul Covington, Jay Adams, and Emre Sargin. Deep neural networks for YouTube recommendations. In Proceedings of the 10th ACM Conference on Recommender Systems, pages 191–198, 2016. doi: 10.1145/2959100.2959190.
[5] Aoyang Fang, Yifan Yang, Jin'ao Shang, Qisheng Lu, Junjielung Xu, Rui Wang, Songhan Zhang, Yuzhong Zhang, Boxi Yu, and Pinjia He. OpenRCA 2.0: From outcome labels to causal process supervision. arXiv preprint arXiv:2606.27154, 2026. URL https://arxiv.org/abs/2606.27154.
[6] Jiazhan Feng, Shijue Huang, Xingwei Qu, Ge Zhang, Yujia Qin, Baoquan Zhong, Chengquan Jiang, Jinxin Chi, and Wanjun Zhong. ReTool: Reinforcement learning for strategic tool use in LLMs. arXiv preprint arXiv:2504.11536, 2025. URL https://arxiv.org/abs/2504.11536.
[7] Global E-Commerce Search Relevance Team. A case-driven multi-agent framework for e-commerce search relevance. arXiv preprint arXiv:2605.05991, 2026. URL https://arxiv.org/abs/2605.05991.
[8] Albert Gong, Kyuseong Choi, Abhineet Agarwal, Jason Schechner, Ryan Huang, Raj Agrawal, Anish Agarwal, and Raaz Dwivedi. ORCA-bench: How ready are language model agents for oncall? arXiv preprint arXiv:2607.28545, 2026. URL https://arxiv.org/abs/2607.28545.
[9] Bowen Jin, Hansi Zeng, Zhenrui Yue, Jinsung Yoon, Sercan O. Arik, Dong Wang, Hamed Zamani, and Jiawei Han. Search-R1: Training LLMs to reason and leverage search engines with reinforcement learning. arXiv preprint arXiv:2503.09516, 2025. URL https://arxiv.org/abs/2503.09516.
[10] Sein Kim, Sangwu Park, Hongseok Kang, Wonjoong Kim, Jimin Seo, Yeonjun In, Kanghoon Yoon, Hyunsik Jeon, and Chanyoung Park. Self-EvolveRec: Self-evolving recommender systems with LLM-based directional feedback. arXiv preprint arXiv:2602.12612, 2026. URL https://arxiv.org/abs/2602.12612.
[11] Hunter Lightman, Vineet Kosaraju, Yura Burda, Harri Edwards, Bowen Baker, Teddy Lee, Jan Leike, John Schulman, Ilya Sutskever, and Karl Cobbe. Let's verify step by step. arXiv preprint arXiv:2305.20050, 2023. URL https://arxiv.org/abs/2305.20050.
[12] Xufang Luo, Yuge Zhang, Zhiyuan He, Zilong Wang, Siyun Zhao, Dongsheng Li, Luna K. Qiu, and Yuqing Yang. Agent lightning: Train any AI agents with reinforcement learning. arXiv preprint arXiv:2508.03680, 2025. URL https://arxiv.org/abs/2508.03680.
[13] Lingtao Mao, Huangyu Dai, Xinyu Sun, Zihan Liang, Ben Chen, Chenyi Lei, and Wenwu Ou. SVFSearch: A multimodal knowledge-intensive benchmark for short-video frame search in the gaming vertical domain. arXiv preprint arXiv:2605.17946, 2026. URL https://arxiv.org/abs/2605.17946.
[14] Moonshot AI. Kimi K2.6: Advancing open-source coding, 2026. URL https://www.kimi.com/en/blog/kimi-k2-6.
[15] OpenAI. GPT-5.6: Frontier intelligence that scales with your ambition, 2026. URL https://openai.com/index/gpt-5-6/.
[16] Qwen Team. Qwen3.5: Towards native multimodal agents, 2026. URL https://qwen.ai/blog?id=qwen3.5.
[17] D. Sculley, Gary Holt, Daniel Golovin, Eugene Davydov, Todd Phillips, Dietmar Ebner, Vinay Chaudhary, Michael Young, Jean-François Crespo, and Dan Dennison. Hidden technical debt in machine learning systems. In Advances in Neural Information Processing Systems, volume 28, pages 2503–2511, 2015.
[18] Jaineet Shah. Causal agent replay: Counterfactual attribution for LLM-agent failures. arXiv preprint arXiv:2606.08275, 2026. URL https://arxiv.org/abs/2606.08275.
[19] Zhihong Shao, Peiyi Wang, Qihao Zhu, Runxin Xu, Junxiao Song, Xiao Bi, Haowei Zhang, Mingchuan Zhang, Y. K. Li, Y. Wu, and Daya Guo. DeepSeekMath: Pushing the limits of mathematical reasoning in open language models. arXiv preprint arXiv:2402.03300, 2024. URL https://arxiv.org/abs/2402.03300.
[20] Xijia Tao, Yihua Teng, Xinxing Su, Xinyu Fu, Jihao Wu, Chaofan Tao, Ziru Liu, Haoli Bai, Rui Liu, and Lingpeng Kong. MMSearch-Plus: A simple yet challenging benchmark for multimodal browsing agents. arXiv preprint arXiv:2508.21475, 2025. URL https://arxiv.org/abs/2508.21475.
[21] Cong Wei, Yang Chen, Haonan Chen, Hexiang Hu, Ge Zhang, Jie Fu, Alan Ritter, and Wenhu Chen. UniIR: Training and benchmarking universal multimodal information retrievers. In Proceedings of the European Conference on Computer Vision (ECCV), 2024. doi: 10.1007/978-3-031-73021-4_23.
[22] Li Wu, Johan Tordsson, Erik Elmroth, and Odej Kao. MicroRCA: Root cause localization of performance issues in microservices. In 2020 IEEE/IFIP Network Operations and Management Symposium (NOMS), 2020. doi: 10.1109/NOMS47738.2020.9110353.
[23] Junjielong Xu, Qinan Zhang, Zhiqing Zhong, Shilin He, Chaoyun Zhang, Qingwei Lin, Dan Pei, Pinjia He, Dongmei Zhang, and Qi Zhang. OpenRCA: Can large language models locate the root cause of software failures? In The Thirteenth International Conference on Learning Representations, 2025. URL https://openreview.net/forum?id=M4qNIzQYpd.
[24] Hanchen Yang, Kaiwen Yang, Junpeng Zhuang, Yang He, Keting Cen, Bochao Liu, Zhongbo Sun, An Liu, Zhongteng Han, and Chenyi Lei. SR-Agent: An experience-driven agentic framework for post-ranking strategy refinement in e-commerce recommendation. arXiv preprint arXiv:2607.17719, 2026. URL https://arxiv.org/abs/2607.17719.
[25] Eva Zangerle and Christine Bauer. Evaluating recommender systems: Survey and framework. ACM Computing Surveys, 55(8), 2022. doi: 10.1145/3556536.
A Annotation Details
A.1 Quality Control
The 12,000 cases are randomly shuffled and distributed among 14 annotators. Each case is independently labeled by two annotators without access to each other's judgments. Disagreements are randomly assigned to a third annotator who did not participate in the initial labeling, and the final label follows the majority decision. When all three annotators assign different component labels, a reviewer examines the evidence and determines the final attribution. Table 7 reports percentage agreement and nominal Krippendorff's for case-level and item-level problem identification, and primary component attribution on jointly confirmed problems. All statistics use the initial two independent annotations, excluding third-annotator judgments and adjudicated labels.
Table 7: Inter-annotator agreement.
| Annotation | Agreement | |
|---|---|---|
| Bad-case decision | 93.1% | 0.856 |
| Bad-item decision | 89.7% | 0.678 |
| Component attribution | 94.3% | 0.915 |
A.2 Annotation Details
Experience issues. Experience issues include relevance, freshness, authority, content quality, and diversity. All except diversity are annotated at the item level: relevance assesses whether the content satisfies the query intent; freshness assesses whether it meets temporal requirements; authority assesses whether the source meets the query's credibility requirements; and content quality assesses whether visual, audio, or substantive defects impair viewing or information acquisition. Diversity is annotated at the case level, identifying excessive repetition or insufficient coverage of query intent. An item may receive multiple issue labels, and a case may contain both item-level issues and diversity issues. Table 8 illustrates this distinction: Item C has a relevance issue due to a species mismatch, while no content-quality or case-level diversity issues are identified.
Pipeline attribution. Annotators use candidate supply, recall paths, model scores, and stage-wise ranking positions to attribute confirmed issues to supply, recall, relevance scoring, ranking, or reranking. Supply limitations occur when the corpus lacks suitable content; recall failures occur when suitable content exists but is absent from the retrieved candidates. Relevance-scoring errors underestimate relevant content or overestimate irrelevant content. Ranking errors involve inappropriate ordering that cannot be explained solely by upstream relevance-scoring errors. Reranking errors arise when subsequent adjustments introduce or aggravate experience issues, such as promoting irrelevant items or reducing diversity. Attribution requires internal execution evidence rather than the displayed results alone. For example, Item C in Table 8 receives
Table 8: A WISE-Bench example with experience labels and pipeline attribution.
| Query: Yellow catfish | ||
|---|---|---|
| Item | Video content | Item-level issue |
| A | A prepared yellow-catfish dish. | None |
| B | A tutorial on making yellow-catfish soup. | None |
| C | Silver-gray, striped fish in a container; the title names another species. | Relevance |
| D | Cleaning and preparing yellow catfish before cooking. | None |
| E | A home-style braised yellow-catfish recipe. | None |
Experience judgment. Items A, B, D, and E match the queried species. Item C concerns a different species and is marked as a relevance issue. No content-quality issues are identified. The results cover dish presentation, soup preparation, cleaning, and braising without excessive repetition; no case-level diversity issue is identified.
| Attribution evidence for Item C | |
|---|---|
| Retrieval | ANN channel. |
| Relevance | Score: 0.819; overestimation threshold: 0.650. |
| Ranking | Click prediction: 0.1046 (98.67th percentile); long-view prediction: 0.1167 (99.50th percentile). |
| Reranking | Position change: . |
| Primary component | Relevance scoring. The favorable relevance score conflicts with the species mismatch. No further promotion is observed during reranking. |
|---|---|
| Final labels | Case: bad experience; no diversity issue.Problematic items: {C}Item C: relevance issue; primary attribution to relevance scoring.Content-quality issues: none. |
a relevance score of 0.819 despite the species mismatch, with no position change during reranking; relevance scoring is therefore selected as the primary attribution. When the evidence is insufficient to distinguish a primary component, attribution is marked as unresolved, while the confirmed experience issue is retained.
Final labels. Annotations are retained at two levels:
-
Case level: whether the page contains an experience issue, diversity labels, and overall attributions such as supply limitations or recall failures.
-
Item level: the problematic item's identifier and displayed position, experience-issue labels, and one primary component among relevance scoring, ranking, and reranking.
Since upstream errors may propagate to later stages, downstream consequences are not separately labeled as independent causes. The primary component is determined from evidence across stages, and supporting attribution evidence is retained at both levels.
B WISE Workflow
B.1 Multi-Agent Architecture
WISE is implemented as a LangGraph-based hierarchical multi-agent workflow comprising a problem-discovery team, an attribution team, and a report-generation agent. Agent execution is organized into graph nodes, with conditional edges controlling task routing and stage transitions. QueryCheck interprets the query; ProblemDiscoveryMaster dispatches inspections to specialists; and ProblemDiscoverySummary consolidates their findings. AttributionMaster coordinates specialists for supply/recall, relevance scoring, ranking, and reranking. Each role has dedicated instructions and tool permissions. A separate, tool-free agent, FinalSummary, renders the diagnostic report.
B.2 Communication and Validation
Agents exchange structured JSON records through the harness, with LangGraph's shared state carrying information between nodes. Inputs contain case and task identifiers, the inspection scope, relevant item identifiers, upstream findings, and accessible evidence references. Outputs follow role-specific schemas specifying required fields, field types, and allowed diagnostic labels. The harness checks schema compliance, identifier consistency, and evidence references before forwarding outputs; these checks establish structural validity rather than diagnostic correctness. Invalid responses trigger bounded correction attempts, and persistent failures are recorded separately from negative judgments. The shared state maintains query interpretation, experience issues, specialist findings, consolidated attributions, and execution status for each case, preserving specialist findings separately from consolidated decisions. Each agent's input context is constructed from the state fields and evidence permitted for its role rather than exposing the entire state. Agent messages, tool observations, and validation results are retained in the execution trace for trajectory construction and failure analysis.
B.3 Execution and Consolidation
QueryCheck writes its intent representation to the shared state, which ProblemDiscoveryMaster uses to dispatch item-level and page-level inspections. ProblemDiscoverySummary consolidates the specialists' JSON findings into the input to AttributionMaster. Conditional routing sends cases without confirmed problems directly to final reporting, while incomplete inspections remain explicitly marked. AttributionMaster coordinates case-level supply/recall assessment and applicable item-level investigations. Specialist findings are consolidated into case-level attributions for supply and recall issues and item-level attributions identifying a primary component when sufficient evidence is available. Insufficient evidence leaves the attribution unresolved without removing the confirmed issue. FinalSummary renders the consolidated records without changing diagnostic labels or introducing new claims; the structured JSON remains the authoritative output for evaluation and downstream processing.
C Prompts for Trajectory Construction
We implement the four conditions in Table 2 as separate skills: trajectory-raw retains the original execution; trajectory-endpoint-correction modifies only the scored endpoint fields; trajectory-teacher-regeneration regenerates all assistant-tool interactions; and trajectory-minimal-repair freezes the prefix before the earliest repairable decision and minimally repairs the affected suffix. The following prompts specify the two teacher-based conditions, with deployment-specific values shown as placeholders.
C.1 Full Teacher Regeneration
Full Regeneration regenerates all assistant-tool interactions from the original system and user messages, obtaining tool observations through actual execution. The adjudicated endpoint serves only as a teacher-side target, not evidence.
Listing 1: Teacher prompt for full trajectory regeneration.
| [SYSTEM MESSAGE]Regenerate the complete assistant--tool trajectory from the original system and user messages. Do not reuse previously generated interactions.Treat the adjudicated endpoint as a target, not evidence. Do not cite it as evidence.Follow the diagnostic workflow and use only evidence available at each step.Obtain all tool observations through actual execution. Never fabricate observations.Follow the required output schemas throughout the workflow. The final diagnosis must match the adjudicated endpoint.If available or obtainable evidence cannot support the target, report failure.[USER MESSAGE]<ORIGINAL_INPUT><ADJUDICATED_ENDPOINT><AVAILABLE_TOOLS_AND_SCHEMAS> |
C.2 Evidence-Consistent Minimal Repair
For ReTrace, we identify the earliest repairable decision and divide the recorded trajectory into an immutable prefix and a repairable suffix. All messages, decisions, tool calls, and observations preceding remain unchanged. Given this frozen prefix, the original suffix, and the adjudicated endpoint as a target rather than evidence, the teacher minimally repairs the affected decision and its downstream dependencies. When additional evidence is needed, new tool calls are executed in the actual environment.
A repaired trajectory is accepted only if its final output matches the adjudicated endpoint, its diagnostic claims are supported by evidence available at the corresponding execution steps, and its tool interactions satisfy the workflow constraints. The repair must also preserve case and item identity and follow the required output schemas. Trajectories that fail these checks are rejected rather than forced to match the endpoint. For each accepted repair, we extract supervised examples from the corrected decision nodes, where is the execution prefix available at that node, excluding teacher-only endpoint annotations, and z' is the repaired response.
Listing 2: Teacher prompt for evidence-consistent minimal trajectory repair.
[SYSTEM MESSAGE] You are repairing a recorded agent execution trajectory. Preserve all messages, decisions, tool calls, and observations before the repair point. Treat the adjudicated endpoint as a target, not evidence. Do not cite it as evidence. Starting at the repair point, minimally repair the affected decision and its downstream dependencies. If additional evidence is needed, use workflow-authorized tools. Obtain all new observations through actual tool execution. Never fabricate or alter tool observations. Use only evidence available at each decision node. Follow workflow constraints and the required output schema for the target node. If available or obtainable evidence cannot support the target, mark the trajectory as unrepairable.
[USER MESSAGE] <FROZEN_PREFIX_BEFORE_REPAIR_POINT> <ORIGINALSuffix> <REPAIR_POINT> <ADJUDICATED_ENDPOINT> <AVAILABLE_tools_AND_SCHEMAS>
D Skills for Harness–Policy Optimization
The following specifications define the four roles in AHPO and correspond to the configurations used in our reported experiments. The routing rules distinguish harness-side limitations from incorrect policy decisions. Repository-specific commands and deployment controls are omitted for clarity.
D.1 Failure Analyzer
Listing 3: Methodological specification for search-failure-analyzer.
Role: Analyze Search Diagnosis ProblemDiscovery trajectories against Gold annotations and locate the earliest supported decision error. Do not propose a harness change or assign a HARNESS/POLICY route.
Input:
- benchmark input and Gold annotation;
- model prediction and evaluator mismatch fields;
- compact execution trace and referenced full trajectory records.
Procedure:
- Inspect the observable execution sequence in order: QueryCheck, Master routing, evidence collection, sub-agent execution, sub-agent judgment, and merge/summary.
- Determine whether the mismatch is caused by a model decision, an upstream tool/data/environment failure, an annotation problem, or insufficient evidence.
- For a model failure, identify the earliest observable erroneous decision that plausibly explains the scored mismatch. Mark this as a trace-based hypothesis unless intervention and replay have verified it.
- Record the actual behavior and the expected constraint at that node.
- Trace how the earliest error propagated into later decisions and the final prediction.
- Record correct upstream decisions as protected behavior that later optimization should preserve.
Use only observable trajectory evidence; do not infer hidden reasoning. If required evidence is absent, return INSUFFICIENT_EVIDENCE. If the Gold annotation appears wrong,
return ANNOTATION_SUSPECTED rather than manufacturing a model error.
Output one structured record with:
- verdict and failure domain;
- scored mismatch;
- earliest_error {stage, node, agent, decision_type, actual_behavior, expected_constraint, evidence};
- causal_chain and reusable failure_mechanisms;
- available_evidence and missing_evidence;
- protected_behaviors, confidence, and needs_human_review.
D.2 Intervention Router
Listing 4: Methodological specification for search-intervention-router.
Role: Route a validated Search Diagnosis failure to the harness or the model policy. Determine the optimization surface; do not propose the concrete fix or training examples.
Input: one validated failure analysis containing its earliest error, causal chain, available and missing evidence, and protected behavior.
Answer the following questions in order using observable evidence from before the first erroneous decision:
-
Evidence availability: Was the evidence required for the correct decision available under the current environment and tool boundary?
-
Action support: Did the harness permit the required action and correctly execute actions that the policy requested, including routing, tool use, validation, and recovery? Distinguish an unavailable or incorrectly executed action from the policy choosing the wrong available action.
-
Workflow expressiveness: Could the current schema and workflow express and preserve the correct result?
Routing rule:
- If any answer is no because of a harness constraint or execution defect, route to HARNESS. Identify the workflow, prompt, tool, context, schema, validation, or recovery condition requiring revision.
- If all three answers are yes but the node makes an incorrect decision or selects the wrong available action, route to POLICY. State the remaining capability gap, such as intent understanding, evidence interpretation, attribution, abstention, or action selection.
- Treat the route as the next intervention to evaluate, not an exclusive assignment of responsibility. A prompt change and a policy update may both help the same case.
- If a question cannot be answered from the available evidence, return no route and request further review.
Output one structured record with:
- evidence_available {answer, reason, evidence};
- actionSupported_and_executed {answer, reason, evidence};
- schemaWorkflow_expressive {answer, reason, evidence};
- route, rationale, capability_gap, and confidence.
D.3 Harness Optimizer
Listing 5: Methodological specification for search-harness-optimizer.
Role: Convert failures routed to HARNESS into minimal, generalizable harness revisions.
Input:
- validated HARNESS routing results and their failure analyses;
- current workflow, prompts, tool definitions and boundaries, context construction, output schemas, validators, recovery logic, and relevant skill instructions;
- current results for failed and correctly solved cases.
Procedure:
- Normalize each failure by target node, harness component, and causal mechanism.
- Form a cluster only when one causal change can address all included failures, or when one case reveals a high-impact structural invariant.
- Identify the shared root cause rather than copying case-specific symptoms.
- Choose exactly one primary harness component: workflow, prompt, tool_definition, tool_boundary, context, schema, validation, recovery, or skill.
- Propose the smallest shared change that makes the expected behavior explicit or mechanically enforceable.
- Select target cases exhibiting the failure, nearby contrast cases around the decision boundary, and already-correct anchor cases.
- State the invariant expected after the change and the behaviors most at risk of regression.
Output a structured proposal containing:
- cluster_id, target_node, and harness_component;
- normalized failure_mechanism and shared_root_cause;
- supporting failure records;
- proposed_change and expected_invariant;
- target, contrast, and anchor case sets;
- affected harness surfaces and regression_risks.
D.4 Training Data Planner
Listing 6: Methodological specification for search-training-data-planner.
Role: Convert failures routed to POLICY into capability-focused training groups for agentic policy optimization.
Input:
- validated POLICY routing results and failure analyses;
- benchmark examples and current-agent rollout results;
- the current harness and policy versions.
Procedure:
- Group failures by target node and capability gap rather than by surface wording or query identity.
- For each group, select hard cases backed by a POLICY route at that node.
- Add contrast cases near the relevant decision boundary so that the target behavior is discriminative rather than a blanket rule.
- Add anchor cases that the current policy already solves, preserving established behavior during optimization.
- Target the failing node and its relevant decision records or sub-trajectories. Document whether model parameters are shared across nodes; verify the complete workflow after a targeted update.
- Choose a reward type: rule-based for directly checkable behavior, outcome-based for endpoint correctness, or hybrid when both process and outcome matter.
- Define the Gold-derived target behavior and scoring dimensions for each selected case.
Output a structured plan containing:
- capability clusters with target_node and capability_gap;
- each selected case and its hard/contrast/anchor role;
- training_scope and reward_type;
- the target behavior and scoring dimensions for optimization.
E Experimental Details
E.1 Data Splits
All splits are performed at the search-case level before node-level training records are extracted. Thus, node records originating from the same search case never appear across training, development, and test sets. The test set is excluded from trajectory construction, harness optimization, policy updates, and model selection.
E.2 Training and Inference Configuration
Table 9: Distribution of node-level supervision used for SFT.
| Node Type | Unique Node Records | Fraction (%) |
|---|---|---|
| Problem discovery | 21,178 | 58.4 |
| Issue consolidation | 3,262 | 9.0 |
| Pipeline attribution | 9,660 | 26.6 |
| Final diagnosis | 2,180 | 6.0 |
| Total | 36,280 | 100.0 |
The evaluated backbones are Qwen3.5-4B, Qwen3.5-35B-A3B, GPT-5.6-Luna, GPT-5.6-Terra, and Kimi-K2.6. ReTrace uses GPT-5.6-Terra for trajectory construction. Unless otherwise specified, inference uses a temperature of 0.01 and a maximum generation length of 32,768 tokens. Comparisons under the same backbone use identical decoding settings.
SFT uses 36,280 node-level training records extracted from accepted ReTrace repairs, with their distribution across workflow stages shown in Table 9. We train for 2 epochs with a learning rate of and a global batch size of 64, using 8 GPUs with a per-device batch size of 1 and gradient accumulation of 8. The maximum sequence length is 24,576 tokens. For policy-routed AHPO updates, GRPO uses 8 roll-outs per training instance and a learning rate of . For the hierarchical reward, we set and across diagnostic nodes. For each policy-routed intervention, GRPO trains on the selected data for 1 epochs with a batch size of 16. The number of training steps varies with the dataset size.