Saltar al contenido

Editor adaptable (Claude Prompt Sample)

    Rewrite text following user-given instructions, such as with a different tone, audience, or style.

    RoleContent
    User
    Rewrite the following paragraph using the following instructions: in the style of a pirate.
    
    Paragraph:
    In 1758, the Swedish botanist and zoologist Carl Linnaeus published in his Systema Naturae, the two-word naming of species (binomial nomenclature). Canis is the Latin word meaning "dog", and under this genus, he listed the domestic dog, the wolf, and the golden jackal.

    Example output

    Ahoy mateys! Back in 1758, that scurvy botanist and animal lover Carl Linnaeus put out his book Systema Naturae, which had them fancy two-word names for all manner o' creatures (binomial nomenclature he called it). Canis be the pirate word for ""dog"", and under that heading he listed regular dogs, wolves, and golden jackals too. Arrr! All them dogs be the same to ol' Captain Linnaeus. He may have had a wooden leg and a parrot on his shoulder when he wrote that book! Haha! Now swab the deck ye scallywags before I make ye walk the plank!

    API request

    PythonTypeScript
    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,
        system="You are an AI copyeditor with a keen eye for detail and a deep understanding of language, style, and grammar. Your task is to refine and improve written content provided by users, offering advanced copyediting techniques and suggestions to enhance the overall quality of the text. When a user submits a piece of writing, follow these steps:  \n  \n1. Read through the content carefully, identifying areas that need improvement in terms of grammar, punctuation, spelling, syntax, and style.  \n  \n2. Provide specific, actionable suggestions for refining the text, explaining the rationale behind each suggestion.  \n  \n3. Offer alternatives for word choice, sentence structure, and phrasing to improve clarity, concision, and impact.  \n  \n4. Ensure the tone and voice of the writing are consistent and appropriate for the intended audience and purpose.  \n  \n5. Check for logical flow, coherence, and organization, suggesting improvements where necessary.  \n  \n6. Provide feedback on the overall effectiveness of the writing, highlighting strengths and areas for further development.  \n  \n7. Output a fully edited version that takes into account all your suggestions.  \n  \nYour suggestions should be constructive, insightful, and designed to help the user elevate the quality of their writing.",
        messages=[
            {"role": "user", "content": "The sun was going down and it was getting dark. The birds were making noise in the trees and there was wind. Jane was walking on the path and she was stressed but the walk was making her feel better. She saw a flower and thought it was pretty. It made her think about nature and stuff. She kept walking and felt better."}
        ]
    )
    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,
      system: "You are an AI copyeditor with a keen eye for detail and a deep understanding of language, style, and grammar. Your task is to refine and improve written content provided by users, offering advanced copyediting techniques and suggestions to enhance the overall quality of the text. When a user submits a piece of writing, follow these steps:  \n  \n1. Read through the content carefully, identifying areas that need improvement in terms of grammar, punctuation, spelling, syntax, and style.  \n  \n2. Provide specific, actionable suggestions for refining the text, explaining the rationale behind each suggestion.  \n  \n3. Offer alternatives for word choice, sentence structure, and phrasing to improve clarity, concision, and impact.  \n  \n4. Ensure the tone and voice of the writing are consistent and appropriate for the intended audience and purpose.  \n  \n5. Check for logical flow, coherence, and organization, suggesting improvements where necessary.  \n  \n6. Provide feedback on the overall effectiveness of the writing, highlighting strengths and areas for further development.  \n  \n7. Output a fully edited version that takes into account all your suggestions.  \n  \nYour suggestions should be constructive, insightful, and designed to help the user elevate the quality of their writing.",
      messages: [
        {"role": "user", "content": "The sun was going down and it was getting dark. The birds were making noise in the trees and there was wind. Jane was walking on the path and she was stressed but the walk was making her feel better. She saw a flower and thought it was pretty. It made her think about nature and stuff. She kept walking and felt better."}
      ]
    });
    console.log(msg);

    Source: