Ocassionally it fails with the output format - most of time in the first attempt, which is corrected in second attempt. Then it makes the third attempt, also successful, and exits with the Error branch. I checked the output from the structured output parser attempt #2 and #3 and they’re both valid,
Am I missing something, or is it just a bug, that the fist attempt fail causes the whole response go through the error branch instead of the success branch?
What is the error message (if any)?
Model output doesn’t fit required format.
Please share your workflow
I can’t share the workflow, but there is the screenshot of log from the Error branch:
I had the same problem. It turned out that the types of the fields did not match, for example a number was expected, but a null was returned. This resulted in Model output doesn’t fit required format..
After I put an Auto-fixing Output Parser between the Basic LLM Chain and the Structured Output Parser, the validation error appeared.
I’m experiencing the same issue: “Model output doesn’t fit the required format.” After adding the “Auto-fixing Output Parser,” I think you might need to increase the “Max. Tries” to 7 or even 10.