Skip to content
Mastering Claude

Home / Real cases end to end

Real cases end to end8 minApplication

Building a data asset, synthetic dataset or knowledge base

A synthetic training dataset and an internal knowledge base share the same four-operation architecture, a shared schema, a matching identifier, deduplication and validation before any downstream use.

Generating a thousand synthetic training examples and building an internal knowledge base for an agent share the same architecture under different names. Both go through four shared operations: batch ingestion or generation, deduplication, linking through a shared schema, then recall via a lightweight index.

A schema before the first record

The schema fixes the fields each record carries before the first one is created, whether it comes from batch generation or from ingesting existing documents. Each record also carries a matching identifier, stable from one pass to the next, which links a new entry to an already known entry without depending on the text content itself.

Deduplicate before validating, never after

Deduplication runs on the matching identifier and on a fingerprint of the content, before anyone reviews the batch. A duplicate not removed at this stage propagates into every validation that follows and skews the final count. The example below builds five fake records, including two deliberate duplicates, to show the mechanics without touching a real file.

# Données fabriquées ici même, aucun fichier réel n'est touché
enregistrements = [
    {"id": "corr-001", "texte": "ponceuse à bande"},
    {"id": "corr-002", "texte": "aspirateur d'atelier"},
    {"id": "corr-001", "texte": "ponceuse à bande"},
    {"id": "corr-003", "texte": "meuleuse d'angle"},
    {"id": "corr-002", "texte": "aspirateur d'atelier"},
]

vus = set()
uniques = []
for enregistrement in enregistrements:
    if enregistrement["id"] not in vus:
        vus.add(enregistrement["id"])
        uniques.append(enregistrement)

print(len(enregistrements), "enregistrements,", len(uniques), "uniques après déduplication")

Five fabricated entries, three kept after deduplication on the identifier: the same logic applies to five hundred or fifty thousand rows.

Batch processing that changes the cost, not the method

When generation or validation happens through repeated calls to a model, grouping these calls into a batch process rather than sending them one by one changes the cost without changing the method. This lesson's metric figure gives a figure for that gap. This same discipline of a shared schema and recall through a lightweight index then serves as the foundation for fan-out research, which verifies every claim before keeping it.

Figure 1

The four operations shared by a synthetic dataset and a knowledge base

01
Batch ingestion or generation
Records arrive from an existing source or are generated in batch, each with a matching identifier from the moment it is created.
02
Deduplication
Duplicates are removed on the identifier and on a fingerprint of the content, before any human review.
03
Linking through a shared schema
Each record follows the same schema, which allows it to be linked to other records without depending on the text content.
04
Recall via a lightweight index
A small index makes it possible to find a specific record without scanning the whole dataset for every question.
The sequence shows the order in which the four operations run, from batch ingestion or generation to recall via a lightweight index.
Figure 2

The cost of batch processing compared with real-time processing

50per cent
cost reduction of batch processing via the Message Batches API, compared with real-time processing
platform.claude.com/docs/en/build-with-claude/batch-processing, 2026-09-02
The figure bounds the cost gap between batch processing and real-time processing on the Claude API, measured from the official batch processing documentation.
Calibrate it yourself

An engineer defines a schema shared by each record, generates five hundred synthetic rows each carrying a matching identifier, then runs a deduplication pass on this set before handing it to the team that must validate it.

Write in one sentence what this situation establishes, and in one sentence what it does not establish.

What to remember
  • A synthetic dataset and a knowledge base share the same four-operation architecture, only the generated or ingested content changes.
  • Each record carries a stable matching identifier, fixed by the schema before its creation, which links it without depending on the text itself.
  • Deduplication runs before any validation, never after, so as not to propagate a duplicate into the final count.
  • Grouping calls to a model into a batch process cuts the cost by half compared with real-time processing, without changing the validation method.
  • A lightweight index is used to recall a specific record, without scanning the whole dataset for every question asked.
Do this now

Take ten rows of data you already use, add a stable matching identifier to each one, then spot the duplicates by hand before counting them.

Check the source

Every datable claim in this lesson links here to the public text behind it. A source that does not open proves nothing.