Let AI agents ask multiple-choice clarification questions mid-task using the Vercel AI SDK and generateObject. When the agent encounters ambiguity, it presents structured options to the user instead of guessing — resulting in more accurate outputs and a better user experience.
- Disambiguation when user request can be interpreted multiple ways
- Style preference selection before generating creative content
- Scope confirmation before running expensive agent operations
- Survey and quiz flows powered by AI-generated dynamic questions
Tech stack
Vercel AI SDKNext.jsTypeScriptZodgenerateObject
npx shadcn@latest add https://shadcnagents.com/r/ai-human-in-the-loop-inquire-multiple-choice