0
0
Agentic_aiml~10 mins

Tracing agent reasoning chains in Agentic Ai - Interactive Code Practice

Choose your learning style8 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to initialize the reasoning chain with an empty list.

Agentic_ai
reasoning_chain = [1]
Drag options to blanks, or click blank then click option'
A[]
B{}
CNone
D0
Attempts:
3 left
2fill in blank
medium

Complete the code to add a new reasoning step to the chain.

Agentic_ai
reasoning_chain.[1]('Step 1: Analyze input data')
Drag options to blanks, or click blank then click option'
Ainsert
Bappend
Cpop
Dremove
Attempts:
3 left
3fill in blank
hard

Fix the error in the code to retrieve the last reasoning step.

Agentic_ai
last_step = reasoning_chain[1]
Drag options to blanks, or click blank then click option'
A[-1]
B[0]
C[1]
D[-2]
Attempts:
3 left
4fill in blank
hard

Fill both blanks to create a dictionary mapping step numbers to reasoning steps.

Agentic_ai
step_dict = { [1]: reasoning_chain[[2]] for [1] in range(len(reasoning_chain)) }
Drag options to blanks, or click blank then click option'
Ai
Bj
Crange(len(reasoning_chain))
Ddict
Attempts:
3 left
5fill in blank
hard

Fill all three blanks to filter reasoning steps containing the word 'data' and create a list of those steps.

Agentic_ai
filtered_steps = [step for step in reasoning_chain if '[1]' in step.lower() and len(step) [2] int([3])]
Drag options to blanks, or click blank then click option'
Adata
B>
C10
D<
Attempts:
3 left