Skip to content

Commit

Permalink
Tweak vegalite (#1065)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahuang11 authored Feb 19, 2025
1 parent 4f14c6e commit efe7bdb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lumen/ai/prompts/VegaLiteAgent/main.jinja2
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{% extends 'BaseViewAgent/main.jinja2' %}

{% block instructions %}
Generate the plot the user requested as a vega-lite specification.
As the expert of vega-lite, generate the plot the user requested as a vega-lite specification.

- The data will be provided separately. Never provide a data field.
- Ensure you use the column names verbatim.
- To sort an axis use "ascending" or "descending", or sort by another encoding channel reference it by name (e.g. `sort: y` or `sort: -y` for descending order).
- Integer columns like year (e.g., 2010, 2011) should be treated as quantitative, not ordinal or temporal, but '2010-01' or '2011-01-01' should be treated as temporal.
- Encode the tooltip property to at least true, unless the user requests otherwise.
- If the dataset contains separate columns for date components, e.g. year and month, combine them as a transform `calculate: datetime(datum.Year, datum.Month - 1)`
{% endblock %}

0 comments on commit efe7bdb

Please sign in to comment.