Skip to content

Tongue twister (Claude Prompt Sample)

    Create challenging tongue twisters.

    RoleContent
    User
    Generate complex and creative tongue twisters. Aim to create tongue twisters that are not only challenging to say but also engaging, entertaining, and potentially humorous. Consider incorporating wordplay, rhyme, and alliteration to enhance the difficulty and enjoyment of the tongue twisters.

    Example output

    Tongue Twister 1:
    The shrewd shrew chewed through the shiny, shimmering shoe.
    
    Tongue Twister 2:
    Brisk breezes blew by the blue-blooded, blabbering, babbling baboon.
    
    Tongue Twister 3:
    The perplexed piper picked a peck of pickled peppers while practicing his piping.
    
    Tongue Twister 4:
    Six sleek, slick, slender sleds slid swiftly down the steep, snowy slope.

    API request

    PythonTypeScriptAWS Bedrock PythonAWS Bedrock TypeScript
    import anthropic
    
    client = anthropic.Anthropic(
        # defaults to os.environ.get("ANTHROPIC_API_KEY")
        api_key="my_api_key",
    )
    message = client.messages.create(
        model="claude-3-opus-20240229",
        max_tokens=1000,
        temperature=1,
        messages=[
            {"role": "user", "content": "Generate complex and creative tongue twisters. Aim to create tongue twisters that are not only challenging to say but also engaging, entertaining, and potentially humorous. Consider incorporating wordplay, rhyme, and alliteration to enhance the difficulty and enjoyment of the tongue twisters."}
        ]
    )
    print(message.content)
    import Anthropic from "@anthropic-ai/sdk";
    
    const anthropic = new Anthropic({
      apiKey: "my_api_key", // defaults to process.env["ANTHROPIC_API_KEY"]
    });
    
    const msg = await anthropic.messages.create({
      model: "claude-3-opus-20240229",
      max_tokens: 1000,
      temperature: 1,
      messages: [
        {"role": "user", "content": "Generate complex and creative tongue twisters. Aim to create tongue twisters that are not only challenging to say but also engaging, entertaining, and potentially humorous. Consider incorporating wordplay, rhyme, and alliteration to enhance the difficulty and enjoyment of the tongue twisters."}
      ]
    });
    console.log(msg);
    import anthropic_bedrock
    from anthropic_bedrock import AnthropicBedrock
    
    client = AnthropicBedrock(
      # Authenticate by either providing the keys below or use the default AWS credential providers, such as
      # using ~/.aws/credentials or the "AWS_SECRET_ACCESS_KEY" and "AWS_ACCESS_KEY_ID" environment variables.
      aws_access_key="<access key>",
      aws_secret_key="<secret key>",
      # Temporary credentials can be used with aws_session_token.
      # Read more at https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html.
      aws_session_token="<session_token>",
      # Configure AWS region - defaults to us-east-1 or AWS_REGION env var
      aws_region="us-east-2",
    )
    
    completion = client.completions.create(
      model="anthropic.claude-v2:1",
      max_tokens_to_sample=1000,
      temperature=0,
      prompt=f"{anthropic_bedrock.HUMAN_PROMPT} Generate complex and creative tongue twisters. Aim to create tongue twisters that are not only challenging to say but also engaging, entertaining, and potentially humorous. Consider incorporating wordplay, rhyme, and alliteration to enhance the difficulty and enjoyment of the tongue twisters.{anthropic_bedrock.AI_PROMPT}",
    )
    print(completion.completion)
    import AnthropicBedrock from '@anthropic-ai/bedrock-sdk';
    
    const client = new AnthropicBedrock({
    // Authenticate by either providing the keys below or use the default AWS credential providers, such as
    // using ~/.aws/credentials or the "AWS_SECRET_ACCESS_KEY" and "AWS_ACCESS_KEY_ID" environment variables.
    awsAccessKey: '<access key>',
    awsSecretKey: '<secret key>',
    
    // Temporary credentials can be used with awsSessionToken.
    // Read more at https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html.
    awsSessionToken: '<session_token>',
    
    // Configure AWS region - defaults to us-east-1 or AWS_REGION env var
    awsRegion: 'us-east-2',
    });
    
    async function main() {
    const completion = await client.completions.create({
      model: "anthropic.claude-v2:1",
      max_tokens_to_sample: 1000,
      temperature: 0,
      prompt: `${AnthropicBedrock.HUMAN_PROMPT} Generate complex and creative tongue twisters. Aim to create tongue twisters that are not only challenging to say but also engaging, entertaining, and potentially humorous. Consider incorporating wordplay, rhyme, and alliteration to enhance the difficulty and enjoyment of the tongue twisters.${AnthropicBedrock.AI_PROMPT}`,
    });
    console.log(completion.completion);
    }
    main().catch(console.error);

    Source: