Hi, we have a use cases where we need to thru in a list of ~20 queries into same LLM call at a time, and require the LLM to output a list of binary classification label.
We are able to get it to output the specific format using output schema, but we cannot get it to consistently output a list of N Labels to match the N queries.
I haven't tried BAML yet, I am using LangGraph+dspy, which has no mechanism to reinforce the output schema field length to match the length of input list. Then I did some googling and come across BAML.
Just wondering would BAML be able to solve my problem?
ps. Gemini 2.5f can consistently match the length, but Gemini 2.5 Flash lite cannot. But due to the latency requirement of the app, we had to use the flash lite model.