Azure OpenAI Prompt Generator


You can use this Snap to generate the user prompt as specified in the prompt template using the mustache template.

Azure OpenAI Prompt Generator Overview



Limitations and Known Issues


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 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:

  • Stop Pipeline Execution Stops the current pipeline execution when the Snap encounters an error.
  • Discard Error Data and Continue Ignores the error, discards that record, and continues with the remaining records.
  • Route Error Data to Error View Routes the error data to an error view without stopping the Snap execution.

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: Azure OpenAI Prompt Generator

Example: Azure OpenAI Prompt Generator
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.

Snap execution Dropdown list
Select one of the three modes in which the Snap executes. Available options are:
  • Validate & Execute. Performs limited execution of the Snap and generates a data preview during pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during pipeline runtime.
  • Execute only. Performs full execution of the Snap during pipeline execution without generating preview data.
  • Disabled. Disables the Snap and all Snaps that are downstream from it.

Default value: Validate & Execute

Example: Execute only