Skip to main content
Back to Library
Prompt Engineering Guide

Mastering Analyze sentiment
on Gemini 1.5 Pro

Stop guessing. See how professional prompt engineering transforms Gemini 1.5 Pro's output for specific technical tasks.

The "Vibe" Prompt

"What's the sentiment of this text: 'The new design iterations are causing a lot of frustration among the development team, leading to missed deadlines and a noticeable drop in morale.'"
Low specificity, inconsistent output

Optimized Version

STABLE
Your task is to analyze the sentiment of the provided text. Follow these steps: 1. Identify keywords and phrases that express emotion or opinion. 2. Determine the overall emotional tone conveyed by these keywords/phrases. 3. Classify the sentiment as 'Positive', 'Negative', or 'Neutral'. 4. Provide a brief justification for your classification. Text: 'The new design iterations are causing a lot of frustration among the development team, leading to missed deadlines and a noticeable drop in morale.' Sentiment Analysis: 1. Keywords/Phrases: 'frustration', 'missed deadlines', 'drop in morale' 2. Emotional Tone: These terms strongly indicate negative feelings and outcomes. 3. Classification: Negative 4. Justification: The text explicitly mentions 'frustration' and a 'drop in morale' within the team, directly linked to 'missed deadlines' due to the design iterations.
Structured, task-focused, reduced hallucinations

Engineering Rationale

The optimized prompt provides clear, step-by-step instructions for the model, guiding it through a chain-of-thought process. This structure helps Gemini 1.5 Pro to break down the task, identify relevant information, and justify its conclusion, leading to more accurate and reliable sentiment analysis. The few-shot example reinforces the desired output format and reasoning process, reducing ambiguity.

0%
Token Efficiency Gain
The optimized prompt clearly defines the steps for sentiment analysis.
The optimized prompt includes a few-shot example demonstrating the desired output format.
The optimized prompt explicitly asks for justification, promoting deeper understanding.

Ready to stop burning tokens?

Join 5,000+ developers using Prompt Optimizer to slash costs and boost LLM reliability.

Optimize My Prompts