Excellent article. Very clearly written.
I have one question though. It seems that that model replies with either (i) a text response or (ii) a tool call. However, in the original ReAct paper, there is a "Thought" -> "Action" -> "Observation" cycle. In other words, in response to the user's query, the model first outputs a "Thought" followed by an "Action". How do I implement this (i.e., make the model "think" before performing a tool call)?
The following are the original ReAct prompts for HotpotQA (from the official ReAct GitHub repo): https://raw.githubusercontent.com/ysymyth/ReAct/refs/heads/master/prompts/prompts_naive.json
If you examine these prompts, you'll notice that the "thoughts" come before the "actions".