DS-201d · Module 5

The Six Prompt Patterns That Work

4 min read

After working through three datasets in two tools, patterns emerge. Six prompt structures consistently produce better visualizations than ad hoc requests. These are not templates to copy blindly — they are frameworks that encode the analytical thinking a good visualization requires.

  1. Pattern 1: Analyze-Recommend-Generate Three prompts in sequence. First: "Analyze this data and tell me what stories it tells." Second: "Recommend chart types for each story and explain why." Third: "Generate the charts." In Claude, this often collapses to a single prompt that produces analysis + Artifact together. In ChatGPT, three separate prompts keep the generated script focused and debuggable.
  2. Pattern 2: Reference Chart Replication "I want a chart that looks like [describe a chart you have seen or can reference]. Here is my data. Adapt the format to fit my data while keeping the visual style." This pattern works well in both tools — describe the output you want, let the AI figure out the implementation.
  3. Pattern 3: Progressive Refinement Start simple, add complexity. "Make a basic bar chart of revenue by product." Then: "Add quarterly breakdown as grouped bars." Then: "Add a trend line overlay." Then: "Add data labels on Q4 only." Each prompt adds one layer. In Claude, each iteration re-renders the Artifact instantly. In ChatGPT, each iteration modifies the script.
  4. Pattern 4: Dashboard Composition Build individual charts first, then combine. "Create chart A." "Create chart B." "Create chart C." "Now arrange A, B, and C into a 1x3 dashboard layout with a shared title." In Claude, ask for a single Artifact with all panels. In ChatGPT, build each chart separately in the script, then add a final plt.subplots() figure that arranges them.
  5. Pattern 5: Comparative Prompt "Show me this data two ways: as a bar chart and as a line chart. Which one communicates the trend more clearly?" Force the AI to produce options. Then you choose. Claude will render both in the Artifact. ChatGPT will generate code for both, letting you compare the outputs after execution.
  6. Pattern 6: Annotation Prompt "Take this chart and add annotations: circle the highest value, add an arrow pointing to the Q3 dip with the label 'seasonal effect', and add a text box in the bottom-right with the key takeaway." Annotations are what separate a data dump from a data story. Always add them as a final step.