Dev.to AI πŸ€– Ai πŸ‘ 0 πŸ“– 19 min read

Your AI Pilot Test Set May Already Be in the Demo

Your AI Pilot Test Set May Already Be in the Demo An AI pilot can score well on a test while still failing on genuinely new work. One reason is that the test is not independent of the development process: related examp

Your AI Pilot Test Set May Already Be in the Demo

An AI pilot can score well on a test while still failing on genuinely new work. One reason is that the test is not independent of the development process: related examples appear on both sides, a preprocessing step learns from the test set, a reviewer tunes the prompt after seeing the answers, or a tool retrieves a solution during evaluation. A clean spreadsheet of test rows does not by itself prove a clean evaluation boundary.

A buyer comparing proposals for an AI agency in Geneva can use that commercial group page as an example of a service description. It cannot establish that a specific pilot's evaluation is independent or representative. Ask a supplier to show the data and decision boundaries behind the score, not just a successful demonstration.

The practical control is an evaluation-boundary packet. It names the decision the test is supposed to support, the unit that must be held apart, the source and time of each item, what developers and tools could see, how changes were selected, and which questions remain unknowable. Reserve a final test for the end of development where practical. When independence cannot be established, report that limitation rather than presenting the score as proof of performance on new customers or documents.

This article includes a hand-authored twelve-case matrix and a small executable manifest check. They were designed on 5 December 2026. They contain no real customer data, model outputs, suppliers or performance measurements. They are a reusable review aid, not a benchmark, statistical estimate or guarantee that a model is uncontaminated.

First decide what β€œnew” means

Intended deployment question Possible split unit What a row-only split can miss
Will the system work on another page from a known document? Document page, with the known-document assumption disclosed Similar layout or repeated text from the same document
Will it work on a new document from a known customer? Complete document or document family Templates and customer-specific language shared across documents
Will it work for a new customer? Customer or organization Several documents or conversations belonging to one customer
Will it work after a procedure changes? Time period and version family Later revisions or labels that reveal information unavailable at the decision time
Will it work in a new site, camera or channel? Site, camera, channel or collection session Correlated examples from the same source appearing in both partitions
Will an agent solve a new task without a published answer? Task family plus tool-access boundary A retrieved answer, repository history or copied solution

There is no universally correct split. A test of another page from a familiar document may be appropriate for a narrowly defined workflow; it should not be sold as a test of entirely new customers. A customer-disjoint test is more demanding for a new-customer claim, but may be unnecessarily pessimistic for a system explicitly deployed on known customers with legitimate historical context. State the target population and what information would actually be available at the time of use.

The scikit-learn guide to common pitfalls explains that fitting preprocessing on test data can leak information and produce optimistic estimates. It recommends splitting before fitting transformations and keeping test data out of model choices. This is general machine-learning guidance; your actual pipeline may involve a language model, retrieval index, rules or human review in addition to a traditional estimator.

The same case can wear many filenames

Imagine an agency evaluates an assistant that extracts an invoice amount. The development set contains an invoice PDF. The test set contains an OCR export of that PDF under another filename. The files are different, but the business case and answer are the same. A random row split may make the test appear larger without adding an independent invoice.

The same problem can occur with revised contracts, translated documents, emails in one thread, pages from one report, multiple images of the same object or repeated customer tickets. A task may also share an answer key with a prompt example. Exact hashes can detect identical bytes, but a change in formatting or a translated sentence can evade an exact-match check. A similarity system may suggest related items; a reviewer still needs to decide whether the relationship matters to the claim being tested.

In biomedical validation recommendations, the authors discuss leakage when observations from the same patient occur in training and testing. Their examples are biomedical, not CRM documents or language agents. The transferable lesson is to select a split unit that reflects the dependency you need to test. Do not copy a percentage from a medical study as the expected inflation for your own pilot.

Choose a family identifier before splitting where feasible: customer, case, document lineage, recording session or another unit that matches the deployment question. Keep all relevant members of that family in the same partition. Record how families were created and where the relationship is uncertain. If the family cannot be determined, flag the item rather than assuming it is independent because its filename differs.

There is a trade-off. Grouping by customer may leave too few customers for a stable estimate or produce a test set that lacks rare but important scenarios. Do not fix that by secretly breaking the group boundary. Report the small sample, collect more independent cases, use a clearly labeled additional stress set, or narrow the claim. An honest result with wide uncertainty is more useful than an impressive score that answers the wrong question.

Training, development and final testing are different uses

Teams often use the same word β€œtest” for several activities. A developer may need examples to inspect outputs, refine a prompt, tune thresholds or improve retrieval. Those examples are development material once they influence a choice. A final held-out set is intended to assess the selected configuration after that tuning. If a team repeatedly examines failures on the final set and adjusts the system to pass them, the set has become another development set.

The boundary applies to human choices as well as model fitting. A reviewer who sees the final answers and tells the agency which wording to add has transferred information. A supplier that chooses the best of ten prompts based on a supposedly final score has used that set for selection. A dashboard can correctly calculate the score while hiding this history unless the evaluation record shows who saw which items and when.

Maintain a simple access ledger: dataset version, partition, approved audience, access date, system version and purpose. A small organization may not need elaborate infrastructure; a restricted file, named custodian and documented review process can be a start. The essential property is that a final evaluation is not quietly reused to choose the configuration it is later said to validate.

When a failure exposes a serious safety problem, fix it. The answer is not to preserve a harmful system merely to protect a test set. Instead, mark the exposed cases as development material, document the change, and assess the revised system on another suitable independent set where possible. If no such set exists, say so and describe the result as exploratory. A test score is evidence for a specific configuration and process, not a permanent certificate.

Retrieval and tool access create another boundary

A retrieval-augmented assistant may legitimately access reference documents during production. Holding all documents out of the retrieval index would test a different system if the intended job is to answer questions from those documents. The critical question is what information the system is allowed to see for the claim being evaluated: the approved source material, the test questions, a labeled answer key, future corrections, or another user's private record?

For example, the system may be expected to consult the current product manual while answering a new customer question. It should not gain an unfair advantage by retrieving the evaluator's file containing the exact question and expected answer unless that file would genuinely be an authorized source in the deployed workflow. If an answer key is exposed through a search index or repository, the test no longer measures the intended task.

NIST describes solution contamination during agent evaluations, including cases where an agent can find solutions through tools or internet access. NIST distinguishes that from training-data contamination. The distinction matters: a model might never have seen a benchmark during pretraining and still find the answer while being evaluated. Conversely, preventing internet access during a test does not prove that the underlying model never encountered similar material before release.

Record tool availability, retrieval corpus version, network access, repository history, cached outputs and evaluator files. A controlled test can run with tools enabled if that matches deployment, but the allowed sources must be explicit. Preserve the tool trace and inspect whether the answer came from an authorized document or an exposed solution. Do not assume a citation is independent merely because the model produced one.

Opaque foundation-model training is an uncertainty, not a verdict

For many hosted foundation models, a buyer cannot inspect the complete pretraining corpus. A public benchmark or widely circulated example may have appeared in material available to the model provider. A private, newly created test can reduce some risks, but even then the buyer cannot automatically prove the model has never encountered an equivalent task or public source.

Ask the supplier what can be established: the provenance and access history of the buyer's private cases, whether they were used for fine-tuning, the retrieval corpus, the prompts and tool traces, and whether the provider makes any verifiable commitments about training use. Distinguish β€œwe found no overlap in the records we can inspect” from β€œno overlap exists anywhere.” The first can be a useful observation; the second is usually a much stronger claim.

It is also important not to make an opposite assumption: familiarity is not always improper. A model answering questions about a public regulation is expected to use public information. The test should assess the ability to apply current, authorized material to new cases, cite appropriate evidence and abstain when necessary. The question is whether the test supports the specific claim, not whether the model has encountered any relevant knowledge at all.

The evaluation-boundary packet

The following fields are a proposed buyer-side artifact, not a certification or legal standard. Keep sensitive source identifiers in an access-controlled system. A public report can use counts and pseudonymous family references without exposing customer documents or answer keys.

Field What the owner records Why it matters
Decision claim Intended users, task and type of novelty Defines what the score is supposed to support
Unit of separation Customer, document family, session, time or other unit Prevents a row split from hiding related cases
Data provenance Source, permission, collection time and version Supports lawful, relevant use and traceability
Development exposure Examples, labels and feedback available during tuning Identifies cases that are no longer final tests
Final-test custody Owner, access list, frozen version and release conditions Makes accidental or deliberate reuse visible
Transformations Fitted preprocessing, chunking, deduplication and indexing Finds paths through which test information can influence choices
Tool boundary Retrieval corpus, internet, repositories and caches Separates authorized reference use from answer exposure
Time boundary Prediction time, effective source version and label availability Prevents future information from entering an earlier decision
Coverage Scenario families, missing groups and exclusions Prevents a narrow test from being described as universal
Result and uncertainty Numerator, denominator, unresolved labels and limitations Prevents a small illustrative score being treated as a guarantee
Change record Model, prompt, threshold, corpus and evaluator versions Links a result to the tested configuration
Next decision Release, revise, collect data or pause, with owner Turns evidence into an accountable action

The EY discussion of AI readiness identifies poorly separated data and time-based leakage as risks that can inflate measured performance. It is practitioner guidance from a consulting firm, not an independent evaluation of a particular supplier. Use the packet to ask for concrete evidence rather than accepting a generic statement that a model was β€œvalidated.”

For a Geneva SME, the packet can be a one-page manifest plus a protected case list. Name the person responsible for accepting the data and the person who can pause release. If a supplier says a split is proprietary, ask for a reviewable description of the split unit, counts, exposure controls and limitations without demanding confidential model internals. If the supplier cannot provide enough evidence for the claimed result, narrow the claim or keep the decision open.

Twelve synthetic boundary cases

These twelve scenarios were authored on 5 December 2026 for this article. The sample contains twelve proposed tests, not twelve observed incidents. It excludes real client files, private benchmarks, live models, supplier outcomes and measured error rates. The expected decisions are design recommendations; they are not proof that any evaluation or product is safe.

Case Fictional observation Proposed decision Evidence to inspect
1 Identical file bytes appear in development and final test Hold the final result pending review Source references and matching digest
2 PDF and OCR text represent the same invoice Keep the document family together Lineage, source and transformation records
3 Different invoices belong to one customer Split by customer if the claim is new-customer performance Customer-family assignment and target claim
4 Same document family appears before and after a time cutoff Prevent a later revision from revealing the earlier answer Effective dates and version lineage
5 Imputation or normalization was fitted on all rows Rebuild transformation using development data only Fit logs and partition manifest
6 A final-test answer key is indexed for retrieval Remove unauthorized exposure and rerun on a fresh set where possible Corpus snapshot and retrieval trace
7 A developer changes the prompt after seeing final-test failures Reclassify exposed cases as development material Access log, prompt revision and decision record
8 An agent finds a solution in repository history Treat as tool-access contamination for that claim Tool trace, commit visibility and permitted-source policy
9 Provider training corpus is opaque Mark pretraining overlap unknown Supplier statement and limits of inspection
10 A public manual is an authorized production reference Allow it if the evaluation claim expects that access Corpus policy and source version
11 A rare group is absent from the final test Report the coverage gap Inclusion rules and missing-group inventory
12 A reviewer cannot decide whether two records are related Keep the relationship unresolved; do not assume independence Review decision and escalation owner

The distinction in case ten matters. An authorized manual is not automatically an answer leak just because it contains facts relevant to the task. The assessment should test whether the system applies the allowed material correctly to a new case. Case six is different because the evaluator's expected answer has crossed into a tool-visible location outside the intended workflow. Context determines which boundary matters.

A manifest checker you can run locally

This JavaScript checks a narrow property: a known family identifier must not appear in more than one named partition. It does not discover related records, validate source permissions, detect near-duplicates, inspect tool traces, prove pretraining independence or evaluate a model. Unknown family identifiers are flagged for review rather than silently treated as unique. Run it locally with Node.js; the identifiers below are fictional.

const assert = require('node:assert/strict');

function inspect(items) {
  const seen = new Map();
  const issues = [];
  for (const item of items) {
    if (!item.family || !item.partition) {
      issues.push('missing-family-or-partition');
      continue;
    }
    const partitions = seen.get(item.family) || new Set();
    partitions.add(item.partition);
    seen.set(item.family, partitions);
  }
  for (const [family, partitions] of seen) {
    if (partitions.size > 1) issues.push('cross-partition-family:' + family);
  }
  return issues.sort();
}

assert.deepEqual(inspect([
  {family:'case-a',partition:'development'},
  {family:'case-a',partition:'development'},
  {family:'case-b',partition:'final'}
]), []);
assert.deepEqual(inspect([
  {family:'case-a',partition:'development'},
  {family:'case-a',partition:'final'}
]), ['cross-partition-family:case-a']);
assert.deepEqual(inspect([{partition:'final'}]), ['missing-family-or-partition']);
console.log('Three synthetic manifest checks passed.');

The checker is only as good as the family labels it receives. Two related invoices with different or missing family IDs can pass incorrectly. A single customer may have legitimately independent cases depending on the intended question. A digest check, similarity search, metadata review and human adjudication can provide additional evidence, but none proves that all dependency has been found.

Run the check before tuning and again on the frozen manifest. Record the version and the owner who reviewed exceptions. In a real system, protect the manifest and avoid putting sensitive customer identifiers into logs or public reports. Also test the process that builds the manifest: an accidental family-ID collision can create misleading grouping, while an inconsistent source mapping can split one family without triggering this simple function.

A time boundary is more than sorting rows

For forecasting or operational decisions, define the moment when the system would have had to make the decision. A label, revised document or customer outcome created later may be useful for scoring, but it should not be available as an input at that earlier moment. A chronological split can help; it does not automatically solve late-arriving records, retrospective corrections or features calculated using the full dataset.

Suppose a pilot predicts whether a support case will need escalation. The input snapshot includes a field updated after the case was escalated. The model may appear accurate because it reads the outcome indirectly. The same issue can occur without training a model: an agent may retrieve a corrected answer published after the time being simulated. In both cases, the evaluation is testing access to later information rather than the intended decision.

Create an β€œavailable as of” rule for each source and feature. Record event time, ingestion time, effective time and revision time where they differ. If historical snapshots are unavailable, do not claim a fully point-in-time evaluation. You can still run an exploratory test using current data, but label its limitations and avoid presenting the result as a forecast of past or future operational performance.

Be careful with the unit of grouping and time. Splitting by date alone can put earlier and later records from one customer on opposite sides, which may be appropriate for a known-customer forecasting claim but inappropriate for a new-customer claim. Splitting by customer alone can still allow future-derived values into development. Sometimes the evaluation needs both a group boundary and a time boundary; a small dataset may not support a precise result under both.

A video example and a real question

A computer-vision lesson with a published video transcript illustrates how neighboring frames from one recording can end up in both training and testing. It recommends selecting a split unit such as a recording session, camera or location according to the intended deployment. The example is educational and concerns images; it does not prove that a document assistant has the same error rate. Its value here is the distinction between different files and independent cases.

In a DeepLearning.AI community discussion, a participant asks whether a sampling implementation can place the same people in both training and validation despite an apparent row split. This is a specific forum discussion, not a representative survey or evidence about your supplier's code. It suggests a practical review question: does the data loader actually honor the split, or does it draw from a shared pool at runtime?

The answer requires looking at implementation behavior, not just filenames. Ask for the manifest, the sampler's allowed identifiers, a reproducible check and a trace showing which families were used. A sample-level split can look correct on paper while a generator, augmentation routine or retrieval index crosses the boundary later. Conversely, a repeated reference source may be legitimate when the deployment claim permits it; document the distinction.

What a buyer should ask during a pilot

Start with the business decision. Is the system intended to draft answers for an employee, classify incoming documents, extract fields, or take an external action? What evidence would justify moving from a sandbox to a limited pilot? Which failure would require a pause regardless of the average score? Define these before seeing the results so that a convenient metric does not become the goal after the fact.

Then ask the supplier for a data map. Which examples were supplied by the buyer, generated by the supplier, copied from public materials or obtained from another source? Which can be used for development, model training, retrieval and final testing? Who has access? What must be deleted or returned when the project ends? A separate privacy and security review is still needed for the real data and jurisdiction.

Ask for the split mechanism, not only a statement such as β€œwe used an eighty-twenty split.” Which families were grouped? Was the split made before chunking, augmentation or preprocessing? Did the same customer, document template or recording session occur in multiple partitions? What was fitted on which partition? If labels were corrected after review, were the affected cases removed from the final set?

Ask what happened during evaluation. Were internet access, search tools, repository history or caches available? Could the system find test questions or expected answers? Which retrieval corpus version was used? Were the same tools available in the intended deployment? Retain the answer and a trace when doing so is permitted; a verbal assurance that β€œthe model did not cheat” is not a reproducible boundary.

Finally, ask how results will be reported. A useful report states the number of cases, the unit of independence, coverage, exclusions, unresolved labels, exact system configuration and whether a final set was reused. It separates average quality from severe failure modes and identifies the next decision. If the sample is too small to support a reliable comparison, the report should say so instead of converting a few successful examples into a market-wide performance claim.

Failure modes and recovery

A random split divides one family. Rows from the same customer or document family appear in both development and testing. Rebuild the manifest using the unit required by the claim, then rerun the process. If there are too few independent families, collect more data or narrow the conclusion; changing the label of the test does not restore independence.

Preprocessing sees the final set. A scaler, imputer, feature selector or other fitted transformation learns from all rows. Refit it on the permitted development partition and apply the fitted transformation to the final partition. Review the pipeline and its cached artifacts, not just the model training command.

The answer key enters the retrieval index. An agent returns the expected answer because the key or a future solution is searchable. Remove that source from the permitted corpus, inspect traces and evaluate a revised system with a fresh or appropriately reclassified set. Do not equate all retrieval with leakage: the authorized reference corpus may be essential to the real task.

The final test is used repeatedly for tuning. A team improves the prompt after inspecting final failures, then reports the new score as untouched. Reclassify those cases as development material and document the history. If a fresh final set cannot be assembled, report the result as exploratory and avoid a definitive generalization claim.

A split is clean but unrepresentative. A technically independent set can still omit important languages, document types, customers or rare safety cases. Report coverage and use targeted stress tests alongside the main assessment. Stress cases should not be silently mixed into a representative performance estimate unless the sampling method supports that interpretation.

A score survives a system change. A new model version, prompt, retrieval index or tool permission can change behavior after the evaluation. Link the score to the tested configuration and decide which changes require regression testing or a fresh evaluation. Monitoring after release complements an independent test; it does not retroactively make a contaminated test independent.

Validation checklist before accepting a score

  • [ ] State the task, users, target population and meaning of β€œnew.”
  • [ ] Choose a separation unit that matches that claim and document family construction.
  • [ ] Preserve provenance, permitted use, source dates and version lineage.
  • [ ] Split before fitted preprocessing, augmentation or chunking can cross the boundary.
  • [ ] Check exact duplicates and review likely related cases without claiming perfect detection.
  • [ ] Separate development access, model selection and final-test custody.
  • [ ] Record tool, network, retrieval corpus, repository and cache access.
  • [ ] Verify which information was available at the simulated decision time.
  • [ ] Report coverage, exclusions, unresolved labels and sample limitations.
  • [ ] Bind the result to the tested model, prompt, corpus, thresholds and evaluator version.
  • [ ] Define how exposed final cases are reclassified and how a revised system is retested.
  • [ ] Give a named owner authority to pause, narrow the claim or collect more evidence.

The decision is not whether every test must be perfectly isolated from all prior knowledge. It is whether the evidence matches the claim being made. A supplier that can explain the boundary, show what was checked and disclose what remains unknown gives the buyer a much stronger basis for a pilot decision than a polished score without lineage.

πŸ“° Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.