Bird
Raised Fist0
Agentic AIml~10 mins

Customer support agent architecture in Agentic AI - Interactive Code Practice

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

Complete the code to initialize the customer support agent with a knowledge base.

Agentic AI
agent = CustomerSupportAgent(knowledge_base=[1])
Drag options to blanks, or click blank then click option'
AFAQDatabase()
BUserProfile()
CSessionManager()
DChatHistory()
Attempts:
3 left
💡 Hint
Common Mistakes
Using UserProfile instead of FAQDatabase as knowledge base.
Confusing ChatHistory with knowledge base.
2fill in blank
medium

Complete the code to preprocess the user's message before passing it to the agent.

Agentic AI
processed_message = preprocess([1])
Drag options to blanks, or click blank then click option'
Auser_message
Bknowledge_base
Cagent_response
Dagent_state
Attempts:
3 left
💡 Hint
Common Mistakes
Preprocessing the agent's response instead of the user's message.
Passing the knowledge base to preprocess function.
3fill in blank
hard

Fix the error in the code that generates the agent's reply.

Agentic AI
reply = agent.generate_reply([1])
Drag options to blanks, or click blank then click option'
Aknowledge_base
Braw_input
Cagent_state
Dprocessed_message
Attempts:
3 left
💡 Hint
Common Mistakes
Passing raw_input instead of processed_message.
Using knowledge_base or agent_state as input to generate_reply.
4fill in blank
hard

Fill both blanks to update the agent's state and log the conversation.

Agentic AI
agent.update_state([1])
logger.log_conversation([2])
Drag options to blanks, or click blank then click option'
Areply
Buser_message
Cprocessed_message
Dagent_state
Attempts:
3 left
💡 Hint
Common Mistakes
Logging the reply instead of the user's message.
Updating state with the user's message instead of the reply.
5fill in blank
hard

Fill all three blanks to define the main loop of the customer support agent.

Agentic AI
while True:
    [1] = listen_to_user()
    [2] = preprocess([1])
    [3] = agent.generate_reply([2])
    send_to_user([3])
Drag options to blanks, or click blank then click option'
Auser_input
Bprocessed_input
Creply
Dagent_state
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing variable names or skipping preprocessing.
Using agent_state as a variable in the loop incorrectly.