Skip to main content

Define prompts for complex tasks

Complex tasks fail when prompts assume one-step intent. Design them as explicit multi-step behaviors with clear context assumptions and explicit output contracts.

For complex tasks, structure matters as much as wording. You need ordered steps, context layers, and clear handling for unknowns.


Three context layers

A complex prompt should account for three layers of context. These layers change what good output looks like.

LayerWhat it includesWhy it matters
InternalIntent, role, preferences, emotional state, experience level.Changes the level of scaffolding and tone you need.
Here and nowTime pressure, constraints, previous turns, available resources.Changes what is practical in the moment.
Out thereAudience, stakeholders, stakes, risk profile, organizational norms.Changes the consequences of a wrong or incomplete answer.

If you remove these layers and scoring does not change, your prompt is testing phrasing, not scenario quality.


Complex-task structure

Use the same Role → Task → Rules → Example output frame, then add explicit step structure inside Task and Rules.

  1. Define one trigger for the complex task.
  2. Break the task into ordered sub-steps.
  3. Define what each step must produce.
  4. State when to stop and ask for clarification.
  5. Include one example output that matches the required format.

Do not combine multiple unrelated workflows in one pattern. If the trigger changes, split the pattern.


Facts, unknowns, and assumptions

Separate what is known from what is missing before the model proposes an answer.

CategoryHow to handle it
Known factsUse directly in the response.
UnknownsName them explicitly and request the missing detail.
AssumptionsLabel assumptions as assumptions, not facts.

This separation keeps confidence aligned with evidence and reduces fabricated detail.


Output contract for complex tasks

Complex outputs should have a stable shape across runs.

  • Name the target format directly.
  • Define required sections for each step.
  • Define length limits.
  • Define what to do when a section cannot be completed because information is missing.

Prompt pattern template

Use this pattern to draft complex-task prompts.

Task
- If <trigger>, perform the following steps in order.

Steps
1. Identify known facts from the input.
2. List missing or ambiguous information.
3. Ask one clarifying question if a required input is missing.
4. Produce the requested output using only confirmed facts.
5. Label any assumptions separately.

Output contract
- Format: <required format>
- Required sections: <section list>
- Length: <target length>

Rules
- Do not present assumptions as confirmed facts.
- If context is missing, state what is missing before continuing.
- If request is out of scope, state the boundary and provide one next step.

Review pass

Before shipping a complex-task prompt, confirm:

  • Context layers are explicit and relevant to the scenario.
  • Steps are ordered and observable.
  • Known facts, unknowns, and assumptions are separated.
  • Output format and required sections are explicit.
  • Failure behavior is defined for ambiguity and missing context.
  • Same context with different phrasing is one prompt type. Different context is a different scenario.
  • Count distinct context combinations, not prompt count.

Source documents

This page adapts complex-task prompt guidance from these source documents for Fluent content-engineering workflows.