Prompt
How do I track which prompt version is live?
Latest observation
Nov 4, 2026
OpenAI APIWeb search: off
The easiest way is to give every prompt version a stable version identifier and make your app log it whenever the prompt is used.
Recommended approach
1) Version your prompts explicitly
Store prompts in a registry with fields like:
prompt_nameversionorgit_commit_shacontentstatus(draft,staging,live,deprecated)deployed_at
Example:
{
"prompt_name": "support_reply",
"version": "2026-11-04-01",
"status": "live"
}
2) Include the version in every request
When you call the model, attach the prompt version in metadata or logs:
{
"prompt_name": "support_reply",
"prompt_version": "2026-11-04-01",
"user_id": "12345",
"request_id": "req_abc123"
}
3) Log the exact prompt text and version
For audit/debugging, log:
- prompt name
- prompt version
- prompt hash
- deployment time
- model name
- response id / request id
A hash is useful to detect accidental edits:
prompt_hash = sha256(prompt_text)
4) Use a “current live” pointer
Keep a pointer like:
support_reply:live -> 2026-11-04-01
So your app always resolves the live version at runtime, and you can query which version is active at any time.
5) Track deployments separately from edits
A prompt can be:
- edited locally
- promoted to staging
- deployed live
Only the deployment should update the live pointer. That way, you know exactly which version is in production.
If you want the simplest possible setup
Use a Git commit SHA as the version:
- prompt file stored in Git
- live deployment points to a commit SHA
- app logs that SHA on each call
Example:
prompt_version = "8f3c2a1"
Good practice
Add this to your observability dashboards:
- prompt name
- live version
- deployment timestamp
- number of requests using that version
- error rate / quality metrics by version
If you want, I can also show you:
- a database schema for prompt versioning, or
- a Python/TypeScript example that logs the live prompt version automatically.