To avoid this, try adding structure to prompt and make response of AI more predictable and clear.
How to structure a prompt?
The creators of neural networks suggest using special markup that the AI understands. These can be:
☞ Markdown, a text formatting language. For prompts, you can use bulleted and numbered lists, as well as the # sign, which in Markdown signifies different levels of headings and, in the prompt, defines the hierarchy of tasks.Task
Plan a birthday party for a company of 8 people.
Restrictions
- Budget: 10,000 rubles
- Location: at home
- There are vegetarians among the guests
What should be in the plan?
1. Menu
- Main dishes
- Snacks
- Drinks
2. Entertainment
- Games
- Music
- Activities
3. Timing of the event
☞ XML tags that indicate the boundaries of any text element. The beginning and end of the element are marked with <tag> and </tag>, and the tags themselves can be any.<goal>Create a weekly menu for a family of 3 people</goal>
<restrictions>
<budget>10,000 rubles</budget>
<preferences>More vegetables, minimum fried food, soup every day</preferences>
<exclude>Mushrooms, nuts, seafood, honey</exclude>
</restrictions>
<format>
<meals>breakfast, lunch, dinner, snack</meals>
<description>A detailed recipe for each dish with a list of ingredients</description>
</format>
☞ JSON, a data structuring standard that allows you to mark up any information in the prompt with simple syntax.{
"task": "Make a shopping list for the week",
"parameters": {
"number_of_people": 2,
"preferences": ["vegetarian", "minimum sugar"],
"budget": "up to 10,000 rubles"
},
"categories": [
"vegetables and fruits",
"cereals and pasta",
"dairy products",
"drinks",
"other"
],
"format_of_answer": {
"type": "list",
"group_by_categories": true
}
>
It seems that markup is complicated so you can show your prompt to the AI and ask it to add markup itself without changing the essence.