Skip to main content

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:
The Prompt Record
  • 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

Work in Progress
  • Not publicly visible
  • Can be edited freely
  • Only visible to prompt owner

Published

Live Version
  • Publicly accessible
  • Returned by API calls
  • Immutable once published

Archived

Historical Version
  • 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:
v1 → v2 → v3Use for breaking changes:
  • Complete prompt rewrites
  • Changed input/output format
  • Different LLM requirements
  • New response structure
Example:

Creating New Versions

Initial Prompt Creation

When you create a new prompt, Claro automatically creates v1:
1

Create Prompt

Click New Prompt in the Claro dashboard
2

Add Content

Fill in the prompt details:
  • Title and description
  • Main prompt content
  • Tags and category
3

Publish

Click Publish - this creates and publishes v1 automatically

Creating Subsequent Versions

1

Navigate to Prompt

Open the prompt you want to update in the Claro dashboard
2

Create Draft

Click Edit or New Version to create a draft of the next version
3

Make Changes

Edit the prompt content, critique prompt, or metadata as needed
4

Preview

Test your changes before publishing. See how the new version performs.
5

Publish Version

When satisfied, click Publish to make the new version live
Publishing a new version automatically archives the previous published version. The old version remains accessible in version history but is no longer the default.

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
Use descriptive notes in draft descriptions to remember what you’re testing in each version.

Draft Best Practices

Always test draft versions before publishing:
  • Use the preview feature
  • Test with real inputs
  • Compare outputs with current version
  • Get feedback from team members
Keep clear notes about what changed:
Delete abandoned drafts to keep version history clean:
  • 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:
1

Open Prompt

Navigate to any prompt in the Claro dashboard
2

View Versions

Click Version History to see all versions
3

Compare Versions

Select two versions to see a side-by-side comparison

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:
1

View Version History

Open the prompt and click Version History
2

Select Version

Find the version you want to restore
3

Restore as New Version

Click Restore to create a new draft based on the old version
4

Publish

Review the restored version and publish when ready
Restoring a version creates a new version number. This preserves the complete history and prevents confusion about what’s current.

Emergency Rollback

For critical issues with published versions:
  1. Immediate fix: Restore previous version and publish immediately
  2. Notify users: If using API, inform integration teams of the rollback
  3. Document issue: Add notes about why the rollback was necessary
  4. 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:
In development, using :latest helps you test new versions automatically.

Version Migration Strategy

When updating versions in production:
1

Test New Version

Thoroughly test v2 in development and staging
2

Gradual Rollout

Deploy to a small percentage of users first:
3

Monitor Performance

Track metrics for both versions:
  • Response quality
  • Error rates
  • User satisfaction
4

Full Rollout

Once v2 is validated, update all code to use v2

Version Best Practices

Document what changed in each version:Good description:
Bad description:
Before publishing breaking changes:
  • Test with diverse inputs
  • Get team feedback
  • Run A/B tests if possible
  • Document expected differences
See the Testing guide for comprehensive testing strategies.
When possible, keep versions backward compatible:
  • Don’t change expected output format drastically
  • Add new features rather than removing old ones
  • Document compatibility clearly
If breaking changes are necessary, increment major version (v1 → v2).
Don’t delete historical versions:
  • They provide rollback safety
  • They document prompt evolution
  • They help understand what worked/didn’t work
For workspace prompts:
  • Notify team before publishing major versions
  • Allow review period for significant changes
  • Update documentation when versions change
  • Communicate version deprecation plans
See the Workspace Collaboration guide for team workflows.

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
Version analytics are available on Team and Enterprise plans. Use these insights to make data-driven versioning decisions.

A/B Testing Versions

Compare versions in production:
See the Testing guide for comprehensive A/B testing strategies.

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

Common causes:
  • Missing required fields
  • Validation errors in content
  • Permissions issue (workspace prompts)
Solution: Check the error message for specific validation failures. Ensure all required fields are filled.
Common causes:
  • Caching delay (up to 60 seconds)
  • Still requesting old version explicitly
  • Client-side caching
Solution: Wait 1-2 minutes for cache to clear, or verify you’re requesting the correct version.
Common causes:
  • Navigated away without saving
  • Browser crash or connection issue
  • Simultaneous editing from multiple tabs
Solution: Claro auto-saves drafts every 30 seconds. If you lose changes, check draft versions in version history.
Common causes:
  • Filtering by status (e.g., only showing published)
  • Permissions issue with workspace prompts
Solution: Clear any filters in version history view. Ensure you have permission to view all versions.

Next Steps

Workspace Collaboration

Learn how to manage versions in team environments

Testing Strategies

Test prompt versions before deploying to production

Python SDK

Access specific prompt versions programmatically

Performance Guide

Optimize version fetching and caching