Claude Track
Module 12
Claude Track -- Module 12
Review Intelligence: ThreadCo receives 200 reviews per month. ShopMate now reads them all and produces a monthly report: top complaints, most praised features, sizing issues by product line, suggested product improvements. What took Maya 4 hours now takes 3 minutes.

Reasoning & Analysis

Claude excels at multi-step reasoning, comparative analysis, and synthesis. Claude Opus supports extended thinking -- an API feature where Claude reasons internally before responding.

Comparative Analysis

Ask Claude to compare options across defined criteria with a rubric. Works for technical decisions, business cases, and research synthesis. Provide scoring criteria explicitly.

Root Cause Analysis

Describe a system failure and ask Claude to identify potential root causes ranked by likelihood. Include logs, stack traces, and what you expected vs what happened.

Structured Decomposition

For large ambiguous problems, ask Claude to first decompose into sub-problems, then solve each. This dramatically improves accuracy over single-shot prompting for complex tasks.

Extended Thinking

Claude Opus 4 supports extended thinking mode — Claude reasons internally before responding. Available via the Anthropic API only (not in the VS Code chat panel). Ideal for math, logic puzzles, and multi-constraint optimisation. Thinking tokens are billed at a reduced rate.

ShopMate -- Monthly Review Report

Python -- shopmate/reviews/monthly_report.py
# shopmate/reviews/monthly_report.py -- 200 reviews in, 3-minute report out
import anthropic, json
client = anthropic.Anthropic()

def generate_review_report(reviews: list[dict]) -> dict:
    """Analyse all ThreadCo reviews for the month and extract actionable insights."""
    reviews_text = "
".join(
        f"[{r['rating']}/5] {r['product']}: {r['text']}"
        for r in reviews
    )
    resp = client.messages.create(
        model="claude-sonnet-4-6", max_tokens=1500,
        system="""You are analysing customer reviews for ThreadCo, a T-shirt brand.
Produce an actionable monthly report for the founder.
Focus on patterns, not individual reviews.
Return ONLY valid JSON.""",
        messages=[{"role":"user","content":
            f"Analyse these {len(reviews)} reviews:

{reviews_text}

"
            'Return JSON: {"top_complaints":["..."],"top_praises":["..."],'
            '"sizing_issues":["..."],"product_suggestions":["..."],'
            '"average_rating":0.0,"summary":"2-3 sentences for the founder"}'
        }]
    )
    return json.loads(resp.content[0].text)

# Sample reviews
sample_reviews = [
    {"rating":5,"product":"Sunset Gradient Tee","text":"Softest tee I own, the colour is exactly as shown"},
    {"rating":2,"product":"Midnight Pocket Tee","text":"Runs small, ordered my usual size and it was tight"},
    {"rating":4,"product":"Wave Print Crop Tee","text":"Love the print but shipping took 2 weeks"},
    {"rating":3,"product":"Midnight Pocket Tee","text":"Nice quality but definitely size up"},
]
report = generate_review_report(sample_reviews)
print(json.dumps(report, indent=2))