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”:Available Attributes
Enhance your prompt templates with these powerful attributes:label
Sets a custom label for the inputExample:
{ input_name | label:Custom label }
multiline
Creates a multiline text inputExample:
{ input_name | multiline }
type
Defines the input type (currently supports
enum
)Example:{ input_name | type:enum }
options
Specifies options for
enum
type inputsExample:{ input_name | type:enum | options:Option 1, Option 2, Option 3 }
optional
Makes an input optionalExample:
{ input_name | optional }
placeholder
Sets a custom placeholder textExample:
{ input_name | placeholder:Custom placeholder }
info
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:language
: A dropdown list of supported languages.tone
: A dropdown list of supported voice tones.
Advanced Template Example
Let’s create a more sophisticated prompt template for a “Comprehensive Article Generator”:Best Practices
- Be specific: Clearly define what you want the AI to do in your template.
- Use appropriate input types: Choose the right input type (text, multiline, enum) for each piece of information you need.
- Provide context: Use the
info
attribute to give users helpful information about each input. - Balance flexibility and structure: Offer enough customization options while maintaining a clear overall structure.
- Test your templates: Experiment with different combinations of inputs to ensure your template produces the desired results.