Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to initialize the agent's model with a transformer architecture.
Agentic_ai
agent_model = TransformerModel([1]=512, num_layers=6)
Drag options to blanks, or click blank then click option'
Attempts:
3 left
2fill in blank
mediumComplete the code to tokenize input text before feeding it to the agent.
Agentic_ai
tokens = tokenizer.[1](input_text) Drag options to blanks, or click blank then click option'
Attempts:
3 left
3fill in blank
hardFix the error in the code to correctly generate code output from the agent.
Agentic_ai
generated_code = agent.[1](input_tokens) Drag options to blanks, or click blank then click option'
Attempts:
3 left
4fill in blank
hardFill both blanks to create a dictionary comprehension that maps function names to their code strings if the code length is less than 50.
Agentic_ai
code_map = {func_name: [1] for func_name, [2] in functions.items() if len(code) < 50} Drag options to blanks, or click blank then click option'
Attempts:
3 left
5fill in blank
hardFill all three blanks to filter and map functions with names starting with 'gen' and code length over 30.
Agentic_ai
filtered_funcs = { [1]: [2] for [3], code in all_functions.items() if [3].startswith('gen') and len(code) > 30 } Drag options to blanks, or click blank then click option'
Attempts:
3 left
