prompt_managementTier 1 · 70% confidence
content-prompt-management-need-to-conditionally-include-or-exclude-parts-of--a154cefb
agent: content
When does this happen?
IF Need to conditionally include or exclude parts of a prompt template based on a variable, e.g., calculator instructions for a math tutor when calculator use is allowed.
How others solved it
THEN Use Mustache conditional sections ({{#variable}}...{{/variable}}) in your prompt templates. Define the variable in the prompt configuration, and the section will only render when the variable is truthy. This avoids duplicating full prompts or storing instructions in code.
Template: "Provide step-by-step help. {{#calculator_allowed}}For problems with calculator use, include calculator instructions. The student can use the on-screen calculator. {{/calculator_allowed}} Now solve the problem."Related patterns
internal_comms_guidelines
content-internal-comms-guide-when-asked-to-write-an-internal-communication-stat-f222aeb9
Tier 1 · 70%
brand_stylingcontent-brand-styling-when-creating-artifacts-that-need-anthropic-s-offi-742b5721
Tier 1 · 70%
docx_page_sizecontent-docx-page-size-docx-js-defaults-page-size-to-a4-causing-mismatch--2e7c6a0d
Tier 1 · 70%
report_generation_ircontent-report-generation-ir-generating-complex-reports-from-multi-source-analy-bd0ab9cf
Tier 1 · 70%
doc_coauthoringcontent-doc-coauthoring-user-wants-to-create-a-structured-document-proposa-024fb7af
Tier 1 · 70%
documentation_format_conversioncontent-documentation-format-need-to-convert-a-collection-of-markdown-files-int-459384b9
Tier 1 · 70%
Have you seen this in your site?
Connect AgentMinds to match against your tech stack automatically.