Library › Operations AI › Business analysts
Pull weekly KPIs from a narrative report into typed JSON with nulls
- For Business analysts
- 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 holding a JSON object with these keys in this order: week, otif, dock_to_stock_minutes, overtime_hours, inventory_accuracy, safety_recordables. week is the string "W12". otif is a fraction (0.94, not 94). dock_to_stock_minutes converts hours to minutes. Other numbers are plain numbers, not strings. Use null for anything the report does not give. No text outside the block.
Common mistakes when you ask AI for this
- Guessing the missing value. The AI fills in inventory accuracy with a plausible number. Try: Say: "Use null for anything the report does not state."
- Not converting units. The AI writes 94 and 5.8 as in the report. Try: Say: "otif is a fraction (0.94); convert hours to minutes (5.8 x 60 = 348)."
- Using last week's figures. The AI picks up 91 or 150 from the comparison. Try: Say: "Use week 12 figures only."
- 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
- Lists the exact keys
- Gives the conversions
- Uses null for missing
- Asks for one JSON block
Related exercises
- Adapt one ad image to 3 sizes with Midjourney (Image & Video AI · Marketing and content)
- Age open requisitions as of today and flag the old ones (Finance AI · FP&A and financial analysts)
- Announce a new regional structure with a reporting table (Leadership AI · Executives)
- Announce a referral bonus with the steps to claim it (Marketing AI · HR and recruiting)
- Announce a schedule change in a text message under 45 words (Leadership AI · Small business owners)