Promptea

Prompts for Gemini: format control, grounding, and structured output

How to write prompts that get consistent, well-structured output from Gemini — including format examples, grounding constraints, and multimodal tips.

What makes Gemini different
  • Gemini responds well to a visible output template — showing the exact format you expect reduces variation.
  • It benefits from an explicit example of the final structure, even a short one.
  • For grounded tasks, specify the source: 'Base your answer only on the text below — do not add outside knowledge.'
  • Gemini tends to be verbose; set a hard word or sentence limit to prevent padding.
  • For multimodal prompts (image + text), state what role the image plays before the question.
Patterns that work well with Gemini
  • Show a mini template: 'Return your answer in this format: [field]: [value]'.
  • Separate context from instruction with a header line (e.g., '--- Context ---', '--- Task ---').
  • Ask it to list assumptions before the final answer on ambiguous tasks.
  • For long inputs, use a priority hint: 'Focus on the sections marked [PRIORITY]'.
  • If you need JSON, define the schema inline and add 'Return ONLY valid JSON, no explanation'.
Templates
Structured analysis with format template
Analyze the topic below and return your answer in the exact format shown.

Topic: [describe the topic or question]

Format (use exactly this structure):
Summary: [1 sentence]
Key points:
- [point 1]
- [point 2]
- [point 3]
Assumptions I'm making: [list any assumptions]
Confidence: [high / medium / low] — [reason in 1 sentence]

Constraints:
- Max 200 words total.
- If a field cannot be filled, write 'N/A' — do not omit it.
Opens on home with the prompt prefilled.
Open in Promptea
Grounded Q&A (source-only answers)
Answer the question below using ONLY the source text provided.

Rules:
1. Do not add facts from outside the source.
2. If the answer is not in the source, say: "Not found in source."
3. Quote the relevant sentence (max 1 sentence) before your answer.
4. Keep the answer to 2-3 sentences.

--- Source ---
[paste source text here]
--- End source ---

Question: [your question]
Opens on home with the prompt prefilled.
Open in Promptea
FAQ
Why does Gemini ignore my format instructions?
Usually because the format was described in words but not shown. Add a literal template — even a 2-line example — and Gemini follows it much more reliably.
How do I stop Gemini from adding extra commentary?
End the prompt with an explicit constraint: 'Return ONLY the structured output above — no extra text, no preamble.' Repeating it at the end reinforces it.