A prompt has five parts: task, context, constraints, output format, and examples. Roles label who wrote each part, and a template builder keeps the whole within a token budget.
Part | Carries | Example line |
|---|---|---|
Task | Goal and scope in one verb phrase. |
|
Context | Facts that change the answer. |
|
Constraints | Limits that rule answers out. |
|
Output format | Shape the answer must take. |
|
Examples | Input-output pairs that show the shape. |
|
Lesson | What it covers |
|---|---|
Task, context, constraints, output format, and examples. | |
System, user, and assistant roles as a labeling concept. | |
Specific wording and output formats that parse. | |
Weak-strong pairs for RTL, testbench, and log tasks. | |
A builder that assembles sections and checks a token budget. |
Context, constraints, output format, and examples are missing. The task alone leaves scope, limits, shape, and guidance open.