Table of Contents
Fetching ...

TreeWriter: AI-Assisted Hierarchical Planning and Writing for Long-Form Documents

Zijian Zhang, Fangshi Du, Xingjian Liu, Pan Chen, Oliver Huang, Runlong Ye, Michael Liut, Alán Aspuru-Guzik

TL;DR

TreeWriter introduces a hierarchical, tree-based document model with an integrated agentic AI assistant to support long-form writing. By combining a tree view for structure, a linear view for holistic preview, and multi-level AI editing capabilities, it aims to address coherence, consistency, and cognitive load across large documents. Evaluations across a controlled lab study and a two-month field deployment show improvements in idea exploration, drafting, and perceived authorial control, while identifying challenges in AI content quality and integration with existing workflows. The work provides design guidelines for future AI-assisted writing tools that balance automation with user agency and emphasize externalizing a document’s conceptual structure for transparency and collaboration.

Abstract

Long documents pose many challenges to current intelligent writing systems. These include maintaining consistency across sections, sustaining efficient planning and writing as documents become more complex, and effectively providing and integrating AI assistance to the user. Existing AI co-writing tools offer either inline suggestions or limited structured planning, but rarely support the entire writing process that begins with high-level ideas and ends with polished prose, in which many layers of planning and outlining are needed. Here, we introduce TreeWriter, a hierarchical writing system that represents documents as trees and integrates contextual AI support. TreeWriter allows authors to create, save, and refine document outlines at multiple levels, facilitating drafting, understanding, and iterative editing of long documents. A built-in AI agent can dynamically load relevant content, navigate the document hierarchy, and provide context-aware editing suggestions. A within-subject study (N=12) comparing TreeWriter with Google Docs + Gemini on long-document editing and creative writing tasks shows that TreeWriter improves idea exploration/development, AI helpfulness, and perceived authorial control. A two-month field deployment (N=8) further demonstrated that hierarchical organization supports collaborative writing. Our findings highlight the potential of hierarchical, tree-structured editors with integrated AI support and provide design guidelines for future AI-assisted writing tools that balance automation with user agency.

TreeWriter: AI-Assisted Hierarchical Planning and Writing for Long-Form Documents

TL;DR

TreeWriter introduces a hierarchical, tree-based document model with an integrated agentic AI assistant to support long-form writing. By combining a tree view for structure, a linear view for holistic preview, and multi-level AI editing capabilities, it aims to address coherence, consistency, and cognitive load across large documents. Evaluations across a controlled lab study and a two-month field deployment show improvements in idea exploration, drafting, and perceived authorial control, while identifying challenges in AI content quality and integration with existing workflows. The work provides design guidelines for future AI-assisted writing tools that balance automation with user agency and emphasize externalizing a document’s conceptual structure for transparency and collaboration.

Abstract

Long documents pose many challenges to current intelligent writing systems. These include maintaining consistency across sections, sustaining efficient planning and writing as documents become more complex, and effectively providing and integrating AI assistance to the user. Existing AI co-writing tools offer either inline suggestions or limited structured planning, but rarely support the entire writing process that begins with high-level ideas and ends with polished prose, in which many layers of planning and outlining are needed. Here, we introduce TreeWriter, a hierarchical writing system that represents documents as trees and integrates contextual AI support. TreeWriter allows authors to create, save, and refine document outlines at multiple levels, facilitating drafting, understanding, and iterative editing of long documents. A built-in AI agent can dynamically load relevant content, navigate the document hierarchy, and provide context-aware editing suggestions. A within-subject study (N=12) comparing TreeWriter with Google Docs + Gemini on long-document editing and creative writing tasks shows that TreeWriter improves idea exploration/development, AI helpfulness, and perceived authorial control. A two-month field deployment (N=8) further demonstrated that hierarchical organization supports collaborative writing. Our findings highlight the potential of hierarchical, tree-structured editors with integrated AI support and provide design guidelines for future AI-assisted writing tools that balance automation with user agency.
Paper Structure (57 sections, 13 figures, 7 tables)

This paper contains 57 sections, 13 figures, 7 tables.

Figures (13)

  • Figure 1: TreeWriter enables users to view and edit their documents in two complementary views: (1) the tree view and (2) the linear view. In the tree view, users develop outlines at each node, expand them into text for the final document, or split them into child nodes for further elaboration. Users can use integrated AI features to maintain coherence and consistency across related nodes. The hierarchical structure formed in this process supports easy navigation and multi-level editing. The linear view compiles complete sections by traversing the subtrees and concatenating the exported content from nodes sequentially. A chat-based writing assistant with a scoped context is available in both views, offering node-level writing and revision suggestions.
  • Figure 2: TreeWriter’s interface consists of three columns: (1) a tree navigator on the left for organizing the document structure, with a view switcher at the top for changing the middle-column view; (2) the middle column, which supports two complementary modes: a tree view (currently shown) for hierarchical editing by displaying the children of a parent node, and a linear view for previewing the composed text of that node’s subtree. A floating toolbar at the top allows navigation to higher-level nodes and searching within the document; (3) a chat-based writing assistant and AI editing buttons on the right for AI-assisted document editing.
  • Figure 3: AI-assisted abstraction creation. (1) TreeWriter lets the user freely write within a node, which can grow to any length. Later, the user can split it into reasonable chunks using the "Split into subsections" button, which leverages an LLM to generate child nodes that collectively cover the original text. (2) Once the text has been split, the user can use the "Generate outline from children" button to rewrite the parent node as a concise outline of its children. This "split&summarize" process reduces large nodes and makes the whole tree more reader-friendly. This function can also be used after substantial edits to the children, so the parent content remains in sync with the children. (3) Users can revise a section at a high level by modifying its root node and then use AI to propagate these changes to the subtree. (4) In response to a chat request, TreeWriter's writing assistant can update the child nodes to ensure that the final content reflects the revised outline. This makes it convenient to maintain consistency between the higher-level outline and the lower-level realization during the revision stage of writing. The writing assistant can also be asked to maintain the coherence of the child nodes.
  • Figure 4: Transform from Tree view to Linear view. TreeWriter connects the node-based editor to the final document through the export blocks. Only the content in the export block and the content in a leaf node without an export block appear in the final document. In the linear view, the tree (or a selected subtree) is linearized by a preorder traversal and the content exported from each node is listed in the view. (1) Only the exported content of the nodes is included in the final document. (2) In the linear view, a menu appears when the user clicks on each exported content, which allows the user to focus on the subsection from that node, jump to the corresponding node in the tree view or directly edit that node's content in place. (3) A navigator can be used to expand the scope of the linear view to the ancestors of the current section.
  • Figure 5: AI-assisted paragraph generation in TreeWriter. Users are encouraged to create and save both the outline and the corresponding prose in the nodes. (1) The user can draft an outline first, then click "Generate paragraph" to create an export block with a draft paragraph ready for inclusion. (2--3) Each export block provides two sync buttons: generating a paragraph from an outline or generating an outline from a paragraph. These features allow flexible editing from either direction while maintaining consistency between the outline and the paragraph. (4) A chat-based writing assistant can refine both outlines and paragraphs by the user's instruction, with awareness of the context of the node in the document. (5) When the writing assistant modifies existing content, a confirmation dialogue with a difference viewer will let the user review, accept, or adjust the proposed changes.
  • ...and 8 more figures