0
0
Prompt Engineering / GenAIml~20 mins

ReAct pattern in Prompt Engineering / GenAI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
ReAct Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding the ReAct pattern's main purpose
What is the primary goal of the ReAct pattern in AI systems?
ATo separate reasoning and acting into independent modules
BTo only focus on reactive actions without reasoning
CTo combine reasoning and acting steps for better decision-making
DTo replace human reasoning with random actions
Attempts:
2 left
💡 Hint
Think about how ReAct mixes thinking and doing together.
Predict Output
intermediate
2:00remaining
Output of a simple ReAct loop
Given the following pseudo-code for a ReAct loop, what will be the final output?
Prompt Engineering / GenAI
thoughts = []
actions = []
for step in range(2):
    thoughts.append(f"Think {step}")
    actions.append(f"Act {step}")
output = thoughts + actions
print(output)
A['Act 0', 'Act 1', 'Think 0', 'Think 1']
B['Think 0', 'Think 1', 'Act 0', 'Act 1']
C['Think 0', 'Act 0', 'Think 1', 'Act 1']
D['Think 1', 'Think 0', 'Act 1', 'Act 0']
Attempts:
2 left
💡 Hint
Look at how thoughts and actions are appended and combined.
Model Choice
advanced
2:00remaining
Choosing a model architecture for ReAct
Which model architecture best supports the ReAct pattern by enabling both reasoning and acting in a single framework?
ATransformer-based language model with external tool use
BK-means clustering algorithm
CConvolutional neural network for image classification
DSimple feedforward neural network without memory
Attempts:
2 left
💡 Hint
ReAct needs a model that can generate text and interact with tools.
Hyperparameter
advanced
2:00remaining
Hyperparameter affecting ReAct reasoning depth
Which hyperparameter most directly controls how many reasoning steps the ReAct pattern performs before acting?
AMaximum number of reasoning iterations
BLearning rate of the optimizer
CBatch size during training
DDropout rate in the model
Attempts:
2 left
💡 Hint
Think about what limits the number of times the model thinks before acting.
Metrics
expert
2:00remaining
Evaluating ReAct model performance
Which metric best measures how well a ReAct model balances correct reasoning and effective actions?
APrecision of classification on unrelated dataset
BOnly the loss value during training
CNumber of parameters in the model
DCombined accuracy of reasoning correctness and action success rate
Attempts:
2 left
💡 Hint
Consider a metric that captures both thinking and doing quality.