Skip to content

Prompts overview

Every AI operation in P2Lab AI is driven by a prompt template. Templates are stored in the database, can be edited from the admin, and can be forked per category, manufacturer or rule. This page covers the model.

  • System prompt — instructions the model treats as authoritative. Defines the task, the output format, the constraints.
  • User prompt — the per-call payload. Substituted with placeholders at runtime (product name, current value, target languages, custom instructions).

Both parts can contain {placeholders} that the plugin resolves before sending the request. See Placeholders.

When the plugin builds a request, the final prompt is assembled from three sources. They can each contain formatting rules and they sometimes overlap — knowing the order helps when something comes out wrong.

  1. Base system prompt — the template’s systemPrompt field. Defines the task and global rules (length, HTML structure, tone).
  2. Per-field block — when a job targets multiple fields (e.g. name + description + meta title), the plugin injects a per-field block for each one with format and tone instructions specific to that field.
  3. HTML output directive — appended to the user prompt for HTML-typed fields. Tells the model which tags are allowed (<p>, <strong>, <em>, <ul><li>, <ol><li>, <h1><h6>) and forbids markdown.

The plugin ships around thirty template types covering every feature: SEO, content, alt text, extraction, translation, improve, unify, inline editor, image edit and meta-prompts (forks, learning, brainstorm). See Template types for the full list.

Each type has a default template marked isDefault=true. You can edit the default, but you can also create forks that override the default for specific products — scoped by Shopware Rule, by category tree, by manufacturer, or by sales channel. See Forks.

Templates also carry parameters — flat runtime knobs (length min/max per field, source mode, custom instructions, presets) that the runtime modal and test pane read on open. Parameters inherit down the fork chain independently of the prompts themselves, so a fork can override just fieldConfig.description.lengthMax without rewriting any prompt text. See Template parameters.

  • AI Assistant → Prompt templates lists every template. Filter by type to find the one you want.
  • Click into any template to open the prompt detail page with system and user prompt editors, a Template parameters tab, a test panel, and the AI assistant chat.
  • The Add template button on the list creates a brand-new image-edit preset of your own — written by hand or generated from a reference image. See Add a template.