Prompt
How do I edit prompts without redeploying code?
Latest observation
Nov 4, 2026
OpenAI APIWeb search: off
The usual way is to separate prompts from application code and store them in a place you can change at runtime.
Common approaches:
-
Config file / env-driven prompts
- Put prompt text in a JSON/YAML/config file.
- Load it at startup or on demand.
- Good for simple systems, but often still needs restart unless you add reload logic.
-
Database-backed prompt store
- Save prompts in a DB table with fields like:
prompt_nameversioncontentupdated_atactive
- Your app fetches the current prompt by name/version.
- You can edit prompts from an admin UI without redeploying.
- Save prompts in a DB table with fields like:
-
Remote config / feature flag service
- Use tools like LaunchDarkly, Firebase Remote Config, AWS AppConfig, etc.
- Best when you want controlled rollout, targeting, and versioning.
-
Prompt management tools / prompt CMS
- Some platforms let you author, test, version, and deploy prompts separately from code.
- Useful if multiple people edit prompts frequently.
-
Prompt registry via Git + hot reload
- Store prompts in a repo, but have your app pull the latest prompt definitions periodically or on webhook trigger.
- This avoids redeploying the whole app, though it still uses Git as source of truth.
Best practice:
- Version your prompts
- Add rollback support
- Log which prompt version was used for each request
- Validate prompt syntax/content before activating it
- Cache prompts with a short TTL so edits propagate quickly without hammering the backend
A simple architecture:
- App code contains only:
- prompt lookup logic
- fallback defaults
- validation
- Prompts live in:
- DB / remote config / prompt service
- Admin UI or API updates prompt content
- App reads latest active prompt dynamically
If you want, I can show:
- a simple DB schema
- a Python/Node example
- or a production-ready prompt versioning design.