Proper formatting of prompts is crucial for effective communication with AI models. Here are some tips and tricks on using the formatting languages of the GPT models in markdown
and the anthropic models in xml
.
Highlight important information using various text styling techniques.
Organize your prompt with headings, lists, and nested elements.
Here is everything you need to craft effective prompts in markdown and xml formatting:
Basic Formatting
Headings and Structure
Lists and Steps
Code Blocks
Always test your formatted prompts to ensure they produce the desired results with your specific AI model.
Combine Formats
For complex prompts, consider using a combination of Markdown and XML techniques to leverage the strengths of both formats.
Model-Specific Formatting
Some AI models have specific formatting preferences:
Test and Iterate
Experiment with different formatting styles and structures. Test your prompts with the target AI model and refine based on the results.
By mastering these formatting techniques and utilizing appropriate structures, you can create highly effective prompts that clearly communicate your intentions to AI models, resulting in more accurate and useful responses.
Now that you know the proper formatting, read our comprehensive guide on how to write your system prompt.