craft some llm prompts to help user to do sentiment analysis
- User
craft some llm prompts to help user to do sentiment analysis
- Assistant
craft some llm prompts to help user to do sentiment analysis
Certainly! Below are several example prompts you can use with a Large Language Model (LLM) like GPT to perform sentiment analysis on various types of text inputs. These prompts are designed to help the LLM understand your requirements clearly and provide accurate sentiment classifications.
Prompt:
Please analyze the sentiment of the following text and categorize it as Positive, Negative, or Neutral.
Text: "I absolutely love the new design of your website. It's user-friendly and visually appealing."
Expected Output:
Sentiment: Positive
Prompt:
Perform a sentiment analysis on the following review. Indicate whether the sentiment is Positive, Negative, or Neutral, and provide a brief explanation for your classification.
Review: "The product works as advertised, but the customer service was slow to respond."
Expected Output:
Sentiment: Mixed
Explanation: The product functionality is praised ("works as advertised"), indicating positive sentiment, but there is criticism regarding customer service responsiveness, indicating negative sentiment.
Prompt:
Analyze the sentiment of the following sentence and assign a sentiment score between -1 (most negative) and +1 (most positive).
Sentence: "I'm not sure how I feel about the latest update; some features are great, while others are disappointing."
Expected Output:
Sentiment Score: 0.0
Explanation: The sentence expresses both positive ("some features are great") and negative ("others are disappointing") sentiments, balancing to a neutral score.
Prompt:
Identify the primary emotion expressed in the following text. Choose from Happiness, Sadness, Anger, Fear, Surprise, or Neutral.
Text: "I can't believe how quickly things have changed. It's been overwhelming."
Expected Output:
Emotion: Surprise
Explanation: The text reflects astonishment at the speed of change and feelings of being overwhelmed.
Prompt:
Perform aspect-based sentiment analysis on the following restaurant review. Identify specific aspects mentioned and determine the sentiment for each aspect.
Review: "The ambiance was lovely and the service was excellent, but the food was disappointing."
Expected Output:
Aspects and Sentiments:
1. Ambiance: Positive
2. Service: Positive
3. Food: Negative
Prompt:
Compare the sentiments expressed in the following two sentences and determine if they convey similar, opposite, or unrelated sentiments.
Sentence 1: "I'm thrilled with the new laptop's performance."
Sentence 2: "The battery life of the new laptop is disappointing."
Expected Output:
Comparison: Opposite Sentiments
Explanation: Sentence 1 expresses positive sentiment about the laptop's performance, while Sentence 2 conveys negative sentiment regarding its battery life.
Prompt:
Analyze the sentiment of the following tweet, considering the context that it was posted after a recent product launch.
Tweet: "Really excited about the new features introduced today! Can't wait to try them out."
Expected Output:
Sentiment: Positive
Explanation: The tweet expresses excitement and eagerness to engage with the new product features, indicating a positive sentiment towards the product launch.
Prompt:
Determine the sentiment of the following Spanish sentence and categorize it as Positive, Negative, or Neutral.
Texto: "No me gustó la calidad del servicio recibido ayer."
Expected Output:
Sentiment: Negative
Explanation: The text translates to "I did not like the quality of the service received yesterday," indicating dissatisfaction.
Prompt:
Analyze the sentiment of the following sarcastic remark and classify it as Positive, Negative, or Neutral.
Comment: "Oh great, another meeting. Just what I needed."
Expected Output:
Sentiment: Negative
Explanation: Despite using positive words like "great," the context and overall tone indicate frustration with having another meeting.
Prompt:
Summarize the overall sentiment from the following product reviews.
1. "The camera quality is outstanding, but the battery drains too quickly."
2. "I love the lightweight design, however, the software is a bit buggy."
3. "Excellent customer support and fast shipping."
Expected Output:
Overall Sentiment: Mixed
Summary: While several reviews praise aspects like camera quality, lightweight design, and customer support, there are common criticisms regarding battery life and software performance.
Be Clear and Specific: Clearly state what you want the model to do, such as classifying sentiment, scoring, or providing explanations.
Provide Context: Including context can help the model understand nuances, especially when dealing with sarcasm or mixed sentiments.
Specify the Output Format: If you need the results in a particular format (e.g., JSON, bullet points), mention it in the prompt.
Handle Multiple Aspects Separately: For texts that discuss various aspects, instruct the model to analyze each aspect individually.
Consider Language and Cultural Nuances: When dealing with multilingual texts or culturally specific expressions, specify the language and any relevant context.
Use Examples: Providing examples within the prompt can guide the model to produce outputs in the desired style and format.
Feel free to customize these prompts based on your specific needs and the nature of the text you are analyzing. Properly structured prompts can significantly enhance the accuracy and usefulness of sentiment analysis results.
Not yet included in a published release.