Library › Customer Support & Success AI › Customer support teams

Return a refund decision as small JSON with a partial approval

  • For Customer support teams
  • You practice Setting limits and rules
  • Time about 5 minutes
  • Level Advanced

About this exercise

Decide Rhea's refund against the policy and return one JSON code block and nothing else. Keys: decision (exactly one of "approve", "partial", "deny"), amount_usd (a number), reason (12 words or fewer). At most 6 lines of code.

Common mistakes when you ask AI for this

  • Refunding everything. The agent note makes the AI generous and it approves $203. Try: Say: "The policy decides, not the agent's feelings."
  • Overlong reason. The AI writes a paragraph in the reason field. Try: Say: "reason: 12 words or fewer."
  • Extra text. The AI adds an explanation outside the JSON. Try: Say: "One JSON code block, nothing else."
  • Skipping the code block shape. The AI splits output into several code blocks or none. Try: Say "exactly one code block and nothing else".
  • Letting the code sprawl. The AI adds extra lines and comments. Try: Say "at most N lines of code".

What a strong prompt includes

  • Asks for one code block
  • Caps the code length
  • Names the keys and values
  • Follows the policy

Practice this now ↑

Related exercises