https://www.boundaryml.com logo
Are there any tricks to tool-use with
# questions
d
Are there any tricks to tool-use with BAML beyond the structured outputs? I am not able to get my BAML based agent to be as smart as my direct-Anthropic agent using the same set of tools. In a some cases, the BAML based agent starts sending free-text answers while the direct-Anthropic agent is still selecting tools. In some cases, the tool selection is better and more optimised over multiple iterations. I was wondering if there is some blog or writeup on how to get parity between the two, as BAML comes with a lot of benefits downstream of the agent call that I dont want to forego.
a
is your code open-source by any chance?
we are thinking of just making it so that BAML functions can use the tool-APIs, but we want to see if we can reproduce this kind of issues in a normal chatbot agent
if you can give us some more data here it'd be immensely useful
d
The stuff I build is for customers, so not open source. I can create a minimal example, if needed, over the next few days.
a
yeah if you do have a minimal one it'd be amazing. If your prompts arent open source but want to share with myself only (without sharing publicly that also works). But yes i think with some repros we can figure out what's going on
r
Which tools APIs? Use Pydantic AI!
You already use Pydantic... Pydantic agents are simple and easy to use.
In any. case, abstracting away tool selection would be a big help for routers in particular.