Generate message response with Anthropic Claude

This example pipeline demonstrates how to generate a prompt and subsequent message response using Anthropic Claude on AWS Messages.

  1. Configure the JSON Generator Snap to pass your input data.
    Note: In this example, we use the JSON Generator Snap. However, you can replace the JSON Generator Snap with any Snap of your choice, such as the Chunker, Constant, File Reader, or S3 File Reader Snaps.

    Edit JSON

  2. Configure the Amazon Bedrock Prompt Generator Snap to generate a user prompt as specified in the prompt template. In this example, the prompt template includes placeholders for a role and an intro.
    On validation, the Snap replaces the placeholders with actual values, and displays the generated prompt.
    Amazon Bedrock Prompt Generator Snap - Edit prompt Amazon Bedrock Prompt Generator Snap Output

    Amazon Bedrock Prompt Generator Snap - Edit prompt


    Amazon Bedrock Prompt Generator Snap Output

  3. Configure the Anthropic Claude on AWS Messages Snap to generate message response based on the Model, Prompt, and Model parameters.
    The settings in this Snap enable you to refine the message response; this ensures that the generated text aligns with your conversational style and tone.

    On validation, the Snap displays the generated message response along with usage details.

    Anthropic Claude on AWS Messages Snap Configuration Anthropic Claude on AWS Messages Snap Output

    Anthropic Claude on AWS Messages Snap Configuration


    Anthropic Claude on AWS Messages Snap Output

To successfully reuse pipelines:
  1. Download and import the pipeline into SnapLogic.
  2. Configure Snap accounts as applicable.
  3. Provide pipeline parameters as applicable.