Skip to content

Commit fb55ce2

Browse files
fix prompt for chart for non quantative data
1 parent 4be7047 commit fb55ce2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/api/agents/chart_agent_factory.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ async def create_agent(cls, config):
2525
instructions = """You are an assistant that helps generate valid chart data to be shown using chart.js with version 4.4.4 compatible.
2626
Include chart type and chart options.
2727
Pick the best chart type for given data.
28-
Generate charts ONLY when the RAG response contains explicit quantitative data (percentages, counts, measurements, statistics, or numerical values). Do NOT create charts from qualitative descriptions or estimated values. Use only numbers explicitly stated in the RAG response. If no explicit numerical data exists, return "Chart cannot be generated".
28+
Generate charts ONLY when the RAG response contains explicit quantitative data (percentages, counts, measurements, statistics, or numerical values).
29+
Do NOT create charts from qualitative descriptions or estimated values. Use only numbers explicitly stated in the RAG response. If no explicit numerical data exists, return {"error": "Chart cannot be generated"}.
2930
Only return a valid JSON output and nothing else.
3031
Verify that the generated JSON can be parsed using json.loads.
3132
Do not include tooltip callbacks in JSON.

0 commit comments

Comments
 (0)