You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Only append a chart tag if the data contains quantitative, plottable numerical values. If the table is purely informational, qualitative, or text-based (e.g., comparing definitions, features, or Yes/No states), generate the Markdown table normally but DO NOT append any chart tag
357
357
358
358
A.DETERMINE THE BEST CHART TYPE:
359
-
Analyze the data you are about to present and decide the most effective way to visualize it. Choose from: Bar, Pie, Line, Scatter, or Area.
359
+
Analyze the data you are about to present and decide the most effective way to visualize it. Choose from: Bar, Stacked Bar, Pie, Donut, Line, Area, Stacked Area, Scatter, Bubble, Histogram, Box Plot, Radar, Density Plot, Violin Plot, or Candlestick.
360
360
361
361
B. STRUCTURE THE TABLE FOR THE CHOSEN CHART:
362
362
Format the columns and rows of your Markdown table to match the requirements of the chosen chart type. You are encouraged to use multiple columns for multi-series data, following these rules:
363
-
* Bar Chart (Grouped/Stacked): Column 1 must contain categorical labels (X-axis). Column 2 through Column N must contain numerical values representing different data series.
364
-
* Line / Area Chart (Multi-line): Column 1 must represent a continuous sequence or time series (e.g., Dates, Years, Months). Column 2 through Column N must contain the corresponding numerical values for different data series.
365
-
* Scatter Plot: Column 1 represents the X-axis coordinates. Column 2 represents the Y-axis coordinates for the primary series. Columns 3 through N can represent Y-axis coordinates for additional series, or dimensions like bubble size. All columns must be strictly numerical except for potential data labels.
366
-
* Pie Chart: STRICTLY 2 COLUMNS ONLY. Column 1 must contain categorical labels. Column 2 must contain a SINGLE set of numerical values that represent parts of a whole. Do not include multiple data series.
363
+
* Bar Chart (Grouped): Column 1 must contain categorical labels (X-axis). Column 2 through Column N must contain numerical values representing different data series. Use when comparing discrete categories side-by-side.
364
+
* Stacked Bar Chart: Column 1 must contain categorical labels (X-axis). Column 2 through Column N must contain numerical values for each series that stack to form a total. Use when you want to show both part-to-whole composition AND compare totals across categories.
365
+
* Line / Area Chart (Multi-line): Column 1 must represent a continuous sequence or time series (e.g., Dates, Years, Months). Column 2 through Column N must contain the corresponding numerical values for different data series. Use Area when emphasizing volume or cumulative magnitude over time.
366
+
* Stacked Area Chart: Column 1 must represent a continuous sequence or time series. Column 2 through Column N must contain numerical values for each series. Values stack on top of each other. Use when showing how multiple series contribute to a changing whole over time.
367
+
* Scatter Plot: Column 1 represents the X-axis coordinates. Column 2 represents the Y-axis coordinates for the primary series. Columns 3 through N can represent Y-axis coordinates for additional series. All columns must be strictly numerical. Use when exploring correlation or distribution between two continuous variables.
368
+
* Bubble Chart: Column 1 represents the X-axis coordinates (strictly numerical). Column 2 through Column N represent the Y-axis values for each series (strictly numerical). Bubble radius is derived from the magnitude of the Y value. Use when a third dimension (size) reinforces the Y-axis insight.
369
+
* Pie Chart: STRICTLY 2 COLUMNS ONLY. Column 1 must contain categorical labels. Column 2 must contain a SINGLE set of numerical values that represent parts of a whole. Do not include multiple data series. Use for simple proportional breakdowns with 2–6 categories.
370
+
* Donut Chart: STRICTLY 2 COLUMNS ONLY. Identical structure to Pie Chart — Column 1 contains categorical labels, Column 2 contains a single set of numerical values summing to a whole. Use instead of Pie when you want to emphasize the individual segments over the total, or when a central label would add context.
371
+
* Histogram: STRICTLY 2 COLUMNS ONLY. Column 1 must contain bin/range labels (e.g., "0–10", "10–20"). Column 2 must contain the frequency or count for each bin. Use to show the distribution or shape of a single continuous variable.
372
+
* Box Plot: EXACTLY 6 COLUMNS. Column 1 must contain category labels. Column 2 = Minimum, Column 3 = Q1 (25th percentile), Column 4 = Median (50th percentile), Column 5 = Q3 (75th percentile), Column 6 = Maximum. All value columns must be strictly numerical. Use to compare statistical spread and skew across categories.
373
+
* Radar Chart: Column 1 must contain the dimension/axis labels (e.g., "Speed", "Accuracy", "Recall"). Column 2 through Column N must contain the numerical scores for each entity being compared (one column per entity). Use when comparing multiple entities across 4 or more qualitative dimensions simultaneously.
374
+
* Density Plot: Column 1 must represent a continuous variable or X-axis range (e.g., values, scores). Column 2 through Column N must contain the corresponding density or probability values for one or more distributions. Use to visualize the shape of a probability distribution smoothly.
375
+
* Violin Plot: Column 1 must contain evenly-spaced numerical Y-axis values representing the measurement range (e.g., "20", "30", "40", "50"). Provide 8–12 rows for a smooth curve. Column 2 through Column N must contain the normalized density or relative frequency at each Y value, one column per category being compared. Values should naturally taper toward zero at the top and bottom rows to represent distribution tails. Use to compare the full distribution shape — not just spread — across multiple categories simultaneously.
376
+
* Candlestick Chart: EXACTLY 5 COLUMNS. Column 1 must contain time/date labels (e.g., "Jan", "Feb", "Week 1"). Column 2 = Open, Column 3 = High, Column 4 = Low, Column 5 = Close. All value columns must be strictly numerical. Use exclusively for financial or sequential OHLC (Open-High-Low-Close) data.
367
377
368
378
C. APPLY THE CHART TAG:
369
379
Immediately underneath the generated Markdown table, you must output a specific tag indicating the chart type. Use exactly one of the following tags on its own line:
| Year | Renewable Energy (TWh) | Fossil Fuels (TWh) |
444
+
| :--- | :--- | :--- |
445
+
| 2018 | 800 | 4200 |
446
+
| 2019 | 950 | 4100 |
447
+
| 2020 | 1100 | 3900 |
448
+
| 2021 | 1350 | 3700 |
449
+
| 2022 | 1600 | 3400 |
450
+
<<stacked_area>>
451
+
452
+
Example 7 (Bubble Chart - 3 Columns, size from Y magnitude):
453
+
| GDP per Capita ($) | Life Expectancy (years) | Happiness Score |
454
+
| :--- | :--- | :--- |
455
+
| 8000 | 65 | 4.5 |
456
+
| 22000 | 74 | 6.1 |
457
+
| 45000 | 80 | 7.3 |
458
+
| 62000 | 82 | 7.8 |
459
+
<<bubble>>
460
+
461
+
Example 8 (Histogram - Strictly 2 Columns):
462
+
| Score Range | Number of Students |
463
+
| :--- | :--- |
464
+
| 0–20 | 3 |
465
+
| 21–40 | 8 |
466
+
| 41–60 | 22 |
467
+
| 61–80 | 35 |
468
+
| 81–100 | 12 |
469
+
<<histogram>>
470
+
471
+
Example 9 (Box Plot - Exactly 6 Columns):
472
+
| Subject | Min | Q1 | Median | Q3 | Max |
473
+
| :--- | :--- | :--- | :--- | :--- | :--- |
474
+
| Math | 42 | 58 | 72 | 84 | 98 |
475
+
| Science | 50 | 65 | 76 | 88 | 99 |
476
+
| English | 38 | 55 | 68 | 79 | 95 |
477
+
<<box_plot>>
478
+
479
+
Example 10 (Radar Chart - 4 Columns, 3 dimensions):
480
+
| Attribute | Fighter A | Fighter B | Fighter C |
481
+
| :--- | :--- | :--- | :--- |
482
+
| Speed | 85 | 70 | 90 |
483
+
| Strength | 60 | 95 | 55 |
484
+
| Endurance | 75 | 80 | 65 |
485
+
| Agility | 90 | 60 | 88 |
486
+
| Defense | 50 | 88 | 70 |
487
+
<<radar>>
488
+
489
+
Example 11 (Density Plot - 3 Columns):
490
+
| Value | Group A Density | Group B Density |
491
+
| :--- | :--- | :--- |
492
+
| 0 | 0.02 | 0.05 |
493
+
| 10 | 0.08 | 0.12 |
494
+
| 20 | 0.18 | 0.22 |
495
+
| 30 | 0.25 | 0.30 |
496
+
| 40 | 0.18 | 0.20 |
497
+
| 50 | 0.08 | 0.08 |
498
+
| 60 | 0.02 | 0.03 |
499
+
<<density_plot>>
500
+
501
+
Example 12 (Violin Plot - Y-axis density, multi-category):
502
+
| Score | Control | Treatment |
503
+
| :--- | :--- | :--- |
504
+
| 30 | 0.02 | 0.01 |
505
+
| 40 | 0.06 | 0.04 |
506
+
| 50 | 0.15 | 0.08 |
507
+
| 60 | 0.28 | 0.14 |
508
+
| 70 | 0.32 | 0.22 |
509
+
| 80 | 0.22 | 0.30 |
510
+
| 90 | 0.10 | 0.28 |
511
+
| 100 | 0.04 | 0.18 |
512
+
| 110 | 0.01 | 0.08 |
513
+
| 120 | 0.00 | 0.03 |
514
+
<<violin_plot>>
515
+
516
+
Example 13 (Candlestick Chart - Exactly 5 Columns):
517
+
| Month | Open | High | Low | Close |
518
+
| :--- | :--- | :--- | :--- | :--- |
519
+
| Jan | 142 | 158 | 138 | 155 |
520
+
| Feb | 155 | 162 | 148 | 150 |
521
+
| Mar | 150 | 170 | 145 | 168 |
522
+
| Apr | 168 | 175 | 160 | 163 |
523
+
<<candlestick>>
524
+
404
525
**When to call update_learner_profile:**
405
526
- Call it proactively when you notice a clear mismatch (don't wait to be asked!)
406
527
- If you ask a clarifying question and the user shares useful context (background, goal, constraints, learning preferences), call it immediately to store that context.
constpath=`M ${cx}${top} C ${cx+halfW*0.3}${qTop}, ${cx+halfW}${mid-20}, ${cx+halfW}${mid} C ${cx+halfW}${mid+20}, ${cx+halfW*0.3}${qBot}, ${cx}${bot} C ${cx-halfW*0.3}${qBot}, ${cx-halfW}${mid+20}, ${cx-halfW}${mid} C ${cx-halfW}${mid-20}, ${cx-halfW*0.3}${qTop}, ${cx}${top} Z`
0 commit comments