构建树状结构对话框架,解决多话题对话中上下文混乱问题
Conversation Tree Architecture: A Structured Framework for Context-Aware Multi-Branch LLM Conversations
- 将对话组织成树形结构,每个节点独立维护上下文
- 通过父子节点间规则化上下文流动,避免不同话题互相干扰
- 支持临时分支的智能合并或清除,适合复杂多轮交互场景
大型语言模型(LLMs)在长时、多主题对话中应用日益广泛,但现有对话界面采用扁平、追加式的结构,导致所有上下文堆积在一个无边界窗口中,使不同话题的语义相互污染,逐步降低回复质量。我们称此为逻辑上下文污染。本文提出对话树架构(Conversation Tree Architecture, CTA),一种分层框架,将对话组织为离散、上下文隔离的节点树。每个节点维护独立的局部上下文窗口;通过结构化机制控制父节点与子节点间的上下文传递:分支创建时向下传递,分支删除时向上回溯。此外引入瞬态节点(volatile nodes),即临时分支,其局部上下文需在清除前选择性上提或永久丢弃。我们形式化了架构的基本操作,分析了上下文流动中的开放设计问题,关联了先前的LLM记忆管理研究,并展示了原型实现。CTA为结构化对话上下文管理提供了原则性基础,可自然拓展至多智能体场景。
原文摘要 · Abstract (English)
Large language models (LLMs) are increasingly deployed for extended, multi-topic conversations, yet the flat, append-only structure of current conversation interfaces introduces a fundamental limitation: all context accumulates in a single unbounded window, causing topically distinct threads to bleed into one another and progressively degrade response quality. We term this failure mode logical context poisoning. In this paper, we introduce the Conversation Tree Architecture (CTA), a hierarchical framework that organizes LLM conversations as trees of discrete, context-isolated nodes. Each node maintains its own local context window; structured mechanisms govern how context flows between parent and child nodes, downstream on branch creation and upstream on branch deletion. We additionally introduce volatile nodes, transient branches whose local context must be selectively merged upward or permanently discarded before purging. We formalize the architecture's primitives, characterize the open design problems in context flow, relate our framework to prior work in LLM memory management, and describe a working prototype implementation. The CTA provides a principled foundation for structured conversational context management and extends naturally to multi-agent settings.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。