Data cleaning detects and corrects inconsistencies, missing values, encoding errors, irrelevant boilerplate, and privacy risks before data enters a fine-tuning pipeline. Skipping it can make a model learn noise instead of meaningful patterns, producing strong training results but poor real-world performance. section 2.4.1 section 2.5.2
A practical cleaning pass typically checks for:
- Duplicate records, missing values, inconsistent currency formats, and inconsistent date formats. section 2.4.1
- OCR corruption, broken encodings, irregular whitespace, empty paragraphs, and inconsistent document structure. section 2.4.1 section 2.5.2
- Repeated disclaimers, confidential labels, irrelevant boilerplate, and personally identifiable information requiring masking or removal. section 2.4.1 section 2.5.2
- A consistent representation, such as one cleaned report per dataframe row with text in a dedicated column. section 2.5.2
Normalizing transaction records
Replace account IDs and client names with placeholders, convert values such as “USD 1,000” and “$2,500.00” into numeric amounts, and remove notes such as “CONFIDENTIAL” or repeated disclaimers. The resulting records can then be formatted as instruction-response examples.

















