Report Generation with DAI Studio Part 2
Date: September 10, 2026
Let’s try this again, but with a more complex workflow. The previous post Report Generation with DAI Studio Part 1 provided basic input: fetch the data, build the report. This time, let’s add lots more context about the report’s content and structure, and see how the models handle it.
The diagram — SP500 PE Monthly v2 — keeps Part 1’s three tasks (SP500 PE monthly → Chart the Data → Build Report), but wraps them in a lot more scaffolding this time:
- An Environment subprocess sitting alongside the flow: a
D3JSdependency, anHTMLrule markedcritical/hardenforcement, aStylecomponent note (Inter font, alternating dark/light-blue sections — dark chart, light overview, dark stats, light data), anAccessibilitytest stub, and aClarityobjective — “Make the report clear. Readability must be excellent.” - The Report task is no longer one box. It’s a subprocess with four explicit children: Display Chart Here, Key stats here (four square tiles: current PE, high/80th percentile, low/20th percentile, median), Data and Citations, and Overview (“a short overview of the Chart, its history, and the current valuations”).
Same two human prompts as before, this time against the new diagram:
Plan mode:
plan out building https://dai.studio/blog/sp500-pe-report-2/raw
Code mode:
build
Three models got the same diagram and the same two prompts this time:
| Model | Cost | Report |
|---|---|---|
| Claude Sonnet 5 | $1.21 | View Report — inlined the full 1,281-month dataset (January 1920–present) directly in the page, matched Part 1’s numbers exactly (26.09 current, 22.12 high/80th, 10.42 low/20th, 16.52 median), kept a decade-by-decade table, and gave the chart a proper role="img" plus a full descriptive aria-label |
| Claude Haiku 4.5 | $1.45 | View Report — split the data out into a separate data.json fetched at runtime; that file silently starts in August 1934, dropping the first 174 months of the series it’s supposed to cover, then computed its own percentiles with a cruder nearest-rank method instead of interpolation, swapped the decade table and specific citations for generic filler prose, and shipped the chart with no role, aria-label, or alt text at all |
| Claude Opus 4.7 | $2.99 | View Report — the only run to ship as a real multi-file build (separate HTML/CSS/JS/data files), embedded the full 1,281-month series with the same numbers as Sonnet 5, used a logarithmic y-axis so the 2009 spike to 123.7× stays on-chart with no clipping or callout needed, added a skip-link and a dynamically-generated chart aria-label, shipped a full expandable 1,281-row data table instead of a decade summary, and closed with “Built as a static report — no tracking, no runtime network calls” |
Same diagram, same prompts, three very different price tags, and three slightly different reports. When you provide rich structured context, the models understand your intent more clearly and produce a more detailed result.
Cheers,
Ted :)