This guide covers effective prompt engineering techniques for generating high-quality meditation scripts, guided practices, and contemplative content.
Overview#
Meditation content requires specialized prompting approaches that balance:
- Clear, actionable guidance
- Appropriate pacing and rhythm
- Tradition authenticity
- Emotional resonance
- Safety and inclusivity
Prompt Structure#
Basic Meditation Prompt Template#
typescript
const meditationPrompt = {
system: `You are an experienced meditation teacher specializing in ${tradition} practices.
Your guidance is ${tone}, ${style}, and ${pace}.
You speak with ${voiceCharacteristics}.
Your expertise includes: ${expertiseAreas.join(', ')}.`,
user: `Generate a ${duration}-minute ${technique} meditation.
**Context:**
- Target audience: ${audienceLevel}
- Theme: ${theme}
- Desired emotional journey: ${emotionalArc}
- Include audio tags: ${includeAudioTags}
**Requirements:**
- Opening: Welcome and settle (${openingDuration} seconds)
- Main practice: ${mainPracticeDuration} seconds
- Closing: Integration and return (${closingDuration} seconds)
- Silence ratio: ${silenceRatio}%`
};
Detailed System Prompt#
typescript
const systemPrompt = `You are a meditation guide in the ${tradition} tradition.
VOICE CHARACTERISTICS:
- Tone: ${tone} (calm, warm, soothing, contemplative)
- Pace: ${pace} (slow, measured, with natural pauses)
- Language: Simple, accessible, inviting
CONTENT GUIDELINES:
- Use second person "you" for direct guidance
- Include sensory details (feel, notice, sense)
- Avoid command-heavy language (replace "do" with "allow")
- Embrace silence as an active element
- Guide attention, don't dictate experience
TRADITION-SPECIFIC:
${traditionGuidelines}
SAFETY:
- Never suggest specific health outcomes
- Offer options, not commands
- Include grounding elements
- Respect practitioner autonomy`;
Section-Based Prompting#
Opening Section#
typescript
const openingPrompt = `Generate the opening section (${duration} seconds) for a meditation.
OBJECTIVES:
1. Welcome the practitioner warmly
2. Create transition from daily activity
3. Establish the practice intention
4. Invite physical settling
TONE: Welcoming, gentle, unhurried
PATTERN:
- Greeting (tradition-appropriate)
- Acknowledgment of presence
- Permission to let go
- Physical settling invitation
EXAMPLE PHRASES:
${openingPhrases.map(p => `- "${p}"`).join('\n')}
AUDIO TAGS:
- <break time="2s" /> after greeting
- <break time="3s" /> before settling instructions`;
Grounding Section#
typescript
const groundingPrompt = `Generate the grounding section (${duration} seconds).
OBJECTIVES:
1. Establish body awareness
2. Create sense of stability
3. Connect with present moment
4. Release physical tension
FOCUS AREAS:
- Contact with surface (chair, floor, cushion)
- Gravity and weight
- Earth connection
- Physical support
INSTRUCTION PATTERNS:
- "Feel the weight of your body..."
- "Notice where your body meets..."
- "Allow gravity to support..."
- "Sense your connection to the earth..."
AVOID:
- Rushing through body parts
- Complex anatomical language
- Expectations of specific sensations`;
Breath Awareness Section#
typescript
const breathPrompt = `Generate breath awareness guidance (${duration} seconds).
OBJECTIVES:
1. Direct attention to breath
2. Cultivate non-judgmental observation
3. Establish anchor for wandering mind
4. Deepen presence
GUIDANCE LEVELS:
${breathGuidanceLevels[experienceLevel]}
BEGINNER:
- More detailed observation instructions
- Specific locations to notice (nostrils, chest, belly)
- Frequent reminders about natural breathing
INTERMEDIATE:
- Less directive, more spacious
- Trust in practitioner's experience
- Subtle observations
ADVANCED:
- Minimal guidance
- Extended silence periods
- Subtle refinements
AUDIO TAGS:
- <break time="3s" /> between breath cycles
- Emphasis on key words: breath, notice, allow`;
Main Practice Section#
typescript
const mainPracticePrompt = `Generate the main ${technique} practice (${duration} seconds).
TECHNIQUE: ${technique}
TRADITION: ${tradition}
TECHNIQUE-SPECIFIC GUIDANCE:
${techniqueGuidelines[technique]}
STRUCTURE:
1. Introduction to the practice
2. Core instructions
3. Deepening prompts
4. Sustained practice with silence
5. Transition to integration
EMOTIONAL JOURNEY:
${emotionalBeats.map(beat => `- ${beat.position}: ${beat.emotion} (intensity: ${beat.intensity})`).join('\n')}
SILENCE DISTRIBUTION:
- Insert ${silencePercentage}% silence
- Longer silences in middle portion
- Brief silences after key instructions`;
Closing Section#
typescript
const closingPrompt = `Generate the closing section (${duration} seconds).
OBJECTIVES:
1. Honor the practice
2. Integrate experience
3. Bridge to daily life
4. Gentle return to full awareness
SEQUENCE:
1. Acknowledge completion
2. Invite integration
3. Reawaken body (fingers, toes)
4. Expand awareness (sounds, room)
5. Final blessing/gratitude
TRADITION-APPROPRIATE CLOSING:
${closingBlessings[tradition]}
PACE: Gradually increasing energy, slower to faster
AUDIO TAGS:
- Gradual shortening of pauses
- Energy increasing toward end
- Final pause before blessing`;
Technique-Specific Prompts#
Breath Awareness#
typescript
const breathAwarenessPrompt = `Generate a ${duration}-minute breath awareness meditation.
CORE ELEMENTS:
- Natural breath observation (not controlled breathing)
- Multiple anchor points (nostrils, chest, abdomen)
- Working with wandering mind
- Deepening attention
PROGRESSION:
1. Finding the breath (30%)
2. Stabilizing attention (40%)
3. Deepening awareness (20%)
4. Integration (10%)
PHRASES TO INCLUDE:
- "Notice the natural rhythm of your breathing"
- "Without trying to change anything"
- "When the mind wanders, gently return"
- "Each return is a moment of awakening"
SILENCE RATIO: ${silenceRatio}%`;
Body Scan#
typescript
const bodyScanPrompt = `Generate a ${duration}-minute body scan meditation.
BODY REGIONS (in order):
${bodyRegions.map((region, i) => `${i + 1}. ${region.name} (${region.duration}s)`).join('\n')}
FOR EACH REGION:
1. Direct attention to the area
2. Invite noticing without judgment
3. Allow release/softening
4. Brief pause
5. Transition to next area
LANGUAGE PATTERNS:
- "Bring your awareness to..."
- "Notice any sensations in..."
- "Allow this area to soften..."
- "Breathing into..."
PACE: ${pace} (very slow for relaxation, moderate for awareness)
FINAL INTEGRATION:
- Sense body as unified whole
- Overall relaxation awareness`;
Loving-Kindness (Metta)#
typescript
const mettaPrompt = `Generate a ${duration}-minute loving-kindness meditation.
RECIPIENT SEQUENCE:
1. Self (${selfDuration}s)
2. Loved one (${lovedOneDuration}s)
3. Neutral person (${neutralDuration}s)
4. Difficult person (${difficultDuration}s) [optional]
5. All beings (${allBeingsDuration}s)
TRADITIONAL PHRASES:
- "May [I/you/they] be happy"
- "May [I/you/they] be healthy"
- "May [I/you/they] be safe"
- "May [I/you/they] live with ease"
GUIDANCE FOR EACH RECIPIENT:
1. Visualize or sense their presence
2. Connect with wish for their wellbeing
3. Offer the phrases
4. Rest in the feeling
5. Expand to next recipient
CULTURAL SENSITIVITY:
- Adapt phrases for audience
- Acknowledge difficulty with self-compassion
- Make "difficult person" optional for beginners`;
Visualization#
typescript
const visualizationPrompt = `Generate a ${duration}-minute visualization meditation.
SCENE: ${visualizationScene}
SENSORY DETAILS TO INCLUDE:
- Visual: Colors, light, shapes, movement
- Auditory: Sounds in the environment
- Kinesthetic: Temperature, texture, body sensations
- Olfactory: Scents (optional)
STRUCTURE:
1. Preparation/transition (15%)
2. Scene establishment (20%)
3. Exploration/deepening (40%)
4. Key moment/insight (15%)
5. Return/integration (10%)
LANGUAGE STYLE:
- Evocative but not prescriptive
- "You might notice..." not "You see..."
- Allow personal interpretation
- Rich sensory vocabulary
GROUNDING ELEMENTS:
- Maintain body awareness
- Include breath anchors
- Provide return pathway`;
Mantra Meditation#
typescript
const mantraPrompt = `Generate a ${duration}-minute mantra meditation.
MANTRA: ${mantra}
TRADITION: ${tradition}
STRUCTURE:
1. Introduction and meaning (10%)
2. External repetition guidance (20%)
3. Internal repetition guidance (40%)
4. Silent absorption (20%)
5. Integration (10%)
PRONUNCIATION GUIDE:
${pronunciationGuide}
REPETITION STYLES:
- Verbal (out loud)
- Whispered
- Mental (silent)
- Listening (hearing it in mind)
TRADITION-SPECIFIC GUIDANCE:
${traditionMantraGuidelines[tradition]}
AUDIO TAGS:
- <phoneme>${phoneticMantra}</phoneme>
- Long silences during practice portions`;
Tradition-Specific Guidelines#
Buddhist/Mindfulness#
typescript
const buddhistPrompt = `Apply Buddhist mindfulness principles:
CORE CONCEPTS:
- Sati (mindfulness): Present-moment awareness
- Vipassana: Insight into impermanence
- Metta: Loving-kindness
- Equanimity: Non-reactive awareness
LANGUAGE:
- "Notice" over "focus"
- "Allow" over "make"
- "Arising and passing" for impermanence
- "Just as it is" for acceptance
AUTHENTIC TERMINOLOGY:
- Breath awareness: "awareness of the breath"
- Opening: Begin with three breaths
- Closing: "May the merit of this practice..."
AVOID:
- Promising specific outcomes
- Goal-oriented language
- Striving or achieving mindset`;
Yoga/Hindu#
typescript
const yogaPrompt = `Apply yogic meditation principles:
CORE CONCEPTS:
- Prana: Life force/breath energy
- Chakras: Energy centers (if appropriate)
- Atman: Inner self/witness
- Dharana/Dhyana: Concentration/meditation
LANGUAGE:
- "Pranayama" for breath practices
- "Witness consciousness" for awareness
- "Inner light" for visualization
- "Sacred sound" for mantra
AUTHENTIC TERMINOLOGY:
- Opening: "Om" (optional) or silence
- Closing: "Namaste" or "Shanti, shanti, shanti"
- Breath: "prana" or "life force"
STRUCTURE:
- May include pranayama techniques
- Often includes visualization elements
- Mantra components common`;
Zen/Chan#
typescript
const zenPrompt = `Apply Zen meditation principles:
CORE CONCEPTS:
- Shikantaza: Just sitting
- Beginner's mind: Fresh, open awareness
- Non-attachment: Release of grasping
- Direct pointing: Simple, immediate
LANGUAGE:
- Minimal, direct, simple
- Avoid elaborate imagery
- "Just" as key word
- Questions over answers
STYLE:
- Spacious, less verbal guidance
- Extended silence periods
- No striving or goals
- Embrace "don't know mind"
AUTHENTIC ELEMENTS:
- Bell sounds
- Breath counting (1-10)
- Minimal ornamentation`;
Secular/Contemporary#
typescript
const secularPrompt = `Apply secular meditation principles:
APPROACH:
- Evidence-based language
- Accessible to all backgrounds
- No religious terminology
- Focus on practical benefits
LANGUAGE:
- "Attention" over "awareness"
- "Mind" over "consciousness"
- "Practice" over "meditation" (sometimes)
- Avoid: spiritual, sacred, divine
FRAMING:
- Mental fitness/training
- Stress reduction
- Focus improvement
- Emotional regulation
RESEARCH REFERENCES:
- "Studies show..."
- "Brain science tells us..."
- "This activates the..."
- Use sparingly to maintain flow`;
Audio Tag Integration#
Break Tags#
typescript
const breakTagExamples = `
// Short pause (between sentences)
<break time="1s" />
// Medium pause (between ideas)
<break time="2s" />
// Long pause (for practice/reflection)
<break time="3s" />
// Extended silence (sustained practice)
<break time="5s" />
// Use in prompts:
"After each instruction, insert a <break time="2s" /> tag"
"For the main practice, include <break time="5s" /> between guidance"
`;
Emphasis Tags#
typescript
const emphasisExamples = `
// Gentle emphasis
<emphasis level="moderate">breath</emphasis>
// Strong emphasis
<emphasis level="strong">now</emphasis>
// Reduced emphasis
<emphasis level="reduced">just</emphasis>
// In prompts:
"Emphasize key words: breath, body, present, allow"
"Use moderate emphasis, never strong for meditation"
`;
Prosody Tags#
typescript
const prosodyExamples = `
// Slower pace
<prosody rate="slow">Take your time...</prosody>
// Lower pitch (calming)
<prosody pitch="-10%">Rest here...</prosody>
// Softer volume
<prosody volume="soft">Gently...</prosody>
// Combined
<prosody rate="slow" pitch="-5%" volume="soft">
Allow yourself to settle...
</prosody>
`;
Quality Metrics for Meditation Content#
Clarity Score#
typescript
const clarityGuidelines = `
SENTENCE LENGTH:
- Optimal: 10-15 words
- Acceptable: 8-20 words
- Avoid: 25+ words
VOCABULARY:
- Common words preferred
- Technical terms explained
- Avoid jargon
INSTRUCTIONS:
- One action per sentence
- Clear subject (you, your)
- Specific, not vague`;
Pacing Score#
typescript
const pacingGuidelines = `
PAUSE DISTRIBUTION:
- 10-30% of total time as silence
- Pauses increase in middle sections
- Shorter pauses at transitions
SECTION BALANCE:
- Opening: 10% of duration
- Main practice: 50-60%
- Integration: 15%
- Closing: 15%
RHYTHM:
- Alternating guidance and silence
- Natural breathing rhythm
- No rushed sections`;
Engagement Score#
typescript
const engagementGuidelines = `
SECOND PERSON USAGE:
- Target: 2-5% of words are "you"
- Direct address creates connection
- Balance with impersonal observations
SENSORY LANGUAGE:
- Include: feel, notice, sense, hear, see
- Minimum 5 sensory words per 100 words
- Varied modalities (not all visual)
INVITATION vs. COMMAND:
- "Allow yourself to..." (good)
- "Let your body..." (good)
- "Do this now..." (avoid)`;
Example Prompts#
Complete Generation Prompt#
typescript
const fullPrompt = `Generate a 10-minute breath awareness meditation in the Buddhist mindfulness tradition.
SYSTEM CONTEXT:
You are an experienced meditation teacher with 20 years of practice in the Theravada tradition. Your voice is calm, warm, and unhurried. You guide with gentleness, offering invitations rather than commands.
AUDIENCE:
- Level: Beginner to intermediate
- Context: Morning practice
- Goal: Establish calm, cultivate presence
STRUCTURE:
1. Opening (60s)
- Warm welcome
- Permission to arrive
- Physical settling
2. Grounding (60s)
- Body contact with surface
- Sense of support
- Release of tension
3. Breath Awareness (480s)
- Finding the breath
- Observing natural rhythm
- Working with wandering mind
- Deepening attention
- Sustained practice with silence
4. Integration (60s)
- Acknowledging the practice
- Expanding awareness
- Preparation for return
5. Closing (60s)
- Gentle reawakening
- Gratitude
- Transition to activity
AUDIO REQUIREMENTS:
- Include <break> tags at natural pause points
- Mark emphasis on key meditation words
- 30% silence ratio in main practice
- Gradually shorter pauses in closing
TONE REQUIREMENTS:
- Warm and welcoming throughout
- Soothing during main practice
- Gently energizing in closing
OUTPUT FORMAT:
Provide the complete script with audio tags embedded. Mark section transitions clearly.`;
Iteration/Refinement Prompt#
typescript
const refinementPrompt = `Review and refine this meditation script:
CURRENT SCRIPT:
${currentScript}
QUALITY SCORES:
- Clarity: ${scores.clarity}/1.0
- Pacing: ${scores.pacing}/1.0
- Engagement: ${scores.engagement}/1.0
- Authenticity: ${scores.authenticity}/1.0
ISSUES IDENTIFIED:
${issues.map(i => `- ${i.type}: ${i.description}`).join('\n')}
REFINEMENT FOCUS:
${lowestScoreCategory}
INSTRUCTIONS:
1. Maintain the overall structure
2. Improve ${lowestScoreCategory} specifically
3. Preserve effective elements
4. Enhance audio tag placement
5. Ensure tradition authenticity
OUTPUT:
Provide the refined script with all improvements applied.`;
Best Practices#
1. Start with Clear Intention#
typescript
// Good: Specific intention
"Generate a meditation for releasing physical tension after work"
// Avoid: Vague intention
"Generate a relaxation meditation"
2. Specify Audience Level#
typescript
// Good: Clear level with implications
"For beginners: Include detailed breath observation instructions,
frequent reminders that mind-wandering is normal, shorter practice periods"
// Avoid: Assuming level
"Generate a meditation" (no level specified)
3. Balance Guidance and Silence#
typescript
// Good: Explicit silence requirements
"Include 30% silence in main practice section, with 3-5 second pauses
after each instruction and one 15-second sustained silence"
// Avoid: No silence guidance
"Generate continuous narration for the practice"
4. Use Invitational Language#
typescript
// Good phrases to encourage
"Allow yourself to..."
"You might notice..."
"If it feels comfortable..."
"Invite your attention to..."
// Phrases to avoid
"You must..."
"Focus hard on..."
"Don't let your mind..."
"You should feel..."
5. Include Safety Elements#
typescript
// Always include:
"At any time, if you feel uncomfortable, you can open your eyes
and return to the room."
"There is no right or wrong way to experience this practice."
"Honor your body's signals and adjust as needed."