Reference previous AI responses in sequences with PromptYap's powerful Sacred Yaps system
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.
Sacred Yaps use the same basic syntax as regular Yaps, but with special "lore" keywords:
{{ yap = lore }}
References the AI response from the immediately previous step in the sequence.
{{ 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).
{{ yap = lore }}
or {{ yap = lore_1 }}
{{ yap = lore }}
, or Steps 1-2 with {{ yap = lore_1 }}
, {{ yap = lore_2 }}
Generate 5 engaging blog post topics about {{ yap = industry }} trends for 2024.
Focus on topics that would interest {{ yap = target_audience }}.
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
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.
Analyze this customer support ticket: {{ yap = customer_message }}
Identify:
- Primary issue category
- Urgency level (1-5)
- Required expertise level
- Potential solutions
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
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
You can reference multiple previous steps in a single prompt:
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.
Use Sacred Yaps to create conditional workflows:
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.
Build workflows that progressively refine content:
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.
Always explain what the previous step contains when referencing it.
Use {{ yap = lore_2 }}
instead of {{ yap = lore }}
when you need a specific step.
Design your workflow before building to ensure logical flow.
Don't try to reference future steps or create loops.
Very long sequences can become hard to debug and maintain.
Don't assume the AI remembers what previous steps were about.
If a Sacred Yap isn't being replaced:
{{ yap = lore }}
or {{ yap = lore_N }}
If Sacred Yaps contain unexpected content:
If sequences with Sacred Yaps are slow:
{{ yap = lore }}