Bạn là một mô hình thẩm phán (judge) trong một hệ thống chấm điểm khả năng gọi hàm…
- User
Bạn là một mô hình thẩm phán (judge) trong một hệ thống chấm điểm khả năng gọi hàm (function calling) của một mô hình nhỏ hơn. Bạn sẽ nhận một câu hỏi người dùng, một danh sách các hàm có sẵn, và đầu ra của mô hình. Nhiệm vụ của bạn là đánh giá liệu mô hình nhỏ hơn có thể tạo ra các lời gọi hàm chính xác không, đồng thời cung cấp một điểm số dựa trên tính chính xác và đầy đủ của câu trả lời.
Câu hỏi người dùng: Find a healthy lunch recipe under 500 calories that uses chicken and mushrooms.
Danh sách các hàm có sẵn: [{"name": "restaurant_search", "description": "Searches for restaurants based on a list of preferred ingredients and maximum calorie count.", "parameters": {"type": "object", "properties": {"ingredients": {"type": "array", "items": {"type": "string"}, "description": "A list of ingredients you prefer in the restaurant's dishes."}, "calories": {"type": "integer", "description": "The maximum calorie count you prefer for the restaurant's dishes."}, "meal": {"type": "string", "description": "Type of the meal for the restaurant's dishes, it's optional and could be breakfast, lunch or dinner. Default 'lunch'"}}, "required": ["ingredients", "calories"]}}, {"name": "ingredient_replace", "description": "Replaces an ingredient in a recipe with a substitute, keeping the calories below a certain number.", "parameters": {"type": "object", "properties": {"original_ingredient": {"type": "string", "description": "The ingredient in the recipe to replace."}, "replacement_ingredient": {"type": "string", "description": "The substitute ingredient to replace the original one."}, "calories": {"type": "integer", "description": "The maximum number of calories for the recipe after replacement."}}, "required": ["original_ingredient", "replacement_ingredient", "calories"]}}, {"name": "recipe_search", "description": "Searches for recipes based on a list of ingredients and a maximum caloric value.", "parameters": {"type": "object", "properties": {"ingredients": {"type": "array", "items": {"type": "string"}, "description": "A list of ingredients you want to use in the recipe."}, "calories": {"type": "integer", "description": "The maximum number of calories for the recipe."}, "meal": {"type": "string", "description": "Type of the meal for the recipe, it's optional and could be breakfast, lunch or dinner. Default 'lunch'"}}, "required": ["ingredients", "calories"]}}]
Đầu ra của mô hình nhỏ hơn:
[{'name': 'recipe_search', 'arguments': {'ingredients': ['chicken', 'mushrooms'], 'calories': 500, 'meal': 'lunch'}}]Đánh giá đầu ra dựa trên các tiêu chí sau:
- Chính xác (0-10 điểm)
- Thứ tự gọi hàm (0-10 điểm)
Lưu ý: Nếu không có hàm nào phù hợp, mô hình có thể từ chối gọi hàm và vẫn được tính điểm chính xác.
Chỉ trả về JSON theo định dạng: { "correct": <điểm chính xác>, "function_order": <điểm thứ tự>, "total_score": <tổng điểm> }
- Assistant
{ "correct": 10, "function_order": 10, "total_score": 20 }