Preserve original IDs during AI cleanup

Keep a source identifier unchanged even when you standardize the values around it.

Explain which field is identity

A stock list might use “0081” as an identifier. If a cleanup turns it into the number 81, the result may fail to match the original system. Tell the assistant which fields are opaque identifiers and which may be standardized. In JSON, strings and numbers are distinct values. In CSV, the importer may infer types, so preserving an identifier through the full round trip may require explicit import settings. 1 2

Put derived values in their own fields

For a list of room names, keep the supplied room ID and record a cleaned display name separately. If you want a new slug, create it as a new field instead of overwriting the ID. A schema can require each result to carry its source key and constrain the type where records go through a validated interface. 3

Check a set of identifiers that look similar

Use an ID with leading zeroes, one with a letter, and two whose display names are the same. Verify that every output still joins to the intended source. Compare identifiers as strings exactly. For repeat work, document which field can be changed and why. A reversible mapping gives you a way to investigate an incorrect merge without reconstructing original values from the cleaned text.

Use the original plain-text export as the comparison source if a spreadsheet has already converted some identifiers.

Sources

  1. IETF's common CSV format
  2. IETF JSON specification
  3. What is JSON Schema?