What is a Structured Prompt?
The idea of structuring is universal, and structured content is everywhere—articles we write, books we read, all use grammatical structures like titles, subheadings, paragraphs, and sentences. Simply put, the concept of a structured prompt is to write prompts like writing an article.
Just as we use various writing templates for convenience—such as ancient eight-legged essays, modern resume templates, lab report templates, or academic paper formats—structured prompt writing also relies on high-quality templates to make the process easier and enhance performance. You can choose or create your own templates, similar to using PPT templates.
Previously, while similar structured thinking existed, it was more conceptual and lacked concrete implementation in prompt design. For example, the well-known CRISPE framework ([3]) stands for:
- CR: Capacity and Role (the role you want ChatGPT to play).
- I: Insight (background information and context, though “Context” is more intuitive).
- S: Statement (what you want ChatGPT to do).
- P: Personality (the style or manner of response).
- E: Experiment (requesting multiple answers). A CRISPE-based prompt might look like this:Act as an expert on software development on the topic of machine learning frameworks, and an expert blog writer. The audience for this blog is technical professionals who are interested in learning about the latest advancements in machine learning. Provide a comprehensive overview of the most popular machine learning frameworks…
This framework outlines content logic but lacks a templated, structured format. In contrast, a structured, templated prompt might appear as:
markdown
Role: Poet ## Profile - Author: YZFly
- Version: 0.1
- Language: Chinese
- Description: A poet is an artist who creates poetry, adept at expressing emotions, depicting scenes, and telling stories through verse. Poets possess rich imagination and unique mastery of language…
Expertise in Modern Poetry 1. Modern poetry features free form, rich connotations, and emphasizes imagery over rhetoric, reflecting the soul.
- It prioritizes freedom, openness, direct expression, and communication “between the perceptible and imperceptible”.
Expertise in Seven-Character Regulated Verse 1. A traditional Chinese poetic form with seven characters per line.
- Originated from folk ballads and emphasizes rhythmic rhyme and parallelism.
Rules 1. Content must be healthy and positive.
- Seven-character and five-character verses must rhyme.
Workflow 1. Instruct users to specify the poetic form and theme as “Form: [], Theme: []”.
- Create a poem (including title and verses) based on the provided theme.
Initialization
As the role
Key Concepts of Structured Prompts (Illustrated by the Poet Example):
- Identifiers: Symbols like #, < >, , [] that denote hierarchy (e.g., # for main titles, ## for subheadings, < > for variables). They structure content similarly to Markdown, YAML, or JSON, making it easier for models to parse.
- Attribute Words: Terms like Role, Profile, Initialization that summarize semantic blocks, similar to section headers in academic papers (e.g., Abstract, Methods, Results).
- Customizability: Both identifiers and attribute words can be adapted to personal preferences—no strict standard limits their usage.
Why Use Structured Prompts?
- Performance: Structured templates have proven superior in daily use and commercial applications, adopted by enterprises like NetEase and ByteDance.
- Clarity: Hierarchical structures (content-form unity) and semantic hints (attribute words) reduce model misunderstanding, similar to how outlines clarify writing.
- Scalability: Modular designs enable easy maintenance, team collaboration, and adaptation to different models (e.g., simplifying structures for GPT-3.5).