06. Step-by-Step Reasoning
Step-by-step reasoning is CoT applied to complex tasks. Instead of one "think step by step" phrase, you explicitly delineate the reasoning stages in the prompt.
This differs from CoT in explicitness. CoT relies on the model to produce reasoning steps. Step-by-step reasoning structures the prompt so the model follows a predetermined sequence:
Analyze this contract section and identify:
1. Named parties (who is mentioned and their role)
2. Key dates (deadlines, effective dates, termination dates)
3. Financial obligations (amounts, triggers, payment terms)
For each section, quote the relevant text and note any ambiguities.
Input: [contract text]
The numbered list creates a framework the model must fill. Each stage produces output that feeds into the next stage implicitly.
Step-by-step reasoning prevents:
- Premature conclusions: Model commits to an answer before examining all data
- Skipped steps: Model assumes intermediate work without showing it
- Nonlinear reasoning: Model jumps to conclusions without logical connection
Given a user complaint, perform sentiment analysis with the following steps:
Step 1 - Identify emotion words: List all words that indicate emotion (frustration, satisfaction, confusion, etc.)
Step 2 - Determine polarity: Based on Step 1, is the overall sentiment positive, negative, or neutral?
Step 3 - Identify subject: What specifically is the user reacting to? (product, service, price, support, etc.)
Step 4 - Infer intent: What does the user want? (refund, fix, explanation, acknowledgment, etc.)
Step 5 - Classify: Combine Steps 1-4 to assign one of these categories:
- Complaint-Product
- Complaint-Service
- Complaint-Price
- Complaint-Support
- Request
- Feedback
Input: "I've been waiting 3 weeks for my order and customer service hasn't responded to my last two emails. This is unacceptable."
This structure prevents the model from immediately outputting a category. It forces evidence collection first.
Take a complex task (review analysis, document comparison, multi-criteria decision) and rewrite the prompt to require step-by-step processing with numbered stages.