I have recently started to use function calling via Assistant API’s tools.
Haven’t found in the docs any recommendation regarding proper instructions for the model when and which function to call.
For example,
if I update/create my assistant passing the tool param:
client.beta.assistants.update(
assistant_id=agent_id,
instructions=instructions,
name=name,
tools=tools
)
where the tool is some function:
FUNC_TOOL_REPLY_TYPE = {
"type": "function",
"function": {
"name": "rec_reply_type",
"description": "Records the type of the user reply to the assistant question in terms of relevancy: 'relevant', 'off topic', 'question to clarify'",
"parameters": {
"type": "object",
"properties": {
"reply_type": {
"type": "string",
"description": "one of the replies"
},
},
"required": ["reply_type"]
}
}
}
Do I actually need to mention this name “rec_reply_type” and the maybe even the logic of the description in the assistant instruction?
i.e. “”" When the user replies to your question, you need to call the function ‘rec_reply_type’ with the type of the user reply: ‘relevant’, ‘off topic’, ‘question to clarify’.“”"
or the tool data structure should be enough for the model to use the tool in the right moment calling the right function?