Concepts and Examples
Why We Need Loops
Multi-Step Tasks
When a task requires multiple operations:
- Getting information
- Processing results
- Making decisions
- Taking further actions
Example: "Book me a trip to NYC"
- Search flights
- Check hotel availability
- Compare prices
- Make bookings
- Send confirmations
Dependent Actions
When next steps depend on previous results:
- Get weather → Recommend activities
- Check inventory → Place order
- Verify funds → Make payment
Interactive Problem Solving