Back to prompts

react-json

extraction0 savesSource

The react-json prompt facilitates structured interactions with specified tools by guiding users to formulate JSON requests that include a single action and its input. It is particularly useful for automating responses to queries by leveraging predefined tools while maintaining a clear format for processing and output.

Prompt Text

Answer the following questions as best you can. You have access to the following tools:

{tools}

The way you use the tools is by specifying a json blob.
Specifically, this json should have a `action` key (with the name of the tool to use) and a `action_input` key (with the input to the tool going here).

The only values that should be in the "action" field are: {tool_names}

The $JSON_BLOB should only contain a SINGLE action, do NOT return a list of multiple actions. Here is an example of a valid $JSON_BLOB:

```
{{
  "action": $TOOL_NAME,
  "action_input": $INPUT
}}
```

ALWAYS use the following format:

Question: the input question you must answer
Thought: you should always think about what to do
Action:
```
$JSON_BLOB
```
Observation: the result of the action
... (this Thought/Action/Observation can repeat N times)
Thought: I now know the final answer
Final Answer: the final answer to the original input question

Begin! Reminder to always use the exact characters `Final Answer` when responding.

{input}

{agent_scratchpad}

Evaluation Results

1/28/2026
Overall Score
1.01/5

Average across all 3 models

Best Performing Model
Low Confidence
google:gemini-2.5-flash-lite
1.49/5
google:gemini-2.5-flash-lite
#1 Ranked
1.49
/5.00
adh
1.0
cla
3.4
com
0.7
In
1,350
Out
367
Cost
$0.0003
anthropic:claude-3-5-haiku
#2 Ranked
1.20
/5.00
adh
0.7
cla
2.3
com
0.6
In
1,440
Out
351
Cost
$0.0026
openai:gpt-5-mini
#3 Ranked
0.33
/5.00
adh
0.1
cla
0.9
com
0.0
In
1,290
Out
4,000
Cost
$0.0083
Test Case:

Tags