Skip to main content
Back to Library
Prompt Engineering Guide

Mastering Analyze sentiment
on Groq Llama 3.1 70B

Stop guessing. See how professional prompt engineering transforms Groq Llama 3.1 70B's output for specific technical tasks.

The "Vibe" Prompt

"What's the sentiment of this text: "I absolutely love this new phone! It's so fast and the camera is incredible. Highly recommend it.""
Low specificity, inconsistent output

Optimized Version

STABLE
You are a sentiment analysis AI. Your goal is to accurately identify the sentiment of the provided text as 'Positive', 'Negative', or 'Neutral'. Text: "I absolutely love this new phone! It's so fast and the camera is incredible. Highly recommend it." Thought Process: 1. Identify key sentiment-bearing words or phrases. 2. Determine the overall emotional tone conveyed by these words. 3. Classify the sentiment based on the identified tone. Sentiment:
Structured, task-focused, reduced hallucinations

Engineering Rationale

The optimized prompt provides clear instructions, defines the task, and explicitly lists the allowed output categories ('Positive', 'Negative', 'Neutral'). The Chain-of-Thought (CoT) section ('Thought Process') guides the model to break down the task, leading to more structured and accurate reasoning. This structured approach helps Llama 3.1 70B produce more reliable results, especially for ambiguous cases, by explicitly asking it to show its reasoning.

0%
Token Efficiency Gain
The optimized prompt explicitly defines the output categories (Positive, Negative, Neutral).
The optimized prompt includes a 'Thought Process' section for Chain-of-Thought reasoning.
The optimized prompt clearly states the AI's role ('You are a sentiment analysis AI.').

Ready to stop burning tokens?

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

Optimize My Prompts