Hypothesis Testing
Generates multiple plausible explanations
What Is This Pattern?
The Hypothesis Testing pattern instructs the AI to generate multiple plausible explanations or hypotheses for a problem, then systematically evaluate each one against the available evidence. This is similar to scientific method: propose multiple theories, test them, and determine which best fits the data. This pattern is powerful for complex problems where multiple explanations are possible and you need to find the most likely one.
How It Works
You instruct the AI to: (1) Generate 3-5 plausible hypotheses or explanations, (2) For each hypothesis, identify what evidence would support or refute it, (3) Evaluate each hypothesis against the available evidence, (4) Rank hypotheses by likelihood or strength of evidence, and (5) Present the most likely explanation with reasoning.
When To Use This Pattern
- Debugging complex systems where multiple root causes are possible
- Diagnostic scenarios (medical, technical, business)
- Analyzing ambiguous data or situations
- Investigating incidents or anomalies
- Research problems where multiple theories exist
- Decision-making with uncertainty
- Root cause analysis
Example
My application is slow. Use hypothesis testing to identify the root cause.
**Step 1: Generate Hypotheses**
Generate 3-5 plausible explanations for why the application might be slow:
1. Database query performance issues
2. Network latency or bandwidth constraints
3. Insufficient server resources (CPU, memory)
4. Inefficient code or algorithms
5. External API dependencies causing delays
**Step 2: Evaluate Each Hypothesis**
For each hypothesis, identify:
- What evidence would support it?
- What evidence would refute it?
- What diagnostic steps would confirm it?
**Step 3: Rank Hypotheses**
Rank the hypotheses by likelihood based on available evidence and present the most likely cause with your reasoning.Best Practices
- Specify the number of hypotheses to generate (3-5 is optimal)
- Instruct the AI to evaluate evidence systematically
- Ask for ranking based on likelihood or evidence strength
- Use for complex problems with multiple possible causes
- Combine with diagnostic data or evidence when available
- Instruct the AI to explain why each hypothesis is plausible
Common Mistakes to Avoid
- Generating too many hypotheses (overwhelming)
- Not providing enough context or evidence for evaluation
- Not ranking hypotheses (all seem equally likely)
- Using for simple problems with obvious causes
- Not following up with diagnostic steps