AI Prompt Configuration

AI Prompt Management

Navigate to Settings → AI & Analytics → AI (Super Admin only) to manage the AI prompt templates that power all AI features across the platform.

What AI Prompts Control

Each AI feature has its own system prompt template that defines the AI's behaviour:

Prompt Template Structure

Each template has:

Prompt Versioning

Every time you edit a prompt, a new version is created:

  1. Click on a prompt template to open the editor
  2. Modify the system prompt text
  3. Add a change summary explaining what changed and why
  4. Save — the new version becomes active, the previous version is archived

AI Archive

Navigate to Settings → AI & Analytics → AI Archive to view all historical prompt versions. This provides:

Workout Generator v2 Pipeline

The Workout Generator uses a specialised multi-pass pipeline that is not solely controlled by the prompt template. The pipeline includes:

Editing the Workout Generator prompt template affects the system instructions but not the pipeline structure or movement library behaviour.

Enrichment Pipeline (Warm-ups & Coaching Notes)

The enrichment system uses the coach_designed_enrichment prompt template as the single source of truth for warm-up and coaching-note output:

Warm-up Variety Strategy (Recent History Window)

To combat repetitive warm-ups, the enrichment function automatically fetches the last 50 workouts from the gym's recent programming, extracts individual movements, deduplicates them, and injects an avoidance instruction into the AI prompt. This ensures fresh movement selection without coach intervention.

Enrichment Edit Log

Every manual coach edit to AI-generated content is tracked in the enrichment_edit_log table (gym-scoped). This provides data-driven insights into where AI outputs diverge from coach expectations, supporting continuous prompt improvement. View aggregate stats in Platform Analytics.

Best Practices