0
0
Agentic_aiml~20 mins

Async agent execution in Agentic Ai - Practice Problems & Coding Challenges

Choose your learning style8 modes available
Challenge - 5 Problems
🎖️
Async Agent Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 conceptual
intermediate
2:00remaining
Understanding Async Agent Execution Basics

Which statement best describes the main advantage of using asynchronous execution in AI agents?

AIt allows the agent to perform multiple tasks at the same time without waiting for each to finish.
BIt guarantees that tasks are executed in a strict order, one after another.
CIt reduces the agent's memory usage by storing fewer task details.
DIt makes the agent run slower but more accurately.
Attempts:
2 left
💻 code output
intermediate
2:00remaining
Output of Async Agent Task Scheduling

What will be the output of the following async agent code snippet?

Agentic_ai
import asyncio

async def task(name, delay):
    await asyncio.sleep(delay)
    return f'Task {name} done'

async def main():
    results = await asyncio.gather(
        task('A', 1),
        task('B', 0.5),
        task('C', 0.2)
    )
    print(results)

asyncio.run(main())
A['Task A done', 'Task C done', 'Task B done']
B['Task C done', 'Task B done', 'Task A done']
C['Task A done', 'Task B done', 'Task C done']
D['Task B done', 'Task A done', 'Task C done']
Attempts:
2 left
model choice
advanced
2:00remaining
Choosing the Best Model for Async Agent Execution

Which model architecture is best suited for an AI agent that requires efficient asynchronous task handling and context switching?

ARecurrent Neural Network (RNN) with sequential processing
BTransformer model with self-attention mechanisms
CFeedforward Neural Network with fixed input size
DConvolutional Neural Network (CNN) for image tasks
Attempts:
2 left
hyperparameter
advanced
2:00remaining
Hyperparameter Impact on Async Agent Performance

Which hyperparameter adjustment is most likely to improve an async agent's responsiveness when handling many simultaneous tasks?

AIncreasing the number of parallel worker threads
BReducing the learning rate drastically
CDecreasing the number of training epochs
DIncreasing batch size during training
Attempts:
2 left
🔧 debug
expert
3:00remaining
Debugging Async Agent Deadlock

Given this async agent code, what is the cause of the deadlock preventing task completion?

Agentic_ai
import asyncio

async def task1():
    await task2()
    return 'Task1 done'

async def task2():
    await task1()
    return 'Task2 done'

async def main():
    result = await asyncio.gather(task1(), task2())
    print(result)

asyncio.run(main())
AThe tasks return strings instead of coroutine objects.
BThe tasks are missing await keywords causing syntax errors.
CThe asyncio.gather call is missing a timeout parameter.
DThe tasks call each other recursively causing infinite waiting.
Attempts:
2 left