Skip to content

Editing prompts

The prompt detail page is where you edit every template. It is split into two main cards — System Prompt and User Prompt — each with its own editor, view/edit toggle and AI Assistant button.

  1. Go to AI Assistant → Prompt templates.
  2. Use the filter sidebar to pick the type (e.g. generate_seo.product) and decide if you want the default or a fork.
  3. Click the row to open the detail page.

By default both cards show the prompt in view mode — rendered prose, syntax-highlighted placeholders. Click Edit to switch to a textarea.

While editing:

  • Drag the bottom-right corner to resize the textarea if you need more room.
  • The smart bar at the top tracks unsaved changes. Save when you are happy.
  • Click AI Assistant on either card to refine the prompt by chatting with the model. See AI assistant.
  • Discard rolls back the current draft. Anything you typed in the textarea is lost.
  • Save persists the changes to the database. Active workers pick up the new template on their next run — see “Cache” below.
  • The smart-bar lock indicator shows when someone else is editing the same template. Two admins cannot save the same template at the same time.

Resolved templates are cached per worker process for performance. After saving a template, you need to either:

  • Wait for the cache to expire naturally (next request after the cache TTL), or
  • Restart the workers (bin/console messenger:stop-workers and let supervisor relaunch them), or
  • Trigger any non-cached request (a fresh test on product clears the cache for that template).

For one-off changes the wait is short. For coordinated rollouts (e.g. a brand voice rewrite across all categories) restart the workers to avoid mixed output.

If you have edited a template and want to roll it back, the detail page has a Reset to default action. It restores the systemPrompt and userPrompt fields from the plugin’s shipped defaults (PromptDefaults.php) and clears the isModified flag.

name and description on each template are translatable. The system and user prompts themselves are stored once per template — they are not translated. Use the UI translation feature to read a prompt in your admin language without changing its content.

Alongside the System and User prompt cards, the prompt detail page has a Template parameters tab. These are flat runtime knobs (per-field length, source mode, custom instructions, presets) that the runtime modal and the test pane read when they open. Forks inherit every parameter from their parent template — overriding a single parameter is often cheaper than forking the whole prompt. See Template parameters for the full reference.