arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2603.29678cs.AI
收藏

面向视角的对话编译器用于代理轨迹分析

View-oriented Conversation Compiler for Agent Trace Analysis

Stanford University(斯坦福大学)

Lvmin Zhang, Maneesh Agrawala

AI总结:

本文提出VCC编译器,将原始代理JSONL日志转换为结构化视角,提升轨迹分析质量,减少token消耗并提升模型性能。

摘要:

在代理系统和上下文工程中,代理轨迹具有日益增长的分析价值,但大多数先前工作将对话格式视为琐碎的实现细节。现代代理对话包含深度结构化内容,包括嵌套工具调用和结果、推理链块、子代理调用、上下文窗口压缩边界以及注入的系统指令,其复杂性远超简单用户-助手交流。将此类轨迹直接以纯文本、JSON、YAML或grep方式输入反射器或其他分析机制会显著降低分析质量。本文提出VCC(面向视角的对话编译器),即一个编译器(词法分析、解析、中间表示、下放、生成),将原始代理JSONL日志转换为一系列结构化视角:一个完整视角(无损 transcript 作为标准行号坐标系统)、一个用户界面(UI)视角(重构交互作为用户实际感知的交互)以及一个自适应视角(由相关性谓词控制的结构保持投影)。在AppWorld的上下文工程实验中,仅将反射器的输入格式从原始JSONL替换为VCC编译的视角,导致所有三种模型配置的通过率均更高,同时将反射器的token消耗减少了一半到三分之二,并产生更简洁的学得记忆。这些结果表明,消息格式作为上下文工程的基础设施,而非偶然的实现选择。

英文摘要:

We observe that an agent trace is a structured document. A coding agent session contains user turns, assistant text, chain of thought blocks, tool calls, tool results, subagent invocations, compaction boundaries, and harness injected directives, and may exceed ten thousand JSONL lines. Effective trace analysis requires a lossless record, a session level overview, and content retrieval with conversational roles. To this end, we propose VCC, namely View oriented Conversation Compiler, which lexes, parses, and lowers a raw JSONL log into three views based on one intermediate representation. The full view provides the lossless transcript and defines the line number coordinate system. The UI view reconstructs the interaction perceived by the user. The adaptive view selects relevant trace content and preserves role annotations and line range pointers. Line numbers are assigned before view lowering, ensuring that all pointers can be resolved to the full view. We evaluate VCC in a context engineering experiment on AppWorld by varying the input format of the reflector. Experiments with three model configurations and two test splits show that VCC improves aggregate task goal pass rates by 1.1 to 4.2 points, reduces reflector token consumption by one half to two thirds, and generates smaller memory files. These results demonstrate the effectiveness of trace format as an important component of context engineering infrastructure.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑