CSV Cleaning Prompts for Fixing Messy Product Data With AI
Good CSV cleaning prompts tell an AI tool exactly what’s wrong with a file, what the cleaned version should look like and what it must leave alone. Vague requests like “clean this CSV” invite the tool to guess, and guesses in product data become wrong prices, merged SKUs and broken imports.
The prompts below are written for messy product and store data, such as supplier files and platform exports. Each one asks for a cleaned copy plus a record of what changed, so you can check the work before anything reaches your store.
How to Write a CSV Cleaning Prompt That Works
A reliable cleaning prompt has a few consistent parts. It names the specific problems, describes the output you need, protects values that must not change and asks for a report of every change. Including all four turns the AI from a black box into something you can review.
- Describe the problems you can see. Mixed date formats, prices with currency symbols, duplicate rows and inconsistent spellings are all worth naming explicitly.
- Specify the output. Say whether you want a cleaned CSV, a new spreadsheet tab or a file that matches a specific import template.
- Keep the original unchanged. Ask for a cleaned copy, so you can always compare against the source.
- Ask for a change log. Request a list of rows changed, rows removed and values the tool couldn’t clean confidently.
- Tell it not to guess. Ambiguous values should be flagged and left as they are, not rewritten.
- Protect identifiers. SKUs, handles, barcodes and IDs should never be reformatted, merged or stripped of leading zeros.
Here’s a reusable skeleton that combines these parts. Fill in the bracketed sections for your file:
Clean the attached file [file name]. Problems I can see: [list problems].
Write a cleaned copy as a CSV and keep the original unchanged.
Do not change these columns: [SKU, URL handle, Barcode].
Keep values as text if they have leading zeros.
If a value is ambiguous, leave it unchanged and flag it.
At the end, give me a short report listing rows changed, rows removed
and any values you could not clean confidently.
CSV Cleaning Prompts to Copy
Use these prompts one at a time, in roughly this order, rather than asking for everything at once. Smaller, focused requests are easier to check, and a mistake in one step doesn’t spread through the rest of the file.
1. Inspect the file before changing anything
Start with a read-only profile. It shows what’s actually wrong, which often differs from what you expected.
Inspect the attached CSV without changing it. For each column, tell me
the likely data type, how many values are missing and how many are unique.
Also list duplicate rows, rows with more or fewer fields than the header,
blank rows, and any values that look inconsistent within a column.
Use the profile to decide which of the following prompts you need. If the inspection finds rows with the wrong number of fields, fix those first, because they can shift every value after them into the wrong column.
2. Fix the file’s structure
Structural problems include blank rows, extra spaces and headers that don’t match your import template.
Clean the structure of the attached CSV:
- Remove completely blank rows.
- Trim leading and trailing spaces from every value.
- Rename the headers to match this list exactly: [paste your template headers].
- List any rows where the number of fields doesn't match the header,
but do not try to repair them.
Keep the original file unchanged and give me a cleaned copy.
Asking the tool to list malformed rows rather than repair them is deliberate. A row with an extra field usually has a stray comma or quote, and the correct fix depends on what the value was meant to be.
3. Standardize values
Inconsistent formats are the most common problem in supplier files. Give the tool the exact target format for each column.
Standardize these columns in the attached CSV:
- Dates: convert to YYYY-MM-DD. If a date could be read as month/day
or day/month, leave it unchanged and flag it.
- Price and Compare-at price: numbers only, no currency symbols
or thousands separators, two decimal places.
- Vendor: use the spellings in this list: [approved vendor names].
Show me any vendor value that doesn't clearly match one of them.
Keep blank cells blank. Report every value you changed.
Supplying an approved list for text fields like vendor, product type or tags works far better than asking the tool to “make them consistent.” Without a list, it decides on its own which spelling wins.
4. Find duplicates without deleting them
Duplicates need a human decision, because two similar rows might be a true duplicate or two genuinely different products.
Find possible duplicates in the attached CSV. Treat rows as possible
duplicates if they share the same SKU, or the same title and vendor.
Don't delete anything. Give me a table of each duplicate group with
row numbers and the columns where the rows differ.
Once you’ve reviewed the groups, ask the tool to remove only the specific rows you’ve confirmed, and to keep the first occurrence of each.
5. Protect codes and identifiers
Spreadsheet programs often damage codes before the AI ever sees them. This prompt checks for that damage.
Check the SKU, Barcode and any ZIP code columns in the attached CSV.
Keep every value as text. Flag values that look damaged, such as barcodes
shorter than the others, numbers in scientific notation like 1.23E+11,
or codes that seem to have lost leading zeros. Do not change them.
Damaged codes usually can’t be repaired from the file itself. If the check finds them, go back to the original source and re-export the data with those columns kept as text.
6. Prepare a Shopify product import file
If the file is headed for Shopify, ask the tool to check it against the rules Shopify’s product CSV follows.
Check the attached file against Shopify's product CSV rules and report
problems without fixing them:
- Headers match this template exactly: [paste Shopify template headers].
- Each product uses one URL handle, and no two different products share one.
- Rows for the same product sit together, with product details on the first row.
- No two variants of a product have the same combination of option values.
- Status values are only active, draft or archived.
- Image URLs start with https://.
- Prices contain numbers only.
A report-only request is safer here than an automatic fix. Handle and variant problems change how Shopify groups rows into products, so it’s worth deciding each fix yourself.
7. Produce a final quality report
Finish by asking for a summary you can compare with the original file.
Compare the cleaned file with the original. Report the row count of each,
the number of rows removed and why, the number of values changed per column,
and any values still flagged as uncertain. Save the cleaned file as a UTF-8 CSV.
Check the Results Before You Import
AI tools can misread a column or change values you didn’t ask about, so treat every cleaned file as a draft. Compare row counts with the original, spot-check rows the change log mentions and look closely at anything flagged as uncertain.
Deterministic tools make a useful second check. Command-line tools such as csvkit’s csvclean report rows with the wrong number of columns, and some browser-based CSV cleaners profile a file without uploading it. Neither guesses at values, which makes them a good counterweight to AI.
Privacy matters too. Before uploading customer data to an AI service, check the provider’s data terms, or remove names, emails and addresses that the cleaning task doesn’t need. Product data is usually less sensitive, but the same caution applies to cost prices and supplier details.
Finally, test-import a few rows before the full file. When the cleaned data is ready, Bulkflow supports bulk import with field mapping for Shopify, WooCommerce and Wix, so you can match your cleaned columns to store fields during the import.
Conclusion
CSV cleaning prompts work best when they’re specific, protect your identifiers and ask for a record of every change. Running them as a sequence of small, checkable steps turns AI into a fast assistant for messy product data rather than a source of new errors. We hope these CSV cleaning prompts help you prepare cleaner files for your store. If you work with spreadsheet imports regularly, you can explore Bulkflow.



