Learn by Directing AI
Unit 4

Analyse and follow the thread

Step 1: Compute channel revenue

Start with Farid's first question: which channel is actually making money? Direct AI to compute channel revenue using your definition from Unit 3.

Be specific in the request: "Using my channel revenue definition [paste or reference the definition], compute total revenue by channel for the full fourteen-month period. Show the result as a table."

Check the output. Does the number match what your definition says it should include? If your definition excludes pending wholesale invoices but the number seems high, check whether AI included them. The definition is the contract -- every computation must implement it.

Look at the breakdown. Is retail declining? Is online growing? Is wholesale flat? The pattern Farid suspected should start becoming visible. If it doesn't, check whether the data supports it or whether Farid's intuition was wrong. Both are real outcomes.

Step 2: Follow the analytical thread

Here's where the work diverges from P1. In P1, the analysis spec told you what to compute next. Here, the data tells you.

If retail revenue is declining, the next question is: is it declining across all products or concentrated in specific ones? Direct AI: "Break down retail revenue by product, month over month. Which products are driving the decline?"

If online is growing, the next question is: is the growth profitable after shipping costs? Direct AI: "Compute online profit by product, including shipping costs. Compare revenue growth versus profit growth."

Each finding generates the next question. "Revenue dropped in March" is the finding. "Break it down by channel" is your analytical judgment. AI can compute either, but only you decide which follow-up matters for Farid's requirements.

This iterative pattern -- finding leads to question leads to finding -- is fundamentally different from working through a provided list. The analysis has a direction that emerges from the data.

Step 3: Product profitability by channel

Compute product profitability using your definitions. Direct AI to create a profitability table: product, channel, revenue, cost, profit, margin.

Direct AI to create charts for the most significant findings. You choose the chart type based on what the finding needs to communicate. A bar chart comparing profit margins across channels. A grouped bar showing product profitability within each channel. A line chart showing revenue trends over the fourteen months.

Charts serve the investigation. In P1, the chart types were specified. Here, you decide what to visualise based on what Farid needs to see. A chart that shows "all products are equally profitable" is not useful. A chart that shows "three products generate 60% of the profit and two products lose money" is.

Step 4: Identify discontinuation candidates

Farid asked which products to consider discontinuing. This requires combining profitability with trends. A product with low margins but growing sales is different from one with low margins and declining sales.

Direct AI to combine the profitability analysis with the trend data. Which products are both unprofitable and declining? Which are unprofitable but growing? The recommendation depends on the combination -- the student makes this judgment.

Some products may be profitable in one channel and unprofitable in another. A tea blend that loses money in retail (after the retailer's cut) might be profitable online (direct margin, even after shipping). Discontinuing it entirely would be wrong. The channel-level view matters.

Step 5: Verify AI's aggregations

By now you have been working in Claude Code across many turns -- loading data, defining metrics, computing aggregations, creating charts. That's a lot of analytical context accumulated in the session.

Check whether AI is still using your metric definitions consistently. Direct AI to show the SQL it used for the most recent revenue computation. Compare it against the definition you wrote in Unit 3.

If the SQL differs from your definition -- perhaps AI reverted to SUM(total_amount) without the filters you specified -- that's context degradation. The analytical constraint from earlier in the session has fallen out of AI's effective attention. The revenue number AI just computed looks plausible but was calculated differently from what you agreed on.

This is a structural property of how AI sessions work, not a product-specific limitation. When you notice the numbers look slightly different from what your definitions should produce, check whether AI drifted. The fix is straightforward: re-state the definition and recompute. The skill is recognising when it happened.

Compute the channel revenue total manually from your unified dataset using your plain language definition. Write the query yourself or dictate it precisely to AI. Compare against the number AI produced in its latest output.

✓ Check

Check: Look at your channel revenue totals. Compute the sum manually from the unified dataset using your plain language definition. Does AI's number match? If not, check whether AI used your definition or reverted to a default.