agentleFS
NikoxkxNikoxkx/Agent-Skills/skills/ai-ml/synthetic-data-generator/SKILL.md

synthetic-data-generator

Skill1 starsChanged 5 months agoApache-2.0View on GitHub

Generates synthetic training or test data using LLMs or statistical methods. Use when you need labelled training data, test fixtures, or privacy-safe data substitutes.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Ask the model to generate N records that conform to it.

    line 39
  2. Distinctive:

    Use structured output / JSON mode.

    line 40
  3. Distinctive:

    Start with a small number of real or high-quality seed examples.

    line 43
  4. Distinctive:

    PII leakage: Run a PII/secret scanner on generated data.

    line 77
  5. Distinctive:

    All generated records pass schema validation.

    line 81
  6. Distinctive:

    No obvious PII in a sample.

    line 86

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Overview

Generates high-quality synthetic data using LLMs (for text, structured records, conversations) or statistical methods (for tabular). Covers use case taxonomy, prompt strategies for controlled diversity, schema-driven generation, quality validation (deduplication, diversity, realism), seed example selection, privacy considerations, and complete generation pipelines with evaluation.

When to Use This Skill

  • You need more training data for fine-tuning or few-shot examples.
  • Creating test fixtures or demo data that looks realistic.
  • Privacy or compliance prevents using real customer data.
  • Augmenting a small real dataset.

Prerequisites

  • A schema or example of the desired data shape (JSON schema, Pydantic model, or a few real examples).
  • LLM access (strong model helps for quality and diversity).
  • (For tabular) faker, sdv, or similar libraries.

Steps

  1. Decide generation approach:
    • LLM-based: best for text, conversations, JSON, code, nuanced labels.
    • Statistical / faker: best for structured tabular data with known distributions.
    • Hybrid: use LLM for complex fields, faker for simple ones.
  2. Schema-driven generation:
    • Provide a JSON Schema or Pydantic model in the prompt.
    • Ask the model to generate N records that conform to it.
    • Use structured output / JSON mode.
  3. Seed & diversity:
    • Start with a small number of real or high-quality seed examples.
    • Vary the prompt (different personas, contexts, edge cases).
    • Temperature + top_p for diversity (higher for exploration, lower for fidelity).
    • Post-process to remove near-duplicates (embedding similarity or exact match).
  4. Quality validation:
    • Schema validation (Pydantic or jsonschema).
    • Deduplication (exact + semantic).
    • Diversity metrics (unique values per field, embedding spread).
    • Realism / fidelity (compare distributions to real data if available, or LLM judge).
    • Privacy (no PII leakage — scan with a secret/PII detector).
  5. Scale:
    • Generate in batches (avoid very large single prompts).
    • Parallelize across multiple LLM calls.
    • Store intermediate results and resume.
  6. Output:
    • Generation script (Python) that takes a schema + seeds → synthetic dataset.
    • Prompt templates for different data types.
    • Quality validation functions.
    • Example synthetic dataset + report.
    • Guidance on mixing synthetic + real data.

Examples

  • Generate 500 diverse customer support conversations (with labels) from 10 seed examples using structured output.
  • Generate realistic but fully synthetic user profiles + transaction history (tabular + text fields) with validation.
  • Privacy-safe synthetic medical notes or financial records.

Edge Cases & Error Handling

  • Mode collapse (all examples too similar): Increase temperature, add more varied seeds, post-filter for diversity.
  • Schema violations: Retry with the validation error fed back to the model.
  • PII leakage: Run a PII/secret scanner on generated data; discard or redact offending records.

Verification

  1. All generated records pass schema validation.
  2. Low exact and semantic duplicate rate (<5-10%).
  3. Diversity is high (many unique values across key fields).
  4. (If real data available) distributions are reasonably close.
  5. Manual or LLM review finds the data realistic and useful.
  6. No obvious PII in a sample.
  7. Success: You have a usable synthetic dataset that can stand in for (or augment) real data for the intended purpose.

References

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.