When using the Loop Over Item Node, I encountered a problem where it did not iterate over all the items it received.
Specifically, the If Node passed 1383 items into the Loop Over Item Node, but only 1 to at most 8 items were actually processed in the loop. This causes unexpected behavior and seems to prevent the full dataset from being processed.
After the if node, with a code no, it guarantees that everything has a good JSON structure. Additionally, you can see the output of the if to guarantee that what the AI agent requires is what is expected.
I can confirm that the items returned by OpenAI are all in proper JSON format. When I don’t use the Loop Over Item Node and pass all data directly to OpenAI in a single request, it works without errors.
However, I specifically want to use the Loop Over Item Node to avoid overwhelming the OpenAI node with too much input at once, which can lead to large language model hallucinations. By feeding the data one item at a time, I aim to improve accuracy and stability.
I can guarantee that all the data being passed into the loop is valid JSON.
What you mention is important, it could be that the requests are saturating the agent. You can check the API to see how it is used, because one at a time there is no saturation, that’s why the loop is logical.