@@ -3,6 +3,7 @@ title: Prompt management
33---
44
55import PromptsAlpha from " ./_snippets/prompts-alpha.mdx"
6+ import { ProductScreenshot } from " components/ProductScreenshot"
67
78<PromptsAlpha />
89
@@ -136,7 +137,46 @@ One version can hold several labels (for example `production` and `staging` on t
136137
137138### Managing labels
138139
139- Set or move a label via the API:
140+ #### In the app
141+
142+ Each version in the version history shows the labels pointing at it.
143+
144+ <ProductScreenshot
145+ imageLight = " /images/docs/prompt-management/labels-versions-light-mode.png"
146+ imageDark = " /images/docs/prompt-management/labels-versions-dark-mode.png"
147+ alt = " Labels on prompt versions in the version history"
148+ classes = " rounded"
149+ />
150+
151+ To set a label:
152+
153+ 1 . Open the prompt and find the version in the version history
154+ 2 . Click ** Add label** on that version
155+ 3 . Pick an existing label, or type a name to create a new one
156+
157+ If the label is already on another version, PostHog asks you to confirm the move:
158+
159+ <ProductScreenshot
160+ imageLight = " /images/docs/prompt-management/labels-move-light-mode.png"
161+ imageDark = " /images/docs/prompt-management/labels-move-dark-mode.png"
162+ alt = " Confirming a label move"
163+ classes = " rounded"
164+ />
165+
166+ To remove a label, click the ** ×** on the label and confirm.
167+
168+ The ** History** tab on the prompt shows every label change: who created, moved, or removed a label, and when.
169+
170+ <ProductScreenshot
171+ imageLight = " /images/docs/prompt-management/labels-history-light-mode.png"
172+ imageDark = " /images/docs/prompt-management/labels-history-dark-mode.png"
173+ alt = " Label history on a prompt"
174+ classes = " rounded"
175+ />
176+
177+ #### With the API
178+
179+ Set or move a label:
140180
141181``` bash
142182curl -X PUT " https://us.posthog.com/api/environments/:project_id/llm_prompts/name/:prompt_name/labels/production/" \
0 commit comments