Latitude includes built-in version control, allowing you to manage the lifecycle of your prompts, track changes over time, and collaborate effectively with your team.

Key Concepts

  • Version: A snapshot of all prompts within a project at a specific point in time.
  • Draft: A work-in-progress version where you can safely make and test changes without impacting the live, published version.
  • Published Version: The official, live version of your prompts that is served by the AI Gateway and used in production applications.

Managing Drafts and Versions

Creating and Switching Drafts

  1. Open your project.
  2. Click the version dropdown in the sidebar (usually shows “Published” or the current draft name).
  3. Click “New version” to create a new draft based on the currently published version.
  4. Alternatively, select an existing draft from the list to switch to it.
  5. All changes made while in a draft are saved to that specific draft.

Viewing and Comparing History

  1. Click the version dropdown.
  2. Select “Version history”.
  3. Here you can see a list of all published versions and drafts.
  4. Select two versions to compare their differences side-by-side.

Publishing Changes

When a draft is ready to go live:

  1. Make sure you are viewing the draft you want to publish.
  2. Click the “Publish” button (often located near the version dropdown).
  3. Add a descriptive version note (e.g., “Improved error handling for user queries”). This helps track changes.
  4. Confirm the publish action.

Your draft is now the new “Published” version, and the AI Gateway will start serving these updated prompts.

Collaboration Tips

  • Use Drafts for Development: Encourage team members to create drafts for new features or significant changes to avoid conflicts.
  • Descriptive Version Notes: Write clear notes when publishing to explain what changed and why.
  • Regular Publishing: Publish stable changes regularly rather than keeping large, long-running drafts.
  • Review Before Publishing: Have a team member review changes in a draft before it goes live, especially for critical prompts.
  • Utilize Comparison: Use the diff view in version history to understand changes made by others.

Next Steps