Claude 3.5 Sonnet Synthetic Data Generator for LLM Fine-Tuning
Prompt engineering framework for generating diverse, benchmark-grade synthetic instruction datasets (JSONL) with automated difficulty scaling and rejection sampling.
Parametric Customizer & Compiler Live Tool
Adjust the variables below. The prompt code and API payload update dynamically in real time.
Specific domain capability being fine-tuned into the model
You are a Principal AI Alignment and Foundation Model Training Researcher specializing in Synthetic Data Generation (SDG) for Supervised Fine-Tuning (SFT) and Direct Preference Optimization (DPO).
Generate a batch of high-diversity, verifiable training pairs for fine-tuning under the following parameters:
- Target Capability / Domain: {PostgreSQL Performance Optimization: Index Selection, EXPLAIN ANALYZE query planning, and connection pooling}
- Data Format Standard: {OpenAI / HuggingFace ChatML Format (system, user, assistant messages)}
- Difficulty Evolution Technique: {In-Depth Evolution: Add concrete operational constraints, volume limits, and non-trivial edge cases}
- Quality Filtering & Verification: {Unit-Testable: Solution must include an executable verification script or query plan assertion}
### MANDATORY GENERATION RULES:
1. **High Semantic Diversity**: Avoid common boilerplate. Vary user tone (terse, confused, demanding, technical) and domain constraints.
2. **Executable Invariants**: All code snippets, mathematical proofs, or tabular outputs must be 100% syntactically correct and self-contained.
3. **Structured JSONL Output**: Output directly parseable JSONL lines without markdown code blocks, wrapping each record in strict `{ "messages": [...] }` or `{ "prompt": "...", "chosen": "...", "rejected": "..." }` schemas.
4. **Negative Contrast Pair (for DPO)**: The rejected response must not be blatantly broken; it should reflect subtle common failure modes (hallucinated parameters, inefficient O(N^2) complexity, or over-confidence on false premises). On-demand NVIDIA H100 and A100 GPU clusters for LLM fine-tuning and inference.
Leonardo Phoenix & Flux: Generate photorealistic studio assets with 150 daily free credits. Zero setup required.
πΈ Real Sample Outputs & Verified Results
Visual evidence and benchmark responses generated using this exact prompt formula.
π¬ Prompt Engineering Anatomy
Why this prompt consistently delivers high-tier results: technical parameter breakdown.
Evol-Instruct Methodology Introduced by WizardLM, this technique prompts a strong teacher model (Claude 3.5 Sonnet) to progressively introduce realistic real-world constraints into simple seed prompts.
DPO Preference Margin In Direct Preference Optimization, chosen and rejected pairs must have subtle differences in reasoning quality rather than blatant syntax errors to teach the model nuance.
π¬ Frequently Asked Questions
Troubleshooting common edge cases, model incompatibilities, and best practices.
Can I use Claude 3.5 Sonnet to train open-weights models like Llama 3 or Mistral?
Yes, Claude 3.5 Sonnet is widely considered the premier teacher model for generating clean synthetic coding and reasoning datasets for open-weight foundation models.
How do I avoid synthetic data collapse?
Maintain temperature at 0.7-0.9, inject diverse persona seed inputs, and use embedding clustering to reject duplicate samples before fine-tuning.
Cursor AI & Claude 3.5 Sonnet Pro Bundle
Supercharge your workflow with instant codebase indexing, multi-file edits, and automated system rules.
Explore Related Coding & Architecture Prompts View all β
Claude 3.5 Sonnet Senior Staff Full-Stack Refactoring Architect
Specialized prompt framework for Claude 3.5 Sonnet and Claude 3.7. Transforms messy legacy codebases into modular, testable, high-performance systems with automated regression tests.
cursorCursor AI (.cursorrules) for Next.js 15, React 19 & Tailwind CSS
Stops Cursor from writing outdated Next.js 13 patterns, Pages Router syntax, or deprecated React hooks. Enforces strict TypeScript, Server Actions, and modular clean architecture.
deepseekDeepSeek-R1 Autonomous Deep Research & Synthesis Engine
DeepSeek-R1 chain-of-thought framework designed to force deep reflection, counterfactual auditing, and hypothesis testing before producing production-ready research reports.