Prompt Versioning
Manage and version your prompts for consistent AI interactions
Prompt Versioning
LangWatch provides a robust prompt versioning system that allows you to manage and track changes to your prompts over time. This feature ensures consistency and enables team collaboration when working with AI models.
Using Prompts in the Optimization Studio
To get started with prompt versioning in the Optimization Studio:
- Create a new workflow or open an existing one
- Drag a signature node onto the workspace
- Click on the node to access configuration options in the right side panel
- Make your desired changes to the prompt configuration
- Save your changes as a new version
Managing Prompt Versions
Once you’ve created a prompt version, you can:
- Restore previous versions by clicking the time icon
- Rename your prompts for better organization
- Reuse prompts across different workflows
- View version history and track changes
Prompt Management Table
The Prompt Management table provides a centralized location to manage all your prompts:
- Access the prompt table from the main menu
- Create new prompts or edit existing ones
- Save different versions of your prompts
- View all saved versions in a list format
- See who created each version (team collaboration)
Team Collaboration
All prompts and their versions are shared across your project team:
- Any prompt created in the table is available in the studio
- Changes made in the studio are reflected in the prompt table
- Team members can see who created each version
- Prompts can be reused across different workflows
API Integration
LangWatch provides a comprehensive API for managing prompts programmatically. You can use the API to:
- List all prompts for a project
- Create new prompts
- Update existing prompts
- Manage prompt versions
- Delete prompts
To use the Prompts API, you’ll need to authenticate using your LangWatch API key. For detailed information about the API endpoints and authentication, see the Prompts API Reference.
The API supports the following operations:
GET /api/prompts
- Get all prompts for a projectPOST /api/prompts
- Create a new promptGET /api/prompts/:id
- Get a specific promptPUT /api/prompts/:id
- Update a promptDELETE /api/prompts/:id
- Delete a promptGET /api/prompts/:id/versions
- Get all versions for a promptPOST /api/prompts/:id/versions
- Create a new version for a prompt