Skip to main content

How to Use Snippet Versions from Your Prompts or Chats

Learn how to leverage different snippet versions in your prompts and chats to maintain both production and testing environments seamlessly.

Promptitude Team avatar
Written by Promptitude Team
Updated over a week ago

Snippet versioning in Promptitude allows you to maintain multiple iterations of your content while clearly designating which ones are for production use and which are for testing. This help article explains how to effectively use different snippet versions within your prompts and chats.

πŸ”” Important: Only Live (production) or Preview (staging) versions can be used in your prompts and chats. Draft versions are not available for use.

πŸ“Œ Using Snippet Versions in Prompts

You have two methods to use snippet versions in your prompts:

Method 1: Using the Snippet List

  1. Navigate to the input tab and select a snippet from your list

  2. The system will map the snippet and copy its name to your clipboard

  3. Paste the snippet name {{snippet.name}} at your desired location within the prompt

  4. By default, the Live version will be used

To use the Preview version instead:

  1. Open the snippet details after adding it

  2. Click the "Use as preview" button (it will light up with a yellow dot)

  3. The system will now use the Preview version even though you're using the standard {{snippet.name}} format

  4. You can verify which version is being used with the Preview Prompt functionality

Method 2: Version-Specific Suffixes

This more direct method is ideal for users familiar with prompt structuring:

  • For the Production (Live) version: Add .live suffix

    • Example: {{snippet.name.live}}

  • For the Staging (Preview) version: Add .preview suffix

    • Example: {{snippet.name.preview}}

πŸ“Œ Using Snippet Versions in Chats

Since chats don't support snippet mapping, you'll need to use Method 2 described above:

  1. Type the snippet name in your conversation

  2. Add the specific suffix for the version you want to use:

    • .live for the production version

    • .preview for the staging version

πŸ“Œ Note: This structure works both within Promptitude and when integrating via API.


✏️ How Versioning Works in Promptitude

Versions in Promptitude are automatically assigned sequential numbers:

  1. To create a new version, make your changes, click Save, then select "New version" from the submenu

  2. Each version receives a sequential number (Version 1, Version 2, etc.)

  3. Access specific versions using the version dropdown menu near the save button

  4. Your screen will update to display the selected version for editing or review

Snippets in Promptitude can have one of three statuses:

  • Live - Your production version that's actively being used in your live environment

  • Preview - Your testing version for experimenting without affecting production

  • Draft - All other versions (works in progress or archived versions)

Important limitations:

  • You can have only one Live version and one Preview version at any time

  • All other versions remain as drafts

The version menu provides several important actions:

  • Make Live: Sets the selected version as your production version

  • Set as Preview: Designates the version for staging/testing purposes

  • Edit Version Details: Modify the name and description for better identification

  • Delete Version: Removes unwanted versions

βœ… Best Practices for Using Snippet Versions

  • Check version history to see when specific versions were marked with certain statuses

  • Use the Preview Prompt functionality to verify which version of your snippets will be used

  • Label your versions with clear descriptions to understand their purpose

  • Test new snippets in Preview status before promoting them to Live

By effectively using snippet versions, you can maintain a stable production environment while safely testing new content improvements.

Did this answer your question?