This document provides a comprehensive reference for Mixdown syntax, including all supported tags, attributes, and formatting conventions.
- Core Structure
- Tags Reference
- Variable Interpolation
- Attributes Reference
- Data Formats
- Best Practices
Mixdown combines XML-like tags, YAML data, and Markdown formatting. Here's the basic structure:
<prompt>
<meta>
<!-- Optional metadata about the prompt -->
</meta>
<params>
<!-- Parameters and configuration -->
</params>
<system>
<!-- System instructions -->
</system>
<instructions>
<!-- Main prompt/query -->
</instructions>
<output>
<!-- Output format specification -->
</output>
</prompt>- Purpose: Root container for the entire prompt
- Required: Highly recommended, but optional
- Contains: Any other valid Mixdown tags
Example:
<prompt>
<!-- Other tags go here -->
</prompt>- Purpose: Contains metadata about the prompt
- Required: Optional
- Format: YAML
- Common Fields:
title: Prompt titledescription: Prompt descriptionauthor: Prompt authorcreated: Creation dateversion: Version numbertags: List of tags
Example:
<meta>
title: My Prompt
description: A sample prompt
author: John Doe
created: 2024-03-24
version: 1.0.0
tags:
- sample
- tutorial
</meta>- Purpose: Defines variables and configuration
- Required: Recommended
- Format: YAML
- Usage: Values defined here can be referenced using
{{ variable_name }}
Example:
<params>
system: You are a helpful assistant
content:
type: blog post
style: instructional
include:
- code examples
- explanations
output:
format: markdown
length: 1000 words
</params>- Purpose: Defines system-level instructions
- Required: Recommended
- Usage: Can be self-closing if defined in params
Examples:
<system>You are a helpful assistant</system>
<!-- OR using params -->
<system />- Purpose: Defines assistant-specific instructions
- Required: Optional
- Usage: Often used with
<system>for more specific behavior
Example:
<assistant>
I am a coding assistant specializing in Python
</assistant>- Purpose: Contains the main prompt or query
- Required: Yes
- Usage: Can be section or self-closing
Examples:
<instructions>
Write a blog post about {{ topic }}
</instructions>
<!-- OR -->
<instructions are="below" />
Write a blog post about {{ topic }}- Purpose: Specifies desired output format
- Required: Recommended
- Usage: Can be section or self-closing
Examples:
<output>
# {{ title }}
{{ content }}
</output>
<!-- OR -->
<output format="markdown" length="1000 words" />- Purpose: Provides examples for the LLM
- Required: Optional
- Contains:
<example>tags or example content
Example:
<examples>
<example output="correct">
<input>What is 2 + 2?</input>
<output>4</output>
</example>
<example output="incorrect">
<input>What is 2 + 2?</input>
<output>5</output>
</example>
</examples>- Uses double curly braces:
{{ variable_name }} - Can reference nested values:
{{ user.name }} - Can include attributes:
{{ variable attribute="value" }}
{{ title }}{{ content }}{{ summary }}{{ description }}{{ author }}
<prompt>
<!-- rest of prompt -->
{{ content length="1000 words" }}
{{ summary as="bullet points" }}
{{ code as="markdown code block (python)" }}
</prompt>count="number": Specifies quantity
{{ examples count="3" }}include="items": Specifies items to includeexclude="items": Specifies items to exclude
{{ traits include="strength,intelligence" }}
{{ content exclude="sensitive-info" }}format="type": Specifies output formatlength="value": Specifies content lengthas="type": Specifies presentation format
<output format="markdown" length="500 words" />
{{ content as="bullet points" }}See YAML v1.2 for more information.
<params>
key: value
nested:
key: value
list:
- item1
- item2
</params>- Used for formatting text
- Supported in instructions and output
- Common in content sections
- Used for structure
- Defines sections and components
- Can include attributes
-
Structure
- Use
<prompt>as root when possible - Include
<params>for reusable values - Define clear output format
- Use
-
Variables
- Use descriptive names
- Document placeholder variables
- Use nesting for organization
-
Formatting
- Use consistent indentation
- Keep sections organized
- Use comments for clarity
-
Output
- Specify clear format requirements
- Use attributes for precision
- Include examples when helpful
-
Metadata
- Include version information
- Document changes
- Add descriptive tags