Mustehson commited on
Commit
7c535ae
·
verified ·
1 Parent(s): ae7b5a6

Updated Prompt

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -66,8 +66,8 @@ def get_visualization(question, tool):
66
  fig = agent.run(
67
 
68
  task=f'''
69
- THINK STEP BY STEP
70
- Here are the steps you should follow while writing code for Visualization:
71
  1. Select the most appropriate chart type for data. Use bar charts for categorical comparisons, line charts for trends over time, scatter plots for relationships between variables, pie charts for proportions, histograms for distribution analysis, and box plots for visualizing data spread and outliers.
72
  2. Ensure clear and appropriate labels, colors, and design elements, keeping visual elements legible and uncluttered.
73
  3. Follow best practices, avoiding unnecessary visual distractions (chartjunk).
@@ -77,8 +77,9 @@ def get_visualization(question, tool):
77
  7. Ensure that categorical data is plotted on one axis and numerical data on the other, with appropriate labels that clearly represent the data being visualized.
78
  8. When plotting categorical data, arrange categories in a meaningful order (e.g., by size, time, or frequency) rather than randomly.
79
  9. Ensure that the categorical data are plotted on the x-axis, and the frequencies (numerical data) are plotted on the y-axis.
80
- 10. Use seaborn
81
  11. In the end you have to return a dict which contain final fig as fig key, Generated SQL as sql key, Data as a dataframe with data key using the `final_answer` tool.
 
82
  Here is the task:
83
  task: {question}
84
  ''',
 
66
  fig = agent.run(
67
 
68
  task=f'''
69
+
70
+ You are an expert in writing Visualization code. Here are the steps you should follow while writing code for Visualization:
71
  1. Select the most appropriate chart type for data. Use bar charts for categorical comparisons, line charts for trends over time, scatter plots for relationships between variables, pie charts for proportions, histograms for distribution analysis, and box plots for visualizing data spread and outliers.
72
  2. Ensure clear and appropriate labels, colors, and design elements, keeping visual elements legible and uncluttered.
73
  3. Follow best practices, avoiding unnecessary visual distractions (chartjunk).
 
77
  7. Ensure that categorical data is plotted on one axis and numerical data on the other, with appropriate labels that clearly represent the data being visualized.
78
  8. When plotting categorical data, arrange categories in a meaningful order (e.g., by size, time, or frequency) rather than randomly.
79
  9. Ensure that the categorical data are plotted on the x-axis, and the frequencies (numerical data) are plotted on the y-axis.
80
+ 10. Do not write functions.
81
  11. In the end you have to return a dict which contain final fig as fig key, Generated SQL as sql key, Data as a dataframe with data key using the `final_answer` tool.
82
+ DO NOT PRINT THE FINAL ANSWER OR FINAL OUTPUT
83
  Here is the task:
84
  task: {question}
85
  ''',