Library › Operations AI › Office and admin

Clean a messy emergency contact list into CSV and flag the gap

  • For Office and admin
  • You practice Asking for a format you can use
  • Time about 5 minutes
  • Level Intermediate

About this exercise

Write a prompt for exactly one code block of CSV with the header name,role,phone. Write names in title case, expand "mgr" to Manager and capitalize roles, write phones as 555-0123 style, and remove exact duplicate rows. If a person has no phone number, write NEEDS CHECK. Keep the order of first appearance. After the block add one line: "Duplicates removed: N".

Common mistakes when you ask AI for this

  • Inventing a number. The AI makes up a phone number for Joel Pike. Try: Say: "If there is no number, write NEEDS CHECK. Never guess."
  • Odd phone formats left alone. The AI copies (555) 0138 and 555.0214 as written. Try: Say: "Phones as 555-0171 style."
  • Duplicate kept or header changed. The AI keeps both Alicia rows. Try: Say: "Remove exact duplicate rows; end with Duplicates removed: N."
  • Extra text around the code. The AI adds explanations, extra blocks or comments around the output. Try: Say "exactly one code block, nothing else" and cap the rows.

What a strong prompt includes

  • Quotes the header
  • Normalizes phones
  • Handles missing numbers
  • Removes duplicates

Practice this now ↑

Related exercises