Skip to content
Original tutorialPublic source reviewed

Compare CSV classification results by ID: a worked example

Align two CSV runs with renamed columns and inspect changed, missing and added IDs.

Use caseUse stable IDs to find changed, missing, and added rows after a rule update

Source · JevLog originalSome code10 min

After changing classification rules, compare two CSV exports by stable ID to find changed labels, missing records and added records. This exercise uses two fictional runs with different column names and an expected report you can inspect row by row. No code or model call is required.

Author: JevLog editorial team · Updated 2026-10-02. Synthetic differences do not establish accuracy or approval to release a rule.

Open the run comparison tool · Download before.csv · Download after-renamed.csv · Download the expected diff JSON

Compare two classification runs and review changed, added and missing records separately. AI-generated conceptual illustration.

Keep each run’s input scope, rule version, model identifier and time. If both the sample scope and the classifier change, you cannot attribute every difference to the model. Use stable, unique business IDs rather than row positions that change after sorting.

File ID column Label column Records
Previous run id label 1→Billing, 2→Technical, 3→Other
New run record_id category 1→Billing, 2→Other, 4→Shipping

Column names may differ if the IDs identify the same kind of record and the label fields have comparable meaning. An order ID and a ticket ID are not interchangeable merely because their numbers match.

Click “Load a fictional sample” or select both downloaded files. Choose id and label for the previous run, and record_id and category for the new run. Run the comparison. Each file is limited to 5 MB and is processed locally in your browser.

2. Check four counters and three differences

Section titled “2. Check four counters and three differences”

Expect 1 changed label, 1 missing record, 1 added record and 1 unchanged record. The table and downloaded report contain only the three differences. Unchanged ID 1 contributes to the summary but is not exported as a difference.

ID Previous label New label Change
2 Technical Other Changed label
3 Other Empty Missing in new run
4 Empty Shipping New in new run

Previous count = unchanged 1 + changed 1 + missing 1 = 3. New count = unchanged 1 + changed 1 + added 1 = 3. Equal file sizes do not mean identical populations: only IDs 1 and 2 appear in both files.

For ID 2, inspect the original text, labeling policy and human reference to decide whether Technical→Other is appropriate. For ID 3, check filters, failed requests and export boundaries. For ID 4, check whether the input batch changed. Missing and added records do not directly measure classification correctness.

Download diff-report.csv or diff-report.json. These contain ID, previous label, new label and change type. They do not include original text, rule versions or reference labels. Save those separately and retrieve source text by ID.

A separate handoff table could use id, old_rule_version, new_rule_version, reference_label, reviewer_decision, reason, reviewed_at. This is a suggested table you maintain yourself, not a feature the tool automatically creates or stores.

5. Review uncertain changes before release

Section titled “5. Review uncertain changes before release”

Have a person check uncertain changes. Evaluate errors and business costs on labeled examples that were not used for tuning. If you already have normalized scores, the review queue tool can organize records for inspection; the review workflow guide explains how to retain human decisions.

Why do blank or duplicate IDs block comparison?

Section titled “Why do blank or duplicate IDs block comparison?”

An ID matching several rows creates an ambiguous join, and an empty ID cannot reliably link records. Use the CSV checker first and verify the source system. The comparison does not silently take the first match or pair records by row position.

Are case and whitespace differences in labels counted?

Section titled “Are case and whitespace differences in labels counted?”

Yes. IDs are matched after trimming surrounding whitespace, but labels are compared as raw strings. Billing, billing and Billing differ. If your policy considers them equivalent, normalize them using an explicit, versioned mapping before comparison.

Is a missing record the same as an empty label?

Section titled “Is a missing record the same as an empty label?”

No. A missing record has no corresponding ID in the new file. An existing ID with an empty label still participates in label comparison. The tool does not establish that an empty label is valid; route missing labels through review.

Does a zero diff prove correctness? Are results saved?

Section titled “Does a zero diff prove correctness? Are results saved?”

Zero differences mean the selected label field matches for these records, not that either run is correct. Results are not persisted. Download before refreshing and select both files and column mappings again afterward.

This local check compares existing labels. It does not call Jev or compute evaluation metrics against reference answers. The expected JSON is generated with the current tool logic and can be compared with your browser download.