There's been endless debate about which language format prompts should be written in. Last year it was Markdown vs. JSON, this year it's Markdown vs. HTML.
But if you ask me, the answer has never been about the format itself. The reason why some prompts work so well all points to the same thing: structure.
The essence of prompt engineering isn't about feeding the model more information. It's about helping both the model and humans put their limited attention in the right place. Structured languages happen to do exactly that. They use just a few markers to distribute attention ahead of time within the text.
Let me give you an example. Take a look at this natural language first:
We're going on a picnic on July 1st, the destination is xx City's Second Park (Central Park). We'll drive there. You take the ring road from the south side of the city, and I'll drive straight from the north side. We'll meet at 8 AM at Entrance 2 of Second Park. Remember to bring tuna sandwiches, bottled water, and a Bluetooth speaker. I'll bring a picnic blanket, a tent, chicken sandwiches, and mosquito repellent. Also, don't forget to book the park tickets on the app in advance. You can only book one day ahead. Search for xx City's Second Park on the app.
So where are we meeting? You'd have to spend a lot of time digging through the text to find it. But if we switch to a structured description, it's a whole different story:
### Picnic Location
xx City's Second Park
### Meeting Time and Place
- July 1st, meet at 8 AM
- **Entrance 2** of Second Park
### Transportation
- You: Drive via the ring road
- Me: Drive straight from the north side
### Items to Bring
- You: **Tuna** sandwiches, bottled water, Bluetooth speaker
- Me: **Chicken** sandwiches, picnic blanket, tent, mosquito repellent
### Special Notes
- Must book tickets on the app in advance, search for *xx City's Second Park*
- **Can only book one day ahead**
See? After writing it this way, if I ask you which entrance we're meeting at, your search efficiency goes way up, right?
By categorizing and highlighting key points, the important information grabs your attention early on, instead of getting lost in a sea of text.
I wrote a full article explaining my take on structured prompts in plain language. If you're interested, feel free to click and read on.
Top comments (0)