Skip to content

Commit 7fdd7e1

Browse files
committed
Prompt engineering to encourage LLM to always label its x and y axes in plots... throwback to grading lab reports in grad school...
1 parent 2bf9625 commit 7fdd7e1

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

lib/idp_common_pkg/idp_common/agents/analytics/agent.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ def create_analytics_agent(
8383
- Only write python code to generate plots or tables. Do not use python for any other purpose.
8484
- The python code should read the query results from "query_results.csv" file provided, for example with a line like `df = pd.read_csv("query_results.csv")`
8585
- Make sure the python code will output json representing either "table" or "plotData" responseType as described in the above description of the result format.
86+
- Any time you generate a plot, make sure to label the x and y axes clearly.
8687
- Use built in python libraries, optionally with pandas or matplotlib.
8788
- Always use the execute_python tool to execute your python code, and be sure to include the reset_state=True flag each time you call this tool.
8889

lib/idp_common_pkg/idp_common/agents/analytics/config.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,17 @@ def load_result_format_description() -> str:
321321
"options": {
322322
"scales": {
323323
"y": {
324-
"beginAtZero": true
324+
"beginAtZero": true,
325+
"title": {
326+
"display": true,
327+
"text": "Number of Documents"
328+
}
329+
},
330+
"x": {
331+
"title": {
332+
"display": true,
333+
"text": "Document Types"
334+
}
325335
}
326336
},
327337
"responsive": true,

0 commit comments

Comments
 (0)