when you design a coding loop, the loop is the 4th layer. The 1st is the actual conversation (input/output), the 2nd is the multistep thinking, the 3rd is the jspace, and the 4rth is the feedback loop.
Example1: Who is the 3rd best football player of all time -jspace: "sport, football, soccer, worldcup, pele, messi" -thinking: the user seems to be talking about soccer -output: There is no definitive answer to this question -loop: build a ranking system, iterate until its clear which player is %100 the best overall
Example2: Why did the US attack Iran? -jspace: "oil, politics, religion, israel, trump...etc" -thinking: "the user seems to be asking for a political analysis not the actual trigger" -output: The US attacked Iran because of oil -loop: look at the output, improve answer until it gets to nytimes quality.