Skip to main content
Training guide chapters All documentation

Prepare trustworthy training data

Prepare local JSONL training and evaluation files with explicit splits, validation and privacy controls.

Commands and code stay in English in every language. Replace uppercase placeholders with values from your own account and paid job; do not paste real keys into shared notebooks or logs.

Keep training and evaluation separate

Training text and prompt/target evaluation rows have separate local files.
  1. Sources Approved training text
  2. Quality Validate, review and deduplicate
  3. Training Examples used for weight updates
  4. Validation Guide improvement without teaching answers
  5. Final test Held-out local acceptance

Sources: Approved training text. Quality: Validate, review and deduplicate. Training: Examples used for weight updates. Validation: Guide improvement without teaching answers. Final test: Held-out local acceptance

Prepare local JSONL datasets

Training sources contain JSONL objects with a text field. Evaluation JSONL rows contain prompt, target and criterion fields and are evaluated locally. Validation and final-test files must remain separate from training and teacher requests. Dataset preparation validates rows, deduplicates splits when configured and records fingerprints and exclusions.

  • Keep one JSON object per line and use UTF-8.
  • Do not put validation or final-test answers in training text.
  • Teacher requests may include only explicitly approved training examples.
Example · python
from fusionpointai_training.client import DatasetManifest

# Continue with an authenticated client and an owned session.
ready = client.prepare_session(session["id"])
for item in ready["datasets"]:
    manifest = DatasetManifest(
        split=item["split"], sha256=item["sha256"],
        bytes=item["bytes"], rows=item["rows"],
    )
    rows = client.download_dataset(ready["id"], manifest)
    print(manifest.split, len(rows), manifest.sha256)
    # Each row has a text field. Do not log private training content.
Example · python
import os
from fusionpointai_training import TrainingClient

client = TrainingClient(api_key=os.environ["FUSIONPOINTAI_API_KEY"])
session = client.get_session(os.environ["FUSIONPOINTAI_SESSION_ID"])
for manifest in session["datasets"]:
    print(
        manifest["split"],
        "rows:", manifest["rows"],
        "bytes:", manifest["bytes"],
        "sha256:", manifest["sha256"],
    )
# These are server-provided manifest values, not a local integrity pass.
Example · python
import hashlib
from pathlib import Path

dataset_path = Path("train.jsonl")
expected_bytes = int(input("Manifest bytes: "))
expected_rows = int(input("Manifest rows: "))
expected_sha256 = input("Manifest SHA-256: ").strip()
body = dataset_path.read_bytes()
actual_sha256 = hashlib.sha256(body).hexdigest()
actual_rows = sum(1 for line in body.splitlines() if line)
print("Byte count matches:", len(body) == expected_bytes)
print("Row count matches:", actual_rows == expected_rows)
print("SHA-256 matches:", actual_sha256 == expected_sha256)
# Use values copied from the session manifest; do not log dataset contents.

Prevent leakage and protect sensitive data

Keep final acceptance material outside the training loop. Remove sensitive personal data where required, confirm usage rights, and review generated examples for errors or harmful patterns. Configured deduplication and file fingerprints help identify overlap and preserve integrity; they do not establish truth or replace privacy review.

  • A file digest proves integrity, not truth or dataset quality.
  • Do not use real customer records in shared notebook examples.
  • Record source, permission, topic and transformation history for reproducibility.

Keep splits and teacher sharing explicit

The project validates local training and evaluation files, applies configured deduplication, records data fingerprints and keeps the final test split out of optimization. With teacher_sharing set to approved_only, only approved training text can be sent to the authorized teacher; with none, customer examples stay local.

  • Synthetic teacher examples are stored as training text, not evaluation answers.
  • The final-test path must match rubric.final_test.path.
  • Dataset versions and fingerprints are included in run provenance.