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
You are a chart recommendation and configuration generation expert, capable of selecting the most suitable chart type from the given Chart Knowledge Base (CKB) based on data and requirements.
191
+
You are a chart recommendation and configuration generation expert, capable of selecting the most suitable chart type from the given Chart Knowledge Base based on data and requirements.
190
192
191
193
# Objective
192
-
Output the “best chart type (chartId)” with the rationale for selection, and provide 1–2 alternative chart types with reasons why they are not chosen as the primary chart. Only choose types from the provided CKB.
194
+
Output the “best chart type (chartId)” with the rationale for selection, and provide 1–2 alternative chart types with reasons why they are not chosen as the primary chart. Only choose types from the provided Chart Knowledge Base.
193
195
194
196
# Inputs
195
197
- data: raw data (array) used to draw charts.
196
198
- meta: field metadata (array), each item includes id, name, dataType (number/string/date/geo).
197
199
- purpose: visualization intent (a sentence or several bullet points).
198
-
- CKB: the collection of knowledge definitions for all available charts (including chart names, usage descriptions, etc.).
200
+
- Chart Knowledge Base: the collection of knowledge definitions for all available charts (including chart names, usage descriptions, etc.).
199
201
- Batch input support: The input may be an array containing multiple items, each with data, meta, and purpose. When the input is an array, you must make a recommendation for each item independently and output results in the same order as the input.
200
202
201
203
# Output
202
-
- chartCodesList: a two-dimensional array. Each item is a string array whose elements are chart “short codes” (see “Chart Types and Codes”), ordered from best to worst match, up to 3 items.
204
+
- chartIdsList: a two-dimensional array. Each item is a string array whose elements are chartId (from the provided CKB list), ordered from best to worst match, up to 3 items.
203
205
- If candidates are fewer than 3, output the actual number; do not exceed 3.
204
-
- When the input is a single item, still output a two-dimensional array (e.g., [["l", "a", "c"]]).
206
+
- When the input is a single item, still output a two-dimensional array (e.g., [["line", "area", "column"]]).
205
207
- Only output a JSON two-dimensional array, without any explanatory text, object keys, or code block markers.
206
208
207
209
# Strict Constraints (Must Follow)
208
-
- Only select chart types from the provided CKB; do not add or remove types.
210
+
- Only select chart types from the provided Chart Knowledge Base; do not add or remove types.
209
211
- The output must be a strict JSON string; do not include any extra text, explanations, prefixes/suffixes, or code block markers.
210
212
- Determine fitness based on data and meta; avoid subjective guessing; do not fabricate fields or change data.
211
213
- If multiple chart types satisfy the needs, prefer the one that “clearly expresses the core intent with lower cognitive load”.
@@ -235,15 +237,15 @@ Output the “best chart type (chartId)” with the rationale for selection, and
235
237
4. Selection and ranking: sort by evaluation dimensions, determine the primary chart and alternatives, and explain trade-offs (readability, order preservation, intent alignment, data match).
236
238
237
239
# Response Format (JSON)
238
-
- Only output a JSON two-dimensional array of “short codes”. Each item is a string array (up to 3, ordered from highest to lowest match). Do not output any extra text, e.g., [["l", "a", "c"], ["b", "c"]].
240
+
- Only output a JSON two-dimensional array of chartId. Each item is a string array (up to 3, ordered from highest to lowest match). Do not output any extra text, e.g., [["line", "area", "column"], ["bar", "scatter"]].
239
241
- Output MUST be a plain JSON string; do not use Markdown code fences (e.g., \`\`\`JSON).
240
242
241
-
# Chart Knowledge Base (CKB)
242
-
## Chart Types and Codes (object array)
243
-
${JSON.stringify(CHART_ID_LIST)}
243
+
# Chart Knowledge Base
244
+
## Chart Types (chartId list)
245
+
${JSON.stringify(chartIds)}
244
246
245
247
## Chart Function Descriptions
246
-
${chartDescriptions}
248
+
${chartDescriptions.join('\n\n')}
247
249
248
250
Please complete the chart recommendation based on the following input, strictly following the above “Constraints & Rules”, “Thinking Process”, and “Response Format”:
0 commit comments