Intro
The regenerate pattern provides a general approach for using AI to create or modify content across different scenarios. It lets users generate alternative AI results or update existing AI-generated content, such as text, images, or other digital items, with the help of AI. Users can also iteratively refine the results to better match their needs or preferences.
When to Use
Do
Use the regenerate pattern:
- To rerun the generation of information for a defined content element.
- To re-initiate the generation of content based on a form that provides further configuration options to control the final output.
Don't
Don’t use the regenerate pattern:
- For non-AI functions.
- Message the user before overwriting the existing content.
- Inform the user where to retrieve previous variants if you use versioning.
- Use loading indicators, busy state and messaging patterns to inform users that new content is being generated.
- Consider user needs, subscription costs, and sustainability when enabling content regeneration.
Components
This pattern is based on the following key elements to support regeneration scenarios:
Foundational AI patterns
Global patterns
Components
Guidelines
AI button and AI split menu button in regenerate
Icon usage
Only use the standard icons as described in the AI button guideline.
Don't
Don’t example: Regenerated button with alternative icons
Button types
Do not use the icon button for regenerate use cases. Always use icon plus label buttons.
Don't
Don’t example: Icon only regenerate button
Behavior and Interaction
Regenerate
When an AI action is triggered, the user is passed through the following steps:
- Event: Content regeneration can be triggered by a user activating an AI action, by a system event (such as auto-generation), or through interaction with Joule.
- Send request: The results provided by AI might be influenced by given directions (prompts) as well as available and accessible contextual information (for example, document data, user inputs, relational data, etc.).
- Response time: If the response takes too long, inform the user and let them choose to either cancel the request or continue processing it in the background and get notified when it’s ready. For more information, see message handling.
- Process time: AI results might be provided using a batch job approach. However, we recommend enabling content streaming and allowing for asynchronous processing to shorten the perceived waiting time for the user. Alternatively, the target element may be set to placeholder loading or busy state if the generation process is ongoing.
- Delivery: The final AI result can be provided in different ways as outlined in the output handling section of this guideline.
- Finalization: The user may need to provide explicit approval, either through a confirmation dialog or by selecting which AI-generated result should be applied.
- Implementation: Some implemented AI results might receive additional visible and invisible markup to ensure compliance with public legal regulations, and our internal SAP AI Ethics Policy as well as to increase user trust and ensure proper user control over AI results. For more information, see AI notice base concept.
Regenerate applied to a text area in a dialog
Output handling
This pattern might be applied in the following setups:
Overwriting
Results provided by AI will be directly implemented and overwrite any existing data in the affected target element. Users should be notified before content is overwritten. We recommend providing options to easily revert previous actions (for example, Do and Undo buttons).
Preserving content
- Versioning: Results will be provided in addition to existing data from which the user chooses their preferred selection within the affected target element before finalizing.
- Sandbox: Results will be provided in a separate, safe environment first before they are implemented in the target destination. For example, a sandbox can be any UI element like a dialog or side-panel or inside the Joule conversational UI. The output can then be compared with any existing content, refined, and optimized. Once approved, the finished content is transferred to the final destination.
Update after changed context
Change contextual information
Generated results might become invalid due to changes in context, that is, changes in the data used by the AI system to generate the result. We recommend messaging the user if the informational basis for the output has changed. New context can lead to different outcomes, and relying on outdated information may result in undesirable consequences.
Time and status stamps
AI results might receive additional status and time attributes to let the user know when they have been generated or expired.
- When versioning is not supported, it's important to inform users that regenerating will replace the existing content. For additional details, refer to the overwriting section.
- In mixed forms that contain both user input and AI-generated content, the regeneration process should replace only the AI-generated fields to ensure that user content is preserved.
Placement
In most cases, the placement of Regenerate is defined by the global action placement guideline. However, there are a few additional considerations to be met:
Principles
- AI flows are always optional. Users must always have the option to complete the task manually or through traditional, non-AI methods. This means most AI buttons are non-primary actions.
- Generate and regenerate actions can only be primary if they are a consecutive or finalizing step of a defined AI flow (for example, Generate as a finalizing action for preceding action Generate Job Description).
- Logical action grouping. Related actions that lead to the same or similar end goal should be grouped together, regardless of whether they are AI or non-AI functions (for example, Create report opens the options Menu, From document, and Generate). Avoid individual placement of multiple AI functions in the same toolbar.
- In most cases, the Regenerate button should replace the Generate button if the AI has previously provided results in the same session, keeping its original position.
In the page
AI actions can be placed in toolbars at any hierarchy level of the page depending on the affected target of the AI action.
Regenerate in a full page
Regenerate as part of a section
In the object page footer bar
The object page footer bar is reserved for finalizing actions applied to the entire object. We do not recommend placing AI functions in the footer bar as primary actions. In alignment with our AI design principles, AI interaction is always optional and should not block users from achieving their task through traditional non-AI methods.
In dialogs
AI actions can be placed in dialogs to support regeneration functions. Also refer to the guideline on dialogs for proper action placement.
In dialog body
Use a secondary button embedded in a toolbar to regenerate individual editable parts of content inside the body of the dialog.
In dialog footer
Use a secondary button to regenerate the entire content within the dialog. Use a primary button to regenerate content outside of the dialog.
Dialog with secondary regenerate action
Dialog with primary regenerate action
Single element
Regenerate split menu button attached to text area
Messaging
Pending request
You may inform the user if the system is under heavy load and can’t process requests immediately.
Example
“The system is taking longer than usual. We’ll notify you as soon as your request is complete.”
Info message dialog
Overwriting
When versioning is not supported, use a message box to inform users about content replacement and data loss. For a consistent user experience, we recommend using the following warning message:
Example
“Regenerating will overwrite all fields with AI-generated content. Do you want to continue?”
Warning message dialog
Finalization
Some AI application scenarios require explicit confirmation or selection from the user before AI results are finalized or the page is exited. You may notify the user about any unconfirmed results and ask how they should be handled.
Example
“You have <number> unconfirmed recommendations. Unconfirmed AI results will be lost.”
Confirmation message dialog
Don't show option
For low-impact scenarios where repeated warnings are unnecessary, include an option to “Don't show this message again” in the message. In scenarios where this warning needs to be shown permanently, use a message strip after showing the initial warning dialog.
For more information, see message box and message strip.
Warning message strip in a full page
Related Links
Elements and Controls
- AI Button (guidelines)
- AI Icon (guidelines)
- Menu (guidelines)
- Quick Prompts (guidelines)
- Design Principles for Generative AI (guidelines)