← Microsoft Interview Insights
This question is basically four questions glued together and I did not pace myself well.
Structure your answer as a systematic pipeline: start with diagnosis of OCR noise using quantitative metrics and sampling, then apply filtering and deduplication techniques, followed by normalization steps, and finally validate quality with both automated metrics and human evaluation. Emphasize trade-offs between aggressive cleaning and data retention, and how you iterate based on validation results.
Pro tip: Highlight the importance of establishing a baseline by measuring model performance on the raw data before cleaning, so you can quantify the impact of each cleaning step and avoid over-cleaning that removes valuable signal.
Quantify noise types (e.g., character errors, garbled text, layout issues) using metrics like character error rate on a sample, and visualize common failure patterns to guide cleaning.
Apply heuristic filters (e.g., length, language confidence, symbol ratio) and deduplication methods (e.g., MinHash, exact match) to remove low-quality and redundant data while preserving diversity.
Standardize text through Unicode normalization, whitespace correction, and language-specific rules (e.g., fixing common OCR confusions like 'rn' to 'm') without altering semantic content.
Use automated metrics (e.g., perplexity, downstream task performance) and human evaluation on samples to compare raw vs. cleaned data, ensuring improvements and catching regressions.
Based on validation, refine cleaning steps, document decisions and trade-offs, and establish a repeatable pipeline for future datasets.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.