{"id":"acct-vendor-master-duplicate-json","audience":"accounting","category":"finance-work","track":"finance","technique":"format","level":"intermediate","title":"Flag duplicate vendor records in a JSON array","free":false,"task":"You're cleaning the vendor master. Write a prompt for one JSON code block, an array of 4 objects (one per line, no pretty-printing) with exactly the keys id, vendor, duplicate_of and review. duplicate_of is the id of the original when the bank account ending and the company are the same, otherwise null. review is true when names are similar but the bank endings differ, otherwise false. Outside the code block write at most 12 words.","materialLabel":"Vendor master extract (attached to your prompt automatically)","material":"VENDOR MASTER EXTRACT - Larkin Foods\n\nID | Vendor name | Bank account ending | Notes\nV-31 | Halden IT Services | 4417 | active; oldest record\nV-35 | Halden Information Tech | 4417 | same company, renamed after an acquisition (per Halden's letter on file)\nV-40 | Marlow Cleaning | 2209 | active\nV-52 | Marlow Cleaning Services LLC | 8830 | added Oct 14\n\nRules: duplicate_of holds the id of the original (the older record) when the company and bank ending match. review is true for records with similar names but different bank endings: they may be unrelated companies or a duplicate with new bank details, and a person must check. Do not merge or delete records; this is a flag list only.\n\nNote: the buyer says V-52 is 'obviously the same as V-40'. Nobody has verified that.","rules":[{"type":"codeBlocks","count":1},{"type":"maxCodeLines","max":8},{"type":"maxProseWords","max":12}],"promptHints":[{"label":"Gives the keys","patterns":["id","vendor","duplicate_of","review"]},{"label":"Defines duplicate_of","patterns":["duplicate_of","older record","bank ending"]},{"label":"Defines review","patterns":["review.*(true|similar)"]},{"label":"Sets one object per line","patterns":["one (object )?per line"]},{"label":"Limits prose","patterns":["12 words","code block"]}],"mistakes":[{"title":"Marking V-52 a duplicate","why":"The AI follows the buyer and sets duplicate_of for V-52.","fix":"Say: \"Different bank endings mean review: true, not a duplicate.\"","checks":["r2"]},{"title":"Missing the renamed vendor","why":"The AI treats V-31 and V-35 as unrelated.","fix":"Add: \"Same company and bank ending: duplicate_of the older record.\"","checks":["r1"]},{"title":"Wrong keys or shape","why":"The AI uses 'DuplicateOf' or pretty-prints objects.","fix":"Say: \"Keys exactly id, vendor, duplicate_of, review; one object per line.\"","checks":["r0","maxCodeLines"]},{"title":"Commentary around the block","why":"The AI explains the flags in paragraphs.","fix":"Add: \"At most 12 words outside the code block.\"","checks":["codeBlocks","maxProseWords"]}],"hint":"This is a flagging task with two rules. Give the keys, both rules, the example to avoid and the line rule.","rubricLabels":["One JSON array of exactly 4 objects, one per line, each with exactly the keys id, vendor, duplicate_of and review","V-35 has duplicate_of \"V-31\" and review false; V-31 has duplicate_of null and review false","V-40 and V-52 both have duplicate_of null and review true (similar names, different bank endings), and neither is marked a duplicate of the other"]}