Data Cleaning Agent: Plan, Rules and a Change Log
Plan an agent that cleans a messy table without silently changing meaning.
Added October 15, 2026. Written with AI assistance and checked for clarity and placeholders; not reviewed by a lawyer, accountant, clinician or other professional. How these prompts are made
The Open buttons send the prompt text as currently shown below to that site only when you click. Fill in the placeholders first.
Plan a data cleaning agent for a table with these columns and problems: [COLUMNS_AND_PROBLEMS]. Row count: [ROW_COUNT]. What the data is used for: [PURPOSE]. Values that must never change: [PROTECTED_VALUES]. Set out the stages: profile (types, missing values, duplicates, odd values), propose rules, apply rules on a copy, log every change, and produce a before-and-after summary. Write the profile report layout, a rules table (column, issue, proposed fix, risk, apply automatically or ask), and the change log format (row id, column, old value, new value, rule). Include the standard questions the agent should ask a human: ambiguous dates, name variants, currencies, outliers. Provide rules for not merging records unless two identifiers match, not filling blanks with guesses, and flagging suspected typos without changing them. Add a validation step comparing row counts and totals before and after with the arithmetic. Finish with five tricky example rows and what the agent should do with each.
Fill in before use
Optional: type your details and the prompt above updates. Nothing is saved or sent.
Replace each bracketed placeholder with your own details, then paste into Any AI or another assistant.
See an example result (fictional data)
Profile (invented): 1,200 rows; 38 missing emails (3.2 percent); 14 duplicate customer ids; dates in 3 formats. Rules: trim spaces (auto), standardise date format (auto), uppercase country codes (auto), merge duplicates only if email and postcode match (ask). Change log sample: row 87, column 'country', 'uk ' to 'UK', rule 3; row 212, 'order_date', '03/04/2025' parsed as 3 April, ambiguous, flagged. Validation: row count 1,200 before, 1,186 after merging 14 confirmed duplicates; total sales before 482,310.50 and after 482,310.50. Questions for a human: is '03/04/2025' 3 April or 4 March for this supplier? Should two customers sharing one email address be merged or kept separate? Nothing is merged until I answer.
Illustrative only, made-up data. Your results will differ and must be reviewed.