Skip to content

AI uses for records

Customer holdout dataset evaluation: resolve the customer, then split

By SourceX Editorial · Updated

9 sections

Short answer

Customer holdout dataset evaluation keeps every record of a customer on one side of the train-test boundary, so a score measures skill on customers the model has not met rather than memory of familiar accounts. Build one customer key across CRM, billing and support first, choose the test cell that matches the deployment claim, and report results per customer with intervals clustered by customer.

Evaluation split

Customer holdout dataset

This page covers customer holdout dataset evaluation: resolve the customer, then split.Illustrative

Key takeaways

  • A record-level split lets a model meet the same customer's assets, prices and past resolutions in both training and test.
  • The hard step is the customer key: parent accounts, billing accounts, sites, contacts and assets each produce a different holdout.
  • Crossing seen or new customers with earlier or later periods gives four test cells; a random split supports only the weakest.
  • Report per-customer scores with intervals clustered on the customer, because one account's cases are not independent observations.
  • A gap between seen and new customers can come from segment mix or time drift as well as memorization; test those before blaming leakage.

What does a customer holdout protect an evaluation against?

It protects an evaluation from rewarding familiarity. When records from one customer sit in both the training and test sets, a model can answer test cases from what it already saw about that customer, such as the equipment at a site, a standing discount or last month's resolution, instead of solving the task. A customer holdout puts every record of each customer on one side of the boundary.

The claim it supports is specific: performance on customers the model has never met. That is the claim a buyer of business records needs when a model will serve new accounts, a new region or another company's customers. scikit-learn's documentation states the general rule for grouped data: to measure whether a model generalizes to unseen groups, every sample in a validation fold must come from groups not represented at all in the paired training fold.

This page covers what is particular to customers inside one company's records: how repeat customers leak, how to choose and build the customer key, which of four test cells matches the claim, a sampling worksheet, the coverage limits to report and how to compute intervals. Splitting across several supplying companies, and resolving one customer who appears in two suppliers' records, are separate problems with their own pages.

How a repeat customer's history leaks across a record-level split

It leaks through details that repeat for one account, not through duplicate rows. Business records carry long-lived customer context: asset and site identifiers, contract terms, named contacts, past complaints, customer-specific prices and exceptions. A model that met any of it in training can recognize the customer in a test case and reuse an answer it has effectively seen.

Clinical machine learning has studied the same structure with patients in place of customers. Saeb and colleagues (GigaScience, 2017) compared record-wise and subject-wise cross-validation and, using a public dataset and a simulation, found that record-wise splits often massively overestimated prediction accuracy, because a flexible model could learn to recognize individuals rather than the condition. Customers in business records play the role patients play there.

Repetition inflates scores even when nobody intends it. Lewis, Stenetorp and Riedel (2020) found that 28 to 34 percent of test questions in three open-domain question answering datasets had paraphrased counterparts in the training data, and that models did much worse on questions that could not be memorized from training. A support archive in which one large account files the same request every month has the same shape, and the record count hides it.

The leak also runs forward in time. A customer's later records often contain the outcome of an earlier case: the credit note after a dispute, the second visit after a failed repair. If those later records sit in training while the earlier case sits in test, the model can read the answer instead of working it out.

Who counts as the same customer? Choosing the holdout key

The same customer is whoever shares the context that could give an answer away, which is usually broader than one account number. Choose the identifier layer at which that context is shared, then join every record to it across systems before drawing any split.

Business systems rarely agree on who the customer is. A CRM may hold a parent account with a child account per subsidiary; billing may invoice each site separately; the help desk may know only a requester's email; field service may key everything to an asset serial number. Accounts merge after acquisitions, split when a division is sold and return under new numbers after churn. Each choice of key yields a different holdout.

Build the key as connected groups: link records that share any identifier at the chosen layer, follow merges and parent-child links, and treat each connected group as one customer. Keep the mapping table, so the grouping can be audited and rerun when the data is refreshed.

Resolve the key before de-identification, or make sure de-identification keeps it. Article 4(5) of the GDPR defines pseudonymisation as processing personal data so they can no longer be attributed to a specific person without additional information kept separately, and Recital 26 treats pseudonymised data as still personal. A consistent customer token for named contacts is pseudonymisation in that sense, with the obligations that follow; a fresh random token per record is what destroys the grouping a holdout needs.

The layers below trade leakage protection against test-set size. Start from the highest layer at which customers share contracts or staff, and move lower only with a stated reason.

Who counts as the same customer? Choosing the holdout key
Customer key layerLeak it blocksLeak it missesWhen to use it
Parent account or legal entityShared contracts, pricing, policies and staff across subsidiariesLittle at customer level; it costs test-set sizeThe model will serve new organizations
Billing accountInvoice history, payment terms, credits and disputesContext shared by sibling accounts under one parentSubsidiaries genuinely operate apart
Site or locationEquipment, access notes and visit history at one addressContracts and contacts shared across a customer's sitesField work where the site drives the task
Contact or requesterOne person's phrasing and repeated requestsAccount context, and people who move between customersRarely enough on its own
Asset or deviceRepair and maintenance history of one unitEverything above the assetOnly combined with a higher layer

Four test cells: seen or new customers, earlier or later periods

Pick the test cell that matches the claim the evaluation must support. Crossing customers (seen in training, or new) with time (the training period, or a later one) gives four cells, and each answers a different question.

A random record-level split lands in the first cell and supports only an upper bound. The second cell, the same customers in a later period, tests the claim an internal deployment needs: next quarter's work for existing accounts. The third holds out whole customers within the training period. The fourth, new customers in a later period, is the strictest and the closest to a model deployed for a different company's customers.

Draw the time boundary at the date each decision was made, and leave a gap so late outcomes cannot cross it. For the customer boundary, scikit-learn's GroupKFold keeps the same group out of both the training and test sets, and StratifiedGroupKFold tries to preserve class proportions while keeping each group within a single split; for time, TimeSeriesSplit trains on earlier folds and tests on the fold that follows. None of them alone produces the fourth cell, so combine a customer assignment with a date cutoff.

The cells, and the claim each can carry, are summarized in the table.

Four test cells: seen or new customers, earlier or later periods
Test cellWho is in the test setClaim it supportsWhat it cannot show
1. Seen customers, same periodRandom records from customers also in trainingAn upper bound on performanceAnything about new customers or future work
2. Seen customers, later periodExisting customers' work after the cutoffNext period's work for current accountsPerformance on accounts the model never met
3. New customers, same periodWhole customers held out, same dates as trainingGeneralization to unseen accountsEffects of policy, product or seasonal change
4. New customers, later periodHeld-out customers' work after the cutoffDeployment to new accounts going forwardSegments missing from the whole archive
A two-by-two grid crossing seen and new customers with earlier and later periods, showing the claim each test cell supports, with the new-customer, later-period cell highlighted as the strictest.
Four customer holdout test cells and the claim each one supports. A method diagram, not results.

The customer holdout sampling worksheet

Fill in the worksheet before any model is scored, and freeze it with the split. Each line forces a decision a record count would otherwise hide, and together they make the split reproducible by someone else.

At a glance

The customer holdout sampling worksheet

Units nest. In Anthropic's engineering guide to agent evaluations, a task is one test case with specified inputs and a stated condition for success, and each task gets several trials because a model's output changes from run to run. Trials sit inside tasks, tasks inside cases and cases inside customers, so the worksheet fixes the unit at every level rather than only at the top.

Keep the split alive through refreshes. When the archive is updated, route every new record by its customer key, so a held-out customer's later cases join the test side instead of slipping into training, and treat customers who first appear in the refresh as fresh candidates for cell 4. A split that is redrawn from scratch at each refresh quietly moves customers across the boundary.

Every entry in the illustrative column is an example; replace it with the values for your archive and your claim.

The customer holdout sampling worksheet
FieldWhat to decideIllustrative entryDecision it drives
Target claimWhich test cell the result must supportCell 4: new customers, later periodWhich customers and dates enter the test set
Customer keyIdentifier layer and join rulesParent account, merged across CRM, billing and help deskWhich records move together
Sampling frameCustomers eligible for either sideCustomers with at least one closed case in 2022-2025Who can be drawn at all
Selection ruleHow test customers are drawnStratified by segment and size band, fixed seedWhether the test mirrors the customers served
Per-customer capMaximum test cases from one customer50 cases per customer, drawn at randomWhether large accounts dominate the score
Time cutoff and gapDecision-date boundary and bufferCutoff 2025-01-01 with a 60-day gapWhich later records stay out of training
Unkeyed recordsRecords with no resolvable customerKept out of the test set, counted and reportedHow much of the archive the claim covers
Within-customer similarityHow alike one customer's cases areEstimated from a pilot run on training foldsHow many customers the test set needs
Metric weightingAverage per case or per customerMean per customer, then mean across customersWhether one account can move the headline
Interval methodHow uncertainty is computedClustered by customer, or a bootstrap over customersWhether the reported range is honest

Coverage limits a customer holdout cannot remove

A clean customer split still leaves gaps in who the evaluation speaks for, and those belong in the report beside the score. These are the limits to check in a business archive, with how each shows up and what to write down.

Report each limitation that applies, with its count, next to the result it qualifies:

Coverage limits a customer holdout cannot remove
LimitationHow it shows upEffect on the claimWhat to report
Records with no customer keyGuest checkouts, anonymous chats, walk-in jobsThe holdout cannot cover these interactionsShare of records unkeyed, by task type
A few accounts dominateThe largest customers hold most of the recordsScores mostly reflect large-account workRecords per customer, and per-customer scores
Customers lost before the windowChurned accounts purged or archivedResults lean toward retained customersFrame start date and any known purges
Merged or split accountsOne business under several keys, or the reverseMissed merges leak; over-merging thins the testMerge rules and a sample audit of groups
Single-record customersA long tail with one case eachLittle context to leak, little to learn fromShare of test customers with one record
Segments absent from the archiveIndustries or sizes the business never servedNo test cell can measure themThe segments named as not evaluated

Reporting per-customer scores with intervals clustered on the customer

Report a per-customer score and compute its interval over customers, not records, because cases from one account move together. A record-level interval treats a thousand cases from one customer as a thousand independent observations and reports a range far narrower than the evidence supports.

Anthropic's research on evaluation statistics recommends clustering standard errors on the unit of randomization when questions are not independent. The underlying paper (Miller, 2024) points to reading-comprehension evals such as DROP, QuAC, RACE and SQuAD, which ask several related questions about each passage of text, and reports that clustered standard errors on such data can be more than three times larger than naive ones. In a customer holdout, the customer plays the part of the passage.

Show two averages side by side: the mean over cases and the mean over customers. When they diverge, the headline depends on a few large accounts, and the spread of per-customer scores, with the weakest-served customers described by segment rather than identity, tells a buyer more than either mean.

If several trials run per task, average them within the task before aggregating, so repeated attempts at one case never count as extra customers or extra evidence.

Is the gap memorization, or something else about new customers?

Not always. A drop from seen to new customers can come from leakage, but also from new customers differing in segment mix, from time drift, or from a test design harsher than deployment will be. Test those explanations before calling the gap leakage.

The commentary published alongside Saeb's paper makes the counterpoint. Little argued in GigaScience (2017) that subject-wise splitting in heterogeneous datasets may lead to model under-fitting and larger classification errors, so a group split can overstate error as well as correct it. With customers, that happens when the held-out accounts resemble no one in training, such as the only hospitals in a dataset of retailers.

Three comparisons separate the explanations. Compare cell 2 with cell 4: both are later periods, so a gap between them isolates the customer effect from the time effect. Break the new-customer score down by segment: if the whole gap sits in one segment, it is a coverage problem, not memory. And rerun cell 1 after removing near-duplicate and linked records: if its score falls toward cell 3, the original gap was leakage.

Large record counts can hide all three. Ten thousand cases from two hundred customers is evidence about two hundred customers, and the number to plan around is the customer count.

Requesting records that arrive with customer keys intact

Ask for the key before you ask for volume. A dataset delivered without a stable customer identifier, the account hierarchy and first-seen dates cannot support a customer holdout however many records it holds, and keys usually cannot be added back after de-identification.

Write the requirement into the request: the customer layer you need, consistent pseudonymous tokens across every system in scope, parent-child and merge mappings, decision dates for each case and the count of distinct customers rather than records. Name the test cell your evaluation must support and the acceptance test the data has to pass.

SourceX does not keep datasets on a shelf; it sources them from U.S. businesses against each buyer's request, so key requirements can sit in the request form next to the usual details on size, format and timing. SourceX or its processing partner performs the de-identification, and the supplying company signs off on the scope before anything leaves its systems, so key handling can be settled before preparation starts. Whether a particular supplier's systems can produce a stable customer key is assessed case by case, and no availability is implied.

Frequently asked questions

What is a customer holdout in dataset evaluation?

It is a test set built from customers whose records never appear in training. Every record belonging to a held-out customer, across every system, stays on the test side, so the score measures how a model handles accounts it has never seen rather than how well it remembers familiar ones.

How is a customer holdout different from a random train-test split?

A random split assigns records independently, so one customer's cases usually land on both sides and the model can reuse what it learned about that customer. A customer holdout assigns whole customers. The random split gives an upper bound; the customer holdout tests generalization to new accounts.

Which customer identifier should define the holdout?

Use the highest layer at which customers share context that could reveal an answer, often the parent account or legal entity. Join billing accounts, sites, contacts and assets to that layer across systems, follow merges and parent-child links, and treat each connected group as one customer.

How many customers does a customer holdout test set need?

There is no fixed number; it depends on how alike one customer's cases are and how narrow an interval the decision needs. Plan around the count of distinct customers, estimate within-customer similarity from a pilot, and report intervals clustered by customer, so the range reflects customers rather than records.

Can a customer holdout work on de-identified records?

Yes, if de-identification keeps a consistent token for each customer across systems. A fresh random token per record breaks the grouping and makes a customer holdout impossible. Where customers are people, a consistent token is pseudonymisation under the GDPR, and the data are still treated as personal.

Sources

  • scikit-learn's cross-validation guide says generalization to unseen groups requires validation folds drawn from groups absent from the paired training fold, and documents GroupKFold, StratifiedGroupKFold and TimeSeriesSplit. Source
  • Saeb et al. (GigaScience, 2017) found on a public dataset and in simulation that record-wise cross-validation often massively overestimates prediction accuracy compared with subject-wise cross-validation. Source
  • Little's commentary on Saeb et al. (GigaScience, 2017) argues that subject-wise splitting in heterogeneous datasets may lead to model under-fitting and larger classification errors. Source
  • Lewis, Stenetorp and Riedel (2020) found 28-34 percent of test questions in three open-domain QA datasets had paraphrased counterparts in training, and models performed much worse on questions that could not be memorized. Source
  • GDPR Article 4(5) defines pseudonymisation as processing so data can no longer be attributed to a person without separately kept additional information; Recital 26 treats pseudonymised data as personal data. Source
  • Anthropic's engineering guide to agent evaluations defines a task as a single test with defined inputs and success criteria, and runs multiple trials per task because model outputs vary between runs. Source
  • Anthropic's post on a statistical approach to model evaluations recommends clustering standard errors on the unit of randomization, such as a passage of text, when questions are not independent. Source
  • Miller (2024) notes that reading-comprehension evals such as DROP, QuAC, RACE and SQuAD ask multiple related questions about each passage, and reports that clustered standard errors can be more than 3X larger than naive ones. Source

Tell us what data you need

Share scope, volume, format, timing and licensing needs. Datasets are sourced on request.

See if your company qualifies