gpt-4o-2024-08-06· OpenAI
WildChat-4.8M (AI2)
Please generate a unique programming task in JSON format with the following structure: {…
- User
Please generate a unique programming task in JSON format with the following structure: { "Title": "Task Name", "Task Description": "Description of the task.", "Function Signature": "def function_name(parameters) -> return_type:", "Solve": "", "Input": "Description of the input parameters.", "Output": "Description of the expected output.", "Examples": [ { "input": "Example input here", "output": "Expected output here" }, { "input": "Another example input here", "output": "Another expected output here" } ] } Ensure that:
- The task includes complex sorting algorithms.
- The task must avoid the following titles: .
- The task should be unique and complex.
- The "Solve" section should remain empty.
- Assistant
{ "Title": "Custom Multi-Key Sorter", "Task Description": "Create a function that takes a list of dictionaries and sorts it based on multiple keys. Each dictionary contains a 'name', 'age', and 'score'. The sorting order should be first by 'score' descending, then by 'age' ascending, and finally by 'name' alphabetically.", "Function Signature": "def multi_key_sort(data: List[Dict[str, Any]]) -> List[Dict[str, Any]]:", "Solve": "", "Input": "A list of dictionaries where each dictionary contains 'name' (string), 'age' (integer), and 'score' (integer).", "Output": "The list of dictionaries sorted based on specified key order: descending by 'score', ascending by 'age', and alphabetically by 'name'.", "Examples": [ { "input": "[{'name': 'Alice', 'age': 30, 'score': 90}, {'name': 'Bob', 'age': 25, 'score': 95}, {'name': 'Charlie', 'age': 30, 'score': 90}]", "output": "[{'name': 'Bob', 'age': 25, 'score': 95}, {'name': 'Alice', 'age': 30, 'score': 90}, {'name': 'Charlie', 'age': 30, 'score': 90}]" }, { "input": "[{'name': 'Dan', 'age': 22, 'score': 88}, {'name': 'Eva', 'age': 23, 'score': 88}, {'name': 'Fay', 'age': 21, 'score': 88}]", "output": "[{'name': 'Fay', 'age': 21, 'score': 88}, {'name': 'Dan', 'age': 22, 'score': 88}, {'name': 'Eva', 'age': 23, 'score': 88}]" } ] }
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.