Bird
0
0

You want to create a structured chat agent that handles a multi-turn conversation with slots for 'location' and 'date'. Which approach correctly extends the schema to support this?

hard📝 Application Q8 of 15
LangChain - Agents
You want to create a structured chat agent that handles a multi-turn conversation with slots for 'location' and 'date'. Which approach correctly extends the schema to support this?
ACreate separate agents for 'location' and 'date' without a combined schema
BUse a single input field 'query' and ignore slots in the schema
CDefine schema with input fields 'location' and 'date', and output field 'response', then update inputs each turn
DOnly define output fields; inputs are not needed for multi-turn
Step-by-Step Solution
Solution:
  1. Step 1: Understand multi-turn conversation needs

    Multi-turn requires tracking multiple input slots like 'location' and 'date' to maintain context.
  2. Step 2: Extend schema accordingly

    Defining input fields for each slot and an output field allows the agent to process and respond properly each turn.
  3. Final Answer:

    Define schema with input fields 'location' and 'date', and output field 'response', then update inputs each turn -> Option C
  4. Quick Check:

    Multi-turn needs schema with all input slots [OK]
Quick Trick: Include all slots as input fields in schema for multi-turn [OK]
Common Mistakes:
MISTAKES
  • Ignoring slots in schema for multi-turn
  • Splitting slots into separate agents unnecessarily
  • Not defining input fields for multi-turn context

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LangChain Quizzes