Prompt Versioning
Bayt OS, The Collaborative Intelligence platform, provides a powerful version control system for AI prompts, enabling safe editing, complete history tracking, and collaborative workflows.Understanding Versions
Claro uses a two-tier versioning architecture:- Prompt Metadata
- Version Content
- Title, description, and slug
- Ownership and privacy settings
- Pointer to published version
- Workspace or user namespace
Version States
Each prompt version exists in one of three states:Draft
- Not publicly visible
- Can be edited freely
- Only visible to prompt owner
Published
- Publicly accessible
- Returned by API calls
- Immutable once published
Archived
- Preserved for reference
- Accessible in version history
- Can be restored if needed
Semantic Versioning for Prompts
Claro uses semantic versioning to help teams understand the impact of changes:Version Naming Convention
While Claro uses simple version numbers (v1, v2, v3), teams should adopt semantic meaning:- Major Versions
- Minor Versions
- Patch Updates
- Complete prompt rewrites
- Changed input/output format
- Different LLM requirements
- New response structure
Creating New Versions
Initial Prompt Creation
When you create a new prompt, Claro automatically creates v1:Create Prompt
Add Content
- Title and description
- Main prompt content
- Tags and category
Publish
Creating Subsequent Versions
Navigate to Prompt
Create Draft
Make Changes
Preview
Publish Version
Working with Drafts
Draft Workflow
Drafts allow safe experimentation without affecting production:Multiple Drafts
You can maintain multiple draft versions:- Work on incremental improvements (draft v2)
- Experiment with major rewrites (draft v3)
- Test different approaches simultaneously
Draft Best Practices
Test Before Publishing
Test Before Publishing
- Use the preview feature
- Test with real inputs
- Compare outputs with current version
- Get feedback from team members
Document Changes
Document Changes
Clean Up Old Drafts
Clean Up Old Drafts
- Remove experimental versions that didn’t work
- Consolidate similar drafts
- Keep only active work-in-progress versions
Version Comparison
Viewing Version History
Access complete version history in the dashboard:Open Prompt
View Versions
Compare Versions
What Gets Compared
The comparison view shows differences in:- Prompt content - Main instruction text
- Critique prompt - Feedback instructions
- Tags - Categorization changes
- Metadata - Description and settings updates
Visual Diff
The comparison interface highlights:- + Added content
- - Removed content
- ~ Modified sections
Rolling Back Changes
Restoring Previous Versions
If a new version causes issues, you can rollback:View Version History
Select Version
Restore as New Version
Publish
Emergency Rollback
For critical issues with published versions:- Immediate fix: Restore previous version and publish immediately
- Notify users: If using API, inform integration teams of the rollback
- Document issue: Add notes about why the rollback was necessary
- Fix and republish: Address the issue in a new draft and test thoroughly
Versioning in API Calls
Specifying Versions
Always specify versions in API calls for consistency:Version Pinning
Pin versions in production for stability:- Development
- Staging
- Production
:latest helps you test new versions automatically.Version Migration Strategy
When updating versions in production:Test New Version
Gradual Rollout
Monitor Performance
- Response quality
- Error rates
- User satisfaction
Full Rollout
Version Best Practices
Use Descriptive Version Notes
Use Descriptive Version Notes
Test Major Changes Thoroughly
Test Major Changes Thoroughly
- Test with diverse inputs
- Get team feedback
- Run A/B tests if possible
- Document expected differences
Maintain Version Compatibility
Maintain Version Compatibility
- Don’t change expected output format drastically
- Add new features rather than removing old ones
- Document compatibility clearly
Keep Important Versions Archived
Keep Important Versions Archived
- They provide rollback safety
- They document prompt evolution
- They help understand what worked/didn’t work
Coordinate with Team
Coordinate with Team
- Notify team before publishing major versions
- Allow review period for significant changes
- Update documentation when versions change
- Communicate version deprecation plans
Version Analytics
Tracking Version Performance
Monitor how different versions perform:- Usage metrics - Which versions are used most
- Success rates - Error rates by version
- User feedback - Ratings and feedback per version
- Performance - Response times and quality
A/B Testing Versions
Compare versions in production:Common Versioning Patterns
Progressive Enhancement
Start simple, add features incrementally:Specialized Versions
Create versions for different use cases:Quality Iterations
Continuously improve based on feedback:Troubleshooting
Can't publish draft version
Can't publish draft version
- Missing required fields
- Validation errors in content
- Permissions issue (workspace prompts)
API returns old version after publishing
API returns old version after publishing
- Caching delay (up to 60 seconds)
- Still requesting old version explicitly
- Client-side caching
Lost draft changes
Lost draft changes
- Navigated away without saving
- Browser crash or connection issue
- Simultaneous editing from multiple tabs
Version history not showing all versions
Version history not showing all versions
- Filtering by status (e.g., only showing published)
- Permissions issue with workspace prompts