An extraction workflow related to mistral7b-invoice-normalizer. The reliable path is to make inputs, assumptions, and acceptance checks visible before producing a new adapter or deployment artifact. This note uses an illustrative workflow rather than a claim about a particular organization or production outcome.
Establish the boundary
Define the output schema for descriptions, quantities, units, prices, taxes, and currency. Start with a versioned source set and preserve stable identifiers through every transformation. That makes it possible to compare a later output with the exact examples, configuration, and review rule that produced the earlier one. Record deterministic failures separately from reviewer judgment so that a retry does not silently alter the work.
Use a small holdout slice for this check. It should include ordinary examples, rare cases, and deliberately awkward inputs that reveal boundary conditions. Keep the result next to the source digest and configuration, then promote only the change that improves the intended condition without weakening the known constraints.
Generate synthetic examples covering OCR noise and missing fields
Generate synthetic examples covering OCR noise and missing fields. Start with a versioned source set and preserve stable identifiers through every transformation. That makes it possible to compare a later output with the exact examples, configuration, and review rule that produced the earlier one. Record deterministic failures separately from reviewer judgment so that a retry does not silently alter the work.
Arithmetic verification outside the model
Keep arithmetic verification outside the model. Start with a versioned source set and preserve stable identifiers through every transformation. That makes it possible to compare a later output with the exact examples, configuration, and review rule that produced the earlier one. Record deterministic failures separately from reviewer judgment so that a retry does not silently alter the work.
Use a small holdout slice for this check. It should include ordinary examples, rare cases, and deliberately awkward inputs that reveal boundary conditions. Keep the result next to the source digest and configuration, then promote only the change that improves the intended condition without weakening the known constraints.
Train with explicit null handling and no guessed values
Train with explicit null handling and no guessed values. Start with a versioned source set and preserve stable identifiers through every transformation. That makes it possible to compare a later output with the exact examples, configuration, and review rule that produced the earlier one. Record deterministic failures separately from reviewer judgment so that a retry does not silently alter the work.
Evaluate parsing, schema validity, field accuracy, and total reconciliation
Evaluate parsing, schema validity, field accuracy, and total reconciliation. Start with a versioned source set and preserve stable identifiers through every transformation. That makes it possible to compare a later output with the exact examples, configuration, and review rule that produced the earlier one. Record deterministic failures separately from reviewer judgment so that a retry does not silently alter the work.
Use a small holdout slice for this check. It should include ordinary examples, rare cases, and deliberately awkward inputs that reveal boundary conditions. Keep the result next to the source digest and configuration, then promote only the change that improves the intended condition without weakening the known constraints.
Add a rejection path for ambiguous records
Add a rejection path for ambiguous records. Start with a versioned source set and preserve stable identifiers through every transformation. That makes it possible to compare a later output with the exact examples, configuration, and review rule that produced the earlier one. Record deterministic failures separately from reviewer judgment so that a retry does not silently alter the work.
Practical check
JSONL records and Python decimal-total validation. The following minimal command or script is intended as a preflight check. It is deliberately small: its job is to expose missing structure before a longer run or a release review.
import json
import sys
for number, line in enumerate(sys.stdin, 1):
record = json.loads(line)
if not isinstance(record, dict):
raise SystemExit(f"line {number}: expected object")
print(json.dumps(record, ensure_ascii=False))
Release decision
A useful release record names the input version, the transformation or runtime configuration, the validation slice, and the remaining limitation. Using floating-point arithmetic for currency totals. When evidence is incomplete, keep the artifact private, add the missing check, and preserve the failing example as a future regression case.
Keep the workflow idempotent. Repeating the same preparation step on the same input should not append metadata, discard additional detail, or change stable identifiers. Idempotence makes retries safe and turns unexpected differences into visible defects.
Review results by failure category instead of relying on a single blended score. A small number of high-risk failures can matter more than an improvement on common cases, especially when the adapter feeds a downstream queue or release process.
The final comparison should keep decoding, prompt formatting, and file versions fixed. If several variables move together, the result may look better while leaving the actual cause of the improvement unknown.
Retain both accepted and rejected examples. A concise rejected case with an expected outcome is a durable test asset and prevents the next contributor from rediscovering the same edge condition.
Keep the workflow idempotent. Repeating the same preparation step on the same input should not append metadata, discard additional detail, or change stable identifiers. Idempotence makes retries safe and turns unexpected differences into visible defects.
Review results by failure category instead of relying on a single blended score. A small number of high-risk failures can matter more than an improvement on common cases, especially when the adapter feeds a downstream queue or release process.
The final comparison should keep decoding, prompt formatting, and file versions fixed. If several variables move together, the result may look better while leaving the actual cause of the improvement unknown.
Retain both accepted and rejected examples. A concise rejected case with an expected outcome is a durable test asset and prevents the next contributor from rediscovering the same edge condition.
Keep the workflow idempotent. Repeating the same preparation step on the same input should not append metadata, discard additional detail, or change stable identifiers. Idempotence makes retries safe and turns unexpected differences into visible defects.
Review results by failure category instead of relying on a single blended score. A small number of high-risk failures can matter more than an improvement on common cases, especially when the adapter feeds a downstream queue or release process.
The final comparison should keep decoding, prompt formatting, and file versions fixed. If several variables move together, the result may look better while leaving the actual cause of the improvement unknown.
Retain both accepted and rejected examples. A concise rejected case with an expected outcome is a durable test asset and prevents the next contributor from rediscovering the same edge condition.
Keep the workflow idempotent. Repeating the same preparation step on the same input should not append metadata, discard additional detail, or change stable identifiers. Idempotence makes retries safe and turns unexpected differences into visible defects.
Review results by failure category instead of relying on a single blended score. A small number of high-risk failures can matter more than an improvement on common cases, especially when the adapter feeds a downstream queue or release process.
The final comparison should keep decoding, prompt formatting, and file versions fixed. If several variables move together, the result may look better while leaving the actual cause of the improvement unknown.
Retain both accepted and rejected examples. A concise rejected case with an expected outcome is a durable test asset and prevents the next contributor from rediscovering the same edge condition.
Keep the workflow idempotent. Repeating the same preparation step on the same input should not append metadata, discard additional detail, or change stable identifiers. Idempotence makes retries safe and turns unexpected differences into visible defects.