Developed by Dr. Hudson Golino
Initial funding provided by The Jefferson Trust
Prompt Engineering Guide
Prompt Engineering Fundamentals
Prompting is the methodology through which we communicate instructions, parameters, and expectations to large language models. The more precise and comprehensive your prompts, the higher the quality of the output.
Pattern Selection Guide
Task Type
Recommended Pattern
Why It Works
Simple Q&A, definitions
Zero shot
Model already knows; instructions suffice
Extraction / classification
Few shot (1-3 samples)
Teaches exact labels & JSON keys
Creative writing
Zero shot + role
Freedom + persona = coherent style
Multi-step math / logic
Chain of Thought
Forces stepwise reasoning
Edge-case heavy tasks
Few shot (2-5 samples)
Covers exceptions & rare labels
Mission-critical accuracy
Guided CoT + Self Consistency
Multiple reasoned paths to consensus
Tool-use / knowledge-heavy
ReAct (Reasoning + Acting)
Thinks, calls tools, repeats for solutions
Comprehensive summarization
Chain of Density (CoD)
Stepwise compression keeps essentials
Accuracy-critical facts
Chain of Verification (CoVe)
Asks and answers its own checks
Advanced Prompt Patterns
Zero Shot
BASIC
Tells the model exactly what you want without examples. Uses the model's pre-training knowledge.
Example: "Analyze the sentiment of this text: 'I love this product!' Classify as Positive, Negative, or Neutral."
Few Shot (1-3 samples)
INTERMEDIATE
Provides 1-3 examples to teach the model the exact input-output mapping you want.
Example: "Classify emotions:
Input: 'I'm thrilled!' → Output: Joy
Input: 'This is terrible.' → Output: Anger
Input: 'I'm worried about tomorrow.' → Output: ?
Zero Shot + Role
INTERMEDIATE
Combines role-playing with zero-shot prompting for creative and persona-driven tasks.
Example: "You are a seasoned mystery novelist. Write the opening paragraph of a detective story set in 1920s New York."
Chain of Thought
ADVANCED
Instructs the model to think through problems step-by-step before providing the final answer.
Example: "Solve this step by step: What is 15% of 240?
Let's think step by step:
1. Convert percentage to decimal: 15% = 0.15
2. Multiply: 240 × 0.15 = 36"
Few Shot (2-5 samples)
ADVANCED
Uses more examples to handle edge cases and complex classification tasks.
Example: "Classify urgency with multiple examples:
'Server down' → High
'Password reset' → Low
'Payment failed' → Medium
'App crashes' → High
'Feature request' → Low
Now classify: 'Cannot access account' → ?"
Guided CoT + Self Consistency
EXPERT
Provides structured reasoning steps and uses multiple reasoning paths for consensus.
Example: "Solve this using these steps: 1) Identify key variables 2) Apply relevant formula 3) Calculate result 4) Verify answer. Generate 3 different solution paths and choose the most consistent result."
ReAct (Reasoning + Acting)
EXPERT
Combines reasoning with tool use, creating a feedback loop of thinking and acting.
Example: "Thought: I need to find current weather data
Action: Search[weather New York today]
Observation: Temperature is 75°F, sunny
Thought: Now I can provide a complete answer"
Chain of Density (CoD)
EXPERT
Iteratively creates more information-dense summaries while maintaining fixed length.
Example: "Summarize this article in exactly 50 words. Then rewrite adding 2 more key entities. Repeat 3 times, making each version more information-dense."
Chain of Verification (CoVe)
EXPERT
Creates a draft response, generates verification questions, answers them, then provides a corrected final response.
Example: "Draft: [Initial analysis]
Verification: 1) Is this factually correct? 2) Are there gaps in reasoning?
Final: [Corrected analysis based on verification]"
Ready-to-Use Examples
Zero Shot Example
You are a data analyst. Analyze the following sales data and provide three key insights: [INSERT_DATA_HERE]
Few Shot Example
Classify customer feedback:
Example 1: "Great product, fast shipping!" → Positive
Example 2: "Item was damaged, poor packaging" → Negative
Example 3: "Average quality, nothing special" → Neutral
Now classify: "[INSERT_FEEDBACK_HERE]"
Zero Shot + Role Example
You are a senior software architect with 15 years of experience. A junior developer asks you to explain microservices architecture. Provide a clear, practical explanation with real-world examples.
Chain of Thought Example
Solve this problem step by step:
"A company's revenue increased by 25% in Q1, then decreased by 15% in Q2. If Q2 revenue was $850,000, what was the original revenue before Q1?"
Let's think step by step:
1. First, I need to identify what we know
2. Then work backwards from Q2 to Q1
3. Then from Q1 to the original revenue
Chain of Verification Example
Draft Analysis: [Provide initial analysis of the topic]
Verification Questions:
1. Is this information factually accurate?
2. Are there any gaps in my reasoning?
3. What counterarguments should I consider?
4. Are my sources reliable?
Verified Analysis: [Provide revised analysis after verification]
Chat Interface
Welcome to Groq AI Desktop!
Enter your Groq API key above to get started with advanced prompt engineering and parameter tuning.
This application provides:
• Real-time streaming responses
• Advanced parameter controls
• Prompt engineering templates
• Model comparison tools
• Rate limit monitoring
Ready to unleash the power of Groq's lightning-fast LLMs!
Generating response...
Use Enter to send message, or click Generate button
Generate AI response based on your prompt and selected parameters
Document Upload
Click to upload or drag and drop files
Fully Supported: TXT, DOCX, JSON, CSV, MD (up to 100MB) PDF Support: Text-based PDFs up to 100MB (intelligent processing for large files) Note: Legacy .doc files require conversion to .docx
How it works:
• Uploaded documents are automatically parsed and included as context in your prompts
• DOCX files are processed with high reliability using Mammoth.js
• PDF files use intelligent processing strategies based on size:
- Small PDFs (<20MB): Complete processing of all pages
- Large PDFs (20-50MB): Selective page processing for efficiency
- Very large PDFs (>50MB): Strategic sampling of key sections
• Large documents are intelligently truncated to fit within model context limits
• Remove files anytime by clicking the × button
New: Large File Support! Now supports PDFs up to 100MB with intelligent processing strategies to extract the most relevant content.
PDF Troubleshooting: If PDF upload fails, the file might be image-based, encrypted, or corrupted. Try converting to DOCX or copy-paste the text directly.