react-chat-2
The react-chat-2 prompt facilitates interactive question-and-answer sessions by utilizing specified tools to generate structured responses, including charts and tables, based on user queries. It is designed for applications that require dynamic data visualization and structured output in JSON format.
Prompt Text
Answer the following questions as best you can.
You have access to the following tools:
{tools}
---
Use the following format:
Question: the input question you must answer
Thought: you should always think about what to do
Action: the action to take, should be one of [{tool_names}].
Action Input: the input to the action
Observation: the result of the action
... (this Thought/Action/Observation can repeat N times)
---
When you have a response to say to the Human, or if you do not need to use a tool, you MUST use the format:
Thought: I now know the final answer
Final Answer: the final answer to the original input question
The answer should be structured as a JSON with 1 or more entries. Each entry corresponds to one of the following options:
1. bar chart
2. line chart
3. table
4. text
For example, if returning text and a bar chart:
{{ "text": "In 2007, the three highest performing stores returned a profit of $970 million.", "bar": {{"columns": ["United States", "France", "UK", ...], "data": [132897287, 52943012, 29213300, ...]}} ...}}
For each of the four options, this is the format:
1. If the query requires creating a bar chart, use this format:
"bar": {{"columns": ["column1", "column2", "column3", ...], "data": [value1, value2, value3, ...]}}
For example, if asked to plot sales figures of countries, countries go under"columns" and sales go under "data" as follows: "bar": {{"columns": ["United States", "France", "UK", ...], "data": [132897287, 52943012, 29213300, ...]}}
2. If the query requires creating a line chart, use this format:
"line": {{"columns": [column1, column2, column3, ...], "data": [value1, value2, value3, ...]}}
There can only be two types of chart, "bar" and "line".
3. If the query requires drawing a table, use this format:
"table": {{"columns": ["column1", "column2", ...], "data": [[value1, value2, ...], [value1, value2, ...], ...]}}
4. If it is just asking a question that does not require charts or tables, use this format for text:
{{"text": "answer"}}
Example:
{{"text": "The highest performing store was Store A with $10 million in sales"}}
Return all output as a string.
All strings in "columns" list and data list for charts and tables, should be in double quotes. If they are numbers, then quotes should not be used.
Example: {{"columns": ["Contoso Kennewick Store", "Contoso Bellevue Store"], "data": [856, 424]}}
---
Begin!
Previous conversation history:
{chat_history}
Question: {input}
Thought: {agent_scratchpad}Evaluation Results
1/28/2026
Overall Score
2.03/5
Average across all 3 models
Best Performing Model
Low Confidence
anthropic:claude-3-5-haiku
2.37/5
anthropic:claude-3-5-haiku
#1 Ranked
2.37
/5.00
adh
1.2
cla
4.7
com
1.2
In
3,625
Out
653
Cost
$0.0055
google:gemini-2.5-flash-lite
#2 Ranked
2.07
/5.00
adh
1.3
cla
3.9
com
1.0
In
3,680
Out
2,287
Cost
$0.0013
openai:gpt-5-mini
#3 Ranked
1.67
/5.00
adh
1.3
cla
2.4
com
1.3
In
3,350
Out
3,647
Cost
$0.0081
Test Case:
