Skip to main content
Prompt templating enables dynamic prompts with customizable user inputs. This guide covers template syntax, tags, modifiers, conditionals, and best practices for creating interactive AI experiences.

Understanding Prompt Templates

Prompt templates are pre-designed structures that include placeholders for user inputs. These templates allow you to create consistent and customizable prompts for various AI-powered tasks, such as content generation, language translation, or data analysis.

Key Components

Tags

Tags are the building blocks of prompt templates. They represent input elements that users can customize and are enclosed in curly braces.

Attributes

Attributes modify the behavior of tags, allowing you to fine-tune how inputs are presented and processed. They are appended to tags using the pipe character (|).

Creating Your First Prompt Template

Let’s create a simple prompt template for an “Article Generator”:
This template generates a form with inputs for the topic, draft content, language, and tone, allowing users to customize their article generation request.

Available Attributes

Enhance your prompt templates with these powerful attributes:
Sets a custom label for the inputExample: { input_name | label:Custom label }
Creates a multiline text inputExample:{ input_name | multiline }
Defines the input type (currently supports enum)Example:{ input_name | type:enum }
Specifies options for enum type inputsExample:{ input_name | type:enum | options:Option 1, Option 2, Option 3 }
Makes an input optionalExample:{ input_name | optional }
Sets a custom placeholder textExample:{ input_name | placeholder:Custom placeholder }
Provides additional information about the inputExample:{ input_name | info:Custom info text }

Built-in Inputs

Aikeedo provides two convenient built-in inputs to streamline your prompt templates:
  1. language: A dropdown list of supported languages.
  2. tone: A dropdown list of supported voice tones.
Use these built-in inputs in your templates like this:

Advanced Template Example

Let’s create a more sophisticated prompt template for a “Comprehensive Article Generator”:
This advanced template demonstrates how to combine various attributes and input types to create a comprehensive and flexible prompt for generating high-quality articles.

Best Practices

  1. Be specific: Clearly define what you want the AI to do in your template.
  2. Use appropriate input types: Choose the right input type (text, multiline, enum) for each piece of information you need.
  3. Provide context: Use the info attribute to give users helpful information about each input.
  4. Balance flexibility and structure: Offer enough customization options while maintaining a clear overall structure.
  5. Test your templates: Experiment with different combinations of inputs to ensure your template produces the desired results.

Conclusion

Prompt templates are a powerful tool for creating dynamic, customizable AI experiences. By mastering the use of tags, attributes, and built-in inputs, you can design sophisticated prompts that cater to a wide range of use cases and user needs.