fix: llama4 tool use prompt fix

This commit is contained in:
Eric Huang 2025-05-05 12:15:58 -07:00
parent 4597145011
commit 54da74a6b0
4 changed files with 9 additions and 203 deletions

View file

@ -98,7 +98,7 @@
}
}
},
"multi_turn_tool_calling_01": {
"text_then_tool": {
"data": {
"messages": [
[
@ -150,7 +150,7 @@
]
}
},
"multi_turn_tool_calling_02": {
"tool_then_answer": {
"data": {
"messages": [
[
@ -192,7 +192,7 @@
]
}
},
"multi_turn_tool_calling_03": {
"array_parameter": {
"data": {
"messages": [
[
@ -252,183 +252,6 @@
]
}
},
"multi_turn_tool_calling_04": {
"data": {
"messages": [
[
{
"role": "system",
"content": "Todays date is 2025-03-01."
},
{
"role": "user",
"content": "Do i have any meetings on March 3rd at 10 am ?"
}
],
[
{
"role": "user",
"content": "Alright then, Create an event named 'Team Building', scheduled for that time same time, in the 'Main Conference Room' and add Alice, Bob, Charlie to it. Give me the created event id."
}
]
],
"tools": [
{
"tool_name": "create_event",
"description": "Create a new event",
"parameters": {
"name": {
"param_type": "string",
"description": "Name of the event"
},
"date": {
"param_type": "string",
"description": "Date of the event in ISO format"
},
"time": {
"param_type": "string",
"description": "Event Time (HH:MM)"
},
"location": {
"param_type": "string",
"description": "Location of the event"
},
"participants": {
"param_type": "list[str]",
"description": "List of participant names"
}
}
},
{
"tool_name": "get_event",
"description": "Get an event by date and time",
"parameters": {
"date": {
"param_type": "string",
"description": "Date of the event in ISO format"
},
"time": {
"param_type": "string",
"description": "Event Time (HH:MM)"
}
}
}
],
"tool_responses": [
{
"response": "{'response': 'No events found for 2025-03-03 at 10:00'}"
},
{
"response": "{'response': 'Successfully created new event with id: e_123'}"
}
],
"expected": [
{
"num_tool_calls": 1,
"tool_name": "get_event",
"tool_arguments": {
"date": "2025-03-03",
"time": "10:00"
}
},
{
"num_tool_calls": 0,
"answer": "no"
},
{
"num_tool_calls": 1,
"tool_name": "create_event",
"tool_arguments": {
"name": "Team Building",
"date": "2025-03-03",
"time": "10:00",
"location": "Main Conference Room",
"participants": [
"Alice",
"Bob",
"Charlie"
]
}
},
{
"num_tool_calls": 0,
"answer": "e_123"
}
]
}
},
"multi_turn_tool_calling_05": {
"data": {
"messages": [
[
{
"role": "system",
"content": "Todays date is 2025-03-01."
},
{
"role": "user",
"content": "what was my monthly expense in Jan of this year?"
}
],
[
{
"role": "user",
"content": "Was it less than Feb of last year? Only answer with yes or no."
}
]
],
"tools": [
{
"tool_name": "getMonthlyExpenseSummary",
"description": "Get monthly expense summary",
"parameters": {
"month": {
"param_type": "int",
"description": "Month of the year (1-12)"
},
"year": {
"param_type": "int",
"description": "Year"
}
}
}
],
"tool_responses": [
{
"response": "{'response': 'Total expenses for January 2025: $1000'}"
},
{
"response": "{'response': 'Total expenses for February 2024: $2000'}"
}
],
"expected": [
{
"num_tool_calls": 1,
"tool_name": "getMonthlyExpenseSummary",
"tool_arguments": {
"month": 1,
"year": 2025
}
},
{
"num_tool_calls": 0,
"answer": "1000"
},
{
"num_tool_calls": 1,
"tool_name": "getMonthlyExpenseSummary",
"tool_arguments": {
"month": 2,
"year": 2024
}
},
{
"num_tool_calls": 0,
"answer": "yes"
}
]
}
},
"sample_messages_tool_calling": {
"data": {
"messages": [