Abstract
Large Language Models (LLMs) have shown significant potential in generating technical explanations, yet their use in authoring high-quality programming tutorials remains challenging due to a lack of transparency and limited user control. We present SPROUT, an interactive authoring tool that transforms the "black box" of LLM generation into a transparent, manageable "Tree of Thoughts." SPROUT allows authors to visualize reasoning steps, verify code-text mappings, and refine content through granular manipulation. Our evaluation demonstrates that SPROUT improves engagement and ease of modification compared to standard chat-based interfaces.
Introduction
While LLMs can generate code explanations efficiently, professional tutorial authoring requires high precision and iterative refinement. Current AI-assisted workflows suffer from three primary limitations: (1) Transparency, as models generate text in a "one-shot" manner without exposing reasoning; (2) Control, where minor prompt changes lead to unpredictable outputs; and (3) Verification, as authors must manually ensure every paragraph accurately reflects the source code. SPROUT addresses these by integrating the Tree-of-Thought (ToT) methodology with interactive visualization.
Methodology and System Architecture
SPROUT decomposes the tutorial authoring task into discrete actions, such as writing titles, backgrounds, and specific code explanations. The system utilizes a "Reason and Act" (ReAct) loop where an agent observes the source code, formulates a thought, and executes an action.
The underlying architecture maintains a branching exploratory process rather than a linear conversation. This allows the system to generate multiple alternative explanations for the same code snippet, which the user can then evaluate and select.
Interactive Interface
The SPROUT interface provides several specialized views to facilitate the authoring process:
- Outline View: Displays the hierarchy of the LLM’s "thoughts" and alternative generation paths as a tree graph.
- Chain View: Visually links generated paragraphs to specific lines of source code, reducing the mental overhead of verification.
- Node Space View: Projects alternative explanations onto a 2D plane using text embeddings and UMAP. This allows users to navigate semantic similarities and select the most appropriate version of a paragraph.
Users can interactively "prune" the tree by grouping nodes to condense content, splitting nodes for more detail, or trimming redundant branches. This "garden" metaphor shifts the workflow from prompt engineering to navigating and selecting high-quality AI-generated content.
Evaluation and Results
We evaluated SPROUT through a technical assessment and a user study involving 12 participants.
- Technical Performance: In a test across 10 diverse code snippets, the system achieved an 86.2% accuracy in automatically extracting text-code connections, significantly reducing the manual verification burden.
- User Experience: SPROUT outperformed the baseline (ChatGPT) in "ease of modification" ($p = .007$) and "engagement" ($p = .038$). Participants rated SPROUT more effective for generating (4.50 vs 3.83 on a 5-point scale) and understanding (4.17 vs 3.83) tutorial content.
Discussion and Future Work
SPROUT demonstrates that exposing the intermediate reasoning of LLMs builds user trust and provides superior control. However, the system is currently limited by the context window of underlying models and focuses primarily on text and code. Future work could explore multimodal support (e.g., diagrams and videos) and "multi-path" tutorials tailored to different audience expertise levels.
Summary updated