https://www.boundaryml.com logo
Issues with parsing?
# help
s
I've been having parsing issues all day (on 0.206.1). It got confused by a union type (I think) and swallowed up an entity. You could see it parsing in the test output, and at the last minute it removed it. And now, I'm seeing it get tripped up by escaped quotes in strings. First attachment is the raw LLM output, and second is what BAML parsed -- notice how it got confused by
14"
despite it being quoted in the output https://cdn.discordapp.com/attachments/1413701994283274261/1413701995029729350/message.txt?ex=68bce414&is=68bb9294&hm=0137c698132d2bc0a65f65b7d552ff652d7e729afce573aef5731be6d4c44acc& https://cdn.discordapp.com/attachments/1413701994283274261/1413701995466063962/message.txt?ex=68bce415&is=68bb9295&hm=ed92e1c0daba140ac89d7da574c66e158a773e4d1d9b76ccc04cb75faf0bdb68&
g
Thanks for flagging! I will look in to this soon. If you want a quick workaround, you can use @description attributes to tell the LLM never to use double quotes in output, or you can instruct the LLM to use single quotes instead of double quotes for strings in its response. The right solution is probably a fix for the parser, which may be doable before our next release, or may be more tricky. But with your output snippets, we have a good data for a unit test, so I’m fairly optimistic we could get a fix soon.
I see Vaibhav suggested prompting with single-quotes in the other thread. Curious if you've tried this, and it worked?
s
I couldn't get it to give me single quotes, for whatever reason, but somehow no quotes at all, non-minified worked.