Library › Data AI › Business analysts

Write a data quality alert as a JSON block

  • For Business analysts
  • You practice Asking for a format you can use
  • Time about 5 minutes
  • Level Intermediate

About this exercise

Your monitoring tool takes data quality alerts as JSON. Write one JSON block (a single code block) with exactly these keys: severity, metric, observed, expected, drop_pct, likely_cause, confirmed, owner and next_check. severity is written in capitals (HIGH when the drop is more than 50%), next_check is an ISO datetime like 2025-11-05T09:00, drop_pct is a positive number with one decimal, and confirmed is true or false. At most 12 words outside the code.

Common mistakes when you ask AI for this

  • Claiming the cause is confirmed. The AI sets confirmed to true because the SDK story sounds right. Try: Add: "confirmed: false; the cause is a suspicion."
  • Wrong or string numbers. The AI writes "74%" as a string or computes a different drop. Try: Add: "drop_pct = (1200 - 310) / 1200 x 100 = 74.2 as a number."
  • Extra or renamed keys. The AI adds keys like description and timestamps. Try: Add: "Exactly these keys: severity, metric, observed, expected, drop_pct, likely_cause, confirmed, owner, next_check."
  • Leaving the format to chance. The AI picks its own length and layout unless told the exact shape. Try: Add: "Put the code in exactly 1 code block. Keep the writing outside the code under 12 words."

What a strong prompt includes

  • Lists the keys
  • Gives the drop math
  • Sets confirmed false
  • Asks for typed values
  • Limits outside text

Practice this now ↑

Related exercises