https://www.boundaryml.com logo
BAML parser incorrectly parses json dictionaries
# help
l
As seen in the screenshot, even though the raw LLM REPLY clearly contains elements in the
queries
list, the Parsed Response returns an empty list https://cdn.discordapp.com/attachments/1420417453594247198/1420417454102024273/image.png?ex=68d55257&is=68d400d7&hm=2a38feb525aa4bfcd05c77648c9ffa7d356d5837a042590119d283a6f4878e63&
For reference, this is my output class
Copy code
class ProductSearchTool {
  type "search_tool"
  query string @description("Search query for finding relevant products. MUST be the exact name of a product.")
}

class SearchToolResponse {
  type "search_tool"
  queries ProductSearchTool[]
  response_to_customer string? @description("An interim response to the customer acknowledging that we are searching for products. This message will be displayed to the customer while the search is being carried out. Do not include a follow-up question.")
}
v
The type doesn’t cast 🙂 the LLM didn’t provide the type field
It’s because you’re using search_tool in both types
So the LLM must’ve thought it was a mistake on your end
l
Oh wow, what an oversight. Thanks, man
v
🙂