AI basics & verificationWork Notes

The spreadsheet fails, but you cannot share it. How do you build a sample that still fails?

One record will not match across two tables. You want AI’s help but cannot share the complete files, so you remove columns and rename the identifiers “Customer A.” The sample works; the original still fails. What you need is a way to reduce material before knowing the cause while checking that the failure survives.

Open blank notebook and pens on a desk, illustrating preparation of a reproducible diagnostic example
Illustrative photo: Kelly Sikkema · Unsplash LicenseIllustrative photograph. All identifiers are invented; they are neither customer records nor evidence of a model test.

What changed: Added a complete invented reduction, restoration and control exercise for an unknown cause, preserving business and whole-file acceptance boundaries.

In this article

Keep material that actually reproduces the failure

This exercise is written from scratch with entirely invented identifiers. It contains no customer records and is not an AI-model test. Its JavaScript rule compares text keys character by character, without conversion, zero stripping or fuzzy matching. The left table contains 000041 and 000052; the right contains 41 and 000052. Both have two rows. The question is why the first pair does not match.

Checking the complete material returns unmatched key 000041; 000052 matches. Renaming both keys in the first pair “Customer A” removes the unmatched item. The code still runs, but the sample no longer represents the original anomaly.

For a real problem, record the software, formula or matching operation, relevant settings, and the particular result that differs from the expectation. “It will not join” is too broad. Here, the observation is explicitly the list of unmatched left-side keys.

Invented exercise for a local JavaScript environment

const left = [{key:'000041', note:'sample A'}, {key:'000052', note:'sample B'}];
const right = [{key:'41'}, {key:'000052'}];
const unmatched = (a,b) => a.filter(x => !b.some(y => x.key === y.key)).map(x => x.key);
console.log(unmatched(left,right)); // ['000041']
A reference implementation of this article’s explicit rule, not the default behavior of every spreadsheet application.

Start reducing before the cause is known

Begin with the complete local failing copy. Remove the note column, retain the keys and comparison method, and rerun the check. The unmatched item remains 000041. For this exercise, notes are unnecessary to reproduce the failure.

Next, retain only the 000052 pair. There is no unmatched item. This does not establish that deleting a real business record repairs the join. It shows that the removed material contains a condition needed for reproduction. Restore 000041 and 41: the failure returns.

With more material, reduce groups and continue within material where the failure persists. Some problems require interactions between groups, so neither half is guaranteed to reproduce independently. Retain a known failing version after each step rather than deleting until everything works and forgetting what changed.

Replacing values also changes relationships

Retaining only the first pair still reproduces the failure. Now try invented replacements. Renaming both keys “Customer A” makes them equal; replacing them with 000083 and 83 preserves inequality. Rerunning the check establishes whether the replacement serves this diagnostic purpose. An anonymized-looking value does not establish that by appearance.

MDN’s strict-equality documentation supports this exercise’s text-comparison rule. A real case may depend on whitespace, types, duplication, filters or formula references. Identify necessary material through reduction and reproduction rather than assuming leading zeros explain every failed match.

Building an invented example avoids directly sharing real identifiers, but does not establish that every retained relationship is suitable for public release. Organizational sharing requirements still apply. See long-identifier and text-type checks for preserving relevant types.

Authored reduction log using one check; unmatched counts refer only to each row’s retained material.
Material changeRetained key relationshipsUnmatched count
Complete two pairs with notes000041/41; 000052/0000521
Remove notes onlyRelationships unchanged1
Keep second pair only000052/0000520
Restore first pair000041/41; 000052/0000521
Keep first pair with one aliasCustomer A/Customer A0
Use invented unequal keys000083/831

Restore a disappearing failure to guide the next investigation

The Stack Overflow minimal reproducible example guidance includes removing material until the problem disappears, then adding the last part back. This applies that debugging principle to preparing a diagnostic packet. It does not guarantee that simple binary reduction isolates every failure.

Retain an equal-key control of 000083 against 000083, expecting zero unmatched items, alongside the unequal 000083/83 pair, expecting one. The packet then includes both a failure and something that works under the same rule.

If adding and removing the same material does not reproduce the behavior consistently, record that. Cache, execution order or external state may still be missing. A single successful run should not become a claim that the cause is known.

Understanding one failure leaves a different decision

The packet explains why exact character matching fails. It does not establish whether 000041 and 41 identify the same business customer. That needs an authoritative code mapping or an authorized person’s confirmation. Removing zeros can make text agree while merging identifiers meant to remain distinct.

A selected diagnostic example does not represent the whole-file distribution. Before accepting a rule-changing suggestion, use an authorized complete copy to check uniqueness, unmatched records, row counts and relevant totals, retaining original and transformed keys. Explaining one failure and approving a full-file transformation are separate acceptance tasks.

For a formula problem, preserve the formula, references and filters and use the AI spreadsheet formula sample checks. Do not change the real problem into another one merely to fit this exercise.

Give AI a problem that can be checked again

The accompanying request could say: “Local exact text comparison returns one unmatched key for invented pair 000083/83 and zero for the equal pair. Explain the difference and suggest checks. Real business identity equivalence is unconfirmed; zero stripping is not authorized.” Include the sample, actual operation and expected result.

Preparing the packet can itself advance diagnosis: remove material that leaves the failure unchanged, retain differences that alter it, and record both. AI or a colleague then receives a reproducible question instead of a file edited until it looks normal.

Key Takeaways

Keep a local copy that reproduces the failure and specify the actual operation, expected result and observation. Reduce one category of material at a time and rerun the same check. When the failure disappears, restore the recent change and continue narrowing; success in a reduced sample is not automatically a repair. Once a necessary difference is identified, build invented material preserving that relationship plus a control. Real sharing remains subject to organizational rules.

Further reading & sources