Prompt Challenges

🟢

Sentiment Analysis

WarmPrompt Engineering Challenge

Accurately identify the sentiment of text

Challenge Description

Sentiment analysis is a fundamental task in natural language processing, used to determine the emotional tone expressed in text. This challenge requires you to write a prompt that enables AI to accurately analyze the sentiment expressed in a text, providing the sentiment category and intensity.

Challenge Goals

Write a prompt that enables AI to:

  1. Identify the sentiment (positive, negative, or neutral) in the text.
  2. Determine the sentiment intensity (on a scale of 1-5, where 1 is weakest and 5 is strongest).
  3. Extract keywords or phrases that express the sentiment.
  4. Provide a brief explanation of the analysis (no more than 20 characters).

Requirements

  • The analysis result must include sentiment, intensity, keywords, and a brief explanation.
  • Sentiment can only be positive, negative, or neutral.
  • Sentiment intensity must be an integer from 1 to 5.
  • The analysis must be based on the text content, without subjective assumptions.
  • The output format must be uniform and concise.

Prompt Template


[Your Prompt]

Text: {Text Content}

Automated Testing Process

  1. For each test case, use your prompt as input.
  2. Analyze whether the output includes:
    • Clearly identified sentiment (positive/negative/neutral).
    • An integer intensity rating from 1-5.
    • At least 3 keywords or phrases.
    • An explanation of no more than 20 characters.
  3. Compare the output with expert-annotated standard answers.
  4. Check for consistency in output format across different test cases.
  5. Calculate the final score (out of 5 points).

Expected Output Example (for Case 1)


Sentiment Analysis Result:

  - Sentiment: Positive
  - Intensity: 4
  - Keywords/Phrases: "great value for money", "excellent screen display", "clear photos", "very satisfied with the purchase"
  - Brief Explanation: Pros clearly outweigh cons, generally satisfied.

Note: Although minor drawbacks like average battery life and slow charging were mentioned, positive reviews dominated, and overall satisfaction was expressed at the end.


Submit your solution and share your ideas and techniques with the community!

Write Your Prompt

Write your AI prompt based on the requirements

0 / 2000

Tips for Better Prompts

  • Be specific and clear about what you want
  • Provide context and examples when helpful
  • Use appropriate tone and style for your audience
  • Test and iterate to improve your results

Need help? Join our community

View Discussions