From c5e6d8bef5b3c7f1f42549f5ba3795f90babd2e9 Mon Sep 17 00:00:00 2001 From: dal Date: Fri, 26 Sep 2025 23:41:35 -0600 Subject: [PATCH] fix prompt --- .../helpers/metric-tool-description.txt | 46 +++++++++---------- .../src/metrics/charts/axisInterfaces.ts | 6 +-- 2 files changed, 24 insertions(+), 28 deletions(-) diff --git a/packages/ai/src/tools/visualization-tools/metrics/helpers/metric-tool-description.txt b/packages/ai/src/tools/visualization-tools/metrics/helpers/metric-tool-description.txt index 33d9e2ca2..12ab80021 100644 --- a/packages/ai/src/tools/visualization-tools/metrics/helpers/metric-tool-description.txt +++ b/packages/ai/src/tools/visualization-tools/metrics/helpers/metric-tool-description.txt @@ -556,22 +556,21 @@ definitions: Example: Sales by month - With category=['region']: Creates separate lines/bars for each region (North, South, East, West) - - With colorBy.columnId='region': Colors bars by region but keeps them as one series + - With colorBy=['region']: Colors bars by region but keeps them as one series tooltip: type: [array, 'null'] items: type: string description: Column names for tooltip. If null, y axis is used. Default: null colorBy: - type: [object, 'null'] + type: [array, 'null'] + items: + type: string description: | - Optional color configuration to apply colors based on a column's values. + Optional array of column names to apply colors based on column values. Use this when you want visual differentiation without creating separate series. Perfect for: Status indicators (red/yellow/green), priority levels, or any categorical color coding. - properties: - columnId: - type: [string, 'null'] - description: LOWERCASE column name whose values will determine colors + Example: ['region'] - colors bars by region values required: - x - y @@ -641,14 +640,13 @@ definitions: type: string description: Column names for tooltip. If null, y axis is used. Default: null colorBy: - type: [object, 'null'] + type: [array, 'null'] + items: + type: string description: | - Optional color configuration to apply colors to scatter points based on a column's values. + Optional array of column names to apply colors to scatter points based on column values. Use when you want all points in one series with color-coded differentiation. - properties: - columnId: - type: [string, 'null'] - description: LOWERCASE column name whose values will determine point colors + Example: ['priority'] - colors points by priority values required: - x - y @@ -681,14 +679,13 @@ definitions: type: string description: Column names for tooltip. If null, y axis is used. Default: null colorBy: - type: [object, 'null'] + type: [array, 'null'] + items: + type: string description: | - Optional color configuration for pie slices based on x-axis values. + Optional array of column names for pie slice colors based on column values. Allows custom color mapping for specific slice categories. - properties: - columnId: - type: [string, 'null'] - description: LOWERCASE column name whose values will determine slice colors + Example: ['category'] - colors slices by category values required: - x - y @@ -732,14 +729,13 @@ definitions: type: string description: Column names for tooltip. If null, y axis is used. Default: null colorBy: - type: [object, 'null'] + type: [array, 'null'] + items: + type: string description: | - Optional color configuration to apply colors based on a column's values in combo chart. + Optional array of column names to apply colors based on column values in combo chart. Useful for color-coding bars while lines remain as separate series. - properties: - columnId: - type: [string, 'null'] - description: LOWERCASE column name whose values will determine colors + Example: ['region'] - colors bars by region values required: - x - y diff --git a/packages/server-shared/src/metrics/charts/axisInterfaces.ts b/packages/server-shared/src/metrics/charts/axisInterfaces.ts index 6ed906657..dae484b00 100644 --- a/packages/server-shared/src/metrics/charts/axisInterfaces.ts +++ b/packages/server-shared/src/metrics/charts/axisInterfaces.ts @@ -17,7 +17,7 @@ export const BarAndLineAxisSchema = z * * Example: Monthly sales chart * - category=['region'] → 4 separate lines/bar groups (North, South, East, West) - * - colorBy.columnId='region' → 1 series with bars colored by region + * - colorBy=['region'] → 1 series with bars colored by region * * THE LLM SHOULD NEVER SET MULTIPLE CATEGORY COLUMNS. ONLY THE USER CAN SET THIS. */ @@ -54,7 +54,7 @@ export const ScatterAxisSchema = z * * Example: Customer satisfaction vs response time * - category=['department'] → Separate point series for Sales, Support, Engineering - * - colorBy.columnId='priority' → All points in one series, colored by priority level + * - colorBy=['priority'] → All points in one series, colored by priority level * * THE LLM SHOULD NEVER SET MULTIPLE CATEGORY COLUMNS. ONLY THE USER CAN SET THIS. */ @@ -89,7 +89,7 @@ export const ComboChartAxisSchema = z * * Example: Monthly sales chart * - category=['region'] → 4 separate lines/bar groups (North, South, East, West) - * - colorBy.columnId='region' → 1 series with bars colored by region + * - colorBy=['region'] → 1 series with bars colored by region * * THE LLM SHOULD NEVER SET MULTIPLE CATEGORY COLUMNS. ONLY THE USER CAN SET THIS. */