Sacred Yaps (Lore System)

Reference previous AI responses in sequences with PromptYap's powerful Sacred Yaps system

What are Sacred Yaps?

Sacred Yaps are special variables that automatically reference previous AI responses in sequences. They use the "lore" keyword and allow you to build complex workflows where each step can access the outputs from previous steps.

Key Features

  • Automatic Management: No manual creation required
  • Sequence Context: Access any previous step's output
  • Dynamic Content: Content changes based on AI responses
  • Workflow Building: Create complex multi-step processes
  • Memory System: Maintain context across sequence steps

Sacred vs Regular Yaps

Regular Yaps:
  • User-created and managed
  • Static content
  • Used across all prompts
  • Manual updates required
Sacred Yaps:
  • Automatically generated
  • Dynamic AI responses
  • Sequence-specific
  • Auto-updated per step

Sacred Yap Syntax

Sacred Yaps use the same basic syntax as regular Yaps, but with special "lore" keywords:

Previous Step Reference

Reference Previous Step
{{ yap = lore }}

References the AI response from the immediately previous step in the sequence.

Specific Step Reference

Reference Specific Steps
{{ yap = lore_1 }} → Step 1's AI response
{{ yap = lore_2 }} → Step 2's AI response
{{ yap = lore_3 }} → Step 3's AI response

References the AI response from a specific step number (1-based indexing).

Important Notes

  • Sacred Yaps only work within sequences, not standalone prompts
  • You cannot reference future steps (only previous ones)
  • Step numbering starts at 1, not 0
  • Sacred Yaps are read-only and cannot be manually edited

How Sacred Yaps Work

Sequence Execution Flow

1
Step 1 executes - No Sacred Yaps available yet
2
Step 2 executes - Can reference Step 1 with {{ yap = lore }} or {{ yap = lore_1 }}
3
Step 3 executes - Can reference Step 2 with {{ yap = lore }}, or Steps 1-2 with {{ yap = lore_1 }}, {{ yap = lore_2 }}

Resolution Process

  1. PromptYap identifies Sacred Yaps in the current step's prompt
  2. Retrieves the corresponding AI responses from previous steps
  3. Replaces Sacred Yaps with the actual AI response content
  4. Sends the processed prompt to the AI model
  5. Stores the new response for future Sacred Yap references

Practical Examples

Example 1: Content Creation Workflow

Step 1: Generate Blog Topic

Generate 5 engaging blog post topics about {{ yap = industry }} trends for 2024. 
Focus on topics that would interest {{ yap = target_audience }}.
AI Response: "1. AI Revolution in Healthcare... 2. Sustainable Tech Solutions..."

Step 2: Choose and Expand Topic

From these blog topics: {{ yap = lore }}

Choose the most compelling topic and create a detailed outline with:
- Introduction hook
- 3-5 main sections
- Key points for each section
- Conclusion with call-to-action
AI Response: "Topic: AI Revolution in Healthcare\n\nOutline:\n1. Introduction..."

Step 3: Write Full Article

Using this outline: {{ yap = lore }}

Write a complete 1000-word blog post. Make it engaging, informative, and optimized for SEO. 
Include the company perspective from: {{ yap = company_bio }}

Maintain a {{ yap = brand_voice }} tone throughout.

Example 2: Customer Support Workflow

Step 1: Analyze Customer Issue

Analyze this customer support ticket: {{ yap = customer_message }}

Identify:
- Primary issue category
- Urgency level (1-5)
- Required expertise level
- Potential solutions

Step 2: Generate Response

Based on this analysis: {{ yap = lore }}

Write a professional customer support response that:
- Acknowledges their concern
- Provides clear next steps
- Includes relevant {{ yap = help_resources }}
- Maintains our {{ yap = support_tone }} voice

Step 3: Create Follow-up Plan

Given the initial analysis: {{ yap = lore_1 }}
And the response we sent: {{ yap = lore_2 }}

Create a follow-up plan including:
- Timeline for checking back
- Escalation triggers
- Additional resources to prepare

Advanced Sacred Yap Usage

Combining Multiple References

You can reference multiple previous steps in a single prompt:

Multi-Reference Example
Compare the initial requirements from step 1: {{ yap = lore_1 }}
With the proposed solution from step 3: {{ yap = lore_3 }}
And the feedback from step 5: {{ yap = lore_5 }}

Create a final recommendation that addresses all concerns.

Conditional Logic

Use Sacred Yaps to create conditional workflows:

Conditional Example
Review the analysis from the previous step: {{ yap = lore }}

If the sentiment is positive, create a thank-you response.
If the sentiment is negative, create an apology and resolution plan.
If the sentiment is neutral, create an informational follow-up.

Use our {{ yap = brand_guidelines }} for tone and messaging.

Iterative Refinement

Build workflows that progressively refine content:

Refinement Example
Take the draft from the previous step: {{ yap = lore }}

Improve it by:
- Enhancing clarity and readability
- Adding more specific examples
- Strengthening the conclusion
- Ensuring it aligns with {{ yap = content_guidelines }}

Maintain the core message while making these improvements.

Best Practices for Sacred Yaps

✅ Do This

Provide Context

Always explain what the previous step contains when referencing it.

Use Specific References

Use {{ yap = lore_2 }} instead of {{ yap = lore }} when you need a specific step.

Plan Your Sequence

Design your workflow before building to ensure logical flow.

❌ Avoid This

Circular References

Don't try to reference future steps or create loops.

Overlong Chains

Very long sequences can become hard to debug and maintain.

Missing Context

Don't assume the AI remembers what previous steps were about.

Troubleshooting Sacred Yaps

Sacred Yap Not Resolving

If a Sacred Yap isn't being replaced:

  • Ensure you're running this prompt as part of a sequence
  • Check that the referenced step has already completed
  • Verify the step number exists (can't reference step 5 if only 3 steps have run)
  • Confirm the syntax is correct: {{ yap = lore }} or {{ yap = lore_N }}

Empty or Unexpected Content

If Sacred Yaps contain unexpected content:

  • Check that the previous step actually generated a response
  • Verify the previous step didn't fail or timeout
  • Review the sequence execution logs for errors
  • Ensure the AI model in the previous step produced output

Performance Issues

If sequences with Sacred Yaps are slow:

  • Consider breaking very long sequences into smaller ones
  • Avoid referencing very large AI responses
  • Use specific step references instead of always using {{ yap = lore }}
  • Monitor your sequence complexity and execution time