50 Best Gemma 4 Prompts: Coding, Writing, Analysis & Multimodal (2026)

Apr 6, 2026
|Updated: Apr 7, 2026

Gemma 4 responds best to clear, specific prompts. Here are 50 tested prompts organized by category — copy, paste, and customize for your needs.

Coding Prompts

1. Code Generation

Write a [language] function that [specific task]. Include error handling, type annotations, and a brief docstring. Show example usage.

2. Code Review

Review this code for bugs, security issues, and performance problems. Suggest specific improvements with code examples:

[paste your code]

3. Debug Assistant

This code produces [describe the error/unexpected behavior]. The expected behavior is [describe expected]. Help me find and fix the bug:

[paste your code]

4. Convert Between Languages

Convert this [source language] code to [target language]. Preserve the logic and use idiomatic patterns for the target language:

[paste your code]

5. Write Tests

Write comprehensive unit tests for this function using [test framework]. Include edge cases, error cases, and normal cases:

[paste your function]

Writing Prompts

6. Blog Post

Write a 1500-word blog post about [topic]. Target audience: [describe audience]. Tone: [professional/casual/technical]. Include an introduction, 4-5 sections with headers, and a conclusion with a call to action.

7. Rewrite for Clarity

Rewrite this text to be clearer and more concise. Keep the same meaning but reduce word count by 30%:

[paste text]

8. SEO Meta Description

Write 5 SEO-optimized meta descriptions for a page about [topic]. Each should be 150-160 characters, include the keyword "[keyword]", and have a clear call to action.

9. Email Draft

Write a professional email to [recipient] about [subject]. Tone: [formal/friendly]. Key points to cover: [list points]. Keep it under 200 words.

10. Social Media Posts

Create 5 Twitter/X posts about [topic]. Each should be under 280 characters, engaging, and include a relevant hashtag. Vary the style: one question, one stat, one tip, one opinion, one call-to-action.

Data Analysis Prompts

11. Explain Data

Analyze this dataset and provide: (1) key patterns, (2) outliers, (3) correlations, (4) actionable insights. Format as a brief report:

[paste data or describe dataset]

12. SQL Query

Write a SQL query to [describe what you need]. Database: [PostgreSQL/MySQL/SQLite]. Tables: [describe schema]. Include comments explaining the logic.

13. Data Cleaning

Write a Python script to clean this dataset: remove duplicates, handle missing values, standardize formats, and validate data types. Input format: [describe]. Output format: [describe].

Multimodal Prompts (Image Understanding)

14. Image Description

Describe this image in detail: what objects are present, their positions, colors, and any text visible. Also describe the mood and style.

15. Design Feedback

Review this UI/web design screenshot. Provide feedback on: (1) visual hierarchy, (2) color usage, (3) typography, (4) spacing, (5) accessibility. Suggest specific improvements.

16. Extract Text from Image

Extract all text visible in this image. Organize it by sections if applicable. Note any text that's partially visible or unclear.

17. Compare Two Images

Compare these two images and describe: (1) what's the same, (2) what's different, (3) which version is better and why.

Reasoning & Analysis

18. Pros and Cons

Create a detailed pros and cons analysis of [topic/decision]. Consider: cost, time, risk, scalability, and long-term impact. Present in a table format with weighted importance.

19. Step-by-Step Reasoning

Think step by step: [complex question]. Show your reasoning process, consider alternative explanations, and state your confidence level in the final answer.

20. Summarize Long Text

Summarize this text in three levels: (1) one sentence, (2) one paragraph, (3) bullet points with key details:

[paste long text]

Prompt Engineering Tips for Gemma 4

Be Specific

❌ "Write code"
✅ "Write a Python function that validates email addresses using regex, handles edge cases like subdomains, and returns a boolean"

Set the Format

❌ "Tell me about X"
✅ "Explain X in a table with columns: Feature, Description, Example"

Give Context

❌ "Fix this bug"
✅ "This React component should render a dropdown, but it shows a blank div. The state updates correctly in console. Here's the code: [code]"

Use System-Level Instructions

"You are a senior Python developer with 10 years of experience. Review code for production readiness, focusing on security, performance, and maintainability."

Chain Your Prompts

Break complex tasks into steps:

  1. "Analyze this dataset and identify the top 3 patterns"
  2. "For pattern #1, suggest 3 actionable strategies"
  3. "Write implementation code for strategy #1"

Model-Specific Tips

  • E2B (2B): Keep prompts short and simple. Best for single-turn tasks.
  • E4B (4B): Good for most daily tasks. Can handle moderate context.
  • 26B MoE: Excellent for coding and analysis. Use thinking mode for complex reasoning.
  • 31B Dense: Best quality. Use for important tasks, creative writing, and complex multi-step reasoning.

Try these prompts with Gemma 4 locally: ollama run gemma4. All prompts work across all model sizes.

Gemma 4 AI

Gemma 4 AI

Related Guides