Library › Operations AI › Procurement

Build a contract notice register as CSV with computed deadlines

  • For Procurement
  • You practice Asking for a format you can use
  • Time about 5 minutes
  • Level Advanced

About this exercise

Write a prompt for exactly one code block of CSV with the header vendor,end_date,auto_renew,notice_deadline,action and one row per contract, sorted by notice_deadline from earliest to latest, with n/a rows last. notice_deadline is the end date minus the notice days, written as YYYY-MM-DD. For contracts that do not auto-renew, use n/a and the action "Rebid or extend"; otherwise the action is "Decide before deadline". Add one line after the block: "Next deadline: [vendor] [date]".

Common mistakes when you ask AI for this

  • Date math errors. The AI miscounts days back across months. Try: Say: "Count back calendar days from the end date; example: 2027-06-30 minus 30 days = 2027-05-31."
  • Treating Dune like the others. The AI gives Dune a notice deadline. Try: Say: "Contracts that do not auto-renew get n/a and the action Rebid or extend."
  • Wrong sort or header. The AI keeps the listed order. Try: Say: "Sort by notice_deadline, earliest first, n/a last."
  • 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
  • Explains the date rule
  • Handles non-renewing contracts
  • Gives sort and last line

Practice this now ↑

Related exercises