Skip to main content

Content Generation in Assistant


The Content Generation Application is a tool designed to create tailored, structured content—such as reports, articles, and more—by customizing prompts with parameters like length, keywords, and tone of voice.

assistant-generate-start-page

To generate the text:

  1. Navigate to the "Generate" Application in the sidebar.
  2. Select a Template from the selection field.
  3. Fill out the input fields below as needed. Fields with an asterisk (*) are mandatory.
  4. Click the button "Generate".
  5. The generated text will appear in the Generated results area.

To edit the generated content:

  1. Generate your content.
  2. Click on it in the Generated results area and start editing it.

assistant-generate-edit-content


To copy the generated content:

  1. Generate your content.
  2. Click on the "Copy" icon in the Generated results area.
  3. The generated text will be copied and can then be pasted anywhere.

assistant-generate-copy-content


To rate a generated content:

Two options are available to provide feedback for a generated content to report, whether the result matches the expectation or not.

Positive feedback:

  1. Click on the "Like" icon below the generated text to provide positive feedback.
  2. For on-premise deployments, feedback will be stored locally. You can extract it and send it to us to provide your feedback.

assistant-generate-like

Negative feedback

  1. Click on the "Dislike" icon below the generated text to provide negative feedback.
  2. A popup will appear to provide additional optional information.
    1. Select multiple feedback options:
      1. Made up/Incorrect
      2. Too short/Incomplete
      3. Bad grammar
      4. Biased/Discriminating
      5. Too long/Lengthy
      6. Irrelevant content
    2. Add a comment in the field "Other".
  3. Click the button "Report".
  4. For on-premise deployments, feedback will be stored locally. You can extract it and send it to us to provide your feedback.

assistant-generate-dislike


To clear input information:

  1. To delete the input information click the button "Clear fields" on the left.
  2. Confirm that all fields can be cleared.
  3. The input will be immediately deleted.

assistant-generate-clear-fields


Officially supported languages:

  • English
  • German

For Developers: Template System Configuration

You can fully customize the templates shown to users. The template system uses three main JSON files:

  1. service/templates/templates.json - Defines the template structures, fields, and UI configuration.
  2. service/templates/template_prompts.json - Contains the prompt text used to generate content with the LLM for each language.
  3. ui/src/locales/template.json - Contains the UI text (eg. labels, captions, placeholders) shown to users in each language.

templates.json Structure:

interface TemplatesFile {
templates: Template\[\];
}

interface Template {
id: string; // Unique identifier for the template
name_key: string; // Localization key for template name
main\_prompt\_key: string; // Reference to the main prompt in template_prompts.json
fields: TemplateField\[\]; // Array of fields for this template
}

interface TemplateField {
id: string; // Unique identifier for the field
caption_key: string; // Localization key for field caption/label
type: "text\_input" | "text\_area" | "select"; // Field type
placeholder_key: string; // Localization key for placeholder text
required?: boolean; // Whether the field is required
max_length?: number; // Maximum character length (if applicable)
options?: SelectOption\[\]; // Options for select fields
prompt\_text\_key?: string; // Reference to text in template_prompts.json
}

interface SelectOption {
caption_key: string; // Localization key for option display text
value: string; // Value to be stored when option is selected
prompt\_text\_key: string; // Reference to text in template_prompts.json
default?: boolean // Set to true to preselect this option
}

templates.json Example:

{
"templates": [
{
"id": "press_release",
"name_key": "TEMPLATES.PRESS_RELEASE.NAME",
"main_prompt_key": "PROMPTS.PRESS_RELEASE.MAIN_PROMPT",
"fields": [
{
"id": "key_message",
"caption_key": "TEMPLATES.PRESS_RELEASE.KEY_MESSAGE.CAPTION",
"type": "text_area",
"placeholder_key": "TEMPLATES.PRESS_RELEASE.KEY_MESSAGE.PLACEHOLDER",
"required": true,
"max_length": 5000,
"prompt_text_key": "PROMPTS.PRESS_RELEASE.KEY_MESSAGE"
},
{
"id": "primary_recipient",
"caption_key": "TEMPLATES.PRESS_RELEASE.PRIMARY_RECIPIENT.CAPTION",
"type": "select",
"placeholder_key": "TEMPLATES.PRESS_RELEASE.PRIMARY_RECIPIENT.PLACEHOLDER",
"required": true,
"options": [
{
"caption_key": "TEMPLATES.PRESS_RELEASE.PRIMARY_RECIPIENT.OPTIONS.CITIZENS",
"value": "citizens",
"prompt_text_key": "PROMPTS.PRESS_RELEASE.PRIMARY_RECIPIENT.CITIZENS",
"default": true
},
// More options...
]
},
// More fields...
]
},
// More templates...
]
}

template_prompts.json Structure:

interface TemplatePromptsFile {
[languageCode: string]: {
// Language code (e.g., "en", "de")
PROMPTS: {
[templateCategory: string]: {
// e.g., "PRESS_RELEASE", "JOB_AD"
MAIN_PROMPT: string; // Main prompt template with placeholders
[fieldCategory: string]: {
// Categories for different fields
[optionKey: string]: string; // Actual text for options
};
};
};
};
}

template_prompts.json Example:

{
"en": {
"PROMPTS": {
"PRESS_RELEASE": {
"MAIN_PROMPT": "Create a press release about {{key_message}}. Target audience is {{primary_recipient}}. Use a {{tone_of_voice}} tone. Reference previous release: {{previous_release}}. Include legal basis: {{legal_basis}}.",
"PRIMARY_RECIPIENT": {
"CITIZENS": "the general public",
"BUSINESSES": "businesses and organizations",
"PUBLIC_SERVANTS": "government employees and public servants"
},
"PREVIOUS_RELEASE": {
"PR24": "our previous press release on skilled worker shortages (PR24)",
"PR18": "our previous announcement on digital transformation initiatives (PR18)",
"NONE": "no specific previous release"
},
"KEY_MESSAGE": "It's about the following text: {{value}}."
// More fields...
},
// More templates...
}
},
"de": {
"PROMPTS": {
"PRESS_RELEASE": {
"MAIN_PROMPT": "Erstellen Sie eine Pressemitteilung über {{key_message}}. Die Zielgruppe ist {{primary_recipient}}. Verwenden Sie einen {{tone_of_voice}} Ton. Referenzieren Sie die vorherige Veröffentlichung: {{previous_release}}. Beziehen Sie die Rechtsgrundlage ein: {{legal_basis}}.",
"PRIMARY_RECIPIENT": {
"CITIZENS": "die allgemeine Öffentlichkeit",
"BUSINESSES": "Unternehmen und Organisationen",
"PUBLIC_SERVANTS": "Mitarbeiter im öffentlichen Dienst"
},
"KEY_MESSAGE": "Es geht um folgenden Text: {{value}}."
// More fields...
},
// More templates...
}
}
}

template.json Example:

{
"en": {
"TEMPLATES": {
"PRESS_RELEASE": {
"NAME": "Press Release",
"KEY_MESSAGE": {
"CAPTION": "Key message input",
"PLACEHOLDER": "Enter the main message of your press release"
},
"PRIMARY_RECIPIENT": {
"CAPTION": "Primary recipient group",
"PLACEHOLDER": "Select the primary audience",
"OPTIONS": {
"CITIZENS": "Citizens",
"BUSINESSES": "Businesses",
"PUBLIC_SERVANTS": "Public Servants"
}
}
}
}
}
}