xiaohongshu
xiaohongshu
finetune-design
Use when preparing to fine-tune an LLM for multi-turn conversations, before generating any training data. Triggers - starting a fine-tuning project, need to define evaluation criteria, designing conversation data generation.
Full skill instructions
Design all artifacts needed before generating training data for multi-turn conversation fine-tuning.
By the end of this phase, you will have:
model-choice.md — Selected model with documented tradeoffsconfig/input-taxonomy.yaml — Topics, styles, difficulty, edge casesconfig/rubric.yaml — Binary criteria with calibration examplesconfig/persona-template.yaml — Diversity dimensions and distributionsconfig/prompts/user_sim.md — User simulator promptconfig/prompts/assistant.md — Assistant generation promptconfig/system-prompt.md — System prompt for training database-model-eval-results.md — Baseline evaluation resultsApply this to EVERY design artifact. Role-play domain experts (real or fictional) to stress-test your designs before committing.
| Apply To | Experts to Consider |
|---|---|
| Taxonomy | Domain practitioners, user researchers, edge case specialists |
| Rubric | Quality experts, safety specialists, methodology creators |
| Personas | User advocates, accessibility experts, diverse user representatives |
| Prompts | Domain practitioners, AI safety researchers, communication experts |
Process:
This catches blind spots invisible from your own perspective. One project discovered 6 critical rubric gaps through expert critique that would have corrupted training data.
Full guide: assessment-guide.md#expert-role-play-critique
Select the model you'll fine-tune based on:
| Factor | Why It Matters |
|---|---|
| Context window | Max conversation length you can train on |
| Quantization support | GGUF, MLX, QAT for local deployment |
| Base capability | Evaluate before committing |
| Training cost | LoRA/QLoRA vs full fine-tune |
| Deployment target | Ollama, llama.cpp, MLX |
Gate: Model chosen with documented tradeoffs in model-choice.md
Reference: model-selection-guide.md
Determine training constraints based on cost:
| Tokens/Example | Cost Impact |
|---|---|
| <8K | Cheapest, short conversations only |
| 8-16K | Cost-effective, moderate conversations |
| 16-32K | Expensive, long conversations |
| >32K | Very expensive, may require special handling |
Constraint: Plan max conversation length based on your budget. 16K is a practical ceiling for most projects.
Gate: Max transcript token length defined
Reference: model-selection-guide.md#token-economics
Define the distribution of inputs to generate. A good taxonomy has multiple dimensions:
| Dimension | Question | Examples |
|---|---|---|
| WHAT | What are they asking about? | Topics, subtopics |
| HOW | How do they communicate? | Style, verbosity, tone |
| WHO | Who are they? | Demographics, context |
| DIFFICULTY | How hard is this to handle? | Easy, medium, hard |
| EDGE CASES | What should trigger special handling? | Boundaries, safety |
Key lesson: Allocate ~15% to edge cases. Without explicit representation, the model won't learn to handle them.
→ Apply Expert Role-Play: Have domain experts critique your taxonomy for missing topics and user types.
Gate: Weighted taxonomy with cross-product dimensions in config/input-taxonomy.yaml
Reference: taxonomy-guide.md
Design quality criteria for assessing generated conversations.
Critical requirements:
Why calibration examples are non-negotiable: During generation, you'll run assessment with multiple LLM backends (Claude, GPT, Gemini) to catch blind spots. Without calibration examples, backends interpret criteria differently — 20-30% disagreement is common. Calibration examples anchor consistent interpretation.
Structure:
categories:
comprehension:
weight: 0.15
criteria: [CQ1, CQ2]
# ... more categories
criteria:
CQ1:
name: "Accurate understanding"
question: "Does the response demonstrate accurate understanding?"
na_valid: false # Must always be assessable
calibration_examples:
- type: PASS
context: "..."
response: "..."
reasoning: "..."
- type: FAIL
# ...
safety_gates: [CQ8, CQ9] # Any failure = auto-reject
pass_threshold: 0.80
→ Apply Expert Role-Play: Have quality experts critique your criteria for blind spots and edge cases.
Gate: Rubric with calibration examples in config/rubric.yaml
Reference: rubric-guide.md
Design user diversity for realistic training data.
Dimensions to define:
Key lesson: Flaws vary per message, not per conversation. Real people have good days and bad days.
→ Apply Expert Role-Play: Have user advocates critique your personas for missing populations and unrealistic patterns.
persona_template:
communication_style:
options: [terse, casual, formal, stream-of-consciousness]
weights: [0.15, 0.50, 0.25, 0.10]
flaw_patterns:
primary: # 50% chance per message
secondary: # 20% chance each per message
# 20% of personas should have NO flaw patterns
Gate: Persona template with distributions in config/persona-template.yaml
Reference: persona-guide.md
Create the three prompts for data generation:
| Prompt | Purpose |
|---|---|
| User simulator | Generate realistic user messages with flaws |
| Assistant | Generate high-quality responses |
| System prompt | What gets baked into training data |
Key lessons for assistant prompt:
→ Apply Expert Role-Play: Have domain experts critique your prompts for missing requirements and problematic patterns.
Gate: All three prompts drafted
Reference: generation-guide.md (in finetune-generate)
Before committing to fine-tune, evaluate the base model on your rubric.
Process:
Decision gate:
| Pass Rate | Recommendation |
|---|---|
| >70% | Base model may be sufficient. Consider prompt engineering first. |
| 50-70% | Fine-tuning likely helpful. Moderate improvement expected. |
| <50% | Fine-tuning needed. Significant improvement expected. |
Gate: Base model evaluated, decision to proceed documented in base-model-eval-results.md
All numeric parameters in these guides (15% edge cases, 50%/20% flaw probabilities, 0.80 pass threshold, etc.) are starting points from one successful project, not universal truths. Calibrate them for your domain based on pilot generation results and human review.
| Rationalization | Reality |
|---|---|
| "Base model is obviously not good enough" | Evaluate anyway. You need baseline numbers for comparison. |
| "I'll use numeric scales (1-5), it's fine" | Numeric scales drift across assessors. Binary judgments are consistent. |
| "Calibration examples are overkill" | Without examples, backends interpret criteria differently. 20-30% disagreement. |
| "Edge cases are rare, skip them" | Without ~15% edge case representation, model fails at boundaries. |
| "I know what users want, skip taxonomy" | Your intuition is biased. Formal taxonomy ensures coverage. |
| "Expert role-play takes too long" | 1 hour of critique catches blind spots that corrupt 100+ transcripts. Do it. |
| Resource | What It Contains |
|---|---|
| code/SETUP-REFERENCE.md | Project structure and file templates |
| code/infrastructure.py | Copy-paste ready: LLM backend, checkpointing, slicing, scoring |
| examples/therapy-domain.md | Complete therapy domain example: taxonomy, flaws, rubric criteria |
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience