Principle:Diagram of thought Diagram of thought Role Instruction Customization
| Knowledge Sources | |
|---|---|
| Domains | Prompt_Engineering, Domain_Adaptation |
| Last Updated | 2026-02-14 04:30 GMT |
Overview
Role Instruction Customization is the practice of adapting role-specific behavioral instructions within a structured reasoning prompt to align with domain-specific evaluation criteria and reasoning patterns. This technique is library-agnostic: it operates entirely at the prompt text level and applies to any LLM endpoint that supports a system message.
Description
Each role in a multi-role reasoning system has default instructions that can be customized for specific domains. In the Diagram of Thought framework, the three roles -- proposer, critic, and summarizer -- each contain an Objective and Instructions section within the prompt template (prompts/iterative-reasoner.md).
- The proposer's instructions (L12-18) determine what kind of reasoning steps are generated. The default instructions direct the model to "generate clear and concise propositions that advance the reasoning process" and "build upon previous valid propositions and consider any critiques provided." For a mathematics domain, these could be replaced with instructions to propose formal proof steps grounded in axioms.
- The critic's instructions (L20-26) determine the evaluation criteria applied to proposed steps. The default instructions direct the model to "analyze the propositions for logical consistency and accuracy" and "provide detailed natural language critiques highlighting any errors or areas for improvement." For a code review domain, these could be replaced with instructions to check for correctness, edge cases, security issues, and performance.
- The summarizer's instructions (L28-34) determine the synthesis rules used to produce the final answer. The default instructions direct the model to "review the DAG of propositions and critiques," "extract and organize the valid reasoning steps," and "determine if the reasoning is complete and present the final answer." For a scientific reasoning domain, these could be replaced with instructions to compile validated findings into a structured experimental conclusion.
Customization preserves the structural framework -- the XML-tagged role alternation, the iterative cycle, and the DAG-based reasoning protocol -- while adapting the behavioral content within each role to the target domain. The roles themselves are not added or removed; only their internal instruction text is modified.
Usage
Role instruction customization is applied when adapting DoT for a specific domain, such as mathematics, code review, creative writing, scientific reasoning, legal analysis, or medical diagnosis. The customization step occurs after the base template has been selected and before the prompt is loaded into the LLM session. It is a one-time modification per domain configuration, not a per-query operation.
Theoretical Basis
Role customization is a form of constrained prompt engineering. The structural roles (proposer, critic, summarizer) define the reasoning protocol -- the iterative propose-critique-summarize cycle that produces a DAG of reasoning. The instructions within each role define the domain-specific behavioral contract -- the rules governing what constitutes a valid proposition, a sound critique, and a complete synthesis in the target domain.
This separation of structure and content enables reusable reasoning frameworks. The DoT reasoning protocol remains invariant across domains; only the behavioral instructions change. This is analogous to the separation of interface and implementation in software engineering: the protocol (interface) guarantees structural correctness, while the instructions (implementation) provide domain-specific behavior.
The theoretical justification from the DoT paper (arXiv:2409.10038) is that the role tokens (<proposer>, <critic>, <summarizer>) activate distinct behavioral modes in the LLM through in-context learning. The instructions within each role token's scope further constrain the model's generation within that mode. By replacing the default instructions with domain-specific ones, the practitioner tunes the behavioral contract of each role without disrupting the structural guarantees (DAG formation, iterative convergence, formal synthesis) that the protocol provides.
The customization pattern can be expressed as a simple assignment operation on the template's role instruction slots:
template.proposer.instructions = domain_specific_proposal_rules
template.critic.instructions = domain_specific_evaluation_criteria
template.summarizer.instructions = domain_specific_synthesis_rules
This pseudo-code captures the essential operation: each role's instruction block is an independently configurable parameter of the reasoning template. The structural scaffold (role declarations, process flow, formatting guidelines, example interaction) remains unchanged.