This feature is available on all Portkey plans.
Effective prompt management includes tracking changes, controlling access, and deploying the right version at the right time. Portkey’s prompt versioning system helps you maintain a history of your prompt iterations while ensuring production stability.
Every time you make changes to a prompt template, Portkey tracks these modifications. The versioning system allows you to:
Updating vs. Publishing a Prompt Template
When working with prompts in Portkey, it’s important to understand the difference between updating and publishing:
Whenever any changes are made to your prompt template, Portkey saves your changes in the browser but they are not pushed to production. You can click on the Update
button on the top right to save the latest version of the prompt on Portkey.
Publishing a prompt version marks it as the default version that will be used when no specific version is requested. This is especially important for production environments.
Updating the Prompt does not automatically update your prompt in production. While updating, you can tick Publish prompt changes
which will also update your prompt deployment to the latest version.
All of your prompt versions can be seen by clicking the Version History
button on the playground:
You can Restore
or Publish
any of the previous versions by clicking on the ellipsis menu.
To compare different versions of your prompt:
This helps you understand how prompts have evolved and which changes might have impacted performance.
By default, when you pass the PROMPT_ID
in prompts.completions.create
method, Portkey sends the request to the Published
version of your prompt.
You can also call any specific prompt version by appending version identifiers to your PROMPT_ID
.
For example:
Here, the request is sent to Version 12 of the prompt template.
Portkey supports special version references:
Important Notes:
@latest
refers to the most recent version, regardless of publication statusPublished
versionLabels provide a more flexible and meaningful way to reference prompt versions compared to version numbers. You can add version tags/labels like platform-team
, gpt-model-prompt
to any prompt version to track changes and call them directly:
To create or manage labels:
You can now assign multiple custom labels to a single prompt version in Portkey. This makes it easier to promote a prompt version in it’s developemtn cycle.
production
, staging
, development
which cannot be removed.development
for experimental versionsstaging
for versions ready for testingproduction
for versions ready for real usersLabels make it easy for you to test prompt versions through different environments.