onPanda: Efficient Annotation of On-Policy Alignment Data for LLMs and Agents via Token-Level Correction
Lei Yang1 Mengyin Liu1,2 Jia Wang1 Hangyu Guo1 Liang Zhao1 Zheng Ge1
Kang An1 Binxing Jiao1 Qi Han1 Daxin Jiang1 Siqi Shen2 Xiangyu Zhang1
Paper 📄 | Demo 🎮 | Video ▶️ | Tweet 💬 | Dataset 📁 | Code 👨💻
TL;DR: An interactive tool that efficiently annotates on-policy alignment data for LLMs and agents via a token-level locate--correct--continue loop, automatically capturing fine-grained supervision.
Contributions of this paper:
- We propose onPanda, an annotation tool centered on token-level correction for efficiently annotating LLM alignment data and agent trajectories that stay close to the rollout model's distribution.
- We experimentally validate onPanda's annotation efficiency and the on-policy fidelity of the produced data, and demonstrate its support for multimodal and agent-trajectory annotation.
- We release the multimodal Panda-CVL dataset with an accompanying benchmark, providing public resources for research on token-level correction data.
Abstract
We present onPanda, an interactive tool for efficiently annotating LLM alignment data and agent trajectories. onPanda adopts token-level correction as its core interaction: while reading a model response, the annotator locates the first inappropriate token and either picks a substitute from the model's candidate tokens or types the correct text via free-form editing. The system then truncates everything after that position and continues generation from the corrected prefix, repeating this locate-correct-continue loop until a satisfactory response is obtained. This mechanism lets annotators precisely steer model outputs at low cost: a small controlled study suggests that onPanda reduces median annotation time by 52% over 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 and is well suited for constructing on-policy SFT and preference data. Furthermore, the token-level corrections recorded during annotation provide fine-grained supervision with precise positions and naturally paired positive--negative samples. onPanda also connects to external tools and harnesses, enabling interactive trajectory annotation in realistic environments. In addition, we release Panda-CVL, a dataset annotated with onPanda, together with a benchmark for token-level correction.
Agent Trajectory Annotation
Annotating an agent trajectory with onPanda. Reasoning and tool-call arguments remain editable at token level. Corrected tool calls can be executed in the connected environment, and the resulting trajectory continues from the corrected context.
Try agent-annotate example in the live demo, or see our blog onPanda is Efficient Agent Trajectory Annotation Tool for details.
| Tool | Paradigm | Time (s) ↓ | Win rate ↑ | PPL | Δ PPL | SFT Cov. ↑ | Pref. pairs ↑ | NASA-TLX ↓ |
|---|---|---|---|---|---|---|---|---|
| Argilla | rank 4 candidates | 336 (684) | 28.6% | 1.161 | - 0.83% | 11/21 (52%) | 6.00 | 5.4 |
| POTATO | post-editing | 681 (711) | 54.8% | 1.596 | + 36.31% | 21/21 (100%) | 0.95 | 6.8 |
| onPanda | token-level correction | 330 (516) | 66.7% | 1.181 | + 0.86% | 21/21 (100%) | 7.43 | 3.1 |
Table 1: Comparison of annotation paradigms in the controlled study. Time is reported in seconds as the median annotation time over the 21 prompts, with the mean in parentheses. Win rate is the fraction of LLM-judged pairwise comparisons each method wins against the other two. PPL is scored by the rollout model; ΔPPL is the relative change from the re-sampling baseline (1.171); smaller absolute values indicate higher on-policy fidelity. SFT Cov. is the fraction of prompts yielding a valid SFT response, and Pref. pairs is the mean number of derivable preference pairs per prompt. NASA-TLX, from the user study, is on our adapted 0–10 scale (lower is better).
Resources
- Paper (arXiv)
- Source code
- Python library
- Demo video
- Live demo
- Panda-CVL: Dataset and Benchmark for Token-Level Correction
- Panda-MultiRef-21: A Small Dataset for Studying the Distribution of Token-Level Corrections
- Efficient Agent Trajectory Annotation with onPanda - Blog
- Dynamically connect to agent environments and annotate multi-turn SFT and preference data with
tool_callsandreasoningonline
- Dynamically connect to agent environments and annotate multi-turn SFT and preference data with

