Which of the following best describes the purpose of task decomposition in agentic AI systems?
Think about how big problems are easier to solve when split into smaller parts.
Task decomposition helps by breaking down complex problems into smaller subtasks, making it easier for AI agents to solve each part efficiently.
You have a task that requires completing steps in a strict order. Which decomposition strategy suits this best?
Consider the importance of order and dependencies between subtasks.
Hierarchical decomposition organizes subtasks in a sequence respecting dependencies, ideal for ordered tasks.
What is the output of the following Python function that decomposes a task recursively?
def decompose(task, depth=0): if depth == 2: return [task] else: return [task + '_sub1'] + decompose(task + '_sub2', depth + 1) result = decompose('task') print(result)
Trace the recursive calls and note when the base case stops recursion.
The function adds '_sub1' at each level and recurses with '_sub2' until depth 2, producing three items.
You measure the time taken to complete a task with and without decomposition. Which metric best shows improvement due to decomposition?
Think about how breaking tasks affects time efficiency.
Decomposition is efficient if subtasks take less time on average than the whole task, showing better manageability.
Given the following pseudocode for decomposing tasks, which line causes a logical error that prevents proper subtask creation?
1: function decompose(task): 2: subtasks = [] 3: if task is simple: 4: return [task] 5: for sub in task.subtasks: 6: subtasks.append(decompose(task)) 7: return subtasks
Look carefully at what is passed to the recursive call inside the loop.
Line 6 calls decompose(task) repeatedly instead of decompose(sub), causing infinite recursion or wrong results.