Google GenAI Prompt Generator
Overview
You can use this Snap to generate the user prompt as specified in the prompt template using the mustache template.
- Format-type Snap
- Works in Ultra Tasks
Prerequisites
None.
Limitations and known issues
None.
Snap views
View | Description | Examples of upstream and downstream Snaps |
---|---|---|
Input | This Snap has at the most one document output view. The Snap requires a prompt template. | Mapper |
Output | This Snap supports at the most one binary or document input view. The Snap provides the augmented user prompt which is the combination of the user prompt and relevant context in the prompt template. | Mapper |
Error |
Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter when running the pipeline by choosing one of the following options from the When errors occur list under the Views tab. The available options are:
Learn more about Error handling in Pipelines. |
Snap settings
- Suggestion icon (): Indicates a list that is dynamically populated based on the configuration.
- Expression icon (): Indicates whether the value is an expression (if enabled) or a static value (if disabled). Learn more about Using Expressions in SnapLogic.
- Add icon (): Indicates that you can add fields in the field set.
- Remove icon (): Indicates that you can remove fields from the field set.
Field / Field set | Type | Description |
---|---|---|
Label | String |
Required. Specify a unique name for the Snap. Modify this to be more appropriate, especially if more than one of the same Snaps is in the pipeline. Default value: Google GenAI Prompt Generator Example: Generate customer support prompt |
Prompt template | Dropdown list |
Select the template to build the final prompt. The available option is Context Q & A.
This Snap supports variable replacement through a mustache on the input document.
Note: To reset the Prompt template to the default settings, click the Edit prompt and then click Generate Template.
Default value: Context Q & A |
Edit prompt | Button |
In the Edit prompt window, configure the prompt details to generate a user prompt. |
Advanced prompt output | Checkbox |
Select this checkbox to output the entire prompt content array instead of the individual prompt content. Default status: Deselected |
User role | Dropdown list/Expression |
Appears when you select the Advanced prompt output checkbox. Required. Choose the role to use for the prompt. Available
options include:
Default value: USER Example: MODEL |
Content | String/Expression |
Appears when you select Advanced prompt output checkbox and USER in the User role field. Specify the multimodal content to be used in the prompt. Default value: N/A Example: $content |
Snap execution | Dropdown list |
Select one of the three modes in which the Snap executes.
Available options are:
Default value: Validate & Execute Example: Execute only |