Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to initialize the content creation agent with a prompt.
Agentic AI
agent = ContentCreationAgent(prompt=[1]) Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a number instead of a string for the prompt.
Leaving the prompt as None or True.
✗ Incorrect
The prompt must be a string describing the content to create, like "Write a blog post about AI".
2fill in blank
mediumComplete the code to run the agent and get the generated content.
Agentic AI
result = agent.[1]() Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using train() instead of run().
Trying to save or load before running.
✗ Incorrect
The run() method executes the agent to produce the content.
3fill in blank
hardFix the error in the code to set the agent's content type correctly.
Agentic AI
agent.content_type = [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using undefined variables like text without quotes.
Using enums or attributes not defined in the context.
✗ Incorrect
The content_type should be set as a string, e.g., "text".
4fill in blank
hardFill both blanks to create a dictionary with content and metadata keys.
Agentic AI
output = {"content": [1], "metadata": [2] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using agent instead of result for content.
Using None instead of an empty dictionary for metadata.
✗ Incorrect
The content is the result variable, and metadata is an empty dictionary {}.
5fill in blank
hardFill all three blanks to define a function that runs the agent and returns output.
Agentic AI
def create_content(): [1] = ContentCreationAgent(prompt="Generate summary") [2] = agent.[3]() return [2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong variable names like content instead of result.
Calling a method other than run().
✗ Incorrect
We create an agent, run it to get result, and return the result.
