Skip to content

onPanda: Efficiently annotating on-policy alignment data for LLMs and agents via token-level correctionsonPanda: Efficient Annotation of On-Policy Alignment Data for LLMs and Agents via Token-Level Correction

arXiv· arXiv:2609.24983· Lei Yang, Mengyin Liu, Jia Wang, Hangyu Guo, Liang Zhao, Zheng Ge, Kang An, Binxing Jiao, Qi Han, Daxin Jiang, Siqi Shen, Xiangyu Zhang·Indexed by this site · 2026-10-01· Originally publishedTools

Quick read

Other

Based on the paper PDF (AI-generated); refer to the original

onPanda annotates alignment data with token-level corrections; on 21 image descriptions, median time is 330s, 51.5% less than POTATO's 681s.

Questions
Alignment and agents need to simultaneously reduce annotation cost, stay on-policy, and obtain fine-grained supervision. Manual writing or post-editing is costly and off-policy; preference annotation only has response-level signals and also cannot correct content the model cannot sample. Agent correction must also actually execute tools.
Methods
onPanda lets annotators locate the first inappropriate token, click a candidate or freely edit, then truncate and continue from the corrected prefix. The annotation tree records corrections and can export SFT, preference pairs, and token-level samples. The agent connects to tools and harnesses via response templates and MCP.
Experiments and results
The comparison involves 3 annotators and 21 image descriptions, with rollout by Qwen3.5-35B-A3B. onPanda median time is 330s, GPT-5.5 pairwise win rate is 66.7%, and ∆PPL is +0.86%. The highest F1 on the Panda-CVL test set is GPT-5.5's 17.09%.
Limitations and future work
The authors note that relying on prefix continuation and top-k logprobs, the advantage depends on sparse errors, and downstream training benefits have not been validated by training experiments. The comparison involved 3 annotators and 21 image descriptions; the paper does not report significance tests, and the authors state that no controlled agent study was conducted.
Experimental setupDoubao-Seed-2.1-pro、GPT-5.5 (xhigh) et al. · 21 image-description prompts、Panda-CVL et al. · median annotation time、pairwise win rate et al.
Evaluated models
Doubao-Seed-2.1-proGPT-5.5 (xhigh)GPT-5.6-sol (xhigh)GPT-6 (xhigh)Kimi-K2.6Step-3.7-FlashStep-5-PreviewQwen3.6-35B-A3BQwen3.5-397B-A17B
Benchmarks
21 image-description promptsPanda-CVLPanda-MultiRef-21
Metrics
median annotation timepairwise win ratePPL∆PPLSFT coveragepreference pairsNASA-TLXFormatGoodAccLoc.-NGCorr.-NGF1
AI summaryonPanda is an interactive tool for annotating LLM alignment data and agent trajectories. The core interaction is token-level correction: the annotator locates the first inappropriate token, selects a replacement from the model's candidate tokens or freely edits, the system truncates the content after it and continues generation from the corrected prefix, looping "locate—correct—continue" until satisfied. A small controlled study shows that onPanda reduces median annotation time by 52% compared to manual post-editing. Since the vast majority of tokens in the final response are generated by the model itself, the resulting data largely preserves the model's sampling distribution, suitable for building on-policy SFT and preference data, and the correction records also provide positive and negative sample pairs with precise positions.

onPanda is an interactive tool for annotating LLM alignment data and agent trajectories. The core interaction is token-level correction: the annotator locates the first inappropriate token, selects a replacement from the model's candidate tokens or freely edits, the system truncates the content after it and continues generation from the corrected prefix, looping "locate—correct—continue" until satisfied. A small controlled study shows that onPanda reduces median annotation time by 52% compared to manual post-editing. Since the vast majority of tokens in the final response are generated by the model itself, the resulting data largely preserves the model's sampling distribution, suitable for building on-policy SFT and preference data, and the correction records also provide positive and negative sample pairs with precise positions.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Alignment annotation must simultaneously reduce cost, stay on-policy, and provide fine-grained supervision.

    Alignment annotation struggles to simultaneously reduce cost, stay on-policy, and provide fine-grained supervision.

    • Bottleneck: The authors state that scaling high-quality data remains a major bottleneck for LLM alignment and agents. Manual writing or post-editing is costly and yields off-policy data.
    • Preference Data: Cheaper, but the authors state it provides only coarse-grained response-level supervision and can only choose among candidates the model can already sample; when the model cannot sample qualified replies, correction signals are scarce.
    • Agents: Trajectories come from multi-step environment interactions; corrections must actually execute tools and receive feedback before continuing generation. The authors state that existing tools can observe, score, and intervene mid-run, and Reptile can edit outputs for terminal execution, but there is still a lack of interactive tools that can correct reasoning and tool calls in real time across environments and execute corrected calls.
    • Mechanism: Annotators only locate the first unsuitable token, select from candidates or freely type; the system truncates subsequent content and continues from the corrected prefix, repeating the loop until reaching the SFT quality line (Figure 1).
    • Deliverables: The interactive tool onPanda, the Chinese visual-language dataset Panda-CVL annotated with it, and an accompanying token-level correction benchmark.
  2. What related research exists?

    Related work is divided into annotation platforms, fine-grained supervision, and correction-based rewriting; baselines are POTATO and Argilla.

    The paper categorizes related work into three groups in Appendix C and the introduction, and uses POTATO and Argilla in comparative experiments.

    Annotation Tools

    • General Platforms: POTATO (Jurgens et al., 2026) and Argilla can be configured for post-editing or preference annotation; POTATO 2.0 also supports online and offline agent trajectory annotation. This paper uses them to implement two control workflows.
    • Runtime Intervention: AgentDiagnose (Ou et al., 2025) is used to diagnose agent trajectories, allowing observation, scoring, and mid-run intervention of running agents. The introduction only describes it this way.
    • Reptile: Dou et al. (2025) targets terminal SWE tasks; annotators locally edit model outputs to trigger continuation, and the terminal parses and executes. The paper states this is more on-policy than full-text manual post-editing. The authors also note that its corrections rely mainly on manual typing rather than selecting model candidates, and believe this limits on-policy fidelity; the implementation writes reasoning and actions as plain text and shell commands, which cannot support general tool call formats. The authors state that due to different environments and action representations, they do not compete with Reptile on the same tasks.

    Fine-Grained Supervision

    • Step and Token Labels: PRM800K (Lightman et al., 2024) collects step-level labels with human annotation; TLDR (Fu et al., 2025) constructs token-level labels with synthetic perturbations. The authors compare that onPanda's signal is position-precise, with naturally paired positives and negatives, derived from the process of constructing qualified replies, requiring no additional annotation or synthetic perturbations.
    • Preference Granularity: The introduction contrasts preference data with process or fine-grained feedback from Lightman et al. (2024), Uesato et al. (2022), and Wu et al. (2023), stating that preference annotation is cheaper but provides only coarse-grained response-level supervision and is limited to candidates the model can already sample.

    Correct-and-Continue

    • Interactive Translation: Predictive Translation Memory (Green et al., 2014) and INMT (Santy et al., 2019) have already used "correct prefix, regenerate suffix." The authors state that onPanda applies this mechanism to general alignment data annotation, extends it to multimodal and structured agent scenarios, and exports SFT, preferences, and token-level corrections from the annotation tree.

    Baselines and Data

    • Control Baselines: Manual post-editing on POTATO with the answer box pre-filled with the initial rollout; on Argilla, ranking four rollouts per prompt and recording whether the best can serve as SFT. The task is 21 image descriptions, and the rollout model is Qwen3.5-35B-A3B (instruct).
    • Resources in This Paper: Panda-CVL is a publicly releasable production subset; the accompanying benchmark evaluates token-level corrections. Consistency analysis uses Panda-MultiRef-21.

    The authors position onPanda as a tool centered on token-level correction: clicking plus minimal typing guides generation to qualified replies, while most tokens are still generated by the rollout model, automatically leaving position-precise supervision.

  3. How does the paper address this problem?

    onPanda annotates through a locate, correct, truncate, and continue loop, and exports SFT and token-level pairs.

    onPanda performs token-level correction with locate–correct–continue: locate the first unsuitable token, truncate the suffix, and continue from the corrected prefix until reaching the SFT quality line.

    System and Interface

    • Deployment: Component-based frontend. Lightweight web static hosting, no database; after dragging in local files, the browser calls the Chat Completions API; it can also be embedded into an existing platform, with the backend distributing and collecting. The authors state that their internal production system uses the latter.
    • API: Must be able to continue from an assistant prefix (the example in the text is vLLM's continue_final_message) and return top-k candidates with probabilities. Sessions are written to a single .panda.json. Freely edited text recalculates probabilities with a single prompt_logprobs call, so the API must also support that interface. After pasting external text or switching models, one can view the current model's confidence for each token.

    Correction Loop

    • Candidates and Units: Streaming records sampling probabilities and top-k candidates, default k=20, with colors indicating probabilities under tokens (Figure 1). When multi-byte characters or emoji are split, the interface groups them into readable blocks at grapheme boundaries: interaction is on blocks, but recording remains at the token level.
    • Correction and Continuation: If a candidate is suitable, click it; otherwise double-click and type arbitrary text. The system truncates content after the correction point, uses the corrected reply as the assistant prefix for continuation, and does not regenerate tokens before the correction point. Each save records the position, replacement text, and samples before and after correction. Annotators repeat this loop along the reply without re-reading the entire text each time.
    • Four Design Points: Most operations are clicks. Humans only change a few positions; the remaining tokens are generated by the rollout model. Selecting from high-probability candidates perturbs the sampling distribution less. The authors state that records can be converted into preference data for reward models or DPO, or into process rewards from steps containing corrected tokens and their preceding steps. Free editing deviates from the model distribution, but the authors state it only occurs where the model cannot sample the correct content.

    Annotation Tree and Export

    • Tree: Nodes are dialogs. Each correction branches a new node, with the parent node being the dialog before correction. In Figure 1, Dialog 3 is a positive sample when is_good=Y, and Dialogs 1 and 2 are negative samples. Intermediate versions are auto-saved.
    • Logs: Record operation type, timestamp, correction content, whether marked as on-policy, and sampling configuration snapshot. There are also is_good and project schemas (single-choice, multi-choice, text, etc.).
    • Export: is_good=Y is exported as SFT; positive and negative nodes under the same prompt are paired as response-level preferences. Negative samples are usually ancestors of positive samples, sharing the prefix before the correction point and branching at that point. Triples (negative sample, rejected token and position, selected token) can be computed under any tokenizer. The authors believe this could become a foundation for post-training; this paper does not conduct corresponding training experiments.

    Agents and Multimodality

    • Templates: Replies containing reasoning, content, and tool_calls are bidirectionally converted between response templates and native token streams. During rendering, special tokens are visible and editable; after parsing, they are used for storage and tool execution (Figure 2). Corrections thus cover reasoning, body text, and tool parameters. Data is saved in structured form; templates are only applied during rendering and correction and can be continued by different models.
    • Execution: Tools are connected via MCP. harness_to_mcp wraps Claude Code, Codex, and OpenClaw as MCP servers. Calls can be pre-approved: execute after correcting parameters, or reject with optional attached text; rejected trajectories are automatically negative samples. After tool results are written back, generation continues. Images, audio, and video can also be annotated.

    Benchmark Evaluation

    • Task: Given a prompt and candidate reply, the model judges whether it is acceptable; if not, it locates and corrects the first error. The reference is the first correction position and human replacement during annotation.
    • Format and Matching: Output is find-and-replace: if no modification is needed, give an is_good flag; otherwise give a short matching fragment, occurrence order, and replacement text. The full prompt is in the accompanying code repository. 652 test dialogs expand to 2,126 instances (652 good, 1,474 not good). Using the Qwen3.6 tokenizer, two sets of correction triples are compared: annotated negative replies against final qualified replies, and against replies after applying model corrections. They are considered correct only if identical.
    • Score: F1 = 2 · GoodAcc · Corr-NG / (GoodAcc + Corr-NG), i.e., the harmonic mean of GoodAcc and Corr.-NG, aggregated as in ProcessBench (Zheng et al., 2025). Format is the proportion of parseable executions; Loc.-NG only requires locating the position in not-good instances. Always predicting qualified or always attempting correction yields an F1 of 0.
  4. What experiments did the paper conduct?

    On 21 image descriptions, onPanda had a median of 330s and a win rate of 66.7%; the highest baseline F1 was 17.09%.

    Experimental setup

    • Comparison task: 3 annotators annotated 21 image description prompts, split into 3 groups, with a Latin square rotating the order of the three methods. Each method was used only once per group, and the same person did not annotate the same prompt with different methods. Annotators were not onPanda developers, and all three methods were completed with training and warm-up.
    • Generation: Initial rollouts were all Qwen3.5-35B-A3B (instruct), temperature 0.7, top-p 0.8. The first candidate for onPanda, POTATO, and Argilla shared the same rollout.
    • Baselines: POTATO was human post-editing, with the answer box pre-filled with the initial rollout, edited until reaching the SFT quality line. Argilla was preference ranking: four rollouts per prompt, ranked, and whether the best could serve as SFT was recorded. The authors state that the comparison covers the full workflow, making it hard to attribute gains to the interface, paradigm, or their combination. The quality line had no numerical threshold; it depended on whether annotators produced a qualified SFT reply.
    • Metrics: Median and mean annotation time; GPT-5.5 pairwise comparisons of the three final outputs (Argilla took the highest-ranked), with each pair in two orders. PPL was computed by the rollout model; 4 additional rollouts per prompt, mean 1.171 as baseline, and ∆PPL was reported. Also SFT coverage and preference pairs per prompt.
    • Load: The three then filled an adapted NASA-TLX, 6 subscales 0–10, averaged by person then across people. The paper does not report significance tests for time or win rate.
    • Benchmark and consistency: The Panda-CVL test set evaluated the models in Table 3 under the protocol in Question 3. Panda-MultiRef-21 had 21 image descriptions, each with 4 independent onPanda annotations of the same initial reply.

    Main results

    Rollout was Qwen3.5-35B-A3B, 21 image descriptions. Win rate is the proportion of GPT-5.5 pairwise comparisons where the method beat the other two. Per Table 1.

    Swipe horizontally to read the table

    MethodTime s median (mean)Win rate∆PPLSFT coveragePreference pairs/prompt
    Argilla336 (684)28.6%-0.83%52% (11/21)6.00
    POTATO681 (711)54.8%+36.31%100% (21/21)0.95
    onPanda330 (516)66.7%+0.86%100% (21/21)7.43
    • Time: The main text states onPanda's median is 51.5% less than POTATO; the abstract says 52%; it is close to Argilla's median. The main text states the mean is 27.5% and 24.7% lower than POTATO and Argilla (main text means 515.6 s, 711.1 s, 684.5 s; table parentheses are rounded). The authors consider Argilla's mean much higher than its median, consistent with a right tail from reviewing four long replies on hard prompts, and attribute part of the gain over post-editing to continuation: repeated errors are fixed only the first time.
    • Quality: The authors state onPanda has the highest win rate and consider the efficiency gain not at the cost of quality. There was also an anonymous human comparison: evaluators preferred onPanda over POTATO in 54.8% of pairs. This is not the same metric as POTATO's win rate in the table. The paper does not report the number of pairs in the human comparison.
    • Distribution and coverage: The resampled baseline PPL was 1.171, with per-prompt fluctuation of about ±2.8%. The authors state onPanda and Argilla PPL fall within this fluctuation, while post-editing's relative change does not. Editing types are designed to reach qualification; ranking methods may have all four rollouts unqualified. The authors state Argilla's preference pairs come from four-way ranking, POTATO from a before/after editing pair, and some initial rollouts were already qualified without editing.

    User study and production deployment

    • Load: NASA-TLX was onPanda 3.1, Argilla 5.4, POTATO 6.8 (Table 1; 0–10, lower is lighter). One annotator said onPanda shows progress immediately, while ranking requires holding a long context in mind; another said probability coloring helps check low-probability tokens first.
    • Scale: Visual, audio, and agent sessions were 25,596, 105,143, and 1,257 respectively (Table 2). The authors state about 388K token-level corrections were obtained automatically. Across all qualified replies, 97.0% of tokens were model-generated, 2.1% from candidate clicks, and 0.9% manually typed.
    • Inspection: Section 3.3 uses per-token probability colors and entropy for diagnostics, e.g., determining whether a bad rollout came from the model or the pipeline. This section has no quantitative results.

    Panda-CVL benchmark

    • Data: A publicly releasable subset, 7,491 sessions (training 6,839, test 652), mainly Chinese vision-language. Auxiliary rollouts were generated by step-1o-turbo (32B dense VLM). Images were self-built or openly licensed, and tasks did not depend on internal business knowledge. The test set expanded to 2,126 instances.
    • Scores: In Table 3, the highest F1 was GPT-5.5 (xhigh) at 17.09% (GoodAcc 53.37%, Corr.-NG 10.18%). GPT-6 (xhigh) had the highest Loc.-NG 24.46% and Corr.-NG 15.83% in those columns. GPT-5.6-sol (xhigh) had Format 99.98%, GoodAcc 16.56%. The authors state token-level correction remains difficult for all evaluated models, with the highest F1 only 17.09%.
    • Exceptions: 7 of 9 reasoning configurations had Format above 90%, but Corr.-NG was below 16% for all. The authors consider format executability does not necessarily bring accurate localization and correction. The instruct Qwen3.5-397B-A17B had Format 38.83%, F1 1.38%. The authors state GoodAcc varies widely, with models differing in tendency to accept or modify candidate replies.

    Annotation consistency

    • Setup: Panda-MultiRef-21 had 21 image descriptions, each with 4 independent annotations of the same initial reply, 84 total. The comparison was on the position and replacement of the first differing token between the initial reply and the final accepted reply.
    • Position: Exact agreement rate was 30.95%, with a uniform random position baseline of 0.20%; with a tolerance of 4 tokens it was 44.44%, baseline about 1.84% (Figure 3; the caption says 126 pairs for human pairwise comparison). The authors state this gap corresponds to shared localization judgment.
    • Replacement: When positions matched, replacement token agreement was 69.44%. The authors state agreement is not complete; both correction position and replacement token have measurable variation, used to explain single-reference exact-match scores. Figure 3(b) also includes human leave-one-out and Doubao-Seed-2.1-pro curves over paired references (84 times) as a function of window w; the main text does not give pointwise values for these two curves.

    Other ablations and analyses

    • Production median annotation time (Table 2, P50): visual 1.65 min, audio 1.93 min, agent 31.31 min; P75 was 4.48, 3.81, 50.01 min.
    • Token-level corrections per session: 2.256, 3.034, 8.566; candidate clicks 1.684, 2.655, 5.410; double-click edits 0.572, 0.380, 3.156.
    • Zero-correction rate: visual 49.1%, audio 23.9%, agent 53.5%. Model-generated tokens per qualified reply: 207.0, 34.7, 557.0; manually typed 1.0, 0.7, 1.2.
    • Agent per qualified reply: reasoning corrections 0.34, content corrections 0.05, tool-call corrections 0.66; tool calls per session 5.230. The authors state that because agent annotation is new and the rollout model is not optimized, control is stricter and more manual typing occurs.
    • User turns per session: audio 16.163, visual 1.000, agent 1.387. Some projects label multiple SFT instances from one session; is_good=Y samples per session in the table were 1.001, 1.318, 6.018.
    • The comparison experiment did not ablate interface and paradigm separately. The paper does not report agreement values between review and human judgment.
  5. What are some points that can be further explored?

    The authors list API dependency, the sparse-error premise, and unvalidated downstream benefits as limitations.

    Limitations and future directions noted by the authors

    • API: The core interaction depends on assistant prefix continuation and top-k logprobs, and probability refresh also requires prompt_logprobs. The authors state that some proprietary APIs expose neither, so on-policy data cannot be annotated for these models (Limitations). The authors consider this constraint light in practice and list Doubao, DeepSeek, Kimi, and StepFun official APIs as already providing both; on the open-source side, vLLM and SGLang support the required features, while llama.cpp and ollama cover the core interaction.
    • Template cost: Inference and tool-call continuation for new models require adapting the response template. The authors state that with a reference implementation, coding agents can usually do this automatically, but it is still a one-time integration cost (Limitations).
    • Sparse errors: Efficiency and on-policy advantages are built on sparse errors. The authors state that when the model is far from the target and corrections become denser, both advantages weaken, and one can fall back to free editing. On-policy is relative to the rollout model at annotation time; when data is used to train another model, or the trained model's weights are continuously updated, this benefit fades (Limitations).
    • Evidence scale: The authors state that the comparison experiment is small, with 3 annotators × 21 image description prompts and one rollout model; user study participants all came from the institution's internal annotation team (Limitations).
    • Judgment and agents: Quality evaluation mainly relies on LLM-as-a-judge, with a small-scale human comparison between onPanda and POTATO. The authors state that despite position swapping, automatic judgment may still reflect the reviewing model's own preferences. The authors state that no controlled agent study was conducted; agent evidence is limited to system capabilities and deployment statistics; downstream training benefits of token-level correction signals have not been validated by training experiments (Limitations).
    • Future work: The authors are developing a token-level correcting model (the token-level counterpart of a reward model) and token-level correction optimization (the token-level counterpart of DPO), and will use this paper's benchmark to test correction capability. They also plan to close the loop between annotation and incremental training, and will soon support annotating earlier turns, turning later textual feedback into corrections of previous rollouts (Appendix D).

    Experimental coverage

    • The efficiency comparison involved 3 annotators, 21 image descriptions, and a Latin square; the rollout was Qwen3.5-35B-A3B (instruct, temperature 0.7, top-p 0.8); baselines were POTATO post-editing and Argilla four-candidate ranking (Section 3.1). The authors state that this comparison does not distinguish interface from paradigm.
    • Pairwise quality was judged by GPT-5.5 in two orders; there was also an anonymous human comparison between onPanda and POTATO. The paper does not report the number of evaluators or pairs in this human comparison, nor significance tests.
    • The PPL baseline was the mean of 4 additional rollouts per prompt, 1.171. Production statistics covered visual, audio, and agent session types (Table 2). The authors state that no controlled agent study was conducted.
    • Panda-CVL had 7,491 sessions, with 652 conversations and 2,126 instances tested; the auxiliary rollout was step-1o-turbo. Table 3 gives Format, GoodAcc, Loc.-NG, Corr.-NG, and F1 for 9 reasoning configurations and 1 instruct configuration.
    • Consistency data was Panda-MultiRef-21 (21 prompts × 4 annotators). The paper does not report downstream metrics after training with token-level correction data.
  6. Summarize the main content of the paper

    onPanda annotates on-policy alignment data with token-level corrections and reports efficiency and benchmark scores.

    onPanda is an interactive tool for annotating LLM alignment data and agent trajectories with token-level corrections.

    • Problem: Manual writing or post-editing is costly and off-policy; preference annotation provides only response-level signals and cannot fix content the model cannot sample. Agent correction also requires actually executing tools.
    • Method: Annotators locate the first unsuitable token, select a candidate or freely edit; the system truncates the suffix and continues from the corrected prefix until is_good=Y. The annotation tree exports SFT, position-aligned preference pairs, and triples of negative samples, rejected tokens, and selected tokens. Agents use response templates covering reasoning and tool parameters, connect to harnesses via MCP, and can approve or reject before execution.
    • Comparison: 3 annotators, 21 image descriptions, rollout with Qwen3.5-35B-A3B. In Table 1, onPanda median 330 s (mean 516 s), Argilla 336 s (684 s), POTATO 681 s (711 s). The text states 51.5% less than POTATO median; the abstract says 52%. GPT-5.5 win rate: onPanda 66.7%, POTATO 54.8%, Argilla 28.6%. ΔPPL: onPanda +0.86%, Argilla -0.83%, POTATO +36.31% (baseline 1.171). SFT coverage: onPanda and POTATO 21/21, Argilla 11/21. Preference pairs: onPanda 7.43, Argilla 6.00, POTATO 0.95. NASA-TLX: onPanda 3.1, Argilla 5.4, POTATO 6.8.
    • Production and Benchmark: 97.0% of tokens in qualified replies are model-generated. Panda-CVL contains 7,491 sessions. In Table 3, the highest F1 is GPT-5.5 (xhigh) at 17.09%; the authors state that format compliance does not necessarily lead to accurate corrections.
    • Conclusion: The authors believe this loop can stay close to the rollout distribution while leaving fine-grained supervision, and hope the community uses it as a post-training signal. Downstream training benefits are not validated with training experiments in this paper.
Read originalarxiv.org