{"id":"acct-bank-rule-priority-json","audience":"accounting","category":"finance-work","track":"finance","technique":"format","level":"advanced","title":"Order bank feed rules so specific matches beat general ones","free":false,"task":"You're setting up bank-feed categorization rules. Write a prompt for one JSON code block: an array of six objects with keys match, account and priority, one object per line. The first matching rule wins, so more specific rules must come before general ones; priority runs 1 to 6 in order. A rule whose account is unknown gets account null. Outside the code block write at most 15 words.","materialLabel":"Source material (attached to your prompt automatically)","material":"BANK FEED RULES - requested by the bookkeeper (not yet ordered)\n\nIf the bank description contains... then code to:\n- UBER -> 6510 Travel\n- AMAZON -> 6410 Office Supplies\n- STRIPE -> not decided; the owner says Stripe shows up for both payouts and fees, so it needs a person to code it each time (account unknown)\n- AMAZON WEB SERVICES -> 6320 Cloud Hosting\n- UBER EATS -> 6210 Employee Meals\n- STRIPE FEE -> 6830 Payment Processing Fees\n\nThe controller will import the rules as JSON on Nov 9. Use the exact account numbers above.","rules":[{"type":"codeBlocks","count":1},{"type":"maxCodeLines","max":8},{"type":"maxProseWords","max":15}],"promptHints":[{"label":"Names the keys","patterns":["match","account","priority"]},{"label":"Explains first match wins","patterns":["first match","specific","before"]},{"label":"Handles unknown account","patterns":["null","unknown"]},{"label":"Limits to one block","patterns":["one (json )?code block","one object per line"]},{"label":"Caps length","patterns":["\\d+\\s*words","under \\d+"]}],"mistakes":[{"title":"General rules first","why":"The AI keeps the order given, so AMAZON catches AWS.","fix":"Say: \"First match wins; put specific rules before general ones.\"","checks":["r1"]},{"title":"Inventing an account for Stripe","why":"The AI picks a payments account.","fix":"Add: \"Unknown account = null.\"","checks":["r2"]},{"title":"Wrong JSON shape","why":"The AI nests objects or adds fields.","fix":"Add: \"Keys match, account, priority; one object per line.\"","checks":["r0","codeBlocks","maxCodeLines"]},{"title":"Trusting the AI to count words","why":"AI is bad at counting and runs past word limits.","fix":"Ask for fewer words than the real cap and keep each part short.","checks":["maxProseWords"]}],"hint":"The order is the whole point. Tell the AI that the first match wins and what to do when the account is unknown.","rubricLabels":["The JSON array has six objects, one per line, with keys match, account and priority and priority values 1 to 6","AMAZON WEB SERVICES comes before AMAZON, UBER EATS before UBER, and STRIPE FEE before STRIPE (each specific rule has a lower priority number than its general rule)","STRIPE has account null (not a made-up account), the other accounts match the list (6320, 6410, 6510, 6210, 6830), and there is one code block"]}