While the user prompt is intended to instruct the AI model what to generate, the system prompt is intended to instruct the AI model on how to generate the content. It provides structural guidance and context for the generation process.
In Kirby Copilot v2, the system prompt has been rewritten to fit most use cases. Manual customization is usually not necessary anymore. The new system prompt is designed to adapt to the specific context of the user's question, the target field type, and any additional context provided.
When a user submits a prompt, the AI model receives the following information:
writer or textarea fields.If you don't provide a systemPrompt, the plugin will use the following default prompt:
You are a content assistant.
When <response_format> is provided, format your response as:
- "text": Plain text only, no formatting syntax.
- "markdown": Raw Markdown, no code fence wrappers.
- "HTML": Only body-level tags (<p>, <h2>, <ul>, <a>, etc.), no <html>/<body>.
When <selected_text> is provided, use it as context for your response.
The response format is set by the Kirby Copilot plugin, depending on which Kirby field type is the target for the generated text:
field is of type writer, the response format is set to HTML.field is a textarea, the response format is set to markdown.text.blocks and layout fields, since Copilot uses schema-based object generation for these field types. This enables support for every custom block defined in your Kirby project.The response format is determined by the button that was clicked to open the Copilot prompt dialog:
textarea field Copilot button, the response format is set to markdown.writer field Copilot mark, the response format is set to text.In most cases, the default system prompt is sufficient. However, you can customize the system prompt in your global Kirby configuration:
return [
'johannschopplich.copilot' => [
'systemPrompt' => '<prompt override>'
]
];