## Flowchart: Method for Solving Math Problems via Language Models
### Overview
The image depicts a two-stage workflow for solving math problems using a language model. It contrasts **Chain-of-thought prompting** (single-path reasoning) with **Self-consistency** (multi-path reasoning aggregation). The flowchart includes problem statements, reasoning paths, and final answers.
### Components/Axes
- **Key Elements**:
- **Chain-of-thought prompting**: Single reasoning path with greedy decoding.
- **Self-consistency**: Multiple reasoning paths sampled, aggregated to a final answer.
- **Problem Statements**: Two math problems (parking lot cars, duck eggs).
- **Reasoning Paths**: Color-coded (pink, green, blue) with step-by-step calculations.
- **Final Answers**: Aggregated results (e.g., $18).
- **Textual Content**:
- **Problem 1 (Parking Lot)**:
- Prompt: "If there are 3 cars... how many cars are in the parking lot?"
- Greedy decode answer: **5** (3 + 2).
- **Problem 2 (Duck Eggs)**:
- Prompt: "Janet’s ducks lay 16 eggs... How much does she make every day?"
- Greedy decode answer: **$14** (7 eggs × $2).
- **Self-consistency Paths**:
- **Path 1 (Green)**:
- Steps: 16 eggs - 3 breakfast = 13 left; 13 - 4 muffins = 9 left; 9 × $2 = **$18**.
- **Path 2 (Pink)**:
- Steps: 16 - 3 = 13 left; 13 - 4 = 9 left; 9 × $2 = **$18**.
- **Path 3 (Blue)**:
- Steps: 16 - 3 = 13 left; 13 - 4 = 9 left; 9 × $2 = **$18**.
- **Aggregated Answer**: **$18** (median of $18, $26, $18).
### Detailed Analysis
- **Chain-of-thought Prompting**:
- Direct reasoning leads to a single answer (e.g., $14 for eggs).
- Example: "She sells 7 × $2 = $14 per day."
- **Self-consistency**:
- **Diverse Reasoning Paths**:
- Green path: Explicitly calculates remaining eggs after breakfast and muffins.
- Pink path: Simplifies steps (16 - 3 - 4 = 9).
- Blue path: Repeats pink path with minor phrasing differences.
- **Aggregation**: Final answer ($18) derived from majority consensus.
### Key Observations
1. **Inconsistent Intermediate Steps**:
- Path 1 incorrectly states "16 - 3 = 9" (should be 13).
- Path 2 and 3 correctly calculate 16 - 3 - 4 = 9.
2. **Final Answer Discrepancy**:
- Greedy decode ($14) vs. self-consistency ($18) highlights method sensitivity.
3. **Color Coding**:
- Pink: Simplified reasoning.
- Green/Blue: Detailed step-by-step paths.
### Interpretation
The flowchart demonstrates that **self-consistency improves accuracy** by sampling diverse reasoning paths and aggregating results. While greedy decoding produces a quick answer ($14), self-consistency resolves ambiguities (e.g., egg distribution) to yield a more robust solution ($18). The method emphasizes **redundancy in reasoning** to mitigate errors in intermediate steps.
**Notable Anomaly**:
- Path 1’s incorrect subtraction (16 - 3 = 9) suggests potential flaws in sampling diverse paths. However, majority consensus still aligns with the correct answer.