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 nested structures.
- The task must avoid the following titles: .
- The task should be unique and complex.
- The "Solve" section should remain empty.
- Assistant
{ "Title": "Deep Matrix Transformation", "Task Description": "Write a function to transform a nested dictionary structure representing a grid of matrices. Each matrix can contain integers or other matrices. The transformation should sum all integers in the deepest matrices, replacing matrices with their calculated sum. The eventual transformation should flatten the structure into a dictionary that maps grid coordinates to their summed values.", "Function Signature": "def transform_matrices(grid: dict) -> dict:", "Solve": "", "Input": "A nested dictionary with keys representing grid coordinates in string format 'x_y' and values as lists of lists of integers or nested lists, representing matrices.", "Output": "A dictionary where keys are the same grid coordinates and values are the sums of integers from the deepest matrices.", "Examples": [ { "input": "{'0_0': [[1, 2], [3, 4]], '0_1': [[[5, 5], [5, 5]], [[10]]] }", "output": "{'0_0': 10, '0_1': 40}" }, { "input": "{'1_0': [[[[6]]]], '1_1': [[1, 1, 1], [1]]}", "output": "{'1_0': 6, '1_1': 4}" } ] }
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.