Library › Customer Support & Success AI › Managers and team leads

Tag five NPS comments in JSON with mixed-sentiment rules

  • For Managers and team leads
  • You practice Setting limits and rules
  • Time about 5 minutes
  • Level Advanced

About this exercise

Tag each NPS comment and return one JSON code block with an array of five objects, one per line. Keys: id, sentiment (exactly "positive", "neutral" or "negative"), theme (exactly "support", "product" or "pricing"), quote (a verbatim phrase of 6 words or fewer). If a comment mixes positive and negative, sentiment is neutral and theme is the first one mentioned. Nothing outside the block. At most 7 lines of code.

Common mistakes when you ask AI for this

  • Calling C5 negative. The analyst draft says negative. Try: Say: "A mix of praise and complaint is neutral; theme is the first mentioned."
  • Paraphrased quotes. The AI rewrites the phrases. Try: Say: "Quotes word for word, 6 words or fewer."
  • Extra text. The AI adds an explanation. Try: Say: "One JSON code block with keys id, sentiment, theme, quote."
  • 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
  • States the mixed rule

Practice this now ↑

Related exercises