Prompt Snippets
Snippets Overview
Learn about the snippet system for creating reusable prompt content
What are Snippets?
Snippets are reusable text blocks that can be referenced within prompts. They provide a powerful templating system that allows you to:
- Create reusable content across multiple prompts
- Maintain consistency in messaging
- Update content globally across all referencing prompts
- Organize prompt content with hierarchical naming
Core Concepts
Snippet Structure
Each snippet consists of:
- Name: Hierarchical identifier (e.g.,
system/greeting
,validation/email
) - Content: The actual text content that will be inserted
- Revisions: Version history of content changes
- References: Tracking which prompts use the snippet
Reference Types
Snippets can be used in two ways:
- Referenced: Snippet maintains its identity and updates propagate automatically
- Expanded Inline: Snippet content is copied directly into the template (loses reference)
Version Control
- Latest Content: Snippets always use the most recent revision
- No Version Pinning: References point to snippets, not specific versions
- Immediate Updates: Changes to snippets affect all referencing prompts instantly
Key Benefits
Consistency
- Maintain consistent messaging across multiple prompts
- Ensure brand voice and tone alignment
- Standardize common responses and instructions
Efficiency
- Write once, use everywhere
- Reduce duplication across prompt templates
- Faster content updates across the entire system
Organization
- Hierarchical naming for logical grouping
- Clear ownership and attribution
- Centralized content management
Collaboration
- Shared snippet library across teams
- Clear revision history with commit messages
- Usage tracking to understand impact
Use Cases
System Instructions
Common Responses
Validation Rules
Templates
Integration with Prompts
Template Editor
- @-symbol triggers: Type
@snippet-name
to reference snippets - Autocomplete: Search and select from available snippets
- Preview on hover: See snippet content without expanding
- Inline expansion: Convert references to static content
Reference Management
- Automatic tracking of snippet usage in prompt revisions
- Reference cleanup when prompts are updated
- Usage count display for impact assessment
Deployment Behavior
- Only deployed prompt revisions maintain persistent snippet references
- Non-deployed revisions clean up references when updated
- Deployment transfers snippet relationships to the new revision
Important Considerations
Immediate Impact
⚠️ Critical: Updating a snippet immediately affects ALL prompts that reference it. There’s no way to pin prompts to specific snippet versions.
Breaking Changes
- Snippet updates can break dependent prompts without warning
- No rollback mechanism for snippet changes
- Testing recommended before updating widely-used snippets
Deletion Protection
- Cannot delete snippets that are currently referenced
- System shows usage count to understand impact
- Must remove all references before deletion is allowed
Getting Started
- Navigate to Settings > Snippets
- Create your first snippet with a descriptive name
- Add content that you want to reuse
- Reference in prompts using the template editor
- Monitor usage through the snippets dashboard
Check our Creating Snippets Guide for detailed setup instructions.