7. Run Voice Enforcement

Purpose: Re-generate challenge content with voice enforcement to ensure style-specific differentiation across all 6 challenge styles.

Prerequisites:

  • .env.local has DATABASE_URL and API key for the routed model (see available models)
  • Challenge content already exists in fact_challenge_content (run prompt 04 first)
  • Voice and format rules are current in packages/ai/src/config/

Cost / Duration: ~$5-$50 depending on fact count | 4-8 hours

Prompt

I need to run a voice enforcement pass on existing challenge content. This
re-generates challenges with stronger style-specific voice differentiation
so each of the 6 challenge styles has distinct register, energy, and personality.

### Step 1: Run voice pass (partition 1)

Start with the first partition to verify output quality:

```bash
bun scripts/seed/regen-voice-pass.ts --limit 1000 --concurrency 5 --partition 1/4
```

Review a sample of the output. Each challenge style should feel distinctly different
in tone and voice.

### Step 2: Run remaining partitions

If partition 1 looks good, run the remaining partitions in parallel (separate terminals):

```bash
bun scripts/seed/regen-voice-pass.ts --limit 1000 --concurrency 5 --partition 2/4
bun scripts/seed/regen-voice-pass.ts --limit 1000 --concurrency 5 --partition 3/4
bun scripts/seed/regen-voice-pass.ts --limit 1000 --concurrency 5 --partition 4/4
```

### Step 3: Validate voice adherence

```bash
bun scripts/seed/generate-challenge-content.ts --validate
```

Report voice adherence scores. Compare before/after if we have baseline metrics.

If voice improvement is marginal, the format voice rules in
`packages/ai/src/config/` may need more differentiation between styles.
Reduce `--concurrency` to 3 and `--limit` to 500 if hitting API rate limits.

Cost Table

FactsEstimated Cost
1,000~$5
5,000~$25
10,000~$50

Verification

  • Partition 1 output reviewed for voice quality
  • All 4 partitions completed without errors
  • Voice adherence scores improved on --validate
  • Each challenge style has distinct register and personality
  • No API rate limit errors (or they were handled)

Back to index