{"id":"sheet-sales-commission-nested-if-check","audience":"sales","category":"spreadsheets","track":"data","technique":"verification","title":"Find the bugs in an AI's commission tier formula","free":false,"task":"Your commission plan pays one flat rate on the whole month: 5% under $50,000, 8% from $50,000 up to $100,000, and 10% at $100,000 or more. An AI wrote a formula that's paying some reps wrong. Ask for exactly 2 numbered lines labeled Bug 1: and Bug 2:, each naming a rep it gets wrong, then the fixed formula for C2 in one code block. Under 80 words outside the code.","materialLabel":"The AI's formula and your sales sheet (attached to your prompt automatically)","material":"WHAT THE AI SAID\n\"Use this in C2 and fill down:\n=IF(B2>50000,B2*0.08,IF(B2>100000,B2*0.1,B2*0.05))\"\n\nSALES SHEET - October 2026\nA Rep | B Monthly sales | C Commission (AI formula result)\nJo Kim | 42,000 | 2,100\nRaúl Diaz | 50,000 | 2,500\nTess Moore | 75,000 | 6,000\nIan Shaw | 100,000 | 8,000\nNia Ford | 130,000 | 10,400\n\nNotes:\n- Payroll needs this by Nov 10\n- Nia says she should get 13,000\n- Commission is paid with the Nov 25 paycheck\n- The sheet has 18 reps; these 5 are the ones who emailed me\n- Plan document: Commission Plan FY2026, version 2, signed by every rep in January","rules":[{"type":"codeBlocks","count":1},{"type":"numberedItems","count":2},{"type":"maxProseWords","max":80}],"mistakes":[{"title":"Not giving the plan's rules","why":"The AI can't tell whether $50,000 exactly should earn 5% or 8%.","fix":"Add: \"8% from $50,000 up; 10% at $100,000 or more.\"","checks":["r1","r2"]},{"title":"Asking only for a fix","why":"You get a new formula but no proof the old one was wrong, so payroll won't trust either.","fix":"Add: \"Bug 1: and Bug 2:, each naming a rep it pays wrong.\"","checks":["r0","r1","numberedItems"]},{"title":"Getting a menu of options","why":"The AI likes to offer two or three versions of the formula, so you're left to pick and test them yourself.","fix":"Add: \"Give one formula only, in one code block, no alternatives.\"","checks":["codeBlocks"]},{"title":"Getting a tutorial","why":"By default the AI explains nested IFs at length.","fix":"Add: \"Each bug line under 25 words. Nothing after the code.\"","checks":["maxProseWords"]}],"promptHints":[{"label":"Gives the plan's tiers","patterns":["5%","8%","10%","100,?000"]},{"label":"Settles the boundaries","patterns":["exactly","or more","from \\$?50",">="]},{"label":"Asks for named bugs","patterns":["bug","which rep","name a rep"]},{"label":"Asks for one formula","patterns":["one formula","one code block","no alternatives"]}],"hint":"Tier formulas break at the edges. Give the AI your plan's exact boundaries and ask it to prove each bug with a real rep.","rubricLabels":["One bug line says the 10% branch can never be reached because B2>50000 is checked first, so Ian Shaw and/or Nia Ford get 8% instead of 10%","One bug line says the boundaries use > instead of >=, so Raúl Diaz at exactly $50,000 gets 5% instead of 8% (and Ian at exactly $100,000 is affected too)","The fixed formula checks the highest tier first with >= (for example =IF(B2>=100000,B2*0.1,IF(B2>=50000,B2*0.08,B2*0.05))), so Nia gets 13,000 and Raúl gets 4,000"]}