Structured Output (JSON/Schema)
Gemini handles structured output and JSON mode exceptionally well. The explicit schema with confidence scores and metadata produces machine-parseable results suitable for downstream processing.
Parse the following {{input_type}} and return a structured JSON response. Input: {{input_data}} Output schema: { "entities": [ { "name": "string", "type": "{{entity_type}}", "attributes": { }, "relationships": [{ "target": "string", "relation": "string" }], "confidence": "high | medium | low" } ], "summary": "string", "metadata": { "input_quality": "clean | noisy | ambiguous", "entities_found": "number", "processing_notes": "string" } } Rules: - Return ONLY valid JSON, no markdown code fences, no explanation text - If a field cannot be determined, use null (not empty string) - Set confidence to "low" for any entity extracted from ambiguous context - Deduplicate entities that appear multiple times with different names
Variables to customize
Why this prompt works
Gemini handles structured output and JSON mode exceptionally well. The explicit schema with confidence scores and metadata produces machine-parseable results suitable for downstream processing.
Save this prompt to your library
Organize, version, and access your best prompts across ChatGPT, Claude, and Cursor.
Related prompts
Forcing the agent to plan before acting prevents premature execution and wasted steps. Explicit dependency mapping enables parallel execution and catches logical gaps early.
Tool Selection AgentThe ReAct pattern (Reason + Act) creates an explicit reasoning trace that improves tool selection accuracy. The error-handling rule prevents infinite retry loops.
Prompt CompressorExplicitly requiring all functional requirements to be preserved prevents the model from over-compressing and losing critical instructions.
Memory Management AgentExplicit memory read/write instructions create agents that improve over time. Categorization keeps memories organized, and the deduplication rule prevents context bloat.