Function Call parameter correlation bias (or param leakage)

Hi There, I am developing a sort of agent tool using VertexAI-Gemini Function/Tool Calling. Have tried all sorts of Gemini Models (and versions), prompting, tool descriptions, temperatutes, and so on… But when I have a Tool where one param is correlated to another (eg. State and State Capital) ends up I still need both params to be explicitly passed during runtime by the user… But… model keeps “guessing” state by its Capital, my desired behavior is not to fullsill state unless realy mentioned. Also tried “required” combinations to find a way around but it seems it really is contaminated by the other param… Any folks give a clue?

1 Like

Welcome to the forum. I think you’re fighting a losing battle. The model is right, there is a bijective relationship between state and capital, so one of those two parameters is redundant. Is there really no way to relax the requirement that both pieces of information need to have been provided by the user?

If really two information items are needed, a potential workaround is to encode the one piece of information in a non-obvious way when giving it to the model. Then, the model will return that piece of information to your application in the functionCall and, voilà, you can reverse-encode it.

Hope that helps.

1 Like

Thanks for reply. Yes I agree the bijective sense, but in real usecases some times its “broken”. Like 2 states with identical capital names (weird but happens around). I kind of tried the encoding idea, but the way I got better results was generating 2 tools: Tool1 has the state parameter required and only this one (so the tool gets picked when only state is informed); Tool2 has both parameters optional. Basically, I kind of “squeezed” a bit more the model choices and I noticed in a few experiments if a supply state capital and not a state its not creating a random state and I can handle it better like that in my case. Thanks a lot and yes its a losing battle.

1 Like