←back to thread

169 points constantinum | 4 comments | | HN request time: 0.002s | source
1. hellovai ◴[] No.40714509[source]
Hey everyone! One of the creators of BAML here! Appreciate sharing this post. For anyone interested in playing around with an interactive version of BAML online, check it out here: https://www.promptfiddle.com
replies(1): >>40714868 #
2. dsign ◴[] No.40714868[source]
Really interesting library! In the docs, could you describe in a bit more detail which kind of JSON errors it tolerates? And which models currently work best with your parsing approach?
replies(1): >>40714932 #
3. hellovai ◴[] No.40714932[source]
Thanks! We should add that to the docs haha. But the here's a few:

- keys without strings

- coercing singular types -> arrays when the response requires an array

- removing any prefix or suffix tags

- picking the best of many JSON candidates in a string

- unescaped newlines + quotes so "afds"asdf" converts to "afds\"asdf"

In terms of models, honestly, we tried as bad as llama2, and it seems to work in quite a few use cases

replies(1): >>40714962 #
4. dsign ◴[] No.40714962{3}[source]
Thanks! I see myself using the library soon :-)