Model Stage, Post-Processing, Post-Processing, Model Stage, Pre-Processing, Pre-Processing
Pre-processing prepares source material before Claude receives it. Optical character recognition converts scanned invoice images into machine-readable text. Because PII redaction is explicitly performed before model invocation, it also belongs in pre-processing. Additional activities at this layer can include file validation, malware scanning, normalization, page separation, and metadata extraction.
The model stage contains tasks requiring Claude’s language-understanding capability. Classifying the invoice type involves interpreting textual and contextual features, while extracting structured invoice fields requires mapping unstructured content into defined business attributes.
Post-processing verifies and commits the model’s result. Schema validation confirms that required fields exist, data types are correct, enumerated values are permitted, and structural constraints are satisfied. Persistence must occur only after validation and any required human review because the system of record should not receive malformed or unapproved model output.
This decomposition separates probabilistic inference from deterministic processing. OCR, redaction, validation, and persistence do not need to be delegated to Claude when conventional components can execute them more predictably. The resulting architecture reduces model workload, strengthens privacy controls, improves auditability, and prevents unvalidated output from directly changing authoritative records.
Study Guide references/topics: Task decomposition; pre-processing; model inference; post-processing; deterministic validation; privacy-by-design; system-of-record protection.
===============