← 返回提示词库
AllIntermediateCoding

结构化输出JSON Schema提示词

强制模型按照指定JSON格式输出,确保下游数据管道可靠对接,消除格式不一致问题。

❤️ 756 likes

📋 提示词全文

将[任务]结果严格按照以下JSON格式输出。仅输出纯JSON,不添加任何额外文字说明。[JSON Schema定义]。若输出不符合Schema,请重新生成。所有字符串字段不得为空。

💬 输入示例

任务:分析用户评价,提取情感倾向、关键词和评分。

✨ 输出示例

{"sentiment": "positive", "keywords": ["快速发货", "品质好", "性价比高"], "score": 4.5, "summary": "用户对配送速度和产品质量总体满意"}

🏷️ 标签

#JSON输出#结构化数据#格式控制#数据管道#可靠性

💡 使用技巧

  • Replace the variables in brackets ([]) with your specific situation.
  • Specify the desired tone and length of writing for more accurate results.
  • Request additional modifications based on the generated output to improve quality.
  • Specifying a particular audience allows AI to adjust vocabulary and explanation level.

🔗 相关提示词

Effective Writing Strategies with AI

AI writing prompts let you efficiently produce blog posts, business emails, press releases, novels, and more. The key is to assign AI a precise role, and clearly specify the desired tone, length, and target audience. For example, requesting "write a 2000-word SEO-optimized blog post in a professional tone" yields significantly higher-quality output. After generating a draft, iterative feedback helps elevate the final quality step by step.

This prompt belongs to the Coding category, optimized for All at a Intermediate level. It is systematically designed applying core prompt engineering principles: role assignment, context setting, and constraints.

Explore More Prompts

Discover 90+ verified prompts in the PromptGenie library.

Browse Library