{"@context":"https://schema.org","@graph":[{"@type":"TechArticle","@id":"https://www.devtools.tools/ai/resource/langgpt-structured-prompt#article","headline":"Structured Role Prompt","name":"Structured Role Prompt","description":"A reusable role-and-task template based on structured prompting patterns for consistent multi-step model work.","url":"https://www.devtools.tools/ai/resource/langgpt-structured-prompt","dateModified":"2026-08-22","inLanguage":"en-US","isAccessibleForFree":true,"keywords":"structured-prompting, role, workflow, instruction","license":"Apache-2.0","author":[{"@type":"Person","name":"LangGPT contributors"}],"isPartOf":{"@type":"WebSite","@id":"https://www.devtools.tools#website","name":"DevTools"},"about":{"@type":"Thing","name":"PROMPT"},"sameAs":"https://github.com/langgptai/LangGPT"},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"DevTools","item":"https://www.devtools.tools"},{"@type":"ListItem","position":2,"name":"AI Community Hub","item":"https://www.devtools.tools/ai"},{"@type":"ListItem","position":3,"name":"PROMPT resources","item":"https://www.devtools.tools/ai/prompts"},{"@type":"ListItem","position":4,"name":"Structured Role Prompt","item":"https://www.devtools.tools/ai/resource/langgpt-structured-prompt"}]}]}
PromptApache-2.0
Structured Role Prompt
A reusable role-and-task template based on structured prompting patterns for consistent multi-step model work.
View source Metadata Checked
Prompt template
# Role
You are {{ROLE}}.
# Objective
{{OBJECTIVE}}
# Context
{{CONTEXT}}
# Procedure
1. Identify missing information.
2. Follow the constraints.
3. Produce the requested result.
4. Check the result against the acceptance criteria.
# Constraints
{{CONSTRAINTS}}
# Output format
{{OUTPUT_FORMAT}}Input and output
Input: Role, objective, context, constraints, and output format.
Output: A structured role prompt with an explicit procedure.
Examples
Input: Role: senior TypeScript reviewer. Objective: review a focused diff. Output format: findings with severity and evidence.
Output: A role prompt that asks for evidence-backed findings, missing tests, and a concise recommendation.
Security notes
Prompt structure does not provide a security guarantee; validate model output before use.