Organising a complex prompt.
WHY STRUCTURE HELPS
A long prompt containing instructions, context and material is easier for the model to follow when the parts are clearly separated.
HOW TO SEPARATE THEM
Headings, or markers around each section.
"INSTRUCTIONS: ... CONTEXT: ... DOCUMENT: ... QUESTION: ..."
WHY IT MATTERS
Without separation, the model may treat material as instruction, or instruction as material.
That is also a security consideration when processing untrusted content.
FOR DOCUMENTS
Mark clearly where the document begins and ends.
"Here is the document, between the markers: --- [document] ---"
FOR EXAMPLES
Label them as examples so they are not treated as instructions.
FOR MULTIPLE INPUTS
Label each. "Document A: ... Document B: ..."
Then refer to them by label in your question.
WHAT THIS PREVENTS
Confusion about what is instruction and what is content Instructions embedded in a document being followed
THE PRACTICAL HABIT
For anything longer than a paragraph, use clear sections.