Change a prompt without a deploy
Keep prompts in telemetry.dev with versions and labels. Your code fetches the version labeled production, and each trace shows which version ran.
Your coding agent finds the prompts in your code, gives you each one to paste into telemetry.dev, and moves the code to getPrompt.
Promptssupport/refund-reply
gpt-4.1-minitemperature 0.2
system
You are the support agent for {{store_name}}. Refunds above {{refund_limit}} need a human.
user
Order {{order_id}}: {{customer_message}}
- order_id
- 4471
- customer_message
- I was charged twice for the desk
v81.2s$0.0006
I see two charges of $389 for order 4471. I have refunded the second one; it reaches your card in 5 to 10 days.
Recorded as a trace
Ship a version. Watch what it costs.
Labels decide which version your code gets. Move a label to part of the traffic first, then compare the versions on calls, errors, latency, and cost.
Give a new version 10% of the calls first
Promote a version to production for 1 to 99% of calls. If it goes wrong, move the label back to the last version.
v8 gets10%
v8 · 10%v7 · 90%
− Refunds above {{refund_limit}} need a human.
+ Refunds above {{refund_limit}} need a human. Say so before you ask
+ for the order number.
See the version behind each answer
The model call carries the prompt name, version, and label. Filter traces by prompt.
chat gpt-4.1-mini1.16s
Prompt
- Name
- support/refund-reply
- Version
- v8
- Label
- production · 10%
Open in the editor
Output
I see two charges of $389 for order 4471…
Compare versions on real calls
Calls, errors, p50 latency, and cost per call for each version.
Fetch the prompt in your code
The SDK gets the version that carries the label, fills in the variables, and records the prompt on the spans of the model call.
- 01Write and test the prompt
- 02Label a version production
- 03Fetch it in your code
Test runs use your own model key. The model calls of the telemetry.dev SDKs and provider integrations, such as OpenAI or Anthropic, record the prompt.
import { getPrompt, withPrompt } from "@telemetry-dev/sdk";
const prompt = await getPrompt("support/refund-reply", { label: "production" });
const messages = prompt.compile({ order_id, customer_message });
const reply = await withPrompt(prompt, () => callModel(messages));from telemetry_dev import get_prompt, with_prompt
prompt = get_prompt("support/refund-reply", label="production")
messages = prompt.compile(order_id=order_id, customer_message=customer_message)
with with_prompt(prompt):
reply = call_model(messages)curl "https://api.telemetry.dev/v1/prompts?name=support/refund-reply&label=production" \
-H "Authorization: Bearer $TELEMETRY_DEV_API_KEY"Trace your next AI request
Choose an integration, add your project API key, and run an instrumented request.
Start free
30,000 ingestion units a month, one per span, log record, or metric data point. No credit card required.
npm install @telemetry-dev/sdkTalk to an engineer
Our team shows you tracing, cost tracking, and privacy controls for the frameworks and model providers that you use.