Prompt Composer Layout

Console UI Overview

The Prompt Composer console has a 3-panel structure, with each containing two partitions.

Console panels

The following sections described each panel of the Prompt Composer console.

Input Schema

Displays the organization and format of the incoming data from the upstream Snap. This includes the types of data fields (such as strings, integers, and dates) and their relationships. This view helps you write your prompts based on reliable data analysis and processing.

Input Data

Displays the incoming data from upstream Snaps. This view allows you to scroll through the data without having to look at the source or data preview.

Prompt Editor

Enables you to write prompts using mustache template syntax. You can click the left-facing arrow to return to the previous prompt you entered. This grays out the Rendered Template content. To return to the current prompt, click the right-facing arrow.

Inside the Prompt editor window, syntax highlighting visually distinguishes Mustache expressions from the prompt text to improve readability.

Additionally, schema suggestions and auto-completion enhance usability and reduce syntax errors by dynamically guiding users to valid fields in the input schema. This is especially helpful for deeply nested structures. When developing prompts, you can reference fields from the Input schema. When you begin typing a field name, the Prompt Editor window displays a menu of inferred fields from which you can select. The fields are added to the prompt and formatted in Mustache syntax.

The following short video demonstrates this capability:

The Prompt Editor also auto completes the field if you type the first few letters or curly braces, and then press Enter.

Assistant - Ask SnapGPT

Empowers you to write and modify prompts by leveraging SnapGPT for help. This also removes the need to use mustache template syntax. You can ask the SnapGPT to generate your prompt using natural language. When SnapGPT returns a suggested prompt, it displays in the Prompt Editor window. Learn More.

Rendered Template

Displays the template sent to the downstream LLM Snap. When you use the Assistant to generate a prompt, the result is the prompt your wrote in natural language rendered in mustache syntax.

LLM Response

Displays the LLM response. When you enter your prompt, and click Update, the Prompt Composer sends the prompt to the LLM Snap.

The input data and input schema are never sent to the LLM, but you can reference either in the Prompt Editor.

Console layout

The Prompt Composer console is easily customizable for your preferences. Besides the Default layout, which includes all of the panels, you can also choose the following:

  • Editor Focus: Includes the Input Schema and Input Data panels alongside Prompt Editor.
  • Output Focus: Includes the Rendered template and LLM response panels alongside Prompt Editor.

Starting with the Default view, when you collapse panels, the icon tray opens and the icon for the collapsed panel displays. You can click the icon to reopen the panel.

Label Description
Input schema
Input data
SnapGPT Assistant for Prompts
Rendered template
LLM response

Additional display controls

These controls enable you to customize the Prompt Composer console layout to your preferences.

UI Component Description
Enlarges or minimizes the font size.
Collapses the panel, and the icon tray displays the panel icon.
Prompt Editor Panel only. The left-facing arrow removes the current prompt or the right-facing error returns to the prompt.

Double-vertical bars display on either side of the Prompt Editor panel for horizontal adjustment.

Prompt Composer operations

During prompt development, you can use the following operations to iterate on your prompts.

Important: The description of Prompt Composer actions assumes that Autovalidate setting is enabled in User Settings and that Validation is enabled at least at the project level.
Button Description
Validate Saves the latest changes and validates the pipeline. When done, the button is replaced by the status message Validation completed.
Update response Saves the latest changes, validates the pipeline, and updates the LLM output.
Done Closes the Prompt Composer console.
X Closes the Prompt Composer console without saving changes.
Assistant panel only Sends your question or directive to SnapGPT for Prompts. See the description in the next row to understand the toggle.
Assistant panel only Includes the input schema along with your question or directive to SnapGPT for Prompts . To preven the input schema from being sent, press the toggle to the off position.

LLM Snap Selector

Click LLM Snap Selector icon to open a dropdown list of downstream LLM Snaps. This enables you to switch between different LLM vendors when testing your prompts.

For the dropdown list to be populated, you need to drag the LLM calling Snap for each vendor and configure a valid account.

For example, if your Prompt Generator Snap is followed by a OpenAI Chat Completions Snap and Google Gemini Generate Snap, both display as options in the Prompt Composer LLM model selector.