Skip to main content
Back to Library
Prompt Engineering Guide

Mastering Analyze sentiment
on Gemini 2.0 Flash

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

The "Vibe" Prompt

"Analyze the vibe of this text: [text to analyze]"
Low specificity, inconsistent output

Optimized Version

STABLE
You are a sentiment analysis expert. Your goal is to determine the sentiment (positive, negative, neutral) of the provided text. Follow these steps: 1. Read the text carefully. 2. Identify keywords, phrases, and their emotional connotations. 3. Consider the overall tone and context. 4. If there are conflicting sentiments, determine the dominant one. 5. Output your sentiment analysis, clearly stating your reasoning. Text: [text to analyze] Sentiment: [Your inferred sentiment] Reasoning: [Explanation of keywords/phrases and how they lead to the sentiment]
Structured, task-focused, reduced hallucinations

Engineering Rationale

The optimized prompt provides clear instructions, establishes a persona, and forces a chain-of-thought process. It guides the model to identify specific elements leading to its conclusion, reducing ambiguity and improving accuracy and consistency. The structured output format also makes parsing easier.

0%
Token Efficiency Gain
optimized_prompt contains 'sentiment' and not 'vibe'
optimized_prompt contains a clear step-by-step thinking process
optimized_prompt explicitly requests 'Reasoning'

Ready to stop burning tokens?

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

Optimize My Prompts