Table of Contents
Most people write prompts like emails—a stream of thoughts, in whatever order feels natural.
How does prompt structure affect AI responses? Let's explore why word order, formatting, and positioning are so important for AI prompts in the following article!
The structure is not optional
Most people write prompts like emails—a stream of thoughts, in whatever order feels natural. And it works… to some extent.
But here's what the researchers discovered: The same information, rearranged, can significantly alter the quality of AI output. Word order is crucial. Formatting is crucial. Where you place the instructions is also crucial.
This lesson will analyze the reasons why – and how to structure questions for consistent results.
Attention problems
AI models don't read like humans. They process text through attentional mechanisms, where each part is assigned a different weight. And those weights aren't uniform.
Studies have shown a pattern known as 'mid-range loss'. AI remembers information from the beginning and end of a question better than in the middle. If you place your most important instruction in the third paragraph, the AI ??might miss it entirely.
- Think of it like a meeting : Everyone remembers the opening remarks and the closing summary. Everything in between fades away.
- Practical rule : Place important instructions at the beginning or end. Never bury them!
The structure of a prompt is well-structured
This is a useful template for most complex tasks:
[NG? C?NH H? TH?NG] - AI là ai, các ràng bu?c t?ng th? --- [H??NG D?N NHI?M V?] - Ph?i làm ǵ, c? th? và rơ ràng --- [D? LI?U ??U VÀO] - N?i dung c?n x? lư --- [??NH D?NG ??U RA] - ??nh d?ng chính xác c?a ph?n h?i --- [VÍ D?] - K?t qu? ??u ra t?t trông nh? th? nào (tùy ch?n nh?ng r?t h?u ích)
Each part has its own specific function. Mixing them up would cause confusion.
The power of the separator
Separators are characters used to separate parts. Common separators include:
- --- (3 hyphens)
- ### (3 hash signs)
- """ (3 quotation marks)
- Tag
Why are separators needed? Because AI can confuse your instructions with the content.
A poor prompt:
Tóm t?t khi?u n?i c?a khách hàng này: D?ch v? r?t t? và không ai giúp ?? tôi, tôi mu?n ???c hoàn ti?n. Hăy gi? ph?n tóm t?t chuyên nghi?p và ng?n g?n.
Is 'Keep the summary professional and concise' part of your complaint or your guidance? The AI ??might not actually know.
Prompt is better:
Tóm t?t khi?u n?i c?a khách hàng này trong 2-3 câu chuyên nghi?p. KHI?U N?I: D?ch v? r?t t? và không ai giúp ?? tôi, tôi mu?n ???c hoàn ti?n.
Now, there is no more ambiguity. The dividing line creates a clear boundary.
Order forms and instructions
Three reliable operating patterns include:
Template 1: Preliminary Guide
Vi?t m?t email chuyên nghi?p ?? t? ch?i l?i m?i g?p m?t. Ng? c?nh: Ng??i yêu c?u là m?t nhà cung c?p ?ang c? g?ng bán ph?n m?m. Tôi không quan tâm nh?ng mu?n duy tŕ m?i quan h?. Gi?ng ?i?u: L?ch s? nh?ng kiên quy?t.
Best suited for : Simple, single-step tasks with clear instructions.
Pattern 2: Context first, instructions second
B?n là ng??i qu?n lư c?p cao t?i m?t công ty công ngh?. M?t nhân viên ?ă yêu c?u ???c làm vi?c t? xa trong su?t th?i gian. Chính sách công ty cho phép làm vi?c k?t h?p (3 ngày t?i v?n pḥng, 2 ngày làm vi?c t? xa). Nhân viên này ?ă hoàn thành công vi?c xu?t s?c trong 4 n?m. **Ki?m tra nhanh:** Tr??c khi ti?p t?c, b?n có nh? khái ni?m chính mà chúng ta v?a th?o lu?n không? Hăy c? g?ng gi?i quy?t l?i b?ng l?i v?n c?a b?n tr??c khi ti?p t?c. Vui ḷng vi?t m?t b?n ph?n h?i ?ă nh?n ???c yêu c?u c?a h? ?? gi?i quy?t các ch? ?? chính sách có gi?i h?n. Hăy s?n sàng th?o lu?n thêm trong t??ng lai.
Best suited for : Tasks requiring in-depth understanding of the context before execution.
Pattern 3: The "Sandwich" Style (Instructions - Context - Instructions)
Phân tích d? li?u bán hàng sau ?ây và xác ??nh các xu h??ng. [B?NG D? LI?U ? ?ÂY] D?a trên phân tích c?a b?n, hăy cung c?p: 1. 3 xu h??ng hàng ??u 2. M?t mô h́nh ?áng quan tâm 3. Hành ??ng ???c ?? xu?t
Best suited for : Complex tasks where you need to format content AND specify the output format.
Formatting that helps AI
Certain formatting options can actually improve the results:
Numbered list for sequential tasks:
1. ??c tin nh?n c?a khách hàng 2. Xác ??nh khi?u n?i chính 3. Ki?m tra xem khi?u n?i ?ó có phù h?p v?i chính sách ??i tr? c?a chúng tôi hay không 4. So?n th?o ph?n h?i phù h?p
Bullet points for parallel options:
Hăy xem xét các y?u t? sau: - H?n ch? v? ngân sách - Áp l?c v? th?i gian - N?ng l?c c?a nhóm - Tính kh? thi v? m?t k? thu?t
Title for long prompts:
## Vai tṛ c?a b?n Qu?n lư s?n ph?m c?p cao t?i m?t công ty SaaS ## Nhi?m v? ?u tiên các tính n?ng trong danh sách công vi?c t?n ??ng này ## Ràng bu?c - H?n chót ra m?t quư 1 - Ch? có 3 l?p tŕnh viên - Không thay ??i h? th?ng backend ## Các m?c trong danh sách công vi?c t?n ??ng [li?t kê t?i ?ây]
Things that formatting cannot do
A word of caution: Formatting won't fix an ambiguous requirement. Many people add Markdown headers and numbered lists to vague requirements, thinking it will help. But it won't help at all.
## Nhi?m v? Hăy giúp tôi hoàn thành d? án ## Chi ti?t ?ây là d? án công vi?c ## K?t qu? Hăy làm cho nó th?t t?t
It's just organized ambiguity. The input is garbage, the output is also formatted garbage.
Structure enhances clarity. It doesn't create clarity.
Practice exercises
Consider this messy prompt:
Tôi c?n b?n giúp tôi vi?t m?t bài gi?i thi?u cho khách hàng v? tính n?ng m?i mà chúng tôi s? ra m?t vào tu?n t?i. ?ó là m?t b?ng ?i?u khi?n hi?n th? s? li?u th?ng kê vi?c s? d?ng c?a h?. Tôi mu?n bài vi?t nghe h?p d?n nh?ng v?n chuyên nghi?p, không quá dài, kho?ng 100 - 150 t?, và nh? ?? c?p ??n b?n dùng th? mi?n phí.
Rewrite that paragraph using the appropriate structure, employing delimiters and clear sections.
Let's look at one solution:
## Nhi?m v? Vi?t m?t thông báo khách hàng dài 100-150 t? v? tính n?ng m?i. ## Chi ti?t tính n?ng - Tên: B?ng ?i?u khi?n s? d?ng - Ra m?t: Tu?n t?i - Hi?n th?: Th?ng kê vi?c s? d?ng c?a khách hàng - L?u ư: Có b?n dùng th? mi?n phí ## Gi?ng v?n - H?p d?n nh?ng chuyên nghi?p - Không mang tính qu?ng cáo ho?c quá l? - Rơ ràng và tr?c ti?p ## Yêu c?u - ?? c?p rơ ràng ??n b?n dùng th? mi?n phí - Tuân th? nghiêm ng?t gi?i h?n t?
Key points to remember
- AI's attention is not evenly distributed – the beginning and the end are given higher priority.
- The separator helps avoid confusion between instructions and content.
- Structure your prompts: System ? Task ? Input ? Output ? Example
- Formatting is useful, but only if the underlying content is clear.
- Place important instructions in a 'priority' position (at the beginning or end).
-
Question 1:
What is the "lost halfway" problem?
EXPLAIN:
Research shows that AI models recall information better from the beginning and end of the prompt. The middle sections receive less attention.
-
Question 2:
Why do separators (like ###) help improve AI performance?
EXPLAIN:
The separators create a clear boundary between instructions, context, and content—reducing ambiguity about determining which plays which role.
-
Question 3:
Typically, where should the most important instructions be placed in a prompt?
EXPLAIN:
AI models pay more attention to the beginning and end of prompts. Important instructions should be placed in these 'critical locations'.
Training results
You have completed 0 questions.
-- / --
Reader Comments 0
Sign in with email or Google to join the discussion.