Yaps Overview

Master dynamic variables and reusable content with PromptYap's powerful Yap system

What are Yaps?

Yaps are dynamic variables in PromptYap that allow you to create reusable, maintainable content that can be inserted into any prompt. Think of them as smart placeholders that get replaced with actual content when your prompts are processed.

Why Use Yaps?

  • Eliminate Duplication: Write once, use everywhere
  • Easy Updates: Change content in one place, update all prompts
  • Consistency: Ensure consistent messaging across all prompts
  • Collaboration: Share variables across team members
  • Organization: Keep prompts clean and focused

Basic Yap Syntax

Yaps use a simple, intuitive syntax that's easy to remember and type:

Yap Syntax
{{ yap = shorthand_name }}

Example Yap Definition

Yap: company_name
Shorthand: company_name
Content: Acme Corporation
Description: Our company name for marketing

Usage in Prompt

Prompt Content
Write a press release announcing {{ yap = company_name }}'s new product launch.

Syntax Rules

  • Always use double curly braces: {{ }}
  • Include the keyword "yap" followed by "="
  • Use lowercase letters, numbers, and underscores for shorthand names
  • Spaces around the equals sign are optional but recommended for readability

Types of Yaps

Regular Yaps

Standard variables that you create and manage. These contain static content that gets inserted into your prompts.

Regular Yap Examples
{{ yap = company_name }} → "Acme Corporation"
{{ yap = product_description }} → "AI-powered analytics platform"
{{ yap = contact_email }} → "support@acme.com"

Sacred Yaps (Lore System)

Special variables that reference previous AI responses in sequences. These are automatically managed by PromptYap and allow you to build complex workflows.

Sacred Yap Examples
{{ yap = lore }} → Previous step's AI response
{{ yap = lore_1 }} → Step 1's AI response
{{ yap = lore_2 }} → Step 2's AI response
Learn more about Sacred Yaps →

Creating and Managing Yaps

Creating a New Yap

  1. Navigate to the Yaps page
  2. Click "Create a Yap"
  3. Fill in the required fields:
Yap Creation Form
Shorthand: product_tagline
Content: "Innovation that transforms businesses"
Description: Main tagline for marketing materials
Tags: marketing, branding (optional)

Field Descriptions

Shorthand:The unique identifier used in prompts (e.g., "company_name")
Content:The actual text that replaces the Yap in prompts
Description:Optional note explaining what this Yap is for
Tags:Optional labels for organizing and filtering Yaps

Pro Tips for Creating Yaps

  • Use descriptive shorthand names that clearly indicate the content
  • Keep content concise but complete
  • Add descriptions to help team members understand usage
  • Use tags to organize Yaps by category or project

Naming Best Practices

✅ Good Examples

company_name
product_description
contact_email
pricing_tier_1
marketing_tagline
support_phone
ceo_bio
feature_list_premium

❌ Avoid These

name (too generic)
CompanyName (use lowercase)
company-name (use underscores)
company name (no spaces)
x (not descriptive)
temp123 (unclear purpose)

Naming Conventions

Grouping by Category

company_name
company_address
company_phone

product_name
product_price
product_features

Versioning Content

email_template_welcome
email_template_followup
email_template_reminder

pricing_basic
pricing_premium
pricing_enterprise

Yap Validation

PromptYap automatically validates Yaps to ensure your prompts work correctly:

✅ Valid Yaps

When all referenced Yaps exist, you'll see:

● All Yaps validated successfully

❌ Missing Yaps

When Yaps are missing, you'll see warnings:

⚠ Missing Yaps: company_logo, contact_info

⚠ Syntax Errors

Invalid syntax will be highlighted:

⚠ Invalid syntax: {yap = name} (missing second brace)

Validation Features

  • Real-time validation as you type in the prompt editor
  • Pre-run validation before executing prompts
  • Detailed error messages with suggestions
  • Visual indicators for valid/invalid Yaps

Common Use Cases

Brand Consistency

Maintain consistent brand messaging across all AI-generated content.

{{ yap = brand_voice }} → "Professional yet approachable"
{{ yap = company_values }} → "Innovation, integrity, excellence"
{{ yap = brand_personality }} → "Confident and helpful"

Contact Information

Easily update contact details across all customer communications.

{{ yap = support_email }} → "support@company.com"
{{ yap = sales_phone }} → "+1 (555) 123-4567"
{{ yap = office_address }} → "123 Business St, City, State"

Product Information

Keep product descriptions and features up-to-date everywhere.

{{ yap = product_name }} → "AnalyticsPro 2024"
{{ yap = key_features }} → "Real-time dashboards, AI insights"
{{ yap = pricing_basic }} → "$29/month"

Legal & Compliance

Ensure consistent legal language and compliance statements.

{{ yap = privacy_notice }} → "We respect your privacy..."
{{ yap = terms_link }} → "https://company.com/terms"
{{ yap = disclaimer }} → "Results may vary..."

Advanced Features

Multi-line Content

Yaps can contain multiple lines of text, including formatting:

Multi-line Yap Example
Shorthand: company_bio
Content: Acme Corporation has been leading innovation since 2010.

We specialize in AI-powered solutions that help businesses:
• Increase efficiency by 40%
• Reduce costs by 25%
• Improve customer satisfaction

Contact us today to learn more!

Nested Content

While Yaps cannot directly reference other Yaps, you can organize content hierarchically:

Hierarchical Organization
email_header_formal → "Dear Valued Customer,"
email_header_casual → "Hi there!"
email_footer_standard → "Best regards, The Acme Team"
email_footer_support → "Need help? Contact support@acme.com"

Current Limitations

  • Yaps cannot reference other Yaps (no nesting)
  • Shorthand names must be unique within your account
  • Content is limited to text (no images or files)
  • Sacred Yaps are read-only and managed automatically