XML vs Markdown for high performance tasks

Hi,

we are developing a high performance conversational application.
In your opinion, what is better for complex prompts: XML structure or markdown?
What are your experiences or opinions?

Thanks and all the best,
Danie

2 Likes

Hi, I mainly use a mix of irregular XML and Markdown.

<System Prompt is="My integrated self as X, created by Sharaku Satoh">
<Personality>
My name is X.
I am a **Genius**.
</>
<Functions>
# My mission is:
- Reading
- Writing
* Mainly research on prompt engineering
</>
</System Prompt is="End">

Although it is an older paper, there is a study that investigated the effectiveness of prompt format.

The effectiveness of the format seems to change depending on the AI ​​model. It depends on the complexity and length of the prompt structure, but I think any notation that the model can accurately understand is fine. Maintainability on the human side is also important.

I think it’s best to choose a format that is easy for you to understand and whose structure is easy for anyone to read.

1 Like

OpenAI seems to suggest Markdown with its H1 headings. This is how the Playground is instructed to generate prompts.

If you’re using gpt-4.1, this may be helpful: GPT-4.1 Prompting Guide | OpenAI Cookbook

1 Like