So far you've learned how to call an LLM programmatically and how to iterate on your prompt to perform different tasks (text extraction and summarization). Now let's move from basic scripts to features that create genuine value for users so you'll understand Invisible AI techniques - what they are, why users appreciate them, and how to build them with AI SDK + v0.
Let's set aside chatbots for a moment. Some of the most impactful AI features happen when users don't even realize it's there. Smart categorization. Instant summaries. Forms with intelligent assistance. These are the features we're building next.
Invisible AI is thoughtful enhancements that make your app easier to use.
Chatbots get much of the attention (we'll build one later!), but AI's real impact often comes from features users don't explicitly notice.
Invisible AI integrates helpful assistance and automation throughout your app and processes.
These features don't advertise themselves; they just work.
The goal is a seamless experience the user simply appreciates.
When AI is invisible, it raises important ethical considerations about transparency and user agency.
You can think about UX as activation energy. Every form field, every click, every search = friction. It adds up over time sapping users of precious energy and attention.
Invisible AI done well actively reduces that friction. It automates repetitive tasks and makes complex flows feel intuitive. The needs of the user are anticipated without directly asking.
For product developers, this approach offers several benefits: less friction = more sign-ups, better conversion rates, fewer support tickets.
In the last lesson, you used generateText for basic text generation. For most invisible AI features you'll be using generateObject to generate structured data instead. This approach is powerful and allows you to turn prompts into data that your applications can use.
Now let's build this ourselves. Your template already has starter files with imports and sample data ready.
Open app/(2-invisible-ai)/test-structured.ts. Inside the compareOutputs function, replace the first TODO with a generateText example:
typescript
Now replace the second TODO with generateObject:
typescript
Run your script to see the difference:
bash
You'll see:
Now let's create practical examples. Open app/(2-invisible-ai)/invisible-ai-demo.ts. This file has two functions with TODOs for you to implement.
In the smartFormFill function, replace the TODOs:
typescript
Try implementing the smartEmailTriage function on your own! Use a similar pattern with generateObject and a Zod schema for email categorization.
Once you've implemented both scripts, run them to see Invisible AI in action:
bash
You've just implemented two key Invisible AI patterns:
- Text vs Structured Output - You saw how
generateObjectgives you typed, ready-to-use data instead of strings you need to parse- Smart Form Filling - Natural language input automatically populates form fields
- Email Triage (if you did the challenge) - Automatic categorization and prioritization
These patterns are the foundation for countless Invisible AI features!
Invisible AI is everywhere:
These features don't scream "AI" - they just feel like good UX enhancing, but not interrupting, your workflows.
generateObject + Zod schemas for structured data generationReady to build something practical with Invisible AI? You'll start with auto-classification - automatically routing support tickets, content, and user messages into predefined categories. This pattern applies to countless workflows: customer support, content moderation, email triage, feedback analysis. You'll build a system that takes unstructured user text, organizes it into clear categories using Zod schemas for type safety, and significantly improves support workflow efficiency.
Let's put generateObject to work!
Mark this chapter as finished to continue
Mark this chapter as finished to continue