Skip to main content
QUICK REVIEW

[Paper Review] PromptChainer: Chaining Large Language Model Prompts through Visual Programming

Tongshuang Wu, Ellen Jiang|arXiv (Cornell University)|Mar 12, 2022
Software Engineering ResearchComputer Science8 citations
TL;DR

PromptChainer is a visual programming interface that enables non-experts to author and debug chains of large language model (LLM) prompts through an interactive, node-based workflow. It supports data transformation between steps, function signature definition, and granular debugging, significantly improving transparency and control in complex LLM application prototyping.

ABSTRACT

While LLMs can effectively help prototype single ML functionalities, many real-world applications involve complex tasks that cannot be easily handled via a single run of an LLM. Recent work has found that chaining multiple LLM runs together (with the output of one step being the input to the next) can help users accomplish these more complex tasks, and in a way that is perceived to be more transparent and controllable. However, it remains unknown what users need when authoring their own LLM chains -- a key step for lowering the barriers for non-AI-experts to prototype AI-infused applications. In this work, we explore the LLM chain authoring process. We conclude from pilot studies find that chaining requires careful scaffolding for transforming intermediate node outputs, as well as debugging the chain at multiple granularities; to help with these needs, we designed PromptChainer, an interactive interface for visually programming chains. Through case studies with four people, we show that PromptChainer supports building prototypes for a range of applications, and conclude with open questions on scaling chains to complex tasks, and supporting low-fi chain prototyping.

Motivation & Objective

  • To identify and address key challenges in authoring LLM chains, particularly for non-AI experts.
  • To support users in transforming intermediate LLM outputs across chain steps.
  • To enable debugging at multiple granularities, especially for cascading errors from LLM instability.
  • To explore how visual programming can scaffold mental models of LLM capabilities and task decomposition.
  • To investigate support for low-fidelity prototyping of LLM chains before full prompt engineering.

Proposed method

  • Designing a visual interface with a Chain View for structuring node-edge relationships and a Node View for editing individual LLM prompts.
  • Implementing function signatures for each LLM node to standardize input/output formats and improve composability.
  • Supporting end-to-end execution and selective node execution to enable incremental testing and debugging.
  • Integrating JavaScript helper nodes to handle data transformations and post-processing not natively supported by LLMs.
  • Providing execution visualization and tracing capabilities to track input propagation through the chain.
  • Enabling users to prototype chains with placeholder nodes and refine prompts iteratively during development.
Figure 1 . The PromptChainer interface. (A) The Chain View visualizes the chain structure with node-edge diagrams (enlarged in Figure 3 ), and allows users to edit the chain by adding, removing, or reconnecting nodes. (B) The Node View supports implementing, improving, and testing each individual no
Figure 1 . The PromptChainer interface. (A) The Chain View visualizes the chain structure with node-edge diagrams (enlarged in Figure 3 ), and allows users to edit the chain by adding, removing, or reconnecting nodes. (B) The Node View supports implementing, improving, and testing each individual no

Experimental results

Research questions

  • RQ1What challenges do non-expert users face when authoring chains of LLM prompts for complex tasks?
  • RQ2How can visual programming interfaces support data transformation and debugging across multiple LLM steps?
  • RQ3What role does interactive feedback play in refining LLM prompts during chain development?
  • RQ4How do users approach task decomposition and chain structure design when prototyping with LLMs?
  • RQ5What support is needed for low-fidelity prototyping of LLM chains to reduce upfront effort?

Key findings

  • Users built chains not only to overcome LLM limitations but also to make their prototypes more extensible and maintainable.
  • Participants often refined their pre-existing prompts during interaction with the interface, indicating that observing node interactions reshaped their understanding of prompt behavior.
  • The use of JavaScript helper nodes enabled effective post-processing, such as appending 'The End' to stories, which could not be reliably achieved via prompting alone.
  • Cascading errors and coherence issues emerged in chains with parallel, interdependent sub-tasks, such as inconsistent narrative flow in story generation.
  • Tracking input-to-output mappings became ambiguous in complex chains, especially when nodes produced multiple outputs (e.g., entity extraction), highlighting the need for enhanced tracing.
  • Users exhibited varied strategies—some built step-by-step, others sketched full structures first—indicating diverse mental models of chain authoring.
Figure 2 . An example chain for prototyping music chatbot, modified from a pilot user’s chain (its overview is in Figure 1 ). We provide primary input-output examples, and annotate the node functionalities are annotated inline.
Figure 2 . An example chain for prototyping music chatbot, modified from a pilot user’s chain (its overview is in Figure 1 ). We provide primary input-output examples, and annotate the node functionalities are annotated inline.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.