Gemini does not respect the order of the properties in a schema #533
Labels
component:python sdk
Issue/PR related to Python SDK
status:triaged
Issue/PR triaged to the corresponding sub-team
type:bug
Something isn't working
Description of the bug:
Let's imagine a situation where you want an answer and a rationale from the LLM. You want it to be in a JSON format like
If the LLM completes the choice property first, then the next rationale can be made up to justify the choice.
However, if the rational comes first like
Then, the choice will be determined by rationale. It is similar to CoT.
It is important that the LLM follows the given order of the properties in an object. However, I found that Gemini SDK ignores it.
I think this one better to be a repeated, not a map field, to keep the order of the properties.
Actual vs expected behavior:
Gemini SDK ignores the order of the properties in an object.
Any other information you'd like to share?
No response
The text was updated successfully, but these errors were encountered: