Scenario-based prompting asks an AI system to account for explicitly described usage situations, conditions, or workflows. It turns vague requests into concrete requirements. section 9.6.1
Shopping-cart API
Design a REST API for a shopping cart that handles these scenarios: a guest user adds items; a user logs in and merges the cart; checkout proceeds with a failed payment. section 9.6.1
Strengthen a scenario-based prompt by naming:
- The concrete workflows the system must support. section 9.6.1
- The audience, technical level, constraints, or evaluation criteria when they affect the result. section 9.6.1
<requirements>...</requirements> <implementation>...</implementation> <tests>...</tests>
Organize a request into requirements, implementation, and tests so scenarios remain connected to delivery and verification. section 9.6.1
