MeetKai / functionary

Chat language model that can use tools and interpret the results
MIT License
1.37k stars 107 forks source link

Duplicated function information in prompt #267

Closed tanliboy closed 2 weeks ago

tanliboy commented 2 weeks ago

I am exploring the functionary model for function calling tasks that includes long function descriptions. I found that the models functionary-small-v3.1 repeats the function information provided in the tools section within its prompt generated from the chat template.

Is this duplication of functional information intentional to improve accuracy?

tanliboy commented 2 weeks ago

Never mind. I found the duplicated description is intentionally per the targeted format below

Use the function 'get_current_weather' to 'Get the current weather'
{"name": "get_current_weather", "description": "Get the current weather", "parameters": {"type": "object", "properties": {"location": {"type": "string", "description": "The city and state, e.g. San Francisco, CA"}},"required": ["location"]}}