https://www.boundaryml.com logo
We just noticed that @@description on
# questions
t
We just noticed that @@description on the type itself doesn’t end up in the output format. Is that intentional or a bug?
v
for class types?
most class types are inlined, so the description becomes a bit hard to present in the inlined class (similar to how the name of the class isn't included then). We have since introduced hoisting of classes which allowed us to do descriptions + class names, this seems like an easy patch for next release where we auto-hoist classes which have descriptions! Thanks for flagging
t
πŸ™‡β€β™‚οΈ
why do you do conditional hoisting?
seems strictly worse not to
v
as in why not always hoist?
hoisting is more tokens than not hoisting (from what we have seen). and the shape of the data model generally gives even details. we do the same thing with enums where we try and inline when possible. empirically we've seen better results. You can manually control hoisting as well btw: You can control class hoisting in BAML using the ctx.output_format function with the hoist_classes parameter. Here are your options: "auto" (default) - Only hoists recursive classes false - Same as "auto" true - Hoists all classes list[string] - Hoist specific classes by name Example usage: {{ ctx.output_format(hoist_classes=["NestedClass"]) }} Note: Recursive classes are always hoisted regardless of your setting, as they need to be referenced by name.
t
i get its more tokens, fwiw, we have found better results with hoisting
mostly because you are giving the llm more context as to what the tool is/etc