Prompt writing tips
Three techniques for getting the agent to execute precisely — locate the target, add constraints, break complex tasks into steps.
Talking to the VizChat agent has one key trait: every instruction can turn into a canvas operation. Therefore clarity > politeness > creativity.
Three core techniques
1. Locate first, then act
Don't say "make it bigger" — say "set the width of the currently-selected bar chart to 800."
| Low quality | High quality |
|---|---|
| "Change the color" | "Set the primary color of the 'Revenue trend' line chart to #3B82F6" |
| "Add a title" | "Set the title of the pie chart on the top right to Q3 Channel Mix" |
| "Clean it up" | "Delete every widget on slide 3 whose title is empty" |
The agent locates by widget title, type, and position — the more precise your locator, the fewer round-trips needed.
2. Use verifiable constraints
Include numbers, color codes, enum values to land in one shot and skip clarifying turns.
Create a bar chart:
- Title: Q3 regional GMV
- X axis: North / East / South / Southwest / Northwest
- Y axis: value (unit: 10k RMB)
- Color: gradient blue (#1E3A8A → #93C5FD)
- Width: 600px, Height: 400px3. Break complex tasks into steps
For requests spanning more than 3 actions, split them explicitly:
Please do the following in order:
1. Read my uploaded "Q3-report.pdf" and extract revenue figures;
2. Create a line chart from that data, titled "Revenue trend";
3. Below the chart, add a widget with 3 key insights;
4. Add both widgets to the storyboard.This helps the agent plan execution and also lets you stop between steps to tweak.
Anti-patterns
- Avoid "guess what" prompts: "make it interesting" — result is random;
- Don't cram too much: 2–3 clear goals per turn is optimal;
- Avoid vague pronouns: "it", "that one" — use widget titles instead.
Next step
AI Chat overview
Conversation-driven workflow — tell the agent what you want, and it acts on your document directly: creating widgets, editing configs, reading documents.
Slash commands
Type "/" in the chat input to open a shortcut menu — help, keyboard shortcuts, validate the current document, clear the message list, and more.